diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index cba1054..3703df9 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -7,12 +7,10 @@ type: Bug --- - + - -* [ ] This is an actual bug, not just a setup issue (see the [troubleshooting docs](https://docs.mau.fi/bridges/general/troubleshooting.html) or ask in the Matrix room for setup help). -* [ ] I am certain that sufficient information is included. Ask in the Matrix room first if not. -* [ ] The bug is still present on the main branch. The `!signal version` command output is: `` +It's always best to ask in the Matrix room first, especially if you aren't sure +what details are needed. Issues with insufficient detail will likely just be +ignored or closed immediately. +--> diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 8b988db..ebd9186 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -11,14 +11,14 @@ jobs: strategy: fail-fast: false matrix: - go-version: ["1.26", "1.27"] - name: Lint ${{ matrix.go-version == '1.27' && '(latest)' || '(old)' }} + go-version: ["1.25", "1.26"] + name: Lint ${{ matrix.go-version == '1.26' && '(latest)' || '(old)' }} steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v6 - name: Set up Go - uses: actions/setup-go@v7 + uses: actions/setup-go@v6 with: go-version: ${{ matrix.go-version }} cache: true @@ -40,14 +40,14 @@ jobs: strategy: fail-fast: false matrix: - go-version: ["1.26", "1.27"] - name: Test ${{ matrix.go-version == '1.27' && '(latest)' || '(old)' }} + go-version: ["1.25", "1.26"] + name: Test ${{ matrix.go-version == '1.26' && '(latest)' || '(old)' }} steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@v6 - name: Set up Go - uses: actions/setup-go@v7 + uses: actions/setup-go@v6 with: go-version: ${{ matrix.go-version }} cache: true diff --git a/CHANGELOG.md b/CHANGELOG.md index a0d718c..d992cab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,46 +1,3 @@ -# v26.09 - -* Bumped minimum Go version to 1.26. -* Updated libsignal to v1.102.2. -* Fixed handling messages with invalid values in formatting body ranges. -* Fixed websocket request retrying not working correctly if the first attempt - times out. -* Fixed another potential race condition with edited message bridging. - -# v26.08 - -* Updated libsignal to v0.100.0 -* Added support for handling own profile key changes. -* Changed attachment bridging behavior to match Signal Desktop. -* Fixed edited messages being bridged twice if certain race conditions occurred. - -# v26.07 - -* Updated Docker image to Alpine 3.24. -* Updated libsignal to v0.97.2. -* Added automatic retry when sender key send fails due to missing session. -* Fixed changing poll votes from Matrix. - -# v26.06 - -* Updated libsignal to v0.94.4. -* Updated mrenclave to fix looking up phone numbers. -* Changed knock accept handling to auto-join the ghost user afterwards. - -# v26.05 - -* Updated libsignal to v0.93.2. -* Added support for importing sticker packs from Signal. - -# v26.04 - -* Updated libsignal to v0.92.1. -* Added support for admin message deletes from Signal. -* Added support for binary service IDs in storage service. -* Fixed `private_chat_portal_meta` option not setting DM room names correctly. -* Fixed panic if user is logged out during initial chat sync. -* Fixed avatar upload failing when creating new Signal group. - # v26.03 * Switched to sending binary service ID fields in outgoing messages. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 764f753..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -See diff --git a/Dockerfile b/Dockerfile index ba0a602..63e7542 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # -- Build libsignal (with Rust) -- FROM rust:1-alpine AS rust-builder -RUN apk add --no-cache git make cmake protoc musl-dev g++ clang-dev protobuf-dev +RUN apk add --no-cache git make cmake protoc musl-dev g++ clang-dev WORKDIR /build # Copy all files needed for Rust build, and no Go files @@ -10,7 +10,7 @@ COPY build-rust.sh . RUN ./build-rust.sh # -- Build mautrix-signal (with Go) -- -FROM golang:1-alpine3.24 AS go-builder +FROM golang:1-alpine3.23 AS go-builder RUN apk add --no-cache git ca-certificates build-base olm-dev zlib-dev WORKDIR /build @@ -32,7 +32,7 @@ EOF RUN ./build-go.sh # -- Run mautrix-signal -- -FROM alpine:3.24 +FROM alpine:3.23 ENV UID=1337 \ GID=1337 diff --git a/Dockerfile.ci b/Dockerfile.ci index 85dbfb2..ea2699f 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -1,6 +1,6 @@ ARG DOCKER_HUB="docker.io" -FROM ${DOCKER_HUB}/alpine:3.24 +FROM ${DOCKER_HUB}/alpine:3.23 ENV UID=1337 \ GID=1337 diff --git a/cmd/mautrix-signal/main.go b/cmd/mautrix-signal/main.go index 703d779..cc1ec10 100644 --- a/cmd/mautrix-signal/main.go +++ b/cmd/mautrix-signal/main.go @@ -37,7 +37,7 @@ var m = mxmain.BridgeMain{ Name: "mautrix-signal", URL: "https://github.com/mautrix/signal", Description: "A Matrix-Signal puppeting bridge.", - Version: "26.09", + Version: "26.03", SemCalVer: true, Connector: &connector.SignalConnector{}, diff --git a/go.mod b/go.mod index 93eb572..b0be4f5 100644 --- a/go.mod +++ b/go.mod @@ -1,51 +1,51 @@ module go.mau.fi/mautrix-signal -go 1.26.0 +go 1.25.0 -toolchain go1.27.1 +toolchain go1.26.1 tool go.mau.fi/util/cmd/maubuild require ( - github.com/coder/websocket v1.8.15 + github.com/coder/websocket v1.8.14 github.com/emersion/go-vcard v0.0.0-20241024213814-c9703dde27ff github.com/google/uuid v1.6.0 github.com/mattn/go-pointer v0.0.1 - github.com/rs/zerolog v1.35.1 - github.com/stretchr/testify v1.12.0 - github.com/tidwall/gjson v1.19.0 - go.mau.fi/util v0.10.1 - golang.org/x/crypto v0.57.0 - golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba - golang.org/x/net v0.59.0 - golang.org/x/sync v0.23.0 - google.golang.org/grpc v1.83.2 - google.golang.org/protobuf v1.36.12 + github.com/rs/zerolog v1.34.0 + github.com/stretchr/testify v1.11.1 + github.com/tidwall/gjson v1.18.0 + go.mau.fi/util v0.9.7 + golang.org/x/crypto v0.49.0 + golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90 + golang.org/x/net v0.52.0 + google.golang.org/protobuf v1.36.11 gopkg.in/yaml.v3 v3.0.1 - maunium.net/go/mautrix v0.31.0 + maunium.net/go/mautrix v0.26.4 ) require ( filippo.io/edwards25519 v1.2.0 // indirect - github.com/coreos/go-systemd/v22 v22.7.0 // indirect + github.com/coreos/go-systemd/v22 v22.6.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/kr/pretty v0.3.1 // indirect - github.com/lib/pq v1.12.3 // indirect + github.com/lib/pq v1.11.2 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-sqlite3 v1.14.52 // indirect - github.com/petermattis/goid v0.0.0-20260820044319-269ab09b5261 // indirect + github.com/mattn/go-sqlite3 v1.14.34 // indirect + github.com/petermattis/goid v0.0.0-20260226131333-17d1149c6ac6 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/rs/xid v1.6.0 // indirect github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/tidwall/sjson v1.2.5 // indirect - github.com/yuin/goldmark v1.8.6 // indirect + github.com/yuin/goldmark v1.7.16 // indirect go.mau.fi/zeroconfig v0.2.0 // indirect - golang.org/x/mod v0.41.0 // indirect - golang.org/x/sys v0.48.0 // indirect - golang.org/x/text v0.42.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect + golang.org/x/mod v0.34.0 // indirect + golang.org/x/sync v0.20.0 // indirect + golang.org/x/sys v0.42.0 // indirect + golang.org/x/text v0.35.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect maunium.net/go/mauflag v1.0.0 // indirect diff --git a/go.sum b/go.sum index 606a4ad..ec06d77 100644 --- a/go.sum +++ b/go.sum @@ -2,21 +2,17 @@ filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo= filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc= github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= -github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= -github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/coder/websocket v1.8.15 h1:6B2JPeOGlpff2Uz6vOEH1Vzpi0iUz20A+lPVhPHtNUA= -github.com/coder/websocket v1.8.15/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg= -github.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA= -github.com/coreos/go-systemd/v22 v22.7.0/go.mod h1:xNUYtjHu2EDXbsxz1i41wouACIwT7Ybq9o0BQhMwD0w= +github.com/coder/websocket v1.8.14 h1:9L0p0iKiNOibykf283eHkKUHHrpG7f65OE3BhhO7v9g= +github.com/coder/websocket v1.8.14/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.6.0 h1:aGVa/v8B7hpb0TKl0MWoAavPDmHvobFe5R5zn0bCJWo= +github.com/coreos/go-systemd/v22 v22.6.0/go.mod h1:iG+pp635Fo7ZmV/j14KUcmEyWF+0X7Lua8rrTWzYgWU= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/emersion/go-vcard v0.0.0-20241024213814-c9703dde27ff h1:4N8wnS3f1hNHSmFD5zgFkWCyA4L1kCDkImPAtK7D6tg= github.com/emersion/go-vcard v0.0.0-20241024213814-c9703dde27ff/go.mod h1:HMJKR5wlh/ziNp+sHEDV2ltblO4JD2+IdDOWtGcQBTM= -github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= -github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -28,33 +24,39 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/lib/pq v1.12.3 h1:tTWxr2YLKwIvK90ZXEw8GP7UFHtcbTtty8zsI+YjrfQ= -github.com/lib/pq v1.12.3/go.mod h1:/p+8NSbOcwzAEI7wiMXFlgydTwcgTr3OSKMsD2BitpA= +github.com/lib/pq v1.11.2 h1:x6gxUeu39V0BHZiugWe8LXZYZ+Utk7hSJGThs8sdzfs= +github.com/lib/pq v1.11.2/go.mod h1:/p+8NSbOcwzAEI7wiMXFlgydTwcgTr3OSKMsD2BitpA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0= github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc= -github.com/mattn/go-sqlite3 v1.14.52 h1:wVbm2Qnf4OXkqhBTSPuCRZDRnxfbVrrmiCEroVdog8U= -github.com/mattn/go-sqlite3 v1.14.52/go.mod h1:6JTjA44L93a0QCyJef5YvlPoKXntQPjzWv5gtm9sB6w= -github.com/petermattis/goid v0.0.0-20260820044319-269ab09b5261 h1:lcWAnrqr2nNfDiArwFNHCE4787Mw2tCdVSOXCru0/0E= -github.com/petermattis/goid v0.0.0-20260820044319-269ab09b5261/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/mattn/go-sqlite3 v1.14.34 h1:3NtcvcUnFBPsuRcno8pUtupspG/GM+9nZ88zgJcp6Zk= +github.com/mattn/go-sqlite3 v1.14.34/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= +github.com/petermattis/goid v0.0.0-20260226131333-17d1149c6ac6 h1:rh2lKw/P/EqHa724vYH2+VVQ1YnW4u6EOXl0PMAovZE= +github.com/petermattis/goid v0.0.0-20260226131333-17d1149c6ac6/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU= github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= -github.com/rs/zerolog v1.35.1 h1:m7xQeoiLIiV0BCEY4Hs+j2NG4Gp2o2KPKmhnnLiazKI= -github.com/rs/zerolog v1.35.1/go.mod h1:EjML9kdfa/RMA7h/6z6pYmq1ykOuA8/mjWaEvGI+jcw= +github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY= +github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M= -github.com/stretchr/testify v1.12.0 h1:K6Mr6jO9JICuend/5xzTM03ydSV3vdNRYAdPSukj8uI= -github.com/stretchr/testify v1.12.0/go.mod h1:bOYBZb5qJ00vPzWfIqBUZPaxK8jWiXc6d3ErP4Ca9Gw= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/gjson v1.19.0 h1:xwxm7n691Uf3u5OFjzngavjGTh55KX5q/9w9xHW88JU= -github.com/tidwall/gjson v1.19.0/go.mod h1:V37/opeE/JbLUOfH0QTXiNez2l0RUjYUhpT4szFQAfc= +github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM= github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= @@ -63,47 +65,31 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= -github.com/yuin/goldmark v1.8.6 h1:d0VcaP1sx9GkFVkoW+KtggpGi2KZ965i14b0+bDQST4= -github.com/yuin/goldmark v1.8.6/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= -go.mau.fi/util v0.10.1 h1:1oSqb4TwzLA0cUDY0aomyBPFKkZ3J5fqCmrXV3VH3GQ= -go.mau.fi/util v0.10.1/go.mod h1:40TDo7/ekSeOjgr8KAmX31Yf4zrOF94j83WQB+u5ZPc= +github.com/yuin/goldmark v1.7.16 h1:n+CJdUxaFMiDUNnWC3dMWCIQJSkxH4uz3ZwQBkAlVNE= +github.com/yuin/goldmark v1.7.16/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= +go.mau.fi/util v0.9.7 h1:AWGNbJfz1zRcQOKeOEYhKUG2fT+/26Gy6kyqcH8tnBg= +go.mau.fi/util v0.9.7/go.mod h1:5T2f3ZWZFAGgmFwg3dGw7YK6kIsb9lryDzvynoR98pE= go.mau.fi/zeroconfig v0.2.0 h1:e/OGEERqVRRKlgaro7E6bh8xXiKFSXB3eNNIud7FUjU= go.mau.fi/zeroconfig v0.2.0/go.mod h1:J0Vn0prHNOm493oZoQ84kq83ZaNCYZnq+noI1b1eN8w= -go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= -go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/otel v1.44.0 h1:JjwHmHpA4iZ3wBxluu2fbbE7j4kqlE8jXyAyPXH7HqU= -go.opentelemetry.io/otel v1.44.0/go.mod h1:BMgjTHL9WPRlRjL2oZCBTL4whCGtXch2H4BhOPIAyYc= -go.opentelemetry.io/otel/metric v1.44.0 h1:1w0gILTcHdr3YI+ixLyjemwrVnsMURbTZFrSYCdDdmc= -go.opentelemetry.io/otel/metric v1.44.0/go.mod h1:8O7hanEPBNgEMmybD3s2VBKcgWOCsA6tzHBPODAiquo= -go.opentelemetry.io/otel/sdk v1.44.0 h1:nHYwb9lK+fJPU/dnT6s7W7Z8itMWyqrnVfbheVYrZ58= -go.opentelemetry.io/otel/sdk v1.44.0/go.mod h1:Osuydd3Se74nqjAKxid74N5eC+jfEqfTegHRnq58oK0= -go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRks6si09iEfI= -go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA= -go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk= -go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= -golang.org/x/crypto v0.57.0 h1:3ZVCjf8Ggz7zneR/EHRVx68Ctf+2pmIMP2UFhh9cC6M= -golang.org/x/crypto v0.57.0/go.mod h1:Fdz0i5U6CoizGwLda9DttjSk6qlZo25zYNtR+ycvuZA= -golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba h1:Ck8QetSgk912qxWLMCKxd0in+aiyBQyDSMae6e/xmpU= -golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba/go.mod h1:50RgIsmK7OwqzTTeqcSXQW8SswW0o8fRcDxmqGluJ8E= -golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c= -golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o= -golang.org/x/net v0.59.0 h1:5zfYln+w5XCxwrnMMJPufRgNoXEaGxl0wo5GqPXyues= -golang.org/x/net v0.59.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg= -golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk= -golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= +golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4= +golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= +golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90 h1:jiDhWWeC7jfWqR9c/uplMOqJ0sbNlNWv0UkzE0vX1MA= +golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90/go.mod h1:xE1HEv6b+1SCZ5/uscMRjUBKtIxworgEcEi+/n9NQDQ= +golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI= +golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY= +golang.org/x/net v0.52.0 h1:He/TN1l0e4mmR3QqHMT2Xab3Aj3L9qjbhRm78/6jrW0= +golang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw= +golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= +golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo= -golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= -golang.org/x/text v0.42.0 h1:JbOZXgfeCPU9gacVtYliJqOhD+zhrEqK4LfdpmlUZqI= -golang.org/x/text v0.42.0/go.mod h1:ojzP1Z+2QtioaF8DTtO8K5q7JWVVYwZKenzujK0Zd0E= -gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= -gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa h1:mZHHdPZl0dbGHCflZgAq/Q468DWVFcU2whhB2KAo8fk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= -google.golang.org/grpc v1.83.2 h1:EManeRomTObA0BU7I8vXgg/78uE5MJ9M8B39EX2WscU= -google.golang.org/grpc v1.83.2/go.mod h1:YPI1hK3kDked6iHvgX3tR0y+nX/qpMFKhPgFsokw1S8= -google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= -google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= +golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8= +golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -113,5 +99,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M= maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA= -maunium.net/go/mautrix v0.31.0 h1:x6XNBSa0kOaBgcleI+ZBLkGvBdHIE0qdeY6TZ4wWUeI= -maunium.net/go/mautrix v0.31.0/go.mod h1:vfPYtoGAjlTnIF+W8tl+rjX3yB4PEfqYR2sDXvQo4Co= +maunium.net/go/mautrix v0.26.4 h1:enHSnkf0L2V9+VnfJfNhKSReSW6pBKS/x3Su+v+Vovs= +maunium.net/go/mautrix v0.26.4/go.mod h1:YWw8NWTszsbyFAznboicBObwHPgTSLcuTbVX2kY7U2M= diff --git a/pkg/connector/backfill.go b/pkg/connector/backfill.go index b7b2a23..3f9a611 100644 --- a/pkg/connector/backfill.go +++ b/pkg/connector/backfill.go @@ -187,7 +187,7 @@ func (s *SignalClient) FetchMessages(ctx context.Context, params bridgev2.FetchM CompleteCallback: func() { // When reaching the last backwards backfill batch, delete the chat from the backup store. // If backwards backfilling isn't enabled, delete immediately after the first backfill request. - if (!params.Forward && len(items) < params.Count) || !s.Main.Bridge.Config.Backfill.Queue.AnyEnabled() { + if (!params.Forward && len(items) < params.Count) || (!s.Main.Bridge.Config.Backfill.Queue.Enabled && !s.Main.Bridge.Config.Backfill.WillPaginateManually) { err := s.Client.Store.BackupStore.DeleteBackupChat(ctx, chat.Id) if err != nil { zerolog.Ctx(ctx).Err(err).Msg("Failed to delete chat from backup store") diff --git a/pkg/connector/capabilities.go b/pkg/connector/capabilities.go index 228ac94..e791324 100644 --- a/pkg/connector/capabilities.go +++ b/pkg/connector/capabilities.go @@ -38,7 +38,7 @@ func supportedIfFFmpeg() event.CapabilitySupportLevel { } func capID() string { - base := "fi.mau.signal.capabilities.2026_07_22" + base := "fi.mau.signal.capabilities.2025_12_09" if ffmpeg.Supported() { return base + "+ffmpeg" } @@ -77,7 +77,6 @@ var signalCaps = &event.RoomFeatures{ "image/jpeg": event.CapLevelFullySupported, "image/webp": event.CapLevelFullySupported, "image/bmp": event.CapLevelFullySupported, - "image/avif": event.CapLevelFullySupported, }, MaxWidth: 4096, MaxHeight: 4096, @@ -99,8 +98,6 @@ var signalCaps = &event.RoomFeatures{ MimeTypes: map[string]event.CapabilitySupportLevel{ "audio/aac": event.CapLevelFullySupported, "audio/mpeg": event.CapLevelFullySupported, - "audio/mp3": event.CapLevelFullySupported, - "audio/flac": event.CapLevelFullySupported, }, MaxSize: MaxFileSize, }, @@ -114,8 +111,7 @@ var signalCaps = &event.RoomFeatures{ }, event.CapMsgSticker: { MimeTypes: map[string]event.CapabilitySupportLevel{ - // Signal clients will only render static webp, so apng is preferred - "image/webp": event.CapLevelPartialSupport, + "image/webp": event.CapLevelFullySupported, "image/png": event.CapLevelFullySupported, "image/apng": event.CapLevelFullySupported, "image/gif": supportedIfFFmpeg(), @@ -154,23 +150,18 @@ var signalCaps = &event.RoomFeatures{ event.MemberActionBan: event.CapLevelFullySupported, event.MemberActionKick: event.CapLevelFullySupported, }, - MaxTextLength: MaxTextLength, // TODO support arbitrary sized text messages with files - LocationMessage: event.CapLevelPartialSupport, - Poll: event.CapLevelFullySupported, - PollEnd: event.CapLevelUnsupported, - PollHiddenVotes: event.CapLevelUnsupported, - PollDuplicateOptions: event.CapLevelFullySupported, - PollMaxOptions: 10, - PollOptionMaxLength: 100, - Thread: event.CapLevelUnsupported, - Reply: event.CapLevelFullySupported, - Edit: event.CapLevelFullySupported, - EditMaxCount: 10, - EditMaxAge: ptr.Ptr(jsontime.S(24 * time.Hour)), - Delete: event.CapLevelFullySupported, - DeleteForMe: false, - DeleteMaxAge: ptr.Ptr(jsontime.S(24 * time.Hour)), - DisappearingTimer: signalDisappearingCap, + MaxTextLength: MaxTextLength, // TODO support arbitrary sized text messages with files + LocationMessage: event.CapLevelPartialSupport, + Poll: event.CapLevelRejected, + Thread: event.CapLevelUnsupported, + Reply: event.CapLevelFullySupported, + Edit: event.CapLevelFullySupported, + EditMaxCount: 10, + EditMaxAge: ptr.Ptr(jsontime.S(24 * time.Hour)), + Delete: event.CapLevelFullySupported, + DeleteForMe: false, + DeleteMaxAge: ptr.Ptr(jsontime.S(24 * time.Hour)), + DisappearingTimer: signalDisappearingCap, Reaction: event.CapLevelFullySupported, ReactionCount: 1, @@ -220,7 +211,6 @@ var signalGeneralCaps = &bridgev2.NetworkGeneralCapabilities{ AggressiveUpdateInfo: true, ImplicitReadReceipts: true, Provisioning: bridgev2.ProvisioningCapabilities{ - ImagePackImport: true, ResolveIdentifier: bridgev2.ResolveIdentifierCapabilities{ CreateDM: true, LookupPhone: true, @@ -245,5 +235,5 @@ func (s *SignalConnector) GetCapabilities() *bridgev2.NetworkGeneralCapabilities } func (s *SignalConnector) GetBridgeInfoVersion() (info, capabilities int) { - return 1, 11 + return 1, 7 } diff --git a/pkg/connector/chatinfo.go b/pkg/connector/chatinfo.go index 0d48c45..4ce1f9d 100644 --- a/pkg/connector/chatinfo.go +++ b/pkg/connector/chatinfo.go @@ -332,7 +332,7 @@ func (s *SignalClient) CreateGroup(ctx context.Context, params *bridgev2.GroupCr if err != nil { return nil, fmt.Errorf("failed to download avatar: %w", err) } - group.AvatarPath, err = s.Client.UploadGroupAvatar(ctx, avatarBytes, group.GroupIdentifier, group.GroupMasterKey) + group.AvatarPath, err = s.Client.UploadGroupAvatar(ctx, avatarBytes, group.GroupIdentifier) if err != nil { return nil, fmt.Errorf("failed to upload avatar: %w", err) } @@ -362,7 +362,7 @@ func (s *SignalClient) CreateGroup(ctx context.Context, params *bridgev2.GroupCr return nil, fmt.Errorf("failed to set portal room ID: %w", err) } } - resp, err := s.Client.CreateGroup(ctx, group) + resp, err := s.Client.CreateGroup(ctx, group, avatarBytes) if err != nil { return nil, fmt.Errorf("failed to create group: %w", err) } @@ -414,7 +414,7 @@ func (s *SignalClient) GetContactList(ctx context.Context) ([]*bridgev2.ResolveI } func (s *SignalClient) makeCreateDMResponse(ctx context.Context, recipient *types.Recipient, backupChat *store.BackupChat) *bridgev2.CreateChatResponse { - namePtr := bridgev2.DefaultChatName + name := "" topic := PrivateChatTopic selfUser := s.makeEventSender(s.Client.Store.ACI) members := &bridgev2.ChatMemberList{ @@ -441,7 +441,7 @@ func (s *SignalClient) makeCreateDMResponse(ctx context.Context, recipient *type var serviceID libsignalgo.ServiceID var avatar *bridgev2.Avatar if recipient.ACI == uuid.Nil { - namePtr = ptr.Ptr(s.Main.Config.FormatDisplayname(recipient)) + name = s.Main.Config.FormatDisplayname(recipient) serviceID = libsignalgo.NewPNIServiceID(recipient.PNI) } else { if backupChat == nil { @@ -453,7 +453,7 @@ func (s *SignalClient) makeCreateDMResponse(ctx context.Context, recipient *type } members.OtherUserID = signalid.MakeUserID(recipient.ACI) if recipient.ACI == s.Client.Store.ACI { - namePtr = ptr.Ptr(NoteToSelfName) + name = NoteToSelfName avatar = &bridgev2.Avatar{ ID: networkid.AvatarID(s.Main.Config.NoteToSelfAvatar), Remove: len(s.Main.Config.NoteToSelfAvatar) == 0, @@ -474,7 +474,7 @@ func (s *SignalClient) makeCreateDMResponse(ctx context.Context, recipient *type return &bridgev2.CreateChatResponse{ PortalKey: s.makeDMPortalKey(serviceID), PortalInfo: &bridgev2.ChatInfo{ - Name: namePtr, + Name: &name, Avatar: avatar, Topic: &topic, Members: members, diff --git a/pkg/connector/chatsync.go b/pkg/connector/chatsync.go index 47963d7..5211270 100644 --- a/pkg/connector/chatsync.go +++ b/pkg/connector/chatsync.go @@ -32,19 +32,10 @@ import ( "go.mau.fi/mautrix-signal/pkg/signalmeow/types" ) -func (s *SignalClient) stopChatSync() { - if cancel := s.cancelChatSync.Swap(nil); cancel != nil { - (*cancel)() - } -} - -func (s *SignalClient) syncChats(ctx context.Context, cancel context.CancelFunc) { - defer cancel() - +func (s *SignalClient) syncChats(ctx context.Context) { if s.UserLogin.Metadata.(*signalid.UserLoginMetadata).ChatsSynced { return } - if s.Client.Store.EphemeralBackupKey != nil { zerolog.Ctx(ctx).Info().Msg("Fetching transfer archive before syncing chats") meta, err := s.Client.WaitForTransfer(ctx) @@ -74,22 +65,10 @@ func (s *SignalClient) syncChats(ctx context.Context, cancel context.CancelFunc) } zerolog.Ctx(ctx).Info().Int("chat_count", len(chats)).Msg("Fetched chats to sync from database") for _, chat := range chats { - if ctx.Err() != nil { - zerolog.Ctx(ctx).Debug(). - AnErr("ctx_err", ctx.Err()). - Msg("Context cancelled while syncing chats, stopping") - return - } recipient, err := s.Client.Store.BackupStore.GetBackupRecipient(ctx, chat.RecipientId) if err != nil { zerolog.Ctx(ctx).Err(err).Msg("Failed to get recipient for chat") continue - } else if recipient == nil { - zerolog.Ctx(ctx).Warn(). - Uint64("backup_chat_id", chat.Id). - Uint64("backup_recipient_id", chat.RecipientId). - Msg("No recipient found for chat") - continue } resyncEvt := &simplevent.ChatResync{ EventMeta: simplevent.EventMeta{ @@ -151,10 +130,7 @@ func (s *SignalClient) syncChats(ctx context.Context, cancel context.CancelFunc) groupID := types.GroupIdentifier(base64.StdEncoding.EncodeToString(rawGroupID[:])) groupInfo, err := s.getGroupInfo(ctx, groupID, dest.Group.GetSnapshot().GetVersion(), chat) if err != nil { - zerolog.Ctx(ctx).Err(err). - Uint64("recipient_id", recipient.Id). - Stringer("group_id", groupID). - Msg("Failed to get full group info") + zerolog.Ctx(ctx).Err(err).Msg("Failed to get full group info") continue } resyncEvt.PortalKey = s.makePortalKey(string(groupID)) diff --git a/pkg/connector/client.go b/pkg/connector/client.go index 4fcf188..e224c17 100644 --- a/pkg/connector/client.go +++ b/pkg/connector/client.go @@ -19,7 +19,6 @@ package connector import ( "context" "fmt" - "sync/atomic" "time" "github.com/rs/zerolog" @@ -27,7 +26,6 @@ import ( "maunium.net/go/mautrix/bridgev2" "maunium.net/go/mautrix/bridgev2/networkid" "maunium.net/go/mautrix/bridgev2/status" - "maunium.net/go/mautrix/event" "go.mau.fi/mautrix-signal/pkg/signalid" "go.mau.fi/mautrix-signal/pkg/signalmeow" @@ -41,13 +39,11 @@ type SignalClient struct { Ghost *bridgev2.Ghost queueEmptyWaiter *exsync.Event - cancelChatSync atomic.Pointer[context.CancelFunc] } var ( _ bridgev2.NetworkAPI = (*SignalClient)(nil) _ bridgev2.BackgroundSyncingNetworkAPI = (*SignalClient)(nil) - _ bridgev2.StickerImportingNetworkAPI = (*SignalClient)(nil) ) var pushCfg = &bridgev2.PushConfig{ @@ -78,19 +74,10 @@ func (s *SignalClient) RegisterPushNotifications(ctx context.Context, pushType b } } -func (s *SignalClient) DownloadImagePack(ctx context.Context, url string) (*bridgev2.ImportedImagePack, error) { - return s.Main.MsgConv.DownloadImagePack(ctx, url) -} - -func (s *SignalClient) ListImagePacks(ctx context.Context) ([]*event.ImagePackMetadata, error) { - return []*event.ImagePackMetadata{}, nil -} - func (s *SignalClient) LogoutRemote(ctx context.Context) { if s.Client == nil { return } - s.stopChatSync() err := s.Client.Unlink(ctx) if err != nil { zerolog.Ctx(ctx).Err(err).Msg("Failed to unlink device") @@ -189,7 +176,6 @@ func (s *SignalClient) bridgeStateLoop(statusChan <-chan signalmeow.SignalConnec } case signalmeow.SignalConnectionEventLoggedOut: - s.stopChatSync() s.UserLogin.Log.Debug().Msg("Sending BadCredentials BridgeState") if err == nil { s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateBadCredentials, Message: "You have been logged out of Signal, please reconnect"}) @@ -288,7 +274,6 @@ func (s *SignalClient) Disconnect() { if s.Client == nil { return } - s.stopChatSync() err := s.Client.StopReceiveLoops() if err != nil { s.UserLogin.Log.Err(err).Msg("Failed to stop receive loops") @@ -296,18 +281,25 @@ func (s *SignalClient) Disconnect() { } func (s *SignalClient) postLoginConnect() { - ctx := s.UserLogin.Log.WithContext(s.Main.Bridge.BackgroundCtx) + ctx := s.UserLogin.Log.WithContext(context.Background()) + // TODO it would be more proper to only connect after syncing, + // but currently syncing will fetch group info online, so it has to be connected. s.tryConnect(ctx, 0, false) + if s.Client.Store.EphemeralBackupKey != nil { + go func() { + if s.Client.Store.MasterKey != nil { + s.Client.SyncStorage(ctx) + } else { + s.UserLogin.Log.Warn().Msg("No master key for storage sync before backup sync") + } + s.syncChats(ctx) + }() + } else if s.Client.Store.MasterKey != nil { + go s.Client.SyncStorage(ctx) + } } -func (s *SignalClient) tryConnect(ctx context.Context, retryCount int, noLoginSync bool) { - if ctx.Err() != nil { - zerolog.Ctx(ctx).Debug(). - Int("retry_count", retryCount). - AnErr("ctx_err", ctx.Err()). - Msg("Context is canceled, not trying to connect") - return - } +func (s *SignalClient) tryConnect(ctx context.Context, retryCount int, doSync bool) { if retryCount == 0 { s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateConnecting}) } @@ -326,33 +318,11 @@ func (s *SignalClient) tryConnect(ctx context.Context, retryCount int, noLoginSy zerolog.Ctx(ctx).Info().Msg("Context canceled, exit tryConnect") return } - s.tryConnect(ctx, retryCount+1, noLoginSync) - return - } - syncCtx, cancel := context.WithCancel(ctx) - if oldCancel := s.cancelChatSync.Swap(&cancel); oldCancel != nil { - (*oldCancel)() - } - go s.bridgeStateLoop(ch) - if noLoginSync { - go s.syncChats(syncCtx, cancel) + s.tryConnect(ctx, retryCount+1, doSync) } else { - // TODO it would be more proper to only connect after syncing, - // but currently syncing will fetch group info online, so it has to be connected. - if s.Client.Store.EphemeralBackupKey != nil { - go func() { - if s.Client.Store.MasterKey != nil { - s.Client.SyncStorage(ctx) - } else { - s.UserLogin.Log.Warn().Msg("No master key for storage sync before backup sync") - } - s.syncChats(syncCtx, cancel) - }() - } else { - cancel() - if s.Client.Store.MasterKey != nil { - go s.Client.SyncStorage(ctx) - } + go s.bridgeStateLoop(ch) + if doSync { + go s.syncChats(ctx) } } } diff --git a/pkg/connector/directmedia.go b/pkg/connector/directmedia.go index 05e2a07..0877d66 100644 --- a/pkg/connector/directmedia.go +++ b/pkg/connector/directmedia.go @@ -4,6 +4,7 @@ import ( "context" "encoding/base64" "fmt" + "io" "os" "maunium.net/go/mautrix/bridgev2" @@ -29,7 +30,6 @@ func (s *SignalConnector) Download(ctx context.Context, mediaID networkid.MediaI return nil, fmt.Errorf("failed to parse direct media id: %w", err) } - var rawDataResp []byte switch info := info.(type) { case *signalid.DirectMediaAttachment: log.Info(). @@ -76,11 +76,18 @@ func (s *SignalConnector) Download(ctx context.Context, mediaID networkid.MediaI return nil, fmt.Errorf("failed to to get group master key: %w", err) } - rawDataResp, err = client.Client.DownloadGroupAvatar(ctx, info.GroupAvatarPath, groupMasterKey) - if err != nil { - log.Err(err).Msg("Direct download failed") - return nil, err - } + return &mediaproxy.GetMediaResponseCallback{ + Callback: func(w io.Writer) (int64, error) { + data, err := client.Client.DownloadGroupAvatar(ctx, info.GroupAvatarPath, groupMasterKey) + if err != nil { + log.Err(err).Msg("Direct download failed") + return 0, err + } + + _, err = w.Write(data) + return int64(len(data)), err + }, + }, nil case *signalid.DirectMediaProfileAvatar: log.Info(). Stringer("user_id", info.UserID). @@ -104,27 +111,19 @@ func (s *SignalConnector) Download(ctx context.Context, mediaID networkid.MediaI return nil, fmt.Errorf("profile key not found") } - rawDataResp, err = client.Client.DownloadUserAvatar(ctx, info.ProfileAvatarPath, *profileKey) - if err != nil { - log.Err(err).Msg("Direct download failed") - return nil, err - } - case *signalid.DirectMediaSticker: - log.Info(). - Hex("pack_id", info.PackID). - Uint32("sticker_id", info.StickerID). - Msg("Direct downloading sticker") + return &mediaproxy.GetMediaResponseCallback{ + Callback: func(w io.Writer) (int64, error) { + data, err := client.Client.DownloadUserAvatar(ctx, info.ProfileAvatarPath, *profileKey) + if err != nil { + log.Err(err).Msg("Direct download failed") + return 0, err + } - rawDataResp, err = signalmeow.DownloadStickerPackItem(ctx, info.PackID, info.PackKey, info.StickerID) - if err != nil { - log.Err(err).Msg("Direct download failed") - return nil, err - } + _, err = w.Write(data) + return int64(len(data)), err + }, + }, nil default: return nil, fmt.Errorf("no downloader for direct media type: %T", info) } - if rawDataResp == nil { - return nil, fmt.Errorf("unexpected fallthrough with no data") - } - return mediaproxy.GetMediaResponseRawData(rawDataResp), nil } diff --git a/pkg/connector/handlematrix.go b/pkg/connector/handlematrix.go index 009943a..0ef84f6 100644 --- a/pkg/connector/handlematrix.go +++ b/pkg/connector/handlematrix.go @@ -39,7 +39,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/libsignalgo" "go.mau.fi/mautrix-signal/pkg/signalid" "go.mau.fi/mautrix-signal/pkg/signalmeow" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" ) var ( @@ -137,7 +137,7 @@ func (s *SignalClient) doSendMessage( } msgID := signalid.MakeMessageID(s.Client.Store.ACI, ts) msg.AddPendingToIgnore(networkid.TransactionID(msgID)) - err := s.sendMessage(ctx, msg.Portal.ID, signalmeow.WrapDataMessage(converted)) + err := s.sendMessage(ctx, msg.Portal.ID, &signalpb.Content{DataMessage: converted}) if err != nil { return nil, bridgev2.WrapErrorInStatus(err).WithSendNotice(true) } @@ -173,55 +173,19 @@ func (s *SignalClient) HandleMatrixEdit(ctx context.Context, msg *bridgev2.Matri } ts := getTimestampForEvent(msg.InputTransactionID, msg.Event, msg.OrigSender) converted.Timestamp = &ts - err = s.sendMessage(ctx, msg.Portal.ID, signalmeow.WrapEditMessage(&signalpb.EditMessage{ + err = s.sendMessage(ctx, msg.Portal.ID, &signalpb.Content{EditMessage: &signalpb.EditMessage{ TargetSentTimestamp: proto.Uint64(targetSentTimestamp), DataMessage: converted, - })) + }}) if err != nil { return bridgev2.WrapErrorInStatus(err).WithSendNotice(true) } - prevID := msg.EditTarget.ID msg.EditTarget.ID = signalid.MakeMessageID(s.Client.Store.ACI, ts) msg.EditTarget.Metadata = &signalid.MessageMetadata{ContainsAttachments: len(converted.Attachments) > 0} msg.EditTarget.EditCount++ - if prevID != msg.EditTarget.ID { - err = s.Main.Bridge.DB.DoTxn(ctx, nil, func(ctx context.Context) error { - err = s.Main.Bridge.DB.Message.Update(ctx, msg.EditTarget) - if err != nil { - return err - } - err = saveEditStub(ctx, s.Main.Bridge, prevID, msg.EditTarget) - if err != nil { - return fmt.Errorf("failed to save edit stub: %w", err) - } - return nil - }) - if err != nil { - zerolog.Ctx(ctx).Err(err). - Str("prev_message_id", string(prevID)). - Str("message_id", string(msg.EditTarget.ID)). - Msg("Failed to save message after editing") - } - } return nil } -// saveEditStub saves a placeholder message row pointing at the pre-edit ID of a message, such that -// duplicate checks on incoming edits find it and are dropped. This is necessary because the first -// time we see an edit it modifies the ID in place. -func saveEditStub(ctx context.Context, bridge *bridgev2.Bridge, prevID networkid.MessageID, target *database.Message) error { - stub := &database.Message{ - ID: prevID, - PartID: editStubPartID, - Room: target.Room, - SenderID: target.SenderID, - SenderMXID: target.SenderMXID, - Timestamp: target.Timestamp, - } - stub.SetFakeMXID() - return bridge.DB.Message.Insert(ctx, stub) -} - func (s *SignalClient) PreHandleMatrixReaction(ctx context.Context, msg *bridgev2.MatrixReaction) (bridgev2.MatrixReactionPreResponse, error) { return bridgev2.MatrixReactionPreResponse{ SenderID: signalid.MakeUserID(s.Client.Store.ACI), @@ -236,16 +200,19 @@ func (s *SignalClient) HandleMatrixReaction(ctx context.Context, msg *bridgev2.M return nil, fmt.Errorf("failed to parse target message ID: %w", err) } ts := getTimestampForEvent(msg.InputTransactionID, msg.Event, msg.OrigSender) - err = s.sendMessage(ctx, msg.Portal.ID, signalmeow.WrapDataMessage(&signalpb.DataMessage{ - Timestamp: proto.Uint64(ts), - RequiredProtocolVersion: proto.Uint32(uint32(signalpb.DataMessage_REACTIONS)), - Reaction: &signalpb.DataMessage_Reaction{ - Emoji: proto.String(msg.PreHandleResp.Emoji), - Remove: proto.Bool(false), - TargetAuthorAciBinary: targetAuthorACI[:], - TargetSentTimestamp: proto.Uint64(targetSentTimestamp), + wrappedContent := &signalpb.Content{ + DataMessage: &signalpb.DataMessage{ + Timestamp: proto.Uint64(ts), + RequiredProtocolVersion: proto.Uint32(uint32(signalpb.DataMessage_REACTIONS)), + Reaction: &signalpb.DataMessage_Reaction{ + Emoji: proto.String(msg.PreHandleResp.Emoji), + Remove: proto.Bool(false), + TargetAuthorAciBinary: targetAuthorACI[:], + TargetSentTimestamp: proto.Uint64(targetSentTimestamp), + }, }, - })) + } + err = s.sendMessage(ctx, msg.Portal.ID, wrappedContent) if err != nil { return nil, err } @@ -258,16 +225,19 @@ func (s *SignalClient) HandleMatrixReactionRemove(ctx context.Context, msg *brid return fmt.Errorf("failed to parse target message ID: %w", err) } ts := getTimestampForEvent(msg.InputTransactionID, msg.Event, msg.OrigSender) - err = s.sendMessage(ctx, msg.Portal.ID, signalmeow.WrapDataMessage(&signalpb.DataMessage{ - Timestamp: proto.Uint64(ts), - RequiredProtocolVersion: proto.Uint32(uint32(signalpb.DataMessage_REACTIONS)), - Reaction: &signalpb.DataMessage_Reaction{ - Emoji: proto.String(msg.TargetReaction.Emoji), - Remove: proto.Bool(true), - TargetAuthorAciBinary: targetAuthorACI[:], - TargetSentTimestamp: proto.Uint64(targetSentTimestamp), + wrappedContent := &signalpb.Content{ + DataMessage: &signalpb.DataMessage{ + Timestamp: proto.Uint64(ts), + RequiredProtocolVersion: proto.Uint32(uint32(signalpb.DataMessage_REACTIONS)), + Reaction: &signalpb.DataMessage_Reaction{ + Emoji: proto.String(msg.TargetReaction.Emoji), + Remove: proto.Bool(true), + TargetAuthorAciBinary: targetAuthorACI[:], + TargetSentTimestamp: proto.Uint64(targetSentTimestamp), + }, }, - })) + } + err = s.sendMessage(ctx, msg.Portal.ID, wrappedContent) if err != nil { return err } @@ -282,12 +252,15 @@ func (s *SignalClient) HandleMatrixMessageRemove(ctx context.Context, msg *bridg return fmt.Errorf("cannot delete other people's messages") } ts := getTimestampForEvent(msg.InputTransactionID, msg.Event, msg.OrigSender) - err = s.sendMessage(ctx, msg.Portal.ID, signalmeow.WrapDataMessage(&signalpb.DataMessage{ - Timestamp: proto.Uint64(ts), - Delete: &signalpb.DataMessage_Delete{ - TargetSentTimestamp: proto.Uint64(targetSentTimestamp), + wrappedContent := &signalpb.Content{ + DataMessage: &signalpb.DataMessage{ + Timestamp: proto.Uint64(ts), + Delete: &signalpb.DataMessage_Delete{ + TargetSentTimestamp: proto.Uint64(targetSentTimestamp), + }, }, - })) + } + err = s.sendMessage(ctx, msg.Portal.ID, wrappedContent) if err != nil { return err } @@ -414,7 +387,7 @@ func (s *SignalClient) HandleMatrixRoomAvatar(ctx context.Context, msg *bridgev2 return false, fmt.Errorf("failed to download avatar: %w", err) } avatarHash = sha256.Sum256(data) - avatarPath, err = s.Client.UploadGroupAvatar(ctx, data, groupID, "") + avatarPath, err = s.Client.UploadGroupAvatar(ctx, data, groupID) if err != nil { return false, fmt.Errorf("failed to reupload avatar: %w", err) } @@ -434,9 +407,6 @@ func (s *SignalClient) HandleMatrixRoomTopic(ctx context.Context, msg *bridgev2. } func (s *SignalClient) HandleMatrixMembership(ctx context.Context, msg *bridgev2.MatrixMembershipChange) (*bridgev2.MatrixMembershipResult, error) { - if msg.Type.IsSelf && msg.OrigSender != nil { - return nil, nil - } var targetIntent bridgev2.MatrixAPI var targetSignalID libsignalgo.ServiceID var err error @@ -574,7 +544,7 @@ func (s *SignalClient) HandleMatrixMembership(ctx context.Context, msg *bridgev2 if err != nil { return nil, err } - if (msg.Type == bridgev2.Invite || msg.Type == bridgev2.AcceptKnock) && targetSignalID.Type != libsignalgo.ServiceIDTypePNI { + if msg.Type == bridgev2.Invite && targetSignalID.Type != libsignalgo.ServiceIDTypePNI { err = targetIntent.EnsureJoined(ctx, msg.Portal.MXID) if err != nil { return nil, err @@ -715,11 +685,13 @@ func (s *SignalClient) HandleMatrixDisappearingTimer(ctx context.Context, msg *b }) } else { ts := getTimestampForEvent(msg.InputTransactionID, msg.Event, msg.OrigSender) - res := s.Client.SendMessage(ctx, userID, signalmeow.WrapDataMessage(&signalpb.DataMessage{ - Timestamp: ptr.Ptr(ts), - Flags: ptr.Ptr(uint32(signalpb.DataMessage_EXPIRATION_TIMER_UPDATE)), - ExpireTimer: ptr.Ptr(uint32(msg.Content.Timer.Seconds())), - })) + res := s.Client.SendMessage(ctx, userID, &signalpb.Content{ + DataMessage: &signalpb.DataMessage{ + Timestamp: ptr.Ptr(ts), + Flags: ptr.Ptr(uint32(signalpb.DataMessage_EXPIRATION_TIMER_UPDATE)), + ExpireTimer: ptr.Ptr(uint32(msg.Content.Timer.Seconds())), + }, + }) if !res.WasSuccessful { return false, res.Error } @@ -798,8 +770,8 @@ func (s *SignalClient) HandleMatrixDeleteChat(ctx context.Context, msg *bridgev2 recipientID := s.Client.Store.ACIServiceID() // Send DeleteForMe sync message to self - result := s.Client.SendMessage(ctx, recipientID, signalmeow.WrapSyncMessage(&signalpb.SyncMessage{ - Content: &signalpb.SyncMessage_DeleteForMe_{ + result := s.Client.SendMessage(ctx, recipientID, &signalpb.Content{ + SyncMessage: &signalpb.SyncMessage{ DeleteForMe: &signalpb.SyncMessage_DeleteForMe{ ConversationDeletes: []*signalpb.SyncMessage_DeleteForMe_ConversationDelete{{ Conversation: conversationID, @@ -808,7 +780,7 @@ func (s *SignalClient) HandleMatrixDeleteChat(ctx context.Context, msg *bridgev2 }}, }, }, - })) + }) zerolog.Ctx(ctx).Debug(). Str("portal_id", string(msg.Portal.ID)). @@ -847,8 +819,7 @@ func (s *SignalClient) HandleMatrixPollVote(ctx context.Context, msg *bridgev2.M if err != nil { return nil, err } - meta := msg.VoteTo.Metadata.(*signalid.MessageMetadata) - mxOptions := meta.MatrixPollOptionIDs + mxOptions := msg.VoteTo.Metadata.(*signalid.MessageMetadata).MatrixPollOptionIDs optionIndexes := make([]uint32, len(msg.Content.Response.Answers)) for i, answer := range msg.Content.Response.Answers { if idx := slices.Index(mxOptions, answer); idx >= 0 { @@ -859,20 +830,12 @@ func (s *SignalClient) HandleMatrixPollVote(ctx context.Context, msg *bridgev2.M return nil, fmt.Errorf("unknown poll answer ID: %s", answer) } } - if meta.VoteCount == nil { - meta.VoteCount = make(map[string]uint32) - } - meta.VoteCount[s.Client.Store.ACI.String()]++ - err = s.Main.Bridge.DB.Message.Update(ctx, msg.VoteTo) - if err != nil { - zerolog.Ctx(ctx).Warn().Err(err).Msg("Failed to update poll message with new vote count") - } converted := &signalpb.DataMessage{ PollVote: &signalpb.DataMessage_PollVote{ TargetAuthorAciBinary: senderACI[:], TargetSentTimestamp: &msgTS, OptionIndexes: optionIndexes, - VoteCount: proto.Uint32(meta.VoteCount[s.Client.Store.ACI.String()]), + VoteCount: proto.Uint32(1), // TODO }, RequiredProtocolVersion: proto.Uint32(0), } @@ -902,11 +865,11 @@ func (s *SignalClient) syncMessageRequestResponse( } else { return fmt.Errorf("invalid portal ID for message request response: %s", portal.ID) } - res := s.Client.SendMessage(ctx, libsignalgo.NewACIServiceID(s.Client.Store.ACI), signalmeow.WrapSyncMessage(&signalpb.SyncMessage{ - Content: &signalpb.SyncMessage_MessageRequestResponse_{ + res := s.Client.SendMessage(ctx, libsignalgo.NewACIServiceID(s.Client.Store.ACI), &signalpb.Content{ + SyncMessage: &signalpb.SyncMessage{ MessageRequestResponse: accept, }, - })) + }) if !res.WasSuccessful { return res.Error } @@ -939,13 +902,13 @@ func (s *SignalClient) HandleMatrixAcceptMessageRequest(ctx context.Context, msg } } res := s.Client.SendMessage(ctx, userID, &signalpb.Content{ - Content: &signalpb.Content_DataMessage{DataMessage: &signalpb.DataMessage{ + DataMessage: &signalpb.DataMessage{ Flags: proto.Uint32(uint32(signalpb.DataMessage_PROFILE_KEY_UPDATE)), ProfileKey: profileKey.Slice(), Timestamp: proto.Uint64(getTimestampForEvent(msg.InputTransactionID, msg.Event, msg.OrigSender)), RequiredProtocolVersion: proto.Uint32(0), - }}, + }, PniSignatureMessage: pniSig, }) if !res.WasSuccessful { diff --git a/pkg/connector/handlesignal.go b/pkg/connector/handlesignal.go index fce7f2c..bc0dbe3 100644 --- a/pkg/connector/handlesignal.go +++ b/pkg/connector/handlesignal.go @@ -20,7 +20,6 @@ import ( "context" "encoding/base64" "fmt" - "slices" "strings" "time" @@ -40,7 +39,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/signalid" "go.mau.fi/mautrix-signal/pkg/signalmeow" "go.mau.fi/mautrix-signal/pkg/signalmeow/events" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" ) @@ -185,7 +184,7 @@ func (evt *Bv2ChatEvent) GetType() bridgev2.RemoteEventType { return bridgev2.RemoteEventReactionRemove } return bridgev2.RemoteEventReaction - case innerEvt.Delete != nil, innerEvt.AdminDelete != nil: + case innerEvt.Delete != nil: return bridgev2.RemoteEventMessageRemove case innerEvt.GetGroupV2().GetGroupChange() != nil: return bridgev2.RemoteEventChatInfoChange @@ -304,11 +303,6 @@ func (evt *Bv2ChatEvent) GetTargetMessage() networkid.MessageID { targetSentTS = innerEvt.Reaction.GetTargetSentTimestamp() case innerEvt.Delete != nil: targetSentTS = innerEvt.Delete.GetTargetSentTimestamp() - case innerEvt.AdminDelete != nil: - if len(innerEvt.AdminDelete.GetTargetAuthorAciBinary()) == 16 { - targetAuthorACI = uuid.UUID(innerEvt.AdminDelete.GetTargetAuthorAciBinary()) - } - targetSentTS = innerEvt.AdminDelete.GetTargetSentTimestamp() default: return "" } @@ -359,52 +353,20 @@ func (evt *Bv2ChatEvent) ConvertMessage(ctx context.Context, portal *bridgev2.Po return converted, nil } -const editStubPartID networkid.PartID = "editstub" - -func isEditStub(msg *database.Message) bool { - return msg.PartID == editStubPartID -} - -// editStubMessage returns a non-bridged message part which is saved as a placeholder row pointing -// at the pre-edit ID of a message, such that duplicate checks on incoming edits find it and are -// dropped. This is necessary because the first time we see an edit it modifies the ID in place. -func editStubMessage() *bridgev2.ConvertedMessage { - return &bridgev2.ConvertedMessage{ - Parts: []*bridgev2.ConvertedMessagePart{{ - ID: editStubPartID, - Type: event.EventMessage, - Content: &event.MessageEventContent{}, - DontBridge: true, - }}, - } -} - func (evt *Bv2ChatEvent) ConvertEdit(ctx context.Context, portal *bridgev2.Portal, intent bridgev2.MatrixAPI, existing []*database.Message) (*bridgev2.ConvertedEdit, error) { editMsg, ok := evt.Event.(*signalpb.EditMessage) if !ok { return nil, fmt.Errorf("ConvertEdit() called for non-EditMessage event") } - existing = slices.DeleteFunc(slices.Clone(existing), isEditStub) - if len(existing) == 0 { - return nil, fmt.Errorf("%w: edit target has already been edited", bridgev2.ErrIgnoringRemoteEvent) - } // TODO tell converter about existing parts to avoid reupload? converted := evt.s.Main.MsgConv.ToMatrix(ctx, evt.s.Client, portal, evt.Info.Sender, intent, editMsg.GetDataMessage(), nil) // TODO can anything other than the text be edited? editPart := converted.Parts[len(converted.Parts)-1].ToEditPart(existing[len(existing)-1]) - prevID := editPart.Part.ID - // Clone the database message struct to avoid mutating the ID. - // The ID from the original struct is used for AddedParts (we specifically want the old ID for that) - editPart.Part = ptr.Clone(editPart.Part) editPart.Part.EditCount++ editPart.Part.ID = signalid.MakeMessageID(evt.Info.Sender, editMsg.GetDataMessage().GetTimestamp()) - convertedEdit := &bridgev2.ConvertedEdit{ + return &bridgev2.ConvertedEdit{ ModifiedParts: []*bridgev2.ConvertedEditPart{editPart}, - } - if prevID != editPart.Part.ID { - convertedEdit.AddedParts = editStubMessage() - } - return convertedEdit, nil + }, nil } func (evt *Bv2ChatEvent) GetStreamOrder() int64 { @@ -459,7 +421,7 @@ func (b *Bv2Receipt) GetReadUpTo() time.Time { return time.Time{} } -var _ bridgev2.RemoteReadReceipt = (*Bv2Receipt)(nil) +var _ bridgev2.RemoteReceipt = (*Bv2Receipt)(nil) func convertReceipts[T any](ctx context.Context, input []T, getMessageFunc func(ctx context.Context, msgID T) (*database.Message, error)) map[networkid.PortalKey]*Bv2Receipt { log := zerolog.Ctx(ctx) @@ -505,7 +467,7 @@ func (s *SignalClient) handleSignalReceipt(evt *events.Receipt) bool { Stringer("sender_id", evt.Sender). Stringer("receipt_type", evt.Content.GetType()). Logger() - ctx := log.WithContext(s.Main.Bridge.BackgroundCtx) + ctx := log.WithContext(context.TODO()) receipts := convertReceipts(ctx, evt.Content.Timestamp, func(ctx context.Context, msgTS uint64) (*database.Message, error) { return s.Main.Bridge.DB.Message.GetFirstPartByID(ctx, s.UserLogin.ID, signalid.MakeMessageID(s.Client.Store.ACI, msgTS)) }) @@ -516,7 +478,7 @@ func (s *SignalClient) handleSignalReadSelf(evt *events.ReadSelf) bool { log := s.UserLogin.Log.With(). Str("action", "handle signal read self"). Logger() - ctx := log.WithContext(s.Main.Bridge.BackgroundCtx) + ctx := log.WithContext(context.TODO()) receipts := convertReceipts(ctx, evt.Messages, func(ctx context.Context, msgInfo *signalpb.SyncMessage_Read) (*database.Message, error) { aciUUID, err := signalmeow.ParseStringOrBinaryUUID(msgInfo.GetSenderAci(), msgInfo.GetSenderAciBinary()) if err != nil { @@ -726,7 +688,7 @@ func (s *SignalClient) handleSignalACIFound(evt *events.ACIFound) { Stringer("aci", evt.ACI). Stringer("pni", evt.PNI). Logger() - ctx := log.WithContext(s.Main.Bridge.BackgroundCtx) + ctx := log.WithContext(context.TODO()) pniPortalKey := s.makeDMPortalKey(evt.PNI) aciPortalKey := s.makeDMPortalKey(evt.ACI) result, portal, err := s.Main.Bridge.ReIDPortal(ctx, pniPortalKey, aciPortalKey) @@ -746,7 +708,7 @@ func (s *SignalClient) handleSignalACIFound(evt *events.ACIFound) { func (s *SignalClient) handleSignalContactList(evt *events.ContactList) { log := s.UserLogin.Log.With().Str("action", "handle contact list").Logger() - ctx := log.WithContext(s.Main.Bridge.BackgroundCtx) + ctx := log.WithContext(context.TODO()) for _, contact := range evt.Contacts { if contact.ACI == uuid.Nil { continue diff --git a/pkg/connector/login.go b/pkg/connector/login.go index 60fb936..9116390 100644 --- a/pkg/connector/login.go +++ b/pkg/connector/login.go @@ -18,12 +18,9 @@ package connector import ( "context" - "errors" "fmt" - "net/http" "time" - "github.com/coder/websocket" "github.com/google/uuid" "maunium.net/go/mautrix/bridgev2" "maunium.net/go/mautrix/bridgev2/database" @@ -44,7 +41,7 @@ func (s *SignalConnector) GetLoginFlows() []bridgev2.LoginFlow { func (s *SignalConnector) CreateLogin(ctx context.Context, user *bridgev2.User, flowID string) (bridgev2.LoginProcess, error) { if flowID != "qr" { - return nil, bridgev2.ErrInvalidLoginFlowID + return nil, fmt.Errorf("invalid login flow ID") } return &QRLogin{User: user, Main: s}, nil } @@ -69,78 +66,10 @@ func (qr *QRLogin) Cancel() { const ( LoginStepQR = "fi.mau.signal.login.qr" + LoginStepProcess = "fi.mau.signal.login.processing" LoginStepComplete = "fi.mau.signal.login.complete" ) -const ( - qrRefreshInterval = 45 * time.Second - maxQRRefreshes = 20 -) - -var ( - ErrLoginTimedOut = bridgev2.RespError{ - ErrCode: "FI.MAU.BRIDGE.LOGIN_TIMED_OUT", - Err: "The QR code wasn't scanned in time, please start a new login", - StatusCode: http.StatusGone, - } - ErrLoginCancelled = bridgev2.RespError{ - ErrCode: "FI.MAU.BRIDGE.LOGIN_CANCELLED", - Err: "Login process was cancelled", - StatusCode: http.StatusGone, - } - ErrDeviceLinkMissingCapability = bridgev2.RespError{ - ErrCode: "FI.MAU.SIGNAL.DEVICE_LINK_MISSING_CAPABILITY", - Err: "Signal rejected linking because the bridge is missing a capability required by your account's other devices. Please try again later", - StatusCode: http.StatusConflict, - } - ErrDeviceLimitReached = bridgev2.RespError{ - ErrCode: "FI.MAU.SIGNAL.DEVICE_LIMIT_REACHED", - Err: "Your Signal account already has the maximum number of linked devices. Remove one in the Signal app and try again", - StatusCode: http.StatusBadRequest, - } - ErrDeviceLinkCodeInvalid = bridgev2.RespError{ - ErrCode: "FI.MAU.SIGNAL.DEVICE_LINK_CODE_INVALID", - Err: "The scanned QR code was invalid or already used, please start a new login", - StatusCode: http.StatusForbidden, - } - ErrDeviceLinkRateLimited = bridgev2.RespError{ - ErrCode: "FI.MAU.SIGNAL.DEVICE_LINK_RATE_LIMITED", - Err: "Signal rate-limited the linking attempt, please wait a few minutes and try again", - StatusCode: http.StatusTooManyRequests, - } - ErrDeviceLinkRejected = bridgev2.RespError{ - ErrCode: "FI.MAU.SIGNAL.DEVICE_LINK_REJECTED", - Err: "Signal rejected linking the device", - StatusCode: http.StatusBadRequest, - } -) - -// Statuses of PUT /v1/devices/link, per Signal-Server's DeviceController -func wrapProvisioningError(err error) error { - var linkErr signalmeow.DeviceLinkError - if errors.As(err, &linkErr) { - switch linkErr.StatusCode { - case http.StatusConflict: - return ErrDeviceLinkMissingCapability - case http.StatusLengthRequired: - return ErrDeviceLimitReached - case http.StatusForbidden: - return ErrDeviceLinkCodeInvalid - case http.StatusTooManyRequests: - return ErrDeviceLinkRateLimited - default: - if linkErr.Message != "" { - return ErrDeviceLinkRejected.AppendMessage(" (HTTP %d: %s)", linkErr.StatusCode, linkErr.Message) - } - return ErrDeviceLinkRejected.AppendMessage(" (HTTP %d)", linkErr.StatusCode) - } - } - if websocket.CloseStatus(err) == websocket.StatusGoingAway { - return ErrLoginTimedOut - } - return err -} - func (qr *QRLogin) Start(ctx context.Context) (*bridgev2.LoginStep, error) { log := qr.Main.Bridge.Log.With(). Str("action", "login"). @@ -156,16 +85,14 @@ func (qr *QRLogin) Start(ctx context.Context) (*bridgev2.LoginStep, error) { select { case resp = <-qr.ProvChan: if resp.Err != nil { - return nil, wrapProvisioningError(resp.Err) + return nil, resp.Err } else if resp.State != signalmeow.StateProvisioningURLReceived { return nil, fmt.Errorf("unexpected state %v", resp.State) } case <-ctx.Done(): cancel() - if errors.Is(ctx.Err(), context.DeadlineExceeded) { - return nil, ErrLoginTimedOut - } - return nil, ErrLoginCancelled + return nil, ctx.Err() + // TODO separate timeout here? } return &bridgev2.LoginStep{ Type: bridgev2.LoginStepTypeDisplayAndWait, @@ -187,7 +114,7 @@ func (qr *QRLogin) Wait(ctx context.Context) (*bridgev2.LoginStep, error) { case resp := <-qr.ProvChan: if resp.Err != nil { qr.cancelChan() - return nil, wrapProvisioningError(resp.Err) + return nil, resp.Err } else if resp.State != signalmeow.StateProvisioningDataReceived { qr.cancelChan() return nil, fmt.Errorf("unexpected state %v", resp.State) @@ -199,20 +126,17 @@ func (qr *QRLogin) Wait(ctx context.Context) (*bridgev2.LoginStep, error) { // Server will timeout the request after 60 seconds, but Signal Desktop opens // a new socket and gets a new QR code after 45 seconds. We should do the same. - case <-time.After(qrRefreshInterval): + case <-time.After(45 * time.Second): qr.cancelChan() qr.newQRCount++ - if qr.newQRCount >= maxQRRefreshes { - return nil, ErrLoginTimedOut + if qr.newQRCount >= 6 { + return nil, fmt.Errorf("too many QR code refreshes") } return qr.Start(ctx) case <-ctx.Done(): qr.cancelChan() - if errors.Is(ctx.Err(), context.DeadlineExceeded) { - return nil, ErrLoginTimedOut - } - return nil, ErrLoginCancelled + return nil, ctx.Err() } } diff --git a/pkg/libsignalgo/accountentropy.go b/pkg/libsignalgo/accountentropy.go index 712f886..d1ffe35 100644 --- a/pkg/libsignalgo/accountentropy.go +++ b/pkg/libsignalgo/accountentropy.go @@ -20,18 +20,18 @@ package libsignalgo #include "./libsignal-ffi.h" */ import "C" -import "runtime" +import ( + "runtime" + "unsafe" +) type AccountEntropyPool string -type SVRKey = fixedArray32 func (aep AccountEntropyPool) DeriveSVRKey() ([]byte, error) { - var out SVRKey - aepC, free := GoStringToCString(string(aep)) - defer free() + var out [C.SignalSVR_KEY_LEN]byte signalFfiError := C.signal_account_entropy_pool_derive_svr_key( - out.cFixedArray(), - aepC, + (*[C.SignalSVR_KEY_LEN]C.uint8_t)(unsafe.Pointer(&out)), + C.CString(string(aep)), ) runtime.KeepAlive(aep) if signalFfiError != nil { @@ -41,12 +41,10 @@ func (aep AccountEntropyPool) DeriveSVRKey() ([]byte, error) { } func (aep AccountEntropyPool) DeriveBackupKey() ([]byte, error) { - var out BackupKey - aepC, free := GoStringToCString(string(aep)) - defer free() + var out [C.SignalBACKUP_KEY_LEN]byte signalFfiError := C.signal_account_entropy_pool_derive_backup_key( - out.cFixedArray(), - aepC, + (*[C.SignalBACKUP_KEY_LEN]C.uint8_t)(unsafe.Pointer(&out)), + C.CString(string(aep)), ) runtime.KeepAlive(aep) if signalFfiError != nil { diff --git a/pkg/libsignalgo/address.go b/pkg/libsignalgo/address.go index 8865816..cfc6e58 100644 --- a/pkg/libsignalgo/address.go +++ b/pkg/libsignalgo/address.go @@ -46,9 +46,7 @@ func NewUUIDAddressFromString(uuidStr string, deviceID uint) (*Address, error) { func newAddress(name string, deviceID uint) (*Address, error) { var pa C.SignalMutPointerProtocolAddress - nameStr, freeNameStr := GoStringToCString(name) - defer freeNameStr() - signalFfiError := C.signal_address_new(&pa, nameStr, C.uint(deviceID)) + signalFfiError := C.signal_address_new(&pa, C.CString(name), C.uint(deviceID)) if signalFfiError != nil { return nil, wrapError(signalFfiError) } @@ -83,7 +81,7 @@ func (pa *Address) CancelFinalizer() { } func (pa *Address) Name() (string, error) { - var name C.SignalCStringPtr + var name *C.char signalFfiError := C.signal_address_get_name(&name, pa.constPtr()) runtime.KeepAlive(pa) if signalFfiError != nil { diff --git a/pkg/libsignalgo/aes256gcmsiv.go b/pkg/libsignalgo/aes256gcmsiv.go index b02617d..0fddea2 100644 --- a/pkg/libsignalgo/aes256gcmsiv.go +++ b/pkg/libsignalgo/aes256gcmsiv.go @@ -82,7 +82,6 @@ func (aes *AES256_GCM_SIV) Decrypt(ciphertext, nonce, associatedData []byte) ([] BytesToBuffer(nonce), BytesToBuffer(associatedData), ) - runtime.KeepAlive(aes) if signalFfiError != nil { return nil, wrapError(signalFfiError) } diff --git a/pkg/libsignalgo/authcredential.go b/pkg/libsignalgo/authcredential.go index 0a1edfc..ab759b2 100644 --- a/pkg/libsignalgo/authcredential.go +++ b/pkg/libsignalgo/authcredential.go @@ -24,17 +24,15 @@ package libsignalgo import "C" import ( "fmt" + "unsafe" "github.com/google/uuid" ) -// type AuthCredential [181]byte -// type AuthCredentialResponse [361]byte -const AuthCredentialWithPniLength = 265 -const AuthCredentialWithPniResponseLength = 425 - -type AuthCredentialWithPni [AuthCredentialWithPniLength]byte -type AuthCredentialWithPniResponse [AuthCredentialWithPniResponseLength]byte +// type AuthCredential [C.SignalAUTH_CREDENTIAL_LEN]byte +// type AuthCredentialResponse [C.SignalAUTH_CREDENTIAL_RESPONSE_LEN]byte +type AuthCredentialWithPni [C.SignalAUTH_CREDENTIAL_WITH_PNI_LEN]byte +type AuthCredentialWithPniResponse [C.SignalAUTH_CREDENTIAL_WITH_PNI_RESPONSE_LEN]byte type AuthCredentialPresentation []byte func (ac *AuthCredentialWithPni) Slice() []byte { @@ -53,8 +51,8 @@ func ReceiveAuthCredentialWithPni( signalFfiError := C.signal_server_public_params_receive_auth_credential_with_pni_as_service_id( &c_result, C.SignalConstPointerServerPublicParams{serverPublicParams}, - NewACIServiceID(aci).cConstFixedArray(), - NewPNIServiceID(pni).cConstFixedArray(), + NewACIServiceID(aci).CFixedBytes(), + NewPNIServiceID(pni).CFixedBytes(), C.uint64_t(redemptionTime), BytesToBuffer(authCredResponse[:]), ) @@ -62,16 +60,13 @@ func ReceiveAuthCredentialWithPni( return nil, wrapError(signalFfiError) } resultBytes := CopySignalOwnedBufferToBytes(c_result) - if len(resultBytes) != AuthCredentialWithPniLength { - return nil, fmt.Errorf("invalid response length %d (expected %d)", len(resultBytes), AuthCredentialWithPniLength) + if len(resultBytes) != C.SignalAUTH_CREDENTIAL_WITH_PNI_LEN { + return nil, fmt.Errorf("invalid response length %d (expected %d)", len(resultBytes), C.SignalAUTH_CREDENTIAL_WITH_PNI_LEN) } return (*AuthCredentialWithPni)(resultBytes), nil } func NewAuthCredentialWithPniResponse(b []byte) (*AuthCredentialWithPniResponse, error) { - if len(b) != AuthCredentialWithPniResponseLength { - return nil, fmt.Errorf("invalid auth credential with pni response length %d (expected %d)", len(b), AuthCredentialWithPniResponseLength) - } borrowedBuffer := BytesToBuffer(b) signalFfiError := C.signal_auth_credential_with_pni_response_check_valid_contents(borrowedBuffer) if signalFfiError != nil { @@ -88,12 +83,14 @@ func CreateAuthCredentialWithPniPresentation( authCredWithPni AuthCredentialWithPni, ) (*AuthCredentialPresentation, error) { var c_result C.SignalOwnedBuffer = C.SignalOwnedBuffer{} + c_randomness := (*[C.SignalRANDOMNESS_LEN]C.uchar)(unsafe.Pointer(&randomness[0])) + c_groupSecretParams := (*[C.SignalGROUP_SECRET_PARAMS_LEN]C.uchar)(unsafe.Pointer(&groupSecretParams[0])) signalFfiError := C.signal_server_public_params_create_auth_credential_with_pni_presentation_deterministic( &c_result, C.SignalConstPointerServerPublicParams{serverPublicParams}, - randomness.cConstFixedArray(), - groupSecretParams.cConstFixedArray(), + c_randomness, + c_groupSecretParams, BytesToBuffer(authCredWithPni[:]), ) if signalFfiError != nil { diff --git a/pkg/libsignalgo/backupkey.go b/pkg/libsignalgo/backupkey.go index b5f53f2..fd8a800 100644 --- a/pkg/libsignalgo/backupkey.go +++ b/pkg/libsignalgo/backupkey.go @@ -27,9 +27,7 @@ import ( "go.mau.fi/util/random" ) -const BackupKeyLength = 32 - -type BackupKey [BackupKeyLength]byte +type BackupKey [C.SignalBACKUP_KEY_LEN]byte func (bk *BackupKey) Slice() []byte { if bk == nil { @@ -40,25 +38,17 @@ func (bk *BackupKey) Slice() []byte { const BackupIDLength = 16 -type BackupID = fixedArray16 -type BackupMetadataKey = fixedArray32 -type BackupMediaID = fixedArray15 -type BackupMediaKey = fixedArray64 - -func (bk *BackupKey) cFixedArray() *C.SignalType_FixedArray32_uint8_t { - return (*C.SignalType_FixedArray32_uint8_t)(unsafe.Pointer(bk)) -} - -func (bk *BackupKey) cConstFixedArray() cFixedArray32Compat { - return cFixedArray32Compat(bk.cFixedArray()) -} +type BackupID [BackupIDLength]byte +type BackupMetadataKey [C.SignalLOCAL_BACKUP_METADATA_KEY_LEN]byte +type BackupMediaID [C.SignalMEDIA_ID_LEN]byte +type BackupMediaKey [C.SignalMEDIA_ENCRYPTION_KEY_LEN]byte func GenerateRandomBackupKey() *BackupKey { - return (*BackupKey)(random.Bytes(BackupKeyLength)) + return (*BackupKey)(random.Bytes(C.SignalBACKUP_KEY_LEN)) } func BytesToBackupKey(bytes []byte) *BackupKey { - if len(bytes) != BackupKeyLength { + if len(bytes) != C.SignalBACKUP_KEY_LEN { return nil } return (*BackupKey)(bytes) @@ -67,9 +57,9 @@ func BytesToBackupKey(bytes []byte) *BackupKey { func (bk *BackupKey) DeriveBackupID(aci ServiceID) (*BackupID, error) { var out BackupID signalFfiError := C.signal_backup_key_derive_backup_id( - out.cFixedArray(), - bk.cConstFixedArray(), - aci.cConstFixedArray(), + (*[BackupIDLength]C.uint8_t)(unsafe.Pointer(&out)), + (*[C.SignalBACKUP_KEY_LEN]C.uint8_t)(unsafe.Pointer(bk)), + aci.CFixedBytes(), ) runtime.KeepAlive(bk) if signalFfiError != nil { @@ -82,8 +72,8 @@ func (bk *BackupKey) DeriveECKey(aci ServiceID) (*PrivateKey, error) { var out C.SignalMutPointerPrivateKey signalFfiError := C.signal_backup_key_derive_ec_key( &out, - bk.cConstFixedArray(), - aci.cConstFixedArray(), + (*[C.SignalBACKUP_KEY_LEN]C.uint8_t)(unsafe.Pointer(&bk)), + aci.CFixedBytes(), ) runtime.KeepAlive(bk) if signalFfiError != nil { @@ -95,8 +85,8 @@ func (bk *BackupKey) DeriveECKey(aci ServiceID) (*PrivateKey, error) { func (bk *BackupKey) DeriveLocalBackupMetadataKey() (*BackupMetadataKey, error) { var out BackupMetadataKey signalFfiError := C.signal_backup_key_derive_local_backup_metadata_key( - out.cFixedArray(), - bk.cConstFixedArray(), + (*[C.SignalLOCAL_BACKUP_METADATA_KEY_LEN]C.uint8_t)(unsafe.Pointer(&out)), + (*[C.SignalBACKUP_KEY_LEN]C.uint8_t)(unsafe.Pointer(bk)), ) runtime.KeepAlive(bk) if signalFfiError != nil { @@ -107,12 +97,10 @@ func (bk *BackupKey) DeriveLocalBackupMetadataKey() (*BackupMetadataKey, error) func (bk *BackupKey) DeriveMediaID(mediaName string) (*BackupMediaID, error) { var out BackupMediaID - mediaNameStr, mediaNameFree := GoStringToCString(mediaName) - defer mediaNameFree() signalFfiError := C.signal_backup_key_derive_media_id( - out.cFixedArray(), - bk.cConstFixedArray(), - mediaNameStr, + (*[C.SignalMEDIA_ID_LEN]C.uint8_t)(unsafe.Pointer(&out)), + (*[C.SignalBACKUP_KEY_LEN]C.uint8_t)(unsafe.Pointer(bk)), + C.CString(mediaName), ) runtime.KeepAlive(bk) if signalFfiError != nil { @@ -124,9 +112,9 @@ func (bk *BackupKey) DeriveMediaID(mediaName string) (*BackupMediaID, error) { func (bk *BackupKey) DeriveMediaEncryptionKey(mediaID *BackupMediaID) (*BackupMediaKey, error) { var out BackupMediaKey signalFfiError := C.signal_backup_key_derive_media_encryption_key( - out.cFixedArray(), - bk.cConstFixedArray(), - mediaID.cConstFixedArray(), + (*[C.SignalMEDIA_ENCRYPTION_KEY_LEN]C.uint8_t)(unsafe.Pointer(&out)), + (*[C.SignalBACKUP_KEY_LEN]C.uint8_t)(unsafe.Pointer(bk)), + (*[C.SignalMEDIA_ID_LEN]C.uint8_t)(unsafe.Pointer(mediaID)), ) runtime.KeepAlive(bk) runtime.KeepAlive(mediaID) @@ -139,9 +127,9 @@ func (bk *BackupKey) DeriveMediaEncryptionKey(mediaID *BackupMediaID) (*BackupMe func (bk *BackupKey) DeriveThumbnailTransitEncryptionKey(mediaID *BackupMediaID) (*BackupMediaKey, error) { var out BackupMediaKey signalFfiError := C.signal_backup_key_derive_thumbnail_transit_encryption_key( - out.cFixedArray(), - bk.cConstFixedArray(), - mediaID.cConstFixedArray(), + (*[C.SignalMEDIA_ENCRYPTION_KEY_LEN]C.uint8_t)(unsafe.Pointer(&out)), + (*[C.SignalBACKUP_KEY_LEN]C.uint8_t)(unsafe.Pointer(bk)), + (*[C.SignalMEDIA_ID_LEN]C.uint8_t)(unsafe.Pointer(mediaID)), ) runtime.KeepAlive(bk) runtime.KeepAlive(mediaID) diff --git a/pkg/libsignalgo/buffer.go b/pkg/libsignalgo/buffer.go index b3f2c3f..5518656 100644 --- a/pkg/libsignalgo/buffer.go +++ b/pkg/libsignalgo/buffer.go @@ -21,14 +21,12 @@ package libsignalgo */ import "C" import ( + "fmt" "runtime" "unsafe" ) func BorrowedMutableBuffer(length int) C.SignalBorrowedMutableBuffer { - if length <= 0 { - return C.SignalBorrowedMutableBuffer{} - } data := make([]byte, length) return C.SignalBorrowedMutableBuffer{ base: (*C.uchar)(unsafe.Pointer(&data[0])), @@ -50,9 +48,10 @@ func ManyBytesToBuffer[T ~[]byte](datas []T) (C.SignalBorrowedSliceOfBuffers, fu buffers := make([]C.SignalBorrowedBuffer, len(datas)) var pinner runtime.Pinner for i, data := range datas { - if len(data) > 0 { - pinner.Pin(&data[0]) + if len(data) == 0 { + panic(fmt.Errorf("empty slice passed to ManyBytesToBuffer at index %d", i)) } + pinner.Pin(&data[0]) buffers[i] = BytesToBuffer(data) } return C.SignalBorrowedSliceOfBuffers{ diff --git a/pkg/libsignalgo/cflags.go b/pkg/libsignalgo/cflags.go index 50530d9..e1bb7d5 100644 --- a/pkg/libsignalgo/cflags.go +++ b/pkg/libsignalgo/cflags.go @@ -4,9 +4,3 @@ package libsignalgo #cgo LDFLAGS: -lsignal_ffi -ldl -lm -lz -lstdc++ */ import "C" - -import ( - "go.mau.fi/mautrix-signal/pkg/libsignalgo/signalversion" -) - -const Version = signalversion.Version diff --git a/pkg/libsignalgo/ciphertextmessage.go b/pkg/libsignalgo/ciphertextmessage.go index bb2108f..f74fcd5 100644 --- a/pkg/libsignalgo/ciphertextmessage.go +++ b/pkg/libsignalgo/ciphertextmessage.go @@ -49,7 +49,6 @@ func NewCiphertextMessage(plaintext *PlaintextContent) (*CiphertextMessage, erro &ciphertextMessage, plaintext.constPtr(), ) - runtime.KeepAlive(plaintext) if signalFfiError != nil { return nil, wrapError(signalFfiError) } diff --git a/pkg/libsignalgo/conversions.go b/pkg/libsignalgo/conversions.go index a70e782..1963687 100644 --- a/pkg/libsignalgo/conversions.go +++ b/pkg/libsignalgo/conversions.go @@ -18,20 +18,12 @@ package libsignalgo /* #include "./libsignal-ffi.h" -#include */ import "C" import "unsafe" -func GoStringToCString(str string) (C.SignalCStringPtr, func()) { - cStr := C.CString(str) - return C.SignalCStringPtr(unsafe.Pointer(cStr)), func() { - C.free(unsafe.Pointer(cStr)) - } -} - -func CopyCStringToString(cString C.SignalCStringPtr) (s string) { - s = C.GoString((*C.char)(unsafe.Pointer(cString))) +func CopyCStringToString(cString *C.char) (s string) { + s = C.GoString(cString) C.signal_free_string(cString) return } diff --git a/pkg/libsignalgo/devicetransfer.go b/pkg/libsignalgo/devicetransfer.go index 85aed37..f994e51 100644 --- a/pkg/libsignalgo/devicetransfer.go +++ b/pkg/libsignalgo/devicetransfer.go @@ -43,9 +43,7 @@ func (dtk *DeviceTransferKey) PrivateKeyMaterial() []byte { func (dtk *DeviceTransferKey) GenerateCertificate(name string, days int) ([]byte, error) { var resp C.SignalOwnedBuffer = C.SignalOwnedBuffer{} - nameStr, freeNameStr := GoStringToCString(name) - defer freeNameStr() - signalFfiError := C.signal_device_transfer_generate_certificate(&resp, BytesToBuffer(dtk.privateKey), nameStr, C.uint32_t(days)) + signalFfiError := C.signal_device_transfer_generate_certificate(&resp, BytesToBuffer(dtk.privateKey), C.CString(name), C.uint32_t(days)) runtime.KeepAlive(dtk) if signalFfiError != nil { return nil, wrapError(signalFfiError) diff --git a/pkg/libsignalgo/error.go b/pkg/libsignalgo/error.go index cf46b94..888f8ea 100644 --- a/pkg/libsignalgo/error.go +++ b/pkg/libsignalgo/error.go @@ -152,7 +152,7 @@ func wrapError(signalError *C.SignalFfiError) error { } func wrapSignalError(signalError *C.SignalFfiError, errorType C.uint32_t) error { - var messageBytes C.SignalCStringPtr + var messageBytes *C.char getMessageError := C.signal_error_get_message(&messageBytes, signalError) if getMessageError != nil { // Ignore any errors from this, it will just end up being an empty string. diff --git a/pkg/libsignalgo/fingerprint.go b/pkg/libsignalgo/fingerprint.go index f436aec..b2ef8ce 100644 --- a/pkg/libsignalgo/fingerprint.go +++ b/pkg/libsignalgo/fingerprint.go @@ -52,8 +52,6 @@ func NewFingerprint(iterations, version FingerprintVersion, localIdentifier []by BytesToBuffer(remoteIdentifier), remoteKey.constPtr(), ) - runtime.KeepAlive(localKey) - runtime.KeepAlive(remoteKey) if signalFfiError != nil { return nil, wrapError(signalFfiError) } @@ -94,7 +92,7 @@ func (f *Fingerprint) ScannableEncoding() ([]byte, error) { } func (f *Fingerprint) DisplayString() (string, error) { - var displayString C.SignalCStringPtr + var displayString *C.char signalFfiError := C.signal_fingerprint_display_string(&displayString, f.constPtr()) runtime.KeepAlive(f) if signalFfiError != nil { diff --git a/pkg/libsignalgo/fixedarray.go b/pkg/libsignalgo/fixedarray.go deleted file mode 100644 index 949e808..0000000 --- a/pkg/libsignalgo/fixedarray.go +++ /dev/null @@ -1,159 +0,0 @@ -// mautrix-signal - A Matrix-signal puppeting bridge. -// Copyright (C) 2026 Tulir Asokan -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package libsignalgo - -/* -#include "./libsignal-ffi.h" -*/ -import "C" -import "unsafe" - -type fixedArray15 [15]byte -type fixedArray16 [16]byte -type fixedArray17 [17]byte -type fixedArray32 [32]byte -type fixedArray64 [64]byte -type fixedArray65 [65]byte -type fixedArray97 [97]byte -type fixedArray129 [129]byte -type fixedArray153 [153]byte -type fixedArray177 [177]byte -type fixedArray289 [289]byte -type fixedArray329 [329]byte -type fixedArray409 [409]byte -type fixedArray473 [473]byte -type fixedArray497 [497]byte - -func (a *fixedArray15) cFixedArray() *C.SignalType_FixedArray15_uint8_t { - return (*C.SignalType_FixedArray15_uint8_t)(unsafe.Pointer(a)) -} - -func (a *fixedArray15) cConstFixedArray() cFixedArray15Compat { - return cFixedArray15Compat(a.cFixedArray()) -} - -func (a *fixedArray16) cFixedArray() *C.SignalType_FixedArray16_uint8_t { - return (*C.SignalType_FixedArray16_uint8_t)(unsafe.Pointer(a)) -} - -func (a *fixedArray16) cConstFixedArray() cFixedArray16Compat { - return cFixedArray16Compat(a.cFixedArray()) -} - -func (a *fixedArray17) cFixedArray() *C.SignalType_FixedArray17_uint8_t { - return (*C.SignalType_FixedArray17_uint8_t)(unsafe.Pointer(a)) -} - -func (a *fixedArray17) cConstFixedArray() cFixedArray17Compat { - return cFixedArray17Compat(a.cFixedArray()) -} - -func (a *fixedArray32) cFixedArray() *C.SignalType_FixedArray32_uint8_t { - return (*C.SignalType_FixedArray32_uint8_t)(unsafe.Pointer(a)) -} - -func (a *fixedArray32) cConstFixedArray() cFixedArray32Compat { - return cFixedArray32Compat(a.cFixedArray()) -} - -func (a *fixedArray64) cFixedArray() *C.SignalType_FixedArray64_uint8_t { - return (*C.SignalType_FixedArray64_uint8_t)(unsafe.Pointer(a)) -} - -func (a *fixedArray64) cConstFixedArray() cFixedArray64Compat { - return cFixedArray64Compat(a.cFixedArray()) -} - -func (a *fixedArray65) cFixedArray() *C.SignalType_FixedArray65_uint8_t { - return (*C.SignalType_FixedArray65_uint8_t)(unsafe.Pointer(a)) -} - -func (a *fixedArray65) cConstFixedArray() cFixedArray65Compat { - return cFixedArray65Compat(a.cFixedArray()) -} - -func (a *fixedArray97) cFixedArray() *C.SignalType_FixedArray97_uint8_t { - return (*C.SignalType_FixedArray97_uint8_t)(unsafe.Pointer(a)) -} - -func (a *fixedArray97) cConstFixedArray() cFixedArray97Compat { - return cFixedArray97Compat(a.cFixedArray()) -} - -func (a *fixedArray129) cFixedArray() *C.SignalType_FixedArray129_uint8_t { - return (*C.SignalType_FixedArray129_uint8_t)(unsafe.Pointer(a)) -} - -func (a *fixedArray129) cConstFixedArray() cFixedArray129Compat { - return cFixedArray129Compat(a.cFixedArray()) -} - -func (a *fixedArray153) cFixedArray() *C.SignalType_FixedArray153_uint8_t { - return (*C.SignalType_FixedArray153_uint8_t)(unsafe.Pointer(a)) -} - -func (a *fixedArray153) cConstFixedArray() cFixedArray153Compat { - return cFixedArray153Compat(a.cFixedArray()) -} - -func (a *fixedArray177) cFixedArray() *C.SignalType_FixedArray177_uint8_t { - return (*C.SignalType_FixedArray177_uint8_t)(unsafe.Pointer(a)) -} - -func (a *fixedArray177) cConstFixedArray() cFixedArray177Compat { - return cFixedArray177Compat(a.cFixedArray()) -} - -func (a *fixedArray289) cFixedArray() *C.SignalType_FixedArray289_uint8_t { - return (*C.SignalType_FixedArray289_uint8_t)(unsafe.Pointer(a)) -} - -func (a *fixedArray289) cConstFixedArray() cFixedArray289Compat { - return cFixedArray289Compat(a.cFixedArray()) -} - -func (a *fixedArray329) cFixedArray() *C.SignalType_FixedArray329_uint8_t { - return (*C.SignalType_FixedArray329_uint8_t)(unsafe.Pointer(a)) -} - -func (a *fixedArray329) cConstFixedArray() cFixedArray329Compat { - return cFixedArray329Compat(a.cFixedArray()) -} - -func (a *fixedArray409) cFixedArray() *C.SignalType_FixedArray409_uint8_t { - return (*C.SignalType_FixedArray409_uint8_t)(unsafe.Pointer(a)) -} - -func (a *fixedArray409) cConstFixedArray() cFixedArray409Compat { - return cFixedArray409Compat(a.cFixedArray()) -} - -func (a *fixedArray473) cFixedArray() *C.SignalType_FixedArray473_uint8_t { - return (*C.SignalType_FixedArray473_uint8_t)(unsafe.Pointer(a)) -} - -func (a *fixedArray473) cConstFixedArray() cFixedArray473Compat { - return cFixedArray473Compat(a.cFixedArray()) -} - -func (a *fixedArray497) cFixedArray() *C.SignalType_FixedArray497_uint8_t { - return (*C.SignalType_FixedArray497_uint8_t)(unsafe.Pointer(a)) -} - -func (a *fixedArray497) cConstFixedArray() cFixedArray497Compat { - return cFixedArray497Compat(a.cFixedArray()) -} diff --git a/pkg/libsignalgo/fixedarray_clang.go b/pkg/libsignalgo/fixedarray_clang.go deleted file mode 100644 index 3dc0cd2..0000000 --- a/pkg/libsignalgo/fixedarray_clang.go +++ /dev/null @@ -1,24 +0,0 @@ -//go:build darwin || android || ios || (windows && arm64) - -package libsignalgo - -/* -#include "./libsignal-ffi.h" -*/ -import "C" - -type cFixedArray15Compat = *C.SignalType_FixedArray15_uint8_t -type cFixedArray16Compat = *C.SignalType_FixedArray16_uint8_t -type cFixedArray17Compat = *C.SignalType_FixedArray17_uint8_t -type cFixedArray32Compat = *C.SignalType_FixedArray32_uint8_t -type cFixedArray64Compat = *C.SignalType_FixedArray64_uint8_t -type cFixedArray65Compat = *C.SignalType_FixedArray65_uint8_t -type cFixedArray97Compat = *C.SignalType_FixedArray97_uint8_t -type cFixedArray129Compat = *C.SignalType_FixedArray129_uint8_t -type cFixedArray153Compat = *C.SignalType_FixedArray153_uint8_t -type cFixedArray177Compat = *C.SignalType_FixedArray177_uint8_t -type cFixedArray289Compat = *C.SignalType_FixedArray289_uint8_t -type cFixedArray329Compat = *C.SignalType_FixedArray329_uint8_t -type cFixedArray409Compat = *C.SignalType_FixedArray409_uint8_t -type cFixedArray473Compat = *C.SignalType_FixedArray473_uint8_t -type cFixedArray497Compat = *C.SignalType_FixedArray497_uint8_t diff --git a/pkg/libsignalgo/fixedarray_gcc.go b/pkg/libsignalgo/fixedarray_gcc.go deleted file mode 100644 index 6490494..0000000 --- a/pkg/libsignalgo/fixedarray_gcc.go +++ /dev/null @@ -1,26 +0,0 @@ -//go:build !(darwin || android || ios || (windows && arm64)) - -package libsignalgo - -/* -#include "./libsignal-ffi.h" -*/ -import "C" - -// Hack for https://github.com/golang/go/issues/7270 -// The clang version is more correct, but doesn't work with gcc. -type cFixedArray15Compat = *[15]C.uint8_t -type cFixedArray16Compat = *[16]C.uint8_t -type cFixedArray17Compat = *[17]C.uint8_t -type cFixedArray32Compat = *[32]C.uint8_t -type cFixedArray64Compat = *[64]C.uint8_t -type cFixedArray65Compat = *[65]C.uint8_t -type cFixedArray97Compat = *[97]C.uint8_t -type cFixedArray129Compat = *[129]C.uint8_t -type cFixedArray153Compat = *[153]C.uint8_t -type cFixedArray177Compat = *[177]C.uint8_t -type cFixedArray289Compat = *[289]C.uint8_t -type cFixedArray329Compat = *[329]C.uint8_t -type cFixedArray409Compat = *[409]C.uint8_t -type cFixedArray473Compat = *[473]C.uint8_t -type cFixedArray497Compat = *[497]C.uint8_t diff --git a/pkg/libsignalgo/groupsecretparams.go b/pkg/libsignalgo/groupsecretparams.go index eee983f..a6b370c 100644 --- a/pkg/libsignalgo/groupsecretparams.go +++ b/pkg/libsignalgo/groupsecretparams.go @@ -31,9 +31,7 @@ import ( "github.com/google/uuid" ) -const RandomnessLength = 32 - -type Randomness = fixedArray32 +type Randomness [C.SignalRANDOMNESS_LEN]byte func GenerateRandomness() Randomness { var randomness Randomness @@ -44,39 +42,14 @@ func GenerateRandomness() Randomness { return randomness } -const GroupMasterKeyLength = 32 -const GroupIdentifierLength = 32 -const GroupSecretParamsLength = 289 +const GroupMasterKeyLength = C.SignalGROUP_MASTER_KEY_LEN +const GroupIdentifierLength = C.SignalGROUP_IDENTIFIER_LEN type GroupMasterKey [GroupMasterKeyLength]byte -type GroupSecretParams [GroupSecretParamsLength]byte -type GroupPublicParams = fixedArray97 +type GroupSecretParams [C.SignalGROUP_SECRET_PARAMS_LEN]byte +type GroupPublicParams [C.SignalGROUP_PUBLIC_PARAMS_LEN]byte type GroupIdentifier [GroupIdentifierLength]byte -func (gmk *GroupMasterKey) cFixedArray() *C.SignalType_FixedArray32_uint8_t { - return (*C.SignalType_FixedArray32_uint8_t)(unsafe.Pointer(gmk)) -} - -func (gmk *GroupMasterKey) cConstFixedArray() cFixedArray32Compat { - return cFixedArray32Compat(gmk.cFixedArray()) -} - -func (gsp *GroupSecretParams) cFixedArray() *C.SignalType_FixedArray289_uint8_t { - return (*C.SignalType_FixedArray289_uint8_t)(unsafe.Pointer(gsp)) -} - -func (gsp *GroupSecretParams) cConstFixedArray() cFixedArray289Compat { - return cFixedArray289Compat(gsp.cFixedArray()) -} - -func (gid *GroupIdentifier) cFixedArray() *C.SignalType_FixedArray32_uint8_t { - return (*C.SignalType_FixedArray32_uint8_t)(unsafe.Pointer(gid)) -} - -func (gid *GroupIdentifier) cConstFixedArray() cFixedArray32Compat { - return cFixedArray32Compat(gid.cFixedArray()) -} - func (gid *GroupIdentifier) String() string { if gid == nil { return "" @@ -84,8 +57,8 @@ func (gid *GroupIdentifier) String() string { return base64.StdEncoding.EncodeToString(gid[:]) } -type UUIDCiphertext = fixedArray65 -type ProfileKeyCiphertext = fixedArray65 +type UUIDCiphertext [C.SignalUUID_CIPHERTEXT_LEN]byte +type ProfileKeyCiphertext [C.SignalPROFILE_KEY_CIPHERTEXT_LEN]byte func GenerateGroupSecretParams() (GroupSecretParams, error) { return GenerateGroupSecretParamsWithRandomness(GenerateRandomness()) @@ -108,43 +81,51 @@ func (gmk GroupMasterKey) SecretParams() (GroupSecretParams, error) { } func GenerateGroupSecretParamsWithRandomness(randomness Randomness) (GroupSecretParams, error) { - var params GroupSecretParams - signalFfiError := C.signal_group_secret_params_generate_deterministic(params.cFixedArray(), randomness.cConstFixedArray()) + var params [C.SignalGROUP_SECRET_PARAMS_LEN]C.uchar + signalFfiError := C.signal_group_secret_params_generate_deterministic(¶ms, (*[C.SignalRANDOMNESS_LEN]C.uint8_t)(unsafe.Pointer(&randomness))) runtime.KeepAlive(randomness) if signalFfiError != nil { return GroupSecretParams{}, wrapError(signalFfiError) } - return params, nil + var groupSecretParams GroupSecretParams + copy(groupSecretParams[:], C.GoBytes(unsafe.Pointer(¶ms), C.int(C.SignalGROUP_SECRET_PARAMS_LEN))) + return groupSecretParams, nil } func DeriveGroupSecretParamsFromMasterKey(groupMasterKey GroupMasterKey) (GroupSecretParams, error) { - var params GroupSecretParams - signalFfiError := C.signal_group_secret_params_derive_from_master_key(params.cFixedArray(), groupMasterKey.cConstFixedArray()) + var params [C.SignalGROUP_SECRET_PARAMS_LEN]C.uchar + signalFfiError := C.signal_group_secret_params_derive_from_master_key(¶ms, (*[C.SignalGROUP_MASTER_KEY_LEN]C.uint8_t)(unsafe.Pointer(&groupMasterKey))) runtime.KeepAlive(groupMasterKey) if signalFfiError != nil { return GroupSecretParams{}, wrapError(signalFfiError) } - return params, nil + var groupSecretParams GroupSecretParams + copy(groupSecretParams[:], C.GoBytes(unsafe.Pointer(¶ms), C.int(C.SignalGROUP_SECRET_PARAMS_LEN))) + return groupSecretParams, nil } func (gsp *GroupSecretParams) GetPublicParams() (*GroupPublicParams, error) { - var publicParams GroupPublicParams - signalFfiError := C.signal_group_secret_params_get_public_params(publicParams.cFixedArray(), gsp.cConstFixedArray()) + var publicParams [C.SignalGROUP_PUBLIC_PARAMS_LEN]C.uchar + signalFfiError := C.signal_group_secret_params_get_public_params(&publicParams, (*[C.SignalGROUP_SECRET_PARAMS_LEN]C.uint8_t)(unsafe.Pointer(gsp))) runtime.KeepAlive(gsp) if signalFfiError != nil { return nil, wrapError(signalFfiError) } - return &publicParams, nil + var groupPublicParams GroupPublicParams + copy(groupPublicParams[:], C.GoBytes(unsafe.Pointer(&publicParams), C.int(C.SignalGROUP_PUBLIC_PARAMS_LEN))) + return &groupPublicParams, nil } func GetGroupIdentifier(groupPublicParams GroupPublicParams) (*GroupIdentifier, error) { - var groupIdentifier GroupIdentifier - signalFfiError := C.signal_group_public_params_get_group_identifier(groupIdentifier.cFixedArray(), groupPublicParams.cConstFixedArray()) + var groupIdentifier [C.SignalGROUP_IDENTIFIER_LEN]C.uchar + signalFfiError := C.signal_group_public_params_get_group_identifier(&groupIdentifier, (*[C.SignalGROUP_PUBLIC_PARAMS_LEN]C.uint8_t)(unsafe.Pointer(&groupPublicParams))) runtime.KeepAlive(groupPublicParams) if signalFfiError != nil { return nil, wrapError(signalFfiError) } - return &groupIdentifier, nil + var result GroupIdentifier + copy(result[:], C.GoBytes(unsafe.Pointer(&groupIdentifier), C.int(C.SignalGROUP_IDENTIFIER_LEN))) + return &result, nil } func (gsp *GroupSecretParams) DecryptBlobWithPadding(blob []byte) ([]byte, error) { @@ -152,7 +133,7 @@ func (gsp *GroupSecretParams) DecryptBlobWithPadding(blob []byte) ([]byte, error borrowedBlob := BytesToBuffer(blob) signalFfiError := C.signal_group_secret_params_decrypt_blob_with_padding( &plaintext, - gsp.cConstFixedArray(), + (*[C.SignalGROUP_SECRET_PARAMS_LEN]C.uint8_t)(unsafe.Pointer(gsp)), borrowedBlob, ) runtime.KeepAlive(gsp) @@ -168,8 +149,8 @@ func (gsp *GroupSecretParams) EncryptBlobWithPaddingDeterministic(randomness Ran borrowedPlaintext := BytesToBuffer(plaintext) signalFfiError := C.signal_group_secret_params_encrypt_blob_with_padding_deterministic( &ciphertext, - gsp.cConstFixedArray(), - randomness.cConstFixedArray(), + (*[C.SignalGROUP_SECRET_PARAMS_LEN]C.uint8_t)(unsafe.Pointer(gsp)), + (*[C.SignalRANDOMNESS_LEN]C.uint8_t)(unsafe.Pointer(&randomness)), borrowedPlaintext, (C.uint32_t)(padding_len), ) @@ -184,11 +165,11 @@ func (gsp *GroupSecretParams) EncryptBlobWithPaddingDeterministic(randomness Ran } func (gsp *GroupSecretParams) DecryptServiceID(ciphertextServiceID UUIDCiphertext) (ServiceID, error) { - var serviceIDBytes ServiceIDFixedBytes + u := C.SignalServiceIdFixedWidthBinaryBytes{} signalFfiError := C.signal_group_secret_params_decrypt_service_id( - serviceIDBytes.cFixedArray(), - gsp.cConstFixedArray(), - ciphertextServiceID.cConstFixedArray(), + &u, + (*[C.SignalGROUP_SECRET_PARAMS_LEN]C.uint8_t)(unsafe.Pointer(gsp)), + (*[C.SignalUUID_CIPHERTEXT_LEN]C.uint8_t)(unsafe.Pointer(&ciphertextServiceID)), ) runtime.KeepAlive(gsp) runtime.KeepAlive(ciphertextServiceID) @@ -196,31 +177,33 @@ func (gsp *GroupSecretParams) DecryptServiceID(ciphertextServiceID UUIDCiphertex return EmptyServiceID, wrapError(signalFfiError) } - serviceID := ServiceIDFromCFixedBytes(serviceIDBytes.cFixedArray()) + serviceID := ServiceIDFromCFixedBytes(&u) return serviceID, nil } func (gsp *GroupSecretParams) EncryptServiceID(serviceID ServiceID) (*UUIDCiphertext, error) { - var cipherTextServiceID UUIDCiphertext + var cipherTextServiceID [C.SignalUUID_CIPHERTEXT_LEN]C.uchar signalFfiError := C.signal_group_secret_params_encrypt_service_id( - cipherTextServiceID.cFixedArray(), - gsp.cConstFixedArray(), - serviceID.cConstFixedArray(), + &cipherTextServiceID, + (*[C.SignalGROUP_SECRET_PARAMS_LEN]C.uint8_t)(unsafe.Pointer(gsp)), + serviceID.CFixedBytes(), ) runtime.KeepAlive(gsp) if signalFfiError != nil { return nil, wrapError(signalFfiError) } - return &cipherTextServiceID, nil + var result UUIDCiphertext + copy(result[:], C.GoBytes(unsafe.Pointer(&cipherTextServiceID), C.int(C.SignalUUID_CIPHERTEXT_LEN))) + return &result, nil } func (gsp *GroupSecretParams) DecryptProfileKey(ciphertextProfileKey ProfileKeyCiphertext, u uuid.UUID) (*ProfileKey, error) { - var profileKey ProfileKey + profileKey := [C.SignalPROFILE_KEY_LEN]C.uchar{} signalFfiError := C.signal_group_secret_params_decrypt_profile_key( - profileKey.cFixedArray(), - gsp.cConstFixedArray(), - ciphertextProfileKey.cConstFixedArray(), - NewACIServiceID(u).cConstFixedArray(), + &profileKey, + (*[C.SignalGROUP_SECRET_PARAMS_LEN]C.uint8_t)(unsafe.Pointer(gsp)), + (*[C.SignalPROFILE_KEY_CIPHERTEXT_LEN]C.uint8_t)(unsafe.Pointer(&ciphertextProfileKey)), + NewACIServiceID(u).CFixedBytes(), ) runtime.KeepAlive(gsp) runtime.KeepAlive(ciphertextProfileKey) @@ -228,23 +211,27 @@ func (gsp *GroupSecretParams) DecryptProfileKey(ciphertextProfileKey ProfileKeyC if signalFfiError != nil { return nil, wrapError(signalFfiError) } - return &profileKey, nil + var result ProfileKey + copy(result[:], C.GoBytes(unsafe.Pointer(&profileKey), C.int(C.SignalPROFILE_KEY_LEN))) + return &result, nil } func (gsp *GroupSecretParams) EncryptProfileKey(profileKey ProfileKey, u uuid.UUID) (*ProfileKeyCiphertext, error) { - var ciphertextProfileKey ProfileKeyCiphertext + ciphertextProfileKey := [C.SignalPROFILE_KEY_CIPHERTEXT_LEN]C.uchar{} signalFfiError := C.signal_group_secret_params_encrypt_profile_key( - ciphertextProfileKey.cFixedArray(), - gsp.cConstFixedArray(), - profileKey.cConstFixedArray(), - NewACIServiceID(u).cConstFixedArray(), + &ciphertextProfileKey, + (*[C.SignalGROUP_SECRET_PARAMS_LEN]C.uint8_t)(unsafe.Pointer(gsp)), + (*[C.SignalPROFILE_KEY_LEN]C.uint8_t)(unsafe.Pointer(&profileKey)), + NewACIServiceID(u).CFixedBytes(), ) runtime.KeepAlive(gsp) runtime.KeepAlive(profileKey) if signalFfiError != nil { return nil, wrapError(signalFfiError) } - return &ciphertextProfileKey, nil + var result ProfileKeyCiphertext + copy(result[:], C.GoBytes(unsafe.Pointer(&ciphertextProfileKey), C.int(C.SignalPROFILE_KEY_CIPHERTEXT_LEN))) + return &result, nil } func (gsp *GroupSecretParams) CreateExpiringProfileKeyCredentialPresentation(spp *ServerPublicParams, credential ExpiringProfileKeyCredential) (*ProfileKeyCredentialPresentation, error) { @@ -253,9 +240,9 @@ func (gsp *GroupSecretParams) CreateExpiringProfileKeyCredentialPresentation(spp signalFfiError := C.signal_server_public_params_create_expiring_profile_key_credential_presentation_deterministic( &out, C.SignalConstPointerServerPublicParams{spp}, - randomness.cConstFixedArray(), - gsp.cConstFixedArray(), - credential.cConstFixedArray(), + (*[C.SignalRANDOMNESS_LEN]C.uint8_t)(unsafe.Pointer(&randomness)), + (*[C.SignalGROUP_SECRET_PARAMS_LEN]C.uchar)(unsafe.Pointer(gsp)), + (*[C.SignalEXPIRING_PROFILE_KEY_CREDENTIAL_LEN]C.uchar)(unsafe.Pointer(&credential)), ) runtime.KeepAlive(gsp) runtime.KeepAlive(credential) @@ -269,14 +256,16 @@ func (gsp *GroupSecretParams) CreateExpiringProfileKeyCredentialPresentation(spp } func (gsp *GroupSecretParams) GetMasterKey() (*GroupMasterKey, error) { - var masterKey GroupMasterKey + masterKeyBytes := [C.SignalGROUP_MASTER_KEY_LEN]C.uchar{} signalFfiError := C.signal_group_secret_params_get_master_key( - masterKey.cFixedArray(), - gsp.cConstFixedArray(), + &masterKeyBytes, + (*[C.SignalGROUP_SECRET_PARAMS_LEN]C.uchar)(unsafe.Pointer(gsp)), ) runtime.KeepAlive(gsp) if signalFfiError != nil { return nil, wrapError(signalFfiError) } - return &masterKey, nil + var groupMasterKey GroupMasterKey + copy(groupMasterKey[:], C.GoBytes(unsafe.Pointer(&masterKeyBytes), C.int(C.SignalGROUP_MASTER_KEY_LEN))) + return &groupMasterKey, nil } diff --git a/pkg/libsignalgo/groupsendendorsement.go b/pkg/libsignalgo/groupsendendorsement.go index ed833e1..73f175e 100644 --- a/pkg/libsignalgo/groupsendendorsement.go +++ b/pkg/libsignalgo/groupsendendorsement.go @@ -24,6 +24,7 @@ import ( "encoding/base64" "runtime" "time" + "unsafe" ) type GroupSendFullToken []byte @@ -90,7 +91,7 @@ func (gse GroupSendEndorsement) ToToken(groupSecretParams *GroupSecretParams) (G signalFfiError := C.signal_group_send_endorsement_to_token( &token, BytesToBuffer(gse), - groupSecretParams.cConstFixedArray(), + (*[C.SignalGROUP_SECRET_PARAMS_LEN]C.uint8_t)(unsafe.Pointer(groupSecretParams)), ) runtime.KeepAlive(gse) runtime.KeepAlive(groupSecretParams) @@ -179,17 +180,17 @@ func (gser GroupSendEndorsementsResponse) ReceiveWithServiceIDs( groupMembers []ServiceID, localUser ServiceID, params *GroupSecretParams, spp *ServerPublicParams, ) (GroupSendEndorsement, map[ServiceID]GroupSendEndorsement, error) { var out C.SignalBytestringArray = C.SignalBytestringArray{} - concatenatedMembers := make([]byte, len(groupMembers)*ServiceIDFixedBytesLength) + concatenatedMembers := make([]byte, len(groupMembers)*17) for i, member := range groupMembers { - copy(concatenatedMembers[i*ServiceIDFixedBytesLength:(i+1)*ServiceIDFixedBytesLength], member.FixedBytes()[:]) + copy(concatenatedMembers[i*17:(i+1)*17], member.FixedBytes()[:]) } signalFfiError := C.signal_group_send_endorsements_response_receive_and_combine_with_service_ids( &out, BytesToBuffer(gser), BytesToBuffer(concatenatedMembers), - localUser.cConstFixedArray(), + localUser.CFixedBytes(), C.uint64_t(time.Now().Unix()), - params.cConstFixedArray(), + (*[C.SignalGROUP_SECRET_PARAMS_LEN]C.uint8_t)(unsafe.Pointer(params)), C.SignalConstPointerServerPublicParams{spp}, ) runtime.KeepAlive(gser) @@ -206,13 +207,7 @@ func (gser GroupSendEndorsementsResponse) ReceiveWithServiceIDs( memberEndorsements[member] = endorsements[i] } } - nonEmptyEndorsements := make([]GroupSendEndorsement, 0, len(endorsements)) - for _, endorsement := range endorsements { - if len(endorsement) > 0 { - nonEmptyEndorsements = append(nonEmptyEndorsements, endorsement) - } - } - combined, err := GroupSendEndorsementCombine(nonEmptyEndorsements...) + combined, err := GroupSendEndorsementCombine(endorsements...) if err != nil { return nil, memberEndorsements, err } diff --git a/pkg/libsignalgo/identitykeystore.go b/pkg/libsignalgo/identitykeystore.go index ba26f06..43941da 100644 --- a/pkg/libsignalgo/identitykeystore.go +++ b/pkg/libsignalgo/identitykeystore.go @@ -159,11 +159,11 @@ func signal_destroy_identity_key_store_callback(storeCtx unsafe.Pointer) { func (ctx *CallbackContext) wrapIdentityKeyStore(store IdentityKeyStore) C.SignalConstPointerFfiIdentityKeyStoreStruct { return C.SignalConstPointerFfiIdentityKeyStoreStruct{&C.SignalIdentityKeyStore{ ctx: wrapStore(ctx, store), - get_local_identity_key_pair: C.SignalFfiIdentityKeyStoreGetLocalIdentityKeyPair(C.signal_get_identity_key_pair_callback), - get_local_registration_id: C.SignalFfiIdentityKeyStoreGetLocalRegistrationId(C.signal_get_local_registration_id_callback), - get_identity_key: C.SignalFfiIdentityKeyStoreGetIdentityKey(C.signal_get_identity_key_callback), - save_identity_key: C.SignalFfiIdentityKeyStoreSaveIdentityKey(C.signal_save_identity_key_callback), - is_trusted_identity: C.SignalFfiIdentityKeyStoreIsTrustedIdentity(C.signal_is_trusted_identity_callback), - destroy: C.SignalFfiIdentityKeyStoreDestroy(C.signal_destroy_identity_key_store_callback), + get_local_identity_key_pair: C.SignalFfiBridgeIdentityKeyStoreGetLocalIdentityKeyPair(C.signal_get_identity_key_pair_callback), + get_local_registration_id: C.SignalFfiBridgeIdentityKeyStoreGetLocalRegistrationId(C.signal_get_local_registration_id_callback), + get_identity_key: C.SignalFfiBridgeIdentityKeyStoreGetIdentityKey(C.signal_get_identity_key_callback), + save_identity_key: C.SignalFfiBridgeIdentityKeyStoreSaveIdentityKey(C.signal_save_identity_key_callback), + is_trusted_identity: C.SignalFfiBridgeIdentityKeyStoreIsTrustedIdentity(C.signal_is_trusted_identity_callback), + destroy: C.SignalFfiBridgeIdentityKeyStoreDestroy(C.signal_destroy_identity_key_store_callback), }} } diff --git a/pkg/libsignalgo/kyberprekeystore.go b/pkg/libsignalgo/kyberprekeystore.go index 9deea17..ebb5a9f 100644 --- a/pkg/libsignalgo/kyberprekeystore.go +++ b/pkg/libsignalgo/kyberprekeystore.go @@ -77,9 +77,9 @@ func signal_destroy_kyber_pre_key_store_callback(storeCtx unsafe.Pointer) { func (ctx *CallbackContext) wrapKyberPreKeyStore(store KyberPreKeyStore) C.SignalConstPointerFfiKyberPreKeyStoreStruct { return C.SignalConstPointerFfiKyberPreKeyStoreStruct{&C.SignalKyberPreKeyStore{ ctx: wrapStore(ctx, store), - load_kyber_pre_key: C.SignalFfiKyberPreKeyStoreLoadKyberPreKey(C.signal_load_kyber_pre_key_callback), - store_kyber_pre_key: C.SignalFfiKyberPreKeyStoreStoreKyberPreKey(C.signal_store_kyber_pre_key_callback), - mark_kyber_pre_key_used: C.SignalFfiKyberPreKeyStoreMarkKyberPreKeyUsed(C.signal_mark_kyber_pre_key_used_callback), - destroy: C.SignalFfiKyberPreKeyStoreDestroy(C.signal_destroy_kyber_pre_key_store_callback), + load_kyber_pre_key: C.SignalFfiBridgeKyberPreKeyStoreLoadKyberPreKey(C.signal_load_kyber_pre_key_callback), + store_kyber_pre_key: C.SignalFfiBridgeKyberPreKeyStoreStoreKyberPreKey(C.signal_store_kyber_pre_key_callback), + mark_kyber_pre_key_used: C.SignalFfiBridgeKyberPreKeyStoreMarkKyberPreKeyUsed(C.signal_mark_kyber_pre_key_used_callback), + destroy: C.SignalFfiBridgeKyberPreKeyStoreDestroy(C.signal_destroy_kyber_pre_key_store_callback), }} } diff --git a/pkg/libsignalgo/libsignal b/pkg/libsignalgo/libsignal index 8fc2113..a5e7667 160000 --- a/pkg/libsignalgo/libsignal +++ b/pkg/libsignalgo/libsignal @@ -1 +1 @@ -Subproject commit 8fc2113bda042fc972a166a24b974b0d34155c6c +Subproject commit a5e76674882a89bac1ed3f4a982120652966d21e diff --git a/pkg/libsignalgo/libsignal-ffi.h b/pkg/libsignalgo/libsignal-ffi.h index dec28cd..59409c8 100644 --- a/pkg/libsignalgo/libsignal-ffi.h +++ b/pkg/libsignalgo/libsignal-ffi.h @@ -1,3361 +1,184 @@ -// Copyright (C) 2026 Signal Messenger, LLC. -// SPDX-License-Identifier: AGPL-3.0-only -// AUTOGENERATED! Do not modify! -#pragma once -#include -#include +/* +Copyright (C) 2020-2021 Signal Messenger, LLC. +SPDX-License-Identifier: AGPL-3.0-only +*/ + + +#ifndef SIGNAL_FFI_H_ +#define SIGNAL_FFI_H_ + +/* This file was automatically generated by cbindgen */ + +#include #include #include #include -// A static assert that's only enabled for 64-bit platforms. -#define static_assert_64bit(flag) static_assert((sizeof(void*) == 8) ? (flag) : 1, "") -static_assert_64bit(sizeof(uint8_t) == 1); -static_assert_64bit(alignof(uint8_t) == 1); -typedef uint8_t SignalType_FixedArray32_uint8_t[32]; -static_assert_64bit(sizeof(SignalType_FixedArray32_uint8_t) == 32); -static_assert_64bit(alignof(SignalType_FixedArray32_uint8_t) == 1); -typedef const SignalType_FixedArray32_uint8_t* SignalType_ConstPointer_FixedArray32_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray32_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray32_uint8_t) == 8); -typedef const SignalType_ConstPointer_FixedArray32_uint8_t* SignalType_ConstPointer_ConstPointer_FixedArray32_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_ConstPointer_FixedArray32_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_ConstPointer_FixedArray32_uint8_t) == 8); -static_assert_64bit(sizeof(int8_t) == 1); -static_assert_64bit(alignof(int8_t) == 1); -typedef const int8_t* SignalCStringPtr; -static_assert_64bit(sizeof(SignalCStringPtr) == 8); -static_assert_64bit(alignof(SignalCStringPtr) == 8); -typedef const SignalCStringPtr* SignalType_ConstPointer_SignalCStringPtr; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalCStringPtr) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalCStringPtr) == 8); -typedef uint8_t SignalType_FixedArray129_uint8_t[129]; -static_assert_64bit(sizeof(SignalType_FixedArray129_uint8_t) == 129); -static_assert_64bit(alignof(SignalType_FixedArray129_uint8_t) == 1); -typedef const SignalType_FixedArray129_uint8_t* SignalType_ConstPointer_FixedArray129_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray129_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray129_uint8_t) == 8); -typedef uint8_t SignalType_FixedArray153_uint8_t[153]; -static_assert_64bit(sizeof(SignalType_FixedArray153_uint8_t) == 153); -static_assert_64bit(alignof(SignalType_FixedArray153_uint8_t) == 1); -typedef const SignalType_FixedArray153_uint8_t* SignalType_ConstPointer_FixedArray153_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray153_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray153_uint8_t) == 8); -typedef uint8_t SignalType_FixedArray15_uint8_t[15]; -static_assert_64bit(sizeof(SignalType_FixedArray15_uint8_t) == 15); -static_assert_64bit(alignof(SignalType_FixedArray15_uint8_t) == 1); -typedef const SignalType_FixedArray15_uint8_t* SignalType_ConstPointer_FixedArray15_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray15_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray15_uint8_t) == 8); -typedef uint8_t SignalType_FixedArray16_uint8_t[16]; -static_assert_64bit(sizeof(SignalType_FixedArray16_uint8_t) == 16); -static_assert_64bit(alignof(SignalType_FixedArray16_uint8_t) == 1); -typedef const SignalType_FixedArray16_uint8_t* SignalType_ConstPointer_FixedArray16_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray16_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray16_uint8_t) == 8); -typedef uint8_t SignalType_FixedArray177_uint8_t[177]; -static_assert_64bit(sizeof(SignalType_FixedArray177_uint8_t) == 177); -static_assert_64bit(alignof(SignalType_FixedArray177_uint8_t) == 1); -typedef const SignalType_FixedArray177_uint8_t* SignalType_ConstPointer_FixedArray177_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray177_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray177_uint8_t) == 8); -typedef uint8_t SignalType_FixedArray17_uint8_t[17]; -static_assert_64bit(sizeof(SignalType_FixedArray17_uint8_t) == 17); -static_assert_64bit(alignof(SignalType_FixedArray17_uint8_t) == 1); -typedef const SignalType_FixedArray17_uint8_t* SignalType_ConstPointer_FixedArray17_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray17_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray17_uint8_t) == 8); -typedef uint8_t SignalType_FixedArray289_uint8_t[289]; -static_assert_64bit(sizeof(SignalType_FixedArray289_uint8_t) == 289); -static_assert_64bit(alignof(SignalType_FixedArray289_uint8_t) == 1); -typedef const SignalType_FixedArray289_uint8_t* SignalType_ConstPointer_FixedArray289_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray289_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray289_uint8_t) == 8); -typedef uint8_t SignalType_FixedArray329_uint8_t[329]; -static_assert_64bit(sizeof(SignalType_FixedArray329_uint8_t) == 329); -static_assert_64bit(alignof(SignalType_FixedArray329_uint8_t) == 1); -typedef const SignalType_FixedArray329_uint8_t* SignalType_ConstPointer_FixedArray329_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray329_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray329_uint8_t) == 8); -typedef uint8_t SignalType_FixedArray409_uint8_t[409]; -static_assert_64bit(sizeof(SignalType_FixedArray409_uint8_t) == 409); -static_assert_64bit(alignof(SignalType_FixedArray409_uint8_t) == 1); -typedef const SignalType_FixedArray409_uint8_t* SignalType_ConstPointer_FixedArray409_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray409_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray409_uint8_t) == 8); -typedef uint8_t SignalType_FixedArray473_uint8_t[473]; -static_assert_64bit(sizeof(SignalType_FixedArray473_uint8_t) == 473); -static_assert_64bit(alignof(SignalType_FixedArray473_uint8_t) == 1); -typedef const SignalType_FixedArray473_uint8_t* SignalType_ConstPointer_FixedArray473_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray473_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray473_uint8_t) == 8); -typedef uint8_t SignalType_FixedArray497_uint8_t[497]; -static_assert_64bit(sizeof(SignalType_FixedArray497_uint8_t) == 497); -static_assert_64bit(alignof(SignalType_FixedArray497_uint8_t) == 1); -typedef const SignalType_FixedArray497_uint8_t* SignalType_ConstPointer_FixedArray497_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray497_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray497_uint8_t) == 8); -typedef uint8_t SignalType_FixedArray64_uint8_t[64]; -static_assert_64bit(sizeof(SignalType_FixedArray64_uint8_t) == 64); -static_assert_64bit(alignof(SignalType_FixedArray64_uint8_t) == 1); -typedef const SignalType_FixedArray64_uint8_t* SignalType_ConstPointer_FixedArray64_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray64_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray64_uint8_t) == 8); -typedef uint8_t SignalType_FixedArray65_uint8_t[65]; -static_assert_64bit(sizeof(SignalType_FixedArray65_uint8_t) == 65); -static_assert_64bit(alignof(SignalType_FixedArray65_uint8_t) == 1); -typedef const SignalType_FixedArray65_uint8_t* SignalType_ConstPointer_FixedArray65_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray65_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray65_uint8_t) == 8); -typedef uint8_t SignalType_FixedArray97_uint8_t[97]; -static_assert_64bit(sizeof(SignalType_FixedArray97_uint8_t) == 97); -static_assert_64bit(alignof(SignalType_FixedArray97_uint8_t) == 1); -typedef const SignalType_FixedArray97_uint8_t* SignalType_ConstPointer_FixedArray97_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_FixedArray97_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_FixedArray97_uint8_t) == 8); -typedef struct SignalAes256GcmSiv SignalAes256GcmSiv; -typedef const SignalAes256GcmSiv* SignalType_ConstPointer_SignalAes256GcmSiv; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalAes256GcmSiv) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalAes256GcmSiv) == 8); -static_assert_64bit(sizeof(bool) == 1); -static_assert_64bit(alignof(bool) == 1); -typedef const bool* SignalType_ConstPointer_bool; -static_assert_64bit(sizeof(SignalType_ConstPointer_bool) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_bool) == 8); -typedef const void* SignalType_ConstPointer_void; -static_assert_64bit(sizeof(SignalType_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_void) == 8); -static_assert_64bit(sizeof(int32_t) == 4); -static_assert_64bit(alignof(int32_t) == 4); -typedef const int32_t* SignalType_ConstPointer_int32_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_int32_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_int32_t) == 8); -typedef struct SignalPinHash SignalPinHash; -typedef const SignalPinHash* SignalType_ConstPointer_SignalPinHash; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalPinHash) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalPinHash) == 8); -typedef const uint8_t* SignalType_ConstPointer_uint8_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_uint8_t) == 8); -static_assert_64bit(sizeof(size_t) == 8); -static_assert_64bit(alignof(size_t) == 8); -typedef struct { - const uint8_t* base; - size_t length; -} SignalBorrowedBuffer; -static_assert_64bit(offsetof(SignalBorrowedBuffer, base) == 0); -static_assert_64bit(offsetof(SignalBorrowedBuffer, length) == 8); -static_assert_64bit(sizeof(SignalBorrowedBuffer) == 16); -static_assert_64bit(alignof(SignalBorrowedBuffer) == 8); -typedef const SignalBorrowedBuffer* SignalType_ConstPointer_SignalBorrowedBuffer; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalBorrowedBuffer) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalBorrowedBuffer) == 8); -typedef struct SignalProtocolAddress SignalProtocolAddress; -typedef const SignalProtocolAddress* SignalType_ConstPointer_SignalProtocolAddress; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalProtocolAddress) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalProtocolAddress) == 8); -typedef struct { - const SignalProtocolAddress* raw; -} SignalConstPointerProtocolAddress; -static_assert_64bit(offsetof(SignalConstPointerProtocolAddress, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerProtocolAddress) == 8); -static_assert_64bit(alignof(SignalConstPointerProtocolAddress) == 8); -typedef const SignalConstPointerProtocolAddress* SignalType_ConstPointer_SignalConstPointerProtocolAddress; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalConstPointerProtocolAddress) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalConstPointerProtocolAddress) == 8); -typedef struct SignalPublicKey SignalPublicKey; -typedef const SignalPublicKey* SignalType_ConstPointer_SignalPublicKey; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalPublicKey) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalPublicKey) == 8); -typedef struct { - const SignalPublicKey* raw; -} SignalConstPointerPublicKey; -static_assert_64bit(offsetof(SignalConstPointerPublicKey, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerPublicKey) == 8); -static_assert_64bit(alignof(SignalConstPointerPublicKey) == 8); -typedef const SignalConstPointerPublicKey* SignalType_ConstPointer_SignalConstPointerPublicKey; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalConstPointerPublicKey) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalConstPointerPublicKey) == 8); -typedef struct SignalCiphertextMessage SignalCiphertextMessage; -typedef const SignalCiphertextMessage* SignalType_ConstPointer_SignalCiphertextMessage; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalCiphertextMessage) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalCiphertextMessage) == 8); -typedef struct { - const SignalCiphertextMessage* raw; -} SignalConstPointerCiphertextMessage; -static_assert_64bit(offsetof(SignalConstPointerCiphertextMessage, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerCiphertextMessage) == 8); -static_assert_64bit(alignof(SignalConstPointerCiphertextMessage) == 8); -typedef const SignalConstPointerCiphertextMessage* SignalType_ConstPointer_SignalConstPointerCiphertextMessage; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalConstPointerCiphertextMessage) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalConstPointerCiphertextMessage) == 8); -typedef struct SignalSessionRecord SignalSessionRecord; -typedef const SignalSessionRecord* SignalType_ConstPointer_SignalSessionRecord; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalSessionRecord) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalSessionRecord) == 8); -typedef struct { - const SignalSessionRecord* raw; -} SignalConstPointerSessionRecord; -static_assert_64bit(offsetof(SignalConstPointerSessionRecord, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerSessionRecord) == 8); -static_assert_64bit(alignof(SignalConstPointerSessionRecord) == 8); -typedef const SignalConstPointerSessionRecord* SignalType_ConstPointer_SignalConstPointerSessionRecord; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalConstPointerSessionRecord) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalConstPointerSessionRecord) == 8); -static_assert_64bit(sizeof(uint64_t) == 8); -static_assert_64bit(alignof(uint64_t) == 8); -typedef struct { - uint64_t e164; - SignalType_FixedArray16_uint8_t rawAciUuid; - SignalType_FixedArray16_uint8_t rawPniUuid; -} SignalFfiCdsiLookupResponseEntry; -static_assert_64bit(offsetof(SignalFfiCdsiLookupResponseEntry, e164) == 0); -static_assert_64bit(offsetof(SignalFfiCdsiLookupResponseEntry, rawAciUuid) == 8); -static_assert_64bit(offsetof(SignalFfiCdsiLookupResponseEntry, rawPniUuid) == 24); -static_assert_64bit(sizeof(SignalFfiCdsiLookupResponseEntry) == 40); -static_assert_64bit(alignof(SignalFfiCdsiLookupResponseEntry) == 8); -typedef SignalFfiCdsiLookupResponseEntry* SignalType_MutPointer_SignalFfiCdsiLookupResponseEntry; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalFfiCdsiLookupResponseEntry) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalFfiCdsiLookupResponseEntry) == 8); -typedef struct { - SignalFfiCdsiLookupResponseEntry* base; - size_t length; -} SignalOwnedLookupResponseEntryList; -static_assert_64bit(offsetof(SignalOwnedLookupResponseEntryList, base) == 0); -static_assert_64bit(offsetof(SignalOwnedLookupResponseEntryList, length) == 8); -static_assert_64bit(sizeof(SignalOwnedLookupResponseEntryList) == 16); -static_assert_64bit(alignof(SignalOwnedLookupResponseEntryList) == 8); -typedef struct { - SignalOwnedLookupResponseEntryList entries; - int32_t debug_permits_used; -} SignalFfiCdsiLookupResponse; -static_assert_64bit(offsetof(SignalFfiCdsiLookupResponse, entries) == 0); -static_assert_64bit(offsetof(SignalFfiCdsiLookupResponse, debug_permits_used) == 16); -static_assert_64bit(sizeof(SignalFfiCdsiLookupResponse) == 24); -static_assert_64bit(alignof(SignalFfiCdsiLookupResponse) == 8); -typedef const SignalFfiCdsiLookupResponse* SignalType_ConstPointer_SignalFfiCdsiLookupResponse; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiCdsiLookupResponse) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiCdsiLookupResponse) == 8); -typedef SignalCStringPtr* SignalType_MutPointer_SignalCStringPtr; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCStringPtr) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCStringPtr) == 8); -typedef struct { - SignalCStringPtr* base; - size_t length; -} SignalOwnedBufferOfCStringPtr; -static_assert_64bit(offsetof(SignalOwnedBufferOfCStringPtr, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfCStringPtr, length) == 8); -static_assert_64bit(sizeof(SignalOwnedBufferOfCStringPtr) == 16); -static_assert_64bit(alignof(SignalOwnedBufferOfCStringPtr) == 8); -typedef uint8_t* SignalType_MutPointer_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_uint8_t) == 8); -typedef struct { - uint8_t* base; - size_t length; -} SignalOwnedBuffer; -static_assert_64bit(offsetof(SignalOwnedBuffer, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBuffer, length) == 8); -static_assert_64bit(sizeof(SignalOwnedBuffer) == 16); -static_assert_64bit(alignof(SignalOwnedBuffer) == 8); -static_assert_64bit(sizeof(uint16_t) == 2); -static_assert_64bit(alignof(uint16_t) == 2); -typedef struct { - uint16_t status; - const int8_t* message; - SignalOwnedBufferOfCStringPtr headers; - SignalOwnedBuffer body; -} SignalFfiChatResponse; -static_assert_64bit(offsetof(SignalFfiChatResponse, status) == 0); -static_assert_64bit(offsetof(SignalFfiChatResponse, message) == 8); -static_assert_64bit(offsetof(SignalFfiChatResponse, headers) == 16); -static_assert_64bit(offsetof(SignalFfiChatResponse, body) == 32); -static_assert_64bit(sizeof(SignalFfiChatResponse) == 48); -static_assert_64bit(alignof(SignalFfiChatResponse) == 8); -typedef const SignalFfiChatResponse* SignalType_ConstPointer_SignalFfiChatResponse; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiChatResponse) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiChatResponse) == 8); -typedef size_t* SignalType_MutPointer_size_t; -static_assert_64bit(sizeof(SignalType_MutPointer_size_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_size_t) == 8); -typedef struct { - size_t* base; - size_t length; -} SignalOwnedBufferOfusize; -static_assert_64bit(offsetof(SignalOwnedBufferOfusize, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfusize, length) == 8); -static_assert_64bit(sizeof(SignalOwnedBufferOfusize) == 16); -static_assert_64bit(alignof(SignalOwnedBufferOfusize) == 8); -typedef struct { - SignalOwnedBuffer bytes; - SignalOwnedBufferOfusize lengths; -} SignalBytestringArray; -static_assert_64bit(offsetof(SignalBytestringArray, bytes) == 0); -static_assert_64bit(offsetof(SignalBytestringArray, lengths) == 16); -static_assert_64bit(sizeof(SignalBytestringArray) == 32); -static_assert_64bit(alignof(SignalBytestringArray) == 8); -typedef struct { - SignalBytestringArray entries; -} SignalFfiCheckSvr2CredentialsResponse; -static_assert_64bit(offsetof(SignalFfiCheckSvr2CredentialsResponse, entries) == 0); -static_assert_64bit(sizeof(SignalFfiCheckSvr2CredentialsResponse) == 32); -static_assert_64bit(alignof(SignalFfiCheckSvr2CredentialsResponse) == 8); -typedef const SignalFfiCheckSvr2CredentialsResponse* SignalType_ConstPointer_SignalFfiCheckSvr2CredentialsResponse; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiCheckSvr2CredentialsResponse) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiCheckSvr2CredentialsResponse) == 8); -typedef SignalPublicKey* SignalType_MutPointer_SignalPublicKey; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalPublicKey) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalPublicKey) == 8); -typedef struct { - SignalPublicKey* raw; -} SignalMutPointerPublicKey; -static_assert_64bit(offsetof(SignalMutPointerPublicKey, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerPublicKey) == 8); -static_assert_64bit(alignof(SignalMutPointerPublicKey) == 8); -typedef struct SignalPreKeyBundle SignalPreKeyBundle; -typedef SignalPreKeyBundle* SignalType_MutPointer_SignalPreKeyBundle; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalPreKeyBundle) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalPreKeyBundle) == 8); -typedef struct { - SignalPreKeyBundle* raw; -} SignalMutPointerPreKeyBundle; -static_assert_64bit(offsetof(SignalMutPointerPreKeyBundle, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerPreKeyBundle) == 8); -static_assert_64bit(alignof(SignalMutPointerPreKeyBundle) == 8); -typedef SignalMutPointerPreKeyBundle* SignalType_MutPointer_SignalMutPointerPreKeyBundle; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerPreKeyBundle) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerPreKeyBundle) == 8); -typedef struct { - SignalMutPointerPreKeyBundle* base; - size_t length; -} SignalOwnedBufferOfMutPointerPreKeyBundle; -static_assert_64bit(offsetof(SignalOwnedBufferOfMutPointerPreKeyBundle, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfMutPointerPreKeyBundle, length) == 8); -static_assert_64bit(sizeof(SignalOwnedBufferOfMutPointerPreKeyBundle) == 16); -static_assert_64bit(alignof(SignalOwnedBufferOfMutPointerPreKeyBundle) == 8); -typedef struct { - SignalMutPointerPublicKey identity_key; - SignalOwnedBufferOfMutPointerPreKeyBundle pre_key_bundles; -} SignalFfiPreKeysResponse; -static_assert_64bit(offsetof(SignalFfiPreKeysResponse, identity_key) == 0); -static_assert_64bit(offsetof(SignalFfiPreKeysResponse, pre_key_bundles) == 8); -static_assert_64bit(sizeof(SignalFfiPreKeysResponse) == 24); -static_assert_64bit(alignof(SignalFfiPreKeysResponse) == 8); -typedef const SignalFfiPreKeysResponse* SignalType_ConstPointer_SignalFfiPreKeysResponse; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiPreKeysResponse) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiPreKeysResponse) == 8); -static_assert_64bit(sizeof(uint32_t) == 4); -static_assert_64bit(alignof(uint32_t) == 4); -typedef struct { - uint32_t cdn; - const int8_t* key; - SignalOwnedBufferOfCStringPtr header_keys; - SignalOwnedBufferOfCStringPtr header_values; - const int8_t* signed_upload_url; -} SignalFfiUploadForm; -static_assert_64bit(offsetof(SignalFfiUploadForm, cdn) == 0); -static_assert_64bit(offsetof(SignalFfiUploadForm, key) == 8); -static_assert_64bit(offsetof(SignalFfiUploadForm, header_keys) == 16); -static_assert_64bit(offsetof(SignalFfiUploadForm, header_values) == 32); -static_assert_64bit(offsetof(SignalFfiUploadForm, signed_upload_url) == 48); -static_assert_64bit(sizeof(SignalFfiUploadForm) == 56); -static_assert_64bit(alignof(SignalFfiUploadForm) == 8); -typedef const SignalFfiUploadForm* SignalType_ConstPointer_SignalFfiUploadForm; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiUploadForm) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiUploadForm) == 8); -typedef struct SignalCdsiLookup SignalCdsiLookup; -typedef SignalCdsiLookup* SignalType_MutPointer_SignalCdsiLookup; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCdsiLookup) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCdsiLookup) == 8); -typedef struct { - SignalCdsiLookup* raw; -} SignalMutPointerCdsiLookup; -static_assert_64bit(offsetof(SignalMutPointerCdsiLookup, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerCdsiLookup) == 8); -static_assert_64bit(alignof(SignalMutPointerCdsiLookup) == 8); -typedef const SignalMutPointerCdsiLookup* SignalType_ConstPointer_SignalMutPointerCdsiLookup; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalMutPointerCdsiLookup) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalMutPointerCdsiLookup) == 8); -typedef struct SignalAuthenticatedChatConnection SignalAuthenticatedChatConnection; -typedef SignalAuthenticatedChatConnection* SignalType_MutPointer_SignalAuthenticatedChatConnection; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalAuthenticatedChatConnection) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalAuthenticatedChatConnection) == 8); -typedef struct { - SignalAuthenticatedChatConnection* raw; -} SignalMutPointerAuthenticatedChatConnection; -static_assert_64bit(offsetof(SignalMutPointerAuthenticatedChatConnection, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerAuthenticatedChatConnection) == 8); -static_assert_64bit(alignof(SignalMutPointerAuthenticatedChatConnection) == 8); -typedef const SignalMutPointerAuthenticatedChatConnection* SignalType_ConstPointer_SignalMutPointerAuthenticatedChatConnection; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalMutPointerAuthenticatedChatConnection) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalMutPointerAuthenticatedChatConnection) == 8); -typedef struct SignalProvisioningChatConnection SignalProvisioningChatConnection; -typedef SignalProvisioningChatConnection* SignalType_MutPointer_SignalProvisioningChatConnection; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalProvisioningChatConnection) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalProvisioningChatConnection) == 8); -typedef struct { - SignalProvisioningChatConnection* raw; -} SignalMutPointerProvisioningChatConnection; -static_assert_64bit(offsetof(SignalMutPointerProvisioningChatConnection, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerProvisioningChatConnection) == 8); -static_assert_64bit(alignof(SignalMutPointerProvisioningChatConnection) == 8); -typedef const SignalMutPointerProvisioningChatConnection* SignalType_ConstPointer_SignalMutPointerProvisioningChatConnection; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalMutPointerProvisioningChatConnection) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalMutPointerProvisioningChatConnection) == 8); -typedef struct SignalUnauthenticatedChatConnection SignalUnauthenticatedChatConnection; -typedef SignalUnauthenticatedChatConnection* SignalType_MutPointer_SignalUnauthenticatedChatConnection; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalUnauthenticatedChatConnection) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalUnauthenticatedChatConnection) == 8); -typedef struct { - SignalUnauthenticatedChatConnection* raw; -} SignalMutPointerUnauthenticatedChatConnection; -static_assert_64bit(offsetof(SignalMutPointerUnauthenticatedChatConnection, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerUnauthenticatedChatConnection) == 8); -static_assert_64bit(alignof(SignalMutPointerUnauthenticatedChatConnection) == 8); -typedef const SignalMutPointerUnauthenticatedChatConnection* SignalType_ConstPointer_SignalMutPointerUnauthenticatedChatConnection; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalMutPointerUnauthenticatedChatConnection) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalMutPointerUnauthenticatedChatConnection) == 8); -typedef struct SignalRegistrationService SignalRegistrationService; -typedef SignalRegistrationService* SignalType_MutPointer_SignalRegistrationService; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalRegistrationService) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalRegistrationService) == 8); -typedef struct { - SignalRegistrationService* raw; -} SignalMutPointerRegistrationService; -static_assert_64bit(offsetof(SignalMutPointerRegistrationService, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerRegistrationService) == 8); -static_assert_64bit(alignof(SignalMutPointerRegistrationService) == 8); -typedef const SignalMutPointerRegistrationService* SignalType_ConstPointer_SignalMutPointerRegistrationService; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalMutPointerRegistrationService) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalMutPointerRegistrationService) == 8); -typedef struct SignalBackupRestoreResponse SignalBackupRestoreResponse; -typedef SignalBackupRestoreResponse* SignalType_MutPointer_SignalBackupRestoreResponse; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalBackupRestoreResponse) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalBackupRestoreResponse) == 8); -typedef struct { - SignalBackupRestoreResponse* raw; -} SignalMutPointerBackupRestoreResponse; -static_assert_64bit(offsetof(SignalMutPointerBackupRestoreResponse, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerBackupRestoreResponse) == 8); -static_assert_64bit(alignof(SignalMutPointerBackupRestoreResponse) == 8); -typedef const SignalMutPointerBackupRestoreResponse* SignalType_ConstPointer_SignalMutPointerBackupRestoreResponse; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalMutPointerBackupRestoreResponse) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalMutPointerBackupRestoreResponse) == 8); -typedef struct SignalBackupStoreResponse SignalBackupStoreResponse; -typedef SignalBackupStoreResponse* SignalType_MutPointer_SignalBackupStoreResponse; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalBackupStoreResponse) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalBackupStoreResponse) == 8); -typedef struct { - SignalBackupStoreResponse* raw; -} SignalMutPointerBackupStoreResponse; -static_assert_64bit(offsetof(SignalMutPointerBackupStoreResponse, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerBackupStoreResponse) == 8); -static_assert_64bit(alignof(SignalMutPointerBackupStoreResponse) == 8); -typedef const SignalMutPointerBackupStoreResponse* SignalType_ConstPointer_SignalMutPointerBackupStoreResponse; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalMutPointerBackupStoreResponse) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalMutPointerBackupStoreResponse) == 8); -typedef struct SignalRegisterAccountResponse SignalRegisterAccountResponse; -typedef SignalRegisterAccountResponse* SignalType_MutPointer_SignalRegisterAccountResponse; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalRegisterAccountResponse) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalRegisterAccountResponse) == 8); -typedef struct { - SignalRegisterAccountResponse* raw; -} SignalMutPointerRegisterAccountResponse; -static_assert_64bit(offsetof(SignalMutPointerRegisterAccountResponse, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerRegisterAccountResponse) == 8); -static_assert_64bit(alignof(SignalMutPointerRegisterAccountResponse) == 8); -typedef const SignalMutPointerRegisterAccountResponse* SignalType_ConstPointer_SignalMutPointerRegisterAccountResponse; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalMutPointerRegisterAccountResponse) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalMutPointerRegisterAccountResponse) == 8); -typedef struct { - bool present; - const int8_t* first; - SignalType_FixedArray32_uint8_t second; -} SignalOptionalPairOfCStringPtrc_uchar32; -static_assert_64bit(offsetof(SignalOptionalPairOfCStringPtrc_uchar32, present) == 0); -static_assert_64bit(offsetof(SignalOptionalPairOfCStringPtrc_uchar32, first) == 8); -static_assert_64bit(offsetof(SignalOptionalPairOfCStringPtrc_uchar32, second) == 16); -static_assert_64bit(sizeof(SignalOptionalPairOfCStringPtrc_uchar32) == 48); -static_assert_64bit(alignof(SignalOptionalPairOfCStringPtrc_uchar32) == 8); -typedef const SignalOptionalPairOfCStringPtrc_uchar32* SignalType_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32) == 8); -typedef struct { - bool present; - SignalType_FixedArray16_uint8_t bytes; -} SignalOptionalUuid; -static_assert_64bit(offsetof(SignalOptionalUuid, present) == 0); -static_assert_64bit(offsetof(SignalOptionalUuid, bytes) == 1); -static_assert_64bit(sizeof(SignalOptionalUuid) == 17); -static_assert_64bit(alignof(SignalOptionalUuid) == 1); -typedef const SignalOptionalUuid* SignalType_ConstPointer_SignalOptionalUuid; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalOptionalUuid) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalOptionalUuid) == 8); -typedef SignalType_FixedArray17_uint8_t* SignalType_MutPointer_FixedArray17_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray17_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_FixedArray17_uint8_t) == 8); -typedef struct { - SignalType_FixedArray17_uint8_t* base; - size_t length; -} SignalOwnedBufferOfc_uchar17; -static_assert_64bit(offsetof(SignalOwnedBufferOfc_uchar17, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfc_uchar17, length) == 8); -static_assert_64bit(sizeof(SignalOwnedBufferOfc_uchar17) == 16); -static_assert_64bit(alignof(SignalOwnedBufferOfc_uchar17) == 8); -typedef const SignalOwnedBufferOfc_uchar17* SignalType_ConstPointer_SignalOwnedBufferOfc_uchar17; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalOwnedBufferOfc_uchar17) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalOwnedBufferOfc_uchar17) == 8); -typedef const SignalOwnedBuffer* SignalType_ConstPointer_SignalOwnedBuffer; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalOwnedBuffer) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalOwnedBuffer) == 8); +#include + +#define SignalSVR_KEY_LEN 32 + +#define SignalBACKUP_KEY_LEN 32 + +#define SignalLOCAL_BACKUP_METADATA_KEY_LEN 32 + +#define SignalMEDIA_ID_LEN 15 + +#define SignalBACKUP_FORWARD_SECRECY_TOKEN_LEN 32 + +#define SignalMEDIA_ENCRYPTION_KEY_LEN (32 + 32) + +#define SignalBackupId_LEN 16 + +#define SignalCallLinkSecretParams_ROOT_KEY_MAX_BYTES_FOR_SHO 16 + +#define SignalNUM_AUTH_CRED_ATTRIBUTES 3 + +#define SignalNUM_PROFILE_KEY_CRED_ATTRIBUTES 4 + +#define SignalNUM_RECEIPT_CRED_ATTRIBUTES 2 + +#define SignalPRESENTATION_VERSION_1 0 + +#define SignalPRESENTATION_VERSION_2 1 + +#define SignalPRESENTATION_VERSION_3 2 + +#define SignalPRESENTATION_VERSION_4 3 + +#define SignalAES_KEY_LEN 32 + +#define SignalAESGCM_NONCE_LEN 12 + +#define SignalAESGCM_TAG_LEN 16 + +#define SignalGROUP_MASTER_KEY_LEN 32 + +#define SignalGROUP_SECRET_PARAMS_LEN 289 + +#define SignalGROUP_PUBLIC_PARAMS_LEN 97 + +#define SignalGROUP_IDENTIFIER_LEN 32 + +#define SignalAUTH_CREDENTIAL_LEN 181 + +#define SignalAUTH_CREDENTIAL_PRESENTATION_V2_LEN 461 + +#define SignalAUTH_CREDENTIAL_RESPONSE_LEN 361 + +#define SignalAUTH_CREDENTIAL_WITH_PNI_LEN 265 + +#define SignalAUTH_CREDENTIAL_WITH_PNI_RESPONSE_LEN 425 + +#define SignalPROFILE_KEY_LEN 32 + +#define SignalPROFILE_KEY_CIPHERTEXT_LEN 65 + +#define SignalPROFILE_KEY_COMMITMENT_LEN 97 + +#define SignalEXPIRING_PROFILE_KEY_CREDENTIAL_LEN 153 + +#define SignalPROFILE_KEY_CREDENTIAL_PRESENTATION_V2_LEN 713 + +#define SignalPROFILE_KEY_CREDENTIAL_REQUEST_LEN 329 + +#define SignalPROFILE_KEY_CREDENTIAL_REQUEST_CONTEXT_LEN 473 + +#define SignalEXPIRING_PROFILE_KEY_CREDENTIAL_RESPONSE_LEN 497 + +#define SignalPROFILE_KEY_VERSION_LEN 32 + +#define SignalPROFILE_KEY_VERSION_ENCODED_LEN 64 + +#define SignalRECEIPT_CREDENTIAL_LEN 129 + +#define SignalRECEIPT_CREDENTIAL_PRESENTATION_LEN 329 + +#define SignalRECEIPT_CREDENTIAL_REQUEST_LEN 97 + +#define SignalRECEIPT_CREDENTIAL_REQUEST_CONTEXT_LEN 177 + +#define SignalRECEIPT_CREDENTIAL_RESPONSE_LEN 409 + +#define SignalRECEIPT_SERIAL_LEN 16 + +#define SignalRESERVED_LEN 1 + +#define SignalSERVER_SECRET_PARAMS_LEN 2721 + +#define SignalSERVER_PUBLIC_PARAMS_LEN 673 + +#define SignalUUID_CIPHERTEXT_LEN 65 + +#define SignalRANDOMNESS_LEN 32 + +#define SignalSIGNATURE_LEN 64 + +#define SignalUUID_LEN 16 + +#define SignalACCESS_KEY_LEN 16 + +/** + * Seconds in a 24-hour cycle (ignoring leap seconds). + */ +#define SignalSECONDS_PER_DAY 86400 + +/** + * The encoded length of a [`FourCC`], in bytes. + */ +#define SignalFourCC_ENCODED_LEN 4 + +enum SignalChallengeOption { + SignalChallengeOptionPushChallenge, + SignalChallengeOptionCaptcha, +}; +typedef uint8_t SignalChallengeOption; + typedef enum { - SignalAuthCheckResultFfiResultMatch, - SignalAuthCheckResultFfiResultNoMatch, - SignalAuthCheckResultFfiResultInvalid, -} SignalAuthCheckResultFfiResult; -static_assert_64bit(sizeof(SignalAuthCheckResultFfiResult) == 4); -static_assert_64bit(alignof(SignalAuthCheckResultFfiResult) == 4); -typedef struct { - const int8_t* first; - SignalAuthCheckResultFfiResult second; -} SignalPairOfCStringPtrAuthCheckResultFfiResult; -static_assert_64bit(offsetof(SignalPairOfCStringPtrAuthCheckResultFfiResult, first) == 0); -static_assert_64bit(offsetof(SignalPairOfCStringPtrAuthCheckResultFfiResult, second) == 8); -static_assert_64bit(sizeof(SignalPairOfCStringPtrAuthCheckResultFfiResult) == 16); -static_assert_64bit(alignof(SignalPairOfCStringPtrAuthCheckResultFfiResult) == 8); -typedef SignalPairOfCStringPtrAuthCheckResultFfiResult* SignalType_MutPointer_SignalPairOfCStringPtrAuthCheckResultFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalPairOfCStringPtrAuthCheckResultFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalPairOfCStringPtrAuthCheckResultFfiResult) == 8); -typedef struct { - SignalPairOfCStringPtrAuthCheckResultFfiResult* base; - size_t length; - size_t size_bytes; -} SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult; -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult, length) == 8); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult, size_bytes) == 16); -static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult) == 24); -static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult) == 8); -typedef const SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult* SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult) == 8); -typedef struct { - const int8_t* name; - uint64_t created_at; -} SignalBridgeMfaMetadataFfiResult; -static_assert_64bit(offsetof(SignalBridgeMfaMetadataFfiResult, name) == 0); -static_assert_64bit(offsetof(SignalBridgeMfaMetadataFfiResult, created_at) == 8); -static_assert_64bit(sizeof(SignalBridgeMfaMetadataFfiResult) == 16); -static_assert_64bit(alignof(SignalBridgeMfaMetadataFfiResult) == 8); + SignalCiphertextMessageTypeWhisper = 2, + SignalCiphertextMessageTypePreKey = 3, + SignalCiphertextMessageTypeSenderKey = 7, + SignalCiphertextMessageTypePlaintext = 8, +} SignalCiphertextMessageType; + typedef enum { - SignalBridgeConfirmedMfaKeyMetadataFfiResultMetadata, - SignalBridgeConfirmedMfaKeyMetadataFfiResultUnreadable, -} SignalBridgeConfirmedMfaKeyMetadataFfiResult_Tag; -typedef struct { - SignalBridgeMfaMetadataFfiResult _0; -} SignalBridgeConfirmedMfaKeyMetadataFfiResultSignalMetadata_Body; -typedef struct { - SignalBridgeConfirmedMfaKeyMetadataFfiResult_Tag tag; - union { - SignalBridgeConfirmedMfaKeyMetadataFfiResultSignalMetadata_Body metadata; - }; -} SignalBridgeConfirmedMfaKeyMetadataFfiResult; -static_assert_64bit(sizeof(SignalBridgeConfirmedMfaKeyMetadataFfiResult) == 24); -static_assert_64bit(alignof(SignalBridgeConfirmedMfaKeyMetadataFfiResult) == 8); + SignalContentHintDefault = 0, + SignalContentHintResendable = 1, + SignalContentHintImplicit = 2, +} SignalContentHint; + typedef enum { - SignalBridgeMfaKeyKindFfiResultTotp, - SignalBridgeMfaKeyKindFfiResultUnknown, -} SignalBridgeMfaKeyKindFfiResult; -static_assert_64bit(sizeof(SignalBridgeMfaKeyKindFfiResult) == 4); -static_assert_64bit(alignof(SignalBridgeMfaKeyKindFfiResult) == 4); -typedef struct { - int32_t id; - SignalBridgeConfirmedMfaKeyMetadataFfiResult metadata; - SignalBridgeMfaKeyKindFfiResult kind; -} SignalBridgeConfirmedMfaKeyFfiResult; -static_assert_64bit(offsetof(SignalBridgeConfirmedMfaKeyFfiResult, id) == 0); -static_assert_64bit(offsetof(SignalBridgeConfirmedMfaKeyFfiResult, metadata) == 8); -static_assert_64bit(offsetof(SignalBridgeConfirmedMfaKeyFfiResult, kind) == 32); -static_assert_64bit(sizeof(SignalBridgeConfirmedMfaKeyFfiResult) == 40); -static_assert_64bit(alignof(SignalBridgeConfirmedMfaKeyFfiResult) == 8); -typedef SignalBridgeConfirmedMfaKeyFfiResult* SignalType_MutPointer_SignalBridgeConfirmedMfaKeyFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalBridgeConfirmedMfaKeyFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalBridgeConfirmedMfaKeyFfiResult) == 8); -typedef struct { - SignalBridgeConfirmedMfaKeyFfiResult* base; - size_t length; - size_t size_bytes; -} SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult; -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult, length) == 8); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult, size_bytes) == 16); -static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 24); -static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 8); -typedef const SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult* SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 8); -typedef struct { - uint8_t id; - SignalOwnedBuffer encrypted_name; - uint64_t last_seen; - uint16_t registration_id; - SignalOwnedBuffer created_at_ciphertext; -} SignalLinkedDeviceInternalFfiResult; -static_assert_64bit(offsetof(SignalLinkedDeviceInternalFfiResult, id) == 0); -static_assert_64bit(offsetof(SignalLinkedDeviceInternalFfiResult, encrypted_name) == 8); -static_assert_64bit(offsetof(SignalLinkedDeviceInternalFfiResult, last_seen) == 24); -static_assert_64bit(offsetof(SignalLinkedDeviceInternalFfiResult, registration_id) == 32); -static_assert_64bit(offsetof(SignalLinkedDeviceInternalFfiResult, created_at_ciphertext) == 40); -static_assert_64bit(sizeof(SignalLinkedDeviceInternalFfiResult) == 56); -static_assert_64bit(alignof(SignalLinkedDeviceInternalFfiResult) == 8); -typedef SignalLinkedDeviceInternalFfiResult* SignalType_MutPointer_SignalLinkedDeviceInternalFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalLinkedDeviceInternalFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalLinkedDeviceInternalFfiResult) == 8); -typedef struct { - SignalLinkedDeviceInternalFfiResult* base; - size_t length; - size_t size_bytes; -} SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult; -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult, length) == 8); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult, size_bytes) == 16); -static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult) == 24); -static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult) == 8); -typedef const SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult* SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult) == 8); -typedef struct { - const int8_t* first; - const int8_t* second; -} SignalPairOfCStringPtrCStringPtr; -static_assert_64bit(offsetof(SignalPairOfCStringPtrCStringPtr, first) == 0); -static_assert_64bit(offsetof(SignalPairOfCStringPtrCStringPtr, second) == 8); -static_assert_64bit(sizeof(SignalPairOfCStringPtrCStringPtr) == 16); -static_assert_64bit(alignof(SignalPairOfCStringPtrCStringPtr) == 8); -typedef const SignalPairOfCStringPtrCStringPtr* SignalType_ConstPointer_SignalPairOfCStringPtrCStringPtr; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalPairOfCStringPtrCStringPtr) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalPairOfCStringPtrCStringPtr) == 8); -typedef struct { - SignalOwnedBufferOfCStringPtr first; - SignalOwnedBufferOfCStringPtr second; -} SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr; -static_assert_64bit(offsetof(SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr, first) == 0); -static_assert_64bit(offsetof(SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr, second) == 16); -static_assert_64bit(sizeof(SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr) == 32); -static_assert_64bit(alignof(SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr) == 8); -typedef const SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr* SignalType_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr) == 8); -typedef struct { - SignalOwnedBuffer first; - SignalOwnedBuffer second; -} SignalPairOfOwnedBufferOwnedBuffer; -static_assert_64bit(offsetof(SignalPairOfOwnedBufferOwnedBuffer, first) == 0); -static_assert_64bit(offsetof(SignalPairOfOwnedBufferOwnedBuffer, second) == 16); -static_assert_64bit(sizeof(SignalPairOfOwnedBufferOwnedBuffer) == 32); -static_assert_64bit(alignof(SignalPairOfOwnedBufferOwnedBuffer) == 8); -typedef const SignalPairOfOwnedBufferOwnedBuffer* SignalType_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer) == 8); -typedef struct { - SignalType_FixedArray16_uint8_t bytes; -} SignalUuid; -static_assert_64bit(offsetof(SignalUuid, bytes) == 0); -static_assert_64bit(sizeof(SignalUuid) == 16); -static_assert_64bit(alignof(SignalUuid) == 1); -typedef const SignalUuid* SignalType_ConstPointer_SignalUuid; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalUuid) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalUuid) == 8); -typedef void* SignalType_MutPointer_void; -static_assert_64bit(sizeof(SignalType_MutPointer_void) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_void) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_void)(SignalType_MutPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_void) == 8); -typedef struct SignalConnectionManager SignalConnectionManager; -typedef const SignalConnectionManager* SignalType_ConstPointer_SignalConnectionManager; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalConnectionManager) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalConnectionManager) == 8); -typedef SignalType_ConstPointer_SignalConnectionManager (*SignalType_FunctionPointer_ConstPointer_SignalConnectionManager_MutPointer_void)(SignalType_MutPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_ConstPointer_SignalConnectionManager_MutPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_ConstPointer_SignalConnectionManager_MutPointer_void) == 8); -typedef struct { - void* ctx; - SignalType_FunctionPointer_ConstPointer_SignalConnectionManager_MutPointer_void get_connection_manager; - SignalType_FunctionPointer_void_MutPointer_void destroy; -} SignalFfiConnectChatBridgeStruct; -static_assert_64bit(offsetof(SignalFfiConnectChatBridgeStruct, ctx) == 0); -static_assert_64bit(offsetof(SignalFfiConnectChatBridgeStruct, get_connection_manager) == 8); -static_assert_64bit(offsetof(SignalFfiConnectChatBridgeStruct, destroy) == 16); -static_assert_64bit(sizeof(SignalFfiConnectChatBridgeStruct) == 24); -static_assert_64bit(alignof(SignalFfiConnectChatBridgeStruct) == 8); -typedef const SignalFfiConnectChatBridgeStruct* SignalType_ConstPointer_SignalFfiConnectChatBridgeStruct; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiConnectChatBridgeStruct) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiConnectChatBridgeStruct) == 8); -typedef struct SignalFfiError SignalFfiError; -typedef const SignalFfiError* SignalType_ConstPointer_SignalFfiError; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiError) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiError) == 8); -typedef struct SignalHsmEnclaveClient SignalHsmEnclaveClient; -typedef const SignalHsmEnclaveClient* SignalType_ConstPointer_SignalHsmEnclaveClient; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalHsmEnclaveClient) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalHsmEnclaveClient) == 8); -typedef struct { - uint8_t* base; - size_t length; -} SignalBorrowedMutableBuffer; -static_assert_64bit(offsetof(SignalBorrowedMutableBuffer, base) == 0); -static_assert_64bit(offsetof(SignalBorrowedMutableBuffer, length) == 8); -static_assert_64bit(sizeof(SignalBorrowedMutableBuffer) == 16); -static_assert_64bit(alignof(SignalBorrowedMutableBuffer) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_size_t_SignalBorrowedMutableBuffer)(SignalType_MutPointer_void, SignalType_MutPointer_size_t, SignalBorrowedMutableBuffer); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_size_t_SignalBorrowedMutableBuffer) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_size_t_SignalBorrowedMutableBuffer) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_uint64_t)(SignalType_MutPointer_void, uint64_t); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint64_t) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint64_t) == 8); -typedef struct { - void* ctx; - SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_size_t_SignalBorrowedMutableBuffer read; - SignalType_FunctionPointer_int32_t_MutPointer_void_uint64_t skip; - SignalType_FunctionPointer_void_MutPointer_void destroy; -} SignalFfiSyncInputStreamStruct; -static_assert_64bit(offsetof(SignalFfiSyncInputStreamStruct, ctx) == 0); -static_assert_64bit(offsetof(SignalFfiSyncInputStreamStruct, read) == 8); -static_assert_64bit(offsetof(SignalFfiSyncInputStreamStruct, skip) == 16); -static_assert_64bit(offsetof(SignalFfiSyncInputStreamStruct, destroy) == 24); -static_assert_64bit(sizeof(SignalFfiSyncInputStreamStruct) == 32); -static_assert_64bit(alignof(SignalFfiSyncInputStreamStruct) == 8); -typedef const SignalFfiSyncInputStreamStruct* SignalType_ConstPointer_SignalFfiSyncInputStreamStruct; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiSyncInputStreamStruct) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiSyncInputStreamStruct) == 8); -typedef struct SignalMessageBackupKey SignalMessageBackupKey; -typedef const SignalMessageBackupKey* SignalType_ConstPointer_SignalMessageBackupKey; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalMessageBackupKey) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalMessageBackupKey) == 8); -typedef struct SignalMessageBackupValidationOutcome SignalMessageBackupValidationOutcome; -typedef const SignalMessageBackupValidationOutcome* SignalType_ConstPointer_SignalMessageBackupValidationOutcome; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalMessageBackupValidationOutcome) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalMessageBackupValidationOutcome) == 8); -typedef const SignalCdsiLookup* SignalType_ConstPointer_SignalCdsiLookup; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalCdsiLookup) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalCdsiLookup) == 8); -typedef struct SignalLookupRequest SignalLookupRequest; -typedef const SignalLookupRequest* SignalType_ConstPointer_SignalLookupRequest; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalLookupRequest) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalLookupRequest) == 8); -typedef const SignalAuthenticatedChatConnection* SignalType_ConstPointer_SignalAuthenticatedChatConnection; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalAuthenticatedChatConnection) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalAuthenticatedChatConnection) == 8); -static_assert_64bit(sizeof(int64_t) == 8); -static_assert_64bit(alignof(int64_t) == 8); -typedef struct { - int32_t source_attachment_cdn; - const int8_t* source_key; - int64_t object_length; - const SignalType_FixedArray15_uint8_t* media_id; - const SignalType_FixedArray64_uint8_t* encryption_key; -} SignalBridgeCopyBackupMediaItemFfiArg; -static_assert_64bit(offsetof(SignalBridgeCopyBackupMediaItemFfiArg, source_attachment_cdn) == 0); -static_assert_64bit(offsetof(SignalBridgeCopyBackupMediaItemFfiArg, source_key) == 8); -static_assert_64bit(offsetof(SignalBridgeCopyBackupMediaItemFfiArg, object_length) == 16); -static_assert_64bit(offsetof(SignalBridgeCopyBackupMediaItemFfiArg, media_id) == 24); -static_assert_64bit(offsetof(SignalBridgeCopyBackupMediaItemFfiArg, encryption_key) == 32); -static_assert_64bit(sizeof(SignalBridgeCopyBackupMediaItemFfiArg) == 40); -static_assert_64bit(alignof(SignalBridgeCopyBackupMediaItemFfiArg) == 8); -typedef const SignalBridgeCopyBackupMediaItemFfiArg* SignalType_ConstPointer_SignalBridgeCopyBackupMediaItemFfiArg; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalBridgeCopyBackupMediaItemFfiArg) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalBridgeCopyBackupMediaItemFfiArg) == 8); -typedef struct { - const SignalType_FixedArray15_uint8_t* media_id; - int32_t cdn; -} SignalBridgeDeleteBackupMediaItemFfiArg; -static_assert_64bit(offsetof(SignalBridgeDeleteBackupMediaItemFfiArg, media_id) == 0); -static_assert_64bit(offsetof(SignalBridgeDeleteBackupMediaItemFfiArg, cdn) == 8); -static_assert_64bit(sizeof(SignalBridgeDeleteBackupMediaItemFfiArg) == 16); -static_assert_64bit(alignof(SignalBridgeDeleteBackupMediaItemFfiArg) == 8); -typedef const SignalBridgeDeleteBackupMediaItemFfiArg* SignalType_ConstPointer_SignalBridgeDeleteBackupMediaItemFfiArg; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalBridgeDeleteBackupMediaItemFfiArg) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalBridgeDeleteBackupMediaItemFfiArg) == 8); -typedef struct { - const int8_t* backup_dir; - const int8_t* media_dir; - int64_t used_space; -} SignalBridgeMediaBackupInfoFfiResult; -static_assert_64bit(offsetof(SignalBridgeMediaBackupInfoFfiResult, backup_dir) == 0); -static_assert_64bit(offsetof(SignalBridgeMediaBackupInfoFfiResult, media_dir) == 8); -static_assert_64bit(offsetof(SignalBridgeMediaBackupInfoFfiResult, used_space) == 16); -static_assert_64bit(sizeof(SignalBridgeMediaBackupInfoFfiResult) == 24); -static_assert_64bit(alignof(SignalBridgeMediaBackupInfoFfiResult) == 8); -typedef const SignalBridgeMediaBackupInfoFfiResult* SignalType_ConstPointer_SignalBridgeMediaBackupInfoFfiResult; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalBridgeMediaBackupInfoFfiResult) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalBridgeMediaBackupInfoFfiResult) == 8); -typedef struct { - const int8_t* backup_dir; - int32_t cdn; - const int8_t* backup_name; -} SignalBridgeMessageBackupInfoFfiResult; -static_assert_64bit(offsetof(SignalBridgeMessageBackupInfoFfiResult, backup_dir) == 0); -static_assert_64bit(offsetof(SignalBridgeMessageBackupInfoFfiResult, cdn) == 8); -static_assert_64bit(offsetof(SignalBridgeMessageBackupInfoFfiResult, backup_name) == 16); -static_assert_64bit(sizeof(SignalBridgeMessageBackupInfoFfiResult) == 24); -static_assert_64bit(alignof(SignalBridgeMessageBackupInfoFfiResult) == 8); -typedef const SignalBridgeMessageBackupInfoFfiResult* SignalType_ConstPointer_SignalBridgeMessageBackupInfoFfiResult; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalBridgeMessageBackupInfoFfiResult) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalBridgeMessageBackupInfoFfiResult) == 8); -typedef struct { - const int8_t* algorithm; - int32_t password_length; - int32_t time_step_seconds; -} SignalBridgeTotpParametersFfiResult; -static_assert_64bit(offsetof(SignalBridgeTotpParametersFfiResult, algorithm) == 0); -static_assert_64bit(offsetof(SignalBridgeTotpParametersFfiResult, password_length) == 8); -static_assert_64bit(offsetof(SignalBridgeTotpParametersFfiResult, time_step_seconds) == 12); -static_assert_64bit(sizeof(SignalBridgeTotpParametersFfiResult) == 16); -static_assert_64bit(alignof(SignalBridgeTotpParametersFfiResult) == 8); -typedef struct { - SignalOwnedBuffer key; - SignalBridgeTotpParametersFfiResult parameters; -} SignalBridgePendingTotpKeyFfiResult; -static_assert_64bit(offsetof(SignalBridgePendingTotpKeyFfiResult, key) == 0); -static_assert_64bit(offsetof(SignalBridgePendingTotpKeyFfiResult, parameters) == 16); -static_assert_64bit(sizeof(SignalBridgePendingTotpKeyFfiResult) == 32); -static_assert_64bit(alignof(SignalBridgePendingTotpKeyFfiResult) == 8); -typedef const SignalBridgePendingTotpKeyFfiResult* SignalType_ConstPointer_SignalBridgePendingTotpKeyFfiResult; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalBridgePendingTotpKeyFfiResult) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalBridgePendingTotpKeyFfiResult) == 8); -typedef struct { - int32_t aci_ec_pre_key_count; - int32_t aci_kem_pre_key_count; - int32_t pni_ec_pre_key_count; - int32_t pni_kem_pre_key_count; -} SignalBridgePreKeyCountsFfiResult; -static_assert_64bit(offsetof(SignalBridgePreKeyCountsFfiResult, aci_ec_pre_key_count) == 0); -static_assert_64bit(offsetof(SignalBridgePreKeyCountsFfiResult, aci_kem_pre_key_count) == 4); -static_assert_64bit(offsetof(SignalBridgePreKeyCountsFfiResult, pni_ec_pre_key_count) == 8); -static_assert_64bit(offsetof(SignalBridgePreKeyCountsFfiResult, pni_kem_pre_key_count) == 12); -static_assert_64bit(sizeof(SignalBridgePreKeyCountsFfiResult) == 16); -static_assert_64bit(alignof(SignalBridgePreKeyCountsFfiResult) == 4); -typedef const SignalBridgePreKeyCountsFfiResult* SignalType_ConstPointer_SignalBridgePreKeyCountsFfiResult; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalBridgePreKeyCountsFfiResult) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalBridgePreKeyCountsFfiResult) == 8); -typedef enum { - SignalBridgeCopyBackupMediaResultFfiResultSuccess, - SignalBridgeCopyBackupMediaResultFfiResultSourceNotFound, - SignalBridgeCopyBackupMediaResultFfiResultWrongSourceLength, - SignalBridgeCopyBackupMediaResultFfiResultOutOfSpace, -} SignalBridgeCopyBackupMediaResultFfiResult_Tag; -typedef struct { - int32_t cdn; -} SignalBridgeCopyBackupMediaResultFfiResultSignalSuccess_Body; -typedef struct { - SignalBridgeCopyBackupMediaResultFfiResult_Tag tag; - union { - SignalBridgeCopyBackupMediaResultFfiResultSignalSuccess_Body success; - }; -} SignalBridgeCopyBackupMediaResultFfiResult; -static_assert_64bit(sizeof(SignalBridgeCopyBackupMediaResultFfiResult) == 8); -static_assert_64bit(alignof(SignalBridgeCopyBackupMediaResultFfiResult) == 4); -typedef struct { - SignalType_FixedArray15_uint8_t media_id; - SignalBridgeCopyBackupMediaResultFfiResult result; -} SignalBridgeCopyBackupMediaOutcomeFfiResult; -static_assert_64bit(offsetof(SignalBridgeCopyBackupMediaOutcomeFfiResult, media_id) == 0); -static_assert_64bit(offsetof(SignalBridgeCopyBackupMediaOutcomeFfiResult, result) == 16); -static_assert_64bit(sizeof(SignalBridgeCopyBackupMediaOutcomeFfiResult) == 24); -static_assert_64bit(alignof(SignalBridgeCopyBackupMediaOutcomeFfiResult) == 4); -typedef SignalBridgeCopyBackupMediaOutcomeFfiResult* SignalType_MutPointer_SignalBridgeCopyBackupMediaOutcomeFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalBridgeCopyBackupMediaOutcomeFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalBridgeCopyBackupMediaOutcomeFfiResult) == 8); -typedef struct { - SignalBridgeCopyBackupMediaOutcomeFfiResult* base; - size_t length; - size_t size_bytes; -} SignalOwnedBufferOfMaxAlignedBridgeCopyBackupMediaOutcomeFfiResult; -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedBridgeCopyBackupMediaOutcomeFfiResult, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedBridgeCopyBackupMediaOutcomeFfiResult, length) == 8); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedBridgeCopyBackupMediaOutcomeFfiResult, size_bytes) == 16); -static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedBridgeCopyBackupMediaOutcomeFfiResult) == 24); -static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedBridgeCopyBackupMediaOutcomeFfiResult) == 8); -typedef SignalFfiError* SignalType_MutPointer_SignalFfiError; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalFfiError) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalFfiError) == 8); -typedef struct { - SignalFfiError* raw; -} SignalFfiBulkPolledStreamTerminationReason; -static_assert_64bit(offsetof(SignalFfiBulkPolledStreamTerminationReason, raw) == 0); -static_assert_64bit(sizeof(SignalFfiBulkPolledStreamTerminationReason) == 8); -static_assert_64bit(alignof(SignalFfiBulkPolledStreamTerminationReason) == 8); -typedef struct { - SignalOwnedBufferOfMaxAlignedBridgeCopyBackupMediaOutcomeFfiResult chunk; - SignalFfiBulkPolledStreamTerminationReason termination; -} SignalCopyBackupMediaNextChunkFfiResult; -static_assert_64bit(offsetof(SignalCopyBackupMediaNextChunkFfiResult, chunk) == 0); -static_assert_64bit(offsetof(SignalCopyBackupMediaNextChunkFfiResult, termination) == 24); -static_assert_64bit(sizeof(SignalCopyBackupMediaNextChunkFfiResult) == 32); -static_assert_64bit(alignof(SignalCopyBackupMediaNextChunkFfiResult) == 8); -typedef const SignalCopyBackupMediaNextChunkFfiResult* SignalType_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult) == 8); -typedef struct SignalCopyBackupMediaStream SignalCopyBackupMediaStream; -typedef const SignalCopyBackupMediaStream* SignalType_ConstPointer_SignalCopyBackupMediaStream; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalCopyBackupMediaStream) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalCopyBackupMediaStream) == 8); -typedef struct { - SignalType_FixedArray15_uint8_t media_id; - int32_t cdn; -} SignalBridgeDeleteBackupMediaItemFfiResult; -static_assert_64bit(offsetof(SignalBridgeDeleteBackupMediaItemFfiResult, media_id) == 0); -static_assert_64bit(offsetof(SignalBridgeDeleteBackupMediaItemFfiResult, cdn) == 16); -static_assert_64bit(sizeof(SignalBridgeDeleteBackupMediaItemFfiResult) == 20); -static_assert_64bit(alignof(SignalBridgeDeleteBackupMediaItemFfiResult) == 4); -typedef SignalBridgeDeleteBackupMediaItemFfiResult* SignalType_MutPointer_SignalBridgeDeleteBackupMediaItemFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalBridgeDeleteBackupMediaItemFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalBridgeDeleteBackupMediaItemFfiResult) == 8); -typedef struct { - SignalBridgeDeleteBackupMediaItemFfiResult* base; - size_t length; - size_t size_bytes; -} SignalOwnedBufferOfMaxAlignedBridgeDeleteBackupMediaItemFfiResult; -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedBridgeDeleteBackupMediaItemFfiResult, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedBridgeDeleteBackupMediaItemFfiResult, length) == 8); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedBridgeDeleteBackupMediaItemFfiResult, size_bytes) == 16); -static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedBridgeDeleteBackupMediaItemFfiResult) == 24); -static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedBridgeDeleteBackupMediaItemFfiResult) == 8); -typedef struct { - SignalOwnedBufferOfMaxAlignedBridgeDeleteBackupMediaItemFfiResult chunk; - SignalFfiBulkPolledStreamTerminationReason termination; -} SignalDeleteBackupMediaNextChunkFfiResult; -static_assert_64bit(offsetof(SignalDeleteBackupMediaNextChunkFfiResult, chunk) == 0); -static_assert_64bit(offsetof(SignalDeleteBackupMediaNextChunkFfiResult, termination) == 24); -static_assert_64bit(sizeof(SignalDeleteBackupMediaNextChunkFfiResult) == 32); -static_assert_64bit(alignof(SignalDeleteBackupMediaNextChunkFfiResult) == 8); -typedef const SignalDeleteBackupMediaNextChunkFfiResult* SignalType_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult) == 8); -typedef struct SignalDeleteBackupMediaStream SignalDeleteBackupMediaStream; -typedef const SignalDeleteBackupMediaStream* SignalType_ConstPointer_SignalDeleteBackupMediaStream; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalDeleteBackupMediaStream) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalDeleteBackupMediaStream) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void)(SignalType_MutPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalFfiError)(SignalType_MutPointer_void, SignalType_MutPointer_SignalFfiError); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalFfiError) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalFfiError) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_SignalBytestringArray)(SignalType_MutPointer_void, SignalBytestringArray); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalBytestringArray) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalBytestringArray) == 8); -typedef struct SignalServerMessageAck SignalServerMessageAck; -typedef SignalServerMessageAck* SignalType_MutPointer_SignalServerMessageAck; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalServerMessageAck) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalServerMessageAck) == 8); -typedef struct { - SignalServerMessageAck* raw; -} SignalMutPointerServerMessageAck; -static_assert_64bit(offsetof(SignalMutPointerServerMessageAck, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerServerMessageAck) == 8); -static_assert_64bit(alignof(SignalMutPointerServerMessageAck) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_uint64_t_SignalMutPointerServerMessageAck)(SignalType_MutPointer_void, SignalOwnedBuffer, uint64_t, SignalMutPointerServerMessageAck); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_uint64_t_SignalMutPointerServerMessageAck) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_uint64_t_SignalMutPointerServerMessageAck) == 8); -typedef struct { - void* ctx; - SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_uint64_t_SignalMutPointerServerMessageAck received_incoming_message; - SignalType_FunctionPointer_int32_t_MutPointer_void received_queue_empty; - SignalType_FunctionPointer_int32_t_MutPointer_void_SignalBytestringArray received_alerts; - SignalType_FunctionPointer_int32_t_MutPointer_void_uint64_t received_server_timestamp; - SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalFfiError connection_interrupted; - SignalType_FunctionPointer_void_MutPointer_void destroy; -} SignalFfiChatListenerStruct; -static_assert_64bit(offsetof(SignalFfiChatListenerStruct, ctx) == 0); -static_assert_64bit(offsetof(SignalFfiChatListenerStruct, received_incoming_message) == 8); -static_assert_64bit(offsetof(SignalFfiChatListenerStruct, received_queue_empty) == 16); -static_assert_64bit(offsetof(SignalFfiChatListenerStruct, received_alerts) == 24); -static_assert_64bit(offsetof(SignalFfiChatListenerStruct, received_server_timestamp) == 32); -static_assert_64bit(offsetof(SignalFfiChatListenerStruct, connection_interrupted) == 40); -static_assert_64bit(offsetof(SignalFfiChatListenerStruct, destroy) == 48); -static_assert_64bit(sizeof(SignalFfiChatListenerStruct) == 56); -static_assert_64bit(alignof(SignalFfiChatListenerStruct) == 8); -typedef const SignalFfiChatListenerStruct* SignalType_ConstPointer_SignalFfiChatListenerStruct; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiChatListenerStruct) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiChatListenerStruct) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_SignalCStringPtr_SignalMutPointerServerMessageAck)(SignalType_MutPointer_void, SignalCStringPtr, SignalMutPointerServerMessageAck); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalCStringPtr_SignalMutPointerServerMessageAck) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalCStringPtr_SignalMutPointerServerMessageAck) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_SignalMutPointerServerMessageAck)(SignalType_MutPointer_void, SignalOwnedBuffer, SignalMutPointerServerMessageAck); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_SignalMutPointerServerMessageAck) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_SignalMutPointerServerMessageAck) == 8); -typedef struct { - void* ctx; - SignalType_FunctionPointer_int32_t_MutPointer_void_SignalCStringPtr_SignalMutPointerServerMessageAck received_address; - SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_SignalMutPointerServerMessageAck received_envelope; - SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalFfiError connection_interrupted; - SignalType_FunctionPointer_void_MutPointer_void destroy; -} SignalFfiProvisioningListenerStruct; -static_assert_64bit(offsetof(SignalFfiProvisioningListenerStruct, ctx) == 0); -static_assert_64bit(offsetof(SignalFfiProvisioningListenerStruct, received_address) == 8); -static_assert_64bit(offsetof(SignalFfiProvisioningListenerStruct, received_envelope) == 16); -static_assert_64bit(offsetof(SignalFfiProvisioningListenerStruct, connection_interrupted) == 24); -static_assert_64bit(offsetof(SignalFfiProvisioningListenerStruct, destroy) == 32); -static_assert_64bit(sizeof(SignalFfiProvisioningListenerStruct) == 40); -static_assert_64bit(alignof(SignalFfiProvisioningListenerStruct) == 8); -typedef const SignalFfiProvisioningListenerStruct* SignalType_ConstPointer_SignalFfiProvisioningListenerStruct; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiProvisioningListenerStruct) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiProvisioningListenerStruct) == 8); -typedef struct SignalHttpRequest SignalHttpRequest; -typedef const SignalHttpRequest* SignalType_ConstPointer_SignalHttpRequest; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalHttpRequest) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalHttpRequest) == 8); -typedef const SignalProvisioningChatConnection* SignalType_ConstPointer_SignalProvisioningChatConnection; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalProvisioningChatConnection) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalProvisioningChatConnection) == 8); -typedef const SignalServerMessageAck* SignalType_ConstPointer_SignalServerMessageAck; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalServerMessageAck) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalServerMessageAck) == 8); -typedef const SignalUnauthenticatedChatConnection* SignalType_ConstPointer_SignalUnauthenticatedChatConnection; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalUnauthenticatedChatConnection) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalUnauthenticatedChatConnection) == 8); -typedef SignalPairOfCStringPtrCStringPtr* SignalType_MutPointer_SignalPairOfCStringPtrCStringPtr; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalPairOfCStringPtrCStringPtr) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalPairOfCStringPtrCStringPtr) == 8); -typedef struct { - SignalPairOfCStringPtrCStringPtr* base; - size_t length; - size_t size_bytes; -} SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr; -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr, length) == 8); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr, size_bytes) == 16); -static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr) == 24); -static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr) == 8); -typedef struct { - const int8_t* base; - SignalOwnedBufferOfMaxAlignedPairOfCStringPtrCStringPtr conversions; -} SignalCurrencyInternalFfiResult; -static_assert_64bit(offsetof(SignalCurrencyInternalFfiResult, base) == 0); -static_assert_64bit(offsetof(SignalCurrencyInternalFfiResult, conversions) == 8); -static_assert_64bit(sizeof(SignalCurrencyInternalFfiResult) == 32); -static_assert_64bit(alignof(SignalCurrencyInternalFfiResult) == 8); -typedef SignalCurrencyInternalFfiResult* SignalType_MutPointer_SignalCurrencyInternalFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCurrencyInternalFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCurrencyInternalFfiResult) == 8); -typedef struct { - SignalCurrencyInternalFfiResult* base; - size_t length; - size_t size_bytes; -} SignalOwnedBufferOfMaxAlignedCurrencyInternalFfiResult; -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedCurrencyInternalFfiResult, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedCurrencyInternalFfiResult, length) == 8); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedCurrencyInternalFfiResult, size_bytes) == 16); -static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedCurrencyInternalFfiResult) == 24); -static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedCurrencyInternalFfiResult) == 8); -typedef struct { - uint64_t timestamp_ms; - SignalOwnedBufferOfMaxAlignedCurrencyInternalFfiResult currencies; -} SignalCurrencyConversionsInternalFfiResult; -static_assert_64bit(offsetof(SignalCurrencyConversionsInternalFfiResult, timestamp_ms) == 0); -static_assert_64bit(offsetof(SignalCurrencyConversionsInternalFfiResult, currencies) == 8); -static_assert_64bit(sizeof(SignalCurrencyConversionsInternalFfiResult) == 32); -static_assert_64bit(alignof(SignalCurrencyConversionsInternalFfiResult) == 8); -typedef const SignalCurrencyConversionsInternalFfiResult* SignalType_ConstPointer_SignalCurrencyConversionsInternalFfiResult; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalCurrencyConversionsInternalFfiResult) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalCurrencyConversionsInternalFfiResult) == 8); -typedef enum { - SignalDeviceCapabilityInternalFfiArgStorage, - SignalDeviceCapabilityInternalFfiArgTransfer, - SignalDeviceCapabilityInternalFfiArgAttachmentBackfill, - SignalDeviceCapabilityInternalFfiArgSparsePostQuantumRatchet, - SignalDeviceCapabilityInternalFfiArgProfilesV2, - SignalDeviceCapabilityInternalFfiArgUsernameChangeSyncMessage, - SignalDeviceCapabilityInternalFfiArgOptionalPhoneNumber, -} SignalDeviceCapabilityInternalFfiArg; -static_assert_64bit(sizeof(SignalDeviceCapabilityInternalFfiArg) == 4); -static_assert_64bit(alignof(SignalDeviceCapabilityInternalFfiArg) == 4); -typedef const SignalDeviceCapabilityInternalFfiArg* SignalType_ConstPointer_SignalDeviceCapabilityInternalFfiArg; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalDeviceCapabilityInternalFfiArg) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalDeviceCapabilityInternalFfiArg) == 8); -typedef struct { - const int8_t* key; - const int8_t* credential; - const int8_t* acl; - const int8_t* algorithm; - const int8_t* date; - const int8_t* policy; - const int8_t* signature; -} SignalS3UploadFormInternalFfiResult; -static_assert_64bit(offsetof(SignalS3UploadFormInternalFfiResult, key) == 0); -static_assert_64bit(offsetof(SignalS3UploadFormInternalFfiResult, credential) == 8); -static_assert_64bit(offsetof(SignalS3UploadFormInternalFfiResult, acl) == 16); -static_assert_64bit(offsetof(SignalS3UploadFormInternalFfiResult, algorithm) == 24); -static_assert_64bit(offsetof(SignalS3UploadFormInternalFfiResult, date) == 32); -static_assert_64bit(offsetof(SignalS3UploadFormInternalFfiResult, policy) == 40); -static_assert_64bit(offsetof(SignalS3UploadFormInternalFfiResult, signature) == 48); -static_assert_64bit(sizeof(SignalS3UploadFormInternalFfiResult) == 56); -static_assert_64bit(alignof(SignalS3UploadFormInternalFfiResult) == 8); -typedef SignalS3UploadFormInternalFfiResult* SignalType_MutPointer_SignalS3UploadFormInternalFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalS3UploadFormInternalFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalS3UploadFormInternalFfiResult) == 8); -typedef struct { - SignalS3UploadFormInternalFfiResult* base; - size_t length; - size_t size_bytes; -} SignalOwnedBufferOfMaxAlignedS3UploadFormInternalFfiResult; -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedS3UploadFormInternalFfiResult, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedS3UploadFormInternalFfiResult, length) == 8); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedS3UploadFormInternalFfiResult, size_bytes) == 16); -static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedS3UploadFormInternalFfiResult) == 24); -static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedS3UploadFormInternalFfiResult) == 8); -typedef struct { - const int8_t* pack_id; - SignalS3UploadFormInternalFfiResult manifest_upload_form; - SignalOwnedBufferOfMaxAlignedS3UploadFormInternalFfiResult sticker_upload_forms; -} SignalGetStickerUploadFormsResponseFfiResult; -static_assert_64bit(offsetof(SignalGetStickerUploadFormsResponseFfiResult, pack_id) == 0); -static_assert_64bit(offsetof(SignalGetStickerUploadFormsResponseFfiResult, manifest_upload_form) == 8); -static_assert_64bit(offsetof(SignalGetStickerUploadFormsResponseFfiResult, sticker_upload_forms) == 64); -static_assert_64bit(sizeof(SignalGetStickerUploadFormsResponseFfiResult) == 88); -static_assert_64bit(alignof(SignalGetStickerUploadFormsResponseFfiResult) == 8); -typedef const SignalGetStickerUploadFormsResponseFfiResult* SignalType_ConstPointer_SignalGetStickerUploadFormsResponseFfiResult; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalGetStickerUploadFormsResponseFfiResult) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalGetStickerUploadFormsResponseFfiResult) == 8); -typedef struct { - int32_t cdn; - SignalType_FixedArray15_uint8_t media_id; - int64_t object_length; -} SignalListMediaItemFfiResult; -static_assert_64bit(offsetof(SignalListMediaItemFfiResult, cdn) == 0); -static_assert_64bit(offsetof(SignalListMediaItemFfiResult, media_id) == 4); -static_assert_64bit(offsetof(SignalListMediaItemFfiResult, object_length) == 24); -static_assert_64bit(sizeof(SignalListMediaItemFfiResult) == 32); -static_assert_64bit(alignof(SignalListMediaItemFfiResult) == 8); -typedef SignalListMediaItemFfiResult* SignalType_MutPointer_SignalListMediaItemFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalListMediaItemFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalListMediaItemFfiResult) == 8); -typedef struct { - SignalListMediaItemFfiResult* base; - size_t length; - size_t size_bytes; -} SignalOwnedBufferOfMaxAlignedListMediaItemFfiResult; -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedListMediaItemFfiResult, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedListMediaItemFfiResult, length) == 8); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedListMediaItemFfiResult, size_bytes) == 16); -static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedListMediaItemFfiResult) == 24); -static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedListMediaItemFfiResult) == 8); -typedef struct { - SignalOwnedBufferOfMaxAlignedListMediaItemFfiResult items; - const int8_t* backup_dir; - const int8_t* media_dir; - const int8_t* cursor; -} SignalListMediaResponseFfiResult; -static_assert_64bit(offsetof(SignalListMediaResponseFfiResult, items) == 0); -static_assert_64bit(offsetof(SignalListMediaResponseFfiResult, backup_dir) == 24); -static_assert_64bit(offsetof(SignalListMediaResponseFfiResult, media_dir) == 32); -static_assert_64bit(offsetof(SignalListMediaResponseFfiResult, cursor) == 40); -static_assert_64bit(sizeof(SignalListMediaResponseFfiResult) == 48); -static_assert_64bit(alignof(SignalListMediaResponseFfiResult) == 8); -typedef const SignalListMediaResponseFfiResult* SignalType_ConstPointer_SignalListMediaResponseFfiResult; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalListMediaResponseFfiResult) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalListMediaResponseFfiResult) == 8); -typedef struct SignalRegistrationAccountAttributes SignalRegistrationAccountAttributes; -typedef const SignalRegistrationAccountAttributes* SignalType_ConstPointer_SignalRegistrationAccountAttributes; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalRegistrationAccountAttributes) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalRegistrationAccountAttributes) == 8); -typedef struct SignalRegisterAccountRequest SignalRegisterAccountRequest; -typedef const SignalRegisterAccountRequest* SignalType_ConstPointer_SignalRegisterAccountRequest; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalRegisterAccountRequest) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalRegisterAccountRequest) == 8); -typedef const SignalRegistrationService* SignalType_ConstPointer_SignalRegistrationService; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalRegistrationService) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalRegistrationService) == 8); -typedef struct SignalTokioAsyncContext SignalTokioAsyncContext; -typedef const SignalTokioAsyncContext* SignalType_ConstPointer_SignalTokioAsyncContext; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalTokioAsyncContext) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalTokioAsyncContext) == 8); -typedef bool* SignalType_MutPointer_bool; -static_assert_64bit(sizeof(SignalType_MutPointer_bool) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_bool) == 8); -typedef SignalProtocolAddress* SignalType_MutPointer_SignalProtocolAddress; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalProtocolAddress) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalProtocolAddress) == 8); -typedef struct { - SignalProtocolAddress* raw; -} SignalMutPointerProtocolAddress; -static_assert_64bit(offsetof(SignalMutPointerProtocolAddress, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerProtocolAddress) == 8); -static_assert_64bit(alignof(SignalMutPointerProtocolAddress) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_bool_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey_uint32_t)(SignalType_MutPointer_void, SignalType_MutPointer_bool, SignalMutPointerProtocolAddress, SignalMutPointerPublicKey, uint32_t); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_bool_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey_uint32_t) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_bool_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey_uint32_t) == 8); -typedef SignalMutPointerPublicKey* SignalType_MutPointer_SignalMutPointerPublicKey; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerPublicKey) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerPublicKey) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPublicKey_SignalMutPointerProtocolAddress)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerPublicKey, SignalMutPointerProtocolAddress); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPublicKey_SignalMutPointerProtocolAddress) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPublicKey_SignalMutPointerProtocolAddress) == 8); -typedef struct SignalPrivateKey SignalPrivateKey; -typedef SignalPrivateKey* SignalType_MutPointer_SignalPrivateKey; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalPrivateKey) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalPrivateKey) == 8); -typedef struct { - SignalPrivateKey* raw; -} SignalMutPointerPrivateKey; -static_assert_64bit(offsetof(SignalMutPointerPrivateKey, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerPrivateKey) == 8); -static_assert_64bit(alignof(SignalMutPointerPrivateKey) == 8); -typedef struct { - SignalMutPointerPrivateKey first; - SignalMutPointerPublicKey second; -} SignalPairOfMutPointerPrivateKeyMutPointerPublicKey; -static_assert_64bit(offsetof(SignalPairOfMutPointerPrivateKeyMutPointerPublicKey, first) == 0); -static_assert_64bit(offsetof(SignalPairOfMutPointerPrivateKeyMutPointerPublicKey, second) == 8); -static_assert_64bit(sizeof(SignalPairOfMutPointerPrivateKeyMutPointerPublicKey) == 16); -static_assert_64bit(alignof(SignalPairOfMutPointerPrivateKeyMutPointerPublicKey) == 8); -typedef SignalPairOfMutPointerPrivateKeyMutPointerPublicKey* SignalType_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey)(SignalType_MutPointer_void, SignalType_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey) == 8); -typedef uint32_t* SignalType_MutPointer_uint32_t; -static_assert_64bit(sizeof(SignalType_MutPointer_uint32_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_uint32_t) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint32_t)(SignalType_MutPointer_void, SignalType_MutPointer_uint32_t); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint32_t) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint32_t) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint8_t_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey)(SignalType_MutPointer_void, SignalType_MutPointer_uint8_t, SignalMutPointerProtocolAddress, SignalMutPointerPublicKey); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint8_t_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint8_t_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey) == 8); -typedef struct { - void* ctx; - SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey get_local_identity_key_pair; - SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint32_t get_local_registration_id; - SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPublicKey_SignalMutPointerProtocolAddress get_identity_key; - SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint8_t_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey save_identity_key; - SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_bool_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey_uint32_t is_trusted_identity; - SignalType_FunctionPointer_void_MutPointer_void destroy; -} SignalFfiIdentityKeyStoreStruct; -static_assert_64bit(offsetof(SignalFfiIdentityKeyStoreStruct, ctx) == 0); -static_assert_64bit(offsetof(SignalFfiIdentityKeyStoreStruct, get_local_identity_key_pair) == 8); -static_assert_64bit(offsetof(SignalFfiIdentityKeyStoreStruct, get_local_registration_id) == 16); -static_assert_64bit(offsetof(SignalFfiIdentityKeyStoreStruct, get_identity_key) == 24); -static_assert_64bit(offsetof(SignalFfiIdentityKeyStoreStruct, save_identity_key) == 32); -static_assert_64bit(offsetof(SignalFfiIdentityKeyStoreStruct, is_trusted_identity) == 40); -static_assert_64bit(offsetof(SignalFfiIdentityKeyStoreStruct, destroy) == 48); -static_assert_64bit(sizeof(SignalFfiIdentityKeyStoreStruct) == 56); -static_assert_64bit(alignof(SignalFfiIdentityKeyStoreStruct) == 8); -typedef const SignalFfiIdentityKeyStoreStruct* SignalType_ConstPointer_SignalFfiIdentityKeyStoreStruct; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiIdentityKeyStoreStruct) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiIdentityKeyStoreStruct) == 8); -typedef struct SignalKyberPreKeyRecord SignalKyberPreKeyRecord; -typedef SignalKyberPreKeyRecord* SignalType_MutPointer_SignalKyberPreKeyRecord; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalKyberPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalKyberPreKeyRecord) == 8); -typedef struct { - SignalKyberPreKeyRecord* raw; -} SignalMutPointerKyberPreKeyRecord; -static_assert_64bit(offsetof(SignalMutPointerKyberPreKeyRecord, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerKyberPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalMutPointerKyberPreKeyRecord) == 8); -typedef SignalMutPointerKyberPreKeyRecord* SignalType_MutPointer_SignalMutPointerKyberPreKeyRecord; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerKyberPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerKyberPreKeyRecord) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerKyberPreKeyRecord_uint32_t)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerKyberPreKeyRecord, uint32_t); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerKyberPreKeyRecord_uint32_t) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerKyberPreKeyRecord_uint32_t) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerKyberPreKeyRecord)(SignalType_MutPointer_void, uint32_t, SignalMutPointerKyberPreKeyRecord); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerKyberPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerKyberPreKeyRecord) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_uint32_t_SignalMutPointerPublicKey)(SignalType_MutPointer_void, uint32_t, uint32_t, SignalMutPointerPublicKey); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_uint32_t_SignalMutPointerPublicKey) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_uint32_t_SignalMutPointerPublicKey) == 8); -typedef struct { - void* ctx; - SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerKyberPreKeyRecord_uint32_t load_kyber_pre_key; - SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerKyberPreKeyRecord store_kyber_pre_key; - SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_uint32_t_SignalMutPointerPublicKey mark_kyber_pre_key_used; - SignalType_FunctionPointer_void_MutPointer_void destroy; -} SignalFfiKyberPreKeyStoreStruct; -static_assert_64bit(offsetof(SignalFfiKyberPreKeyStoreStruct, ctx) == 0); -static_assert_64bit(offsetof(SignalFfiKyberPreKeyStoreStruct, load_kyber_pre_key) == 8); -static_assert_64bit(offsetof(SignalFfiKyberPreKeyStoreStruct, store_kyber_pre_key) == 16); -static_assert_64bit(offsetof(SignalFfiKyberPreKeyStoreStruct, mark_kyber_pre_key_used) == 24); -static_assert_64bit(offsetof(SignalFfiKyberPreKeyStoreStruct, destroy) == 32); -static_assert_64bit(sizeof(SignalFfiKyberPreKeyStoreStruct) == 40); -static_assert_64bit(alignof(SignalFfiKyberPreKeyStoreStruct) == 8); -typedef const SignalFfiKyberPreKeyStoreStruct* SignalType_ConstPointer_SignalFfiKyberPreKeyStoreStruct; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiKyberPreKeyStoreStruct) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiKyberPreKeyStoreStruct) == 8); -typedef struct SignalPreKeyRecord SignalPreKeyRecord; -typedef SignalPreKeyRecord* SignalType_MutPointer_SignalPreKeyRecord; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalPreKeyRecord) == 8); -typedef struct { - SignalPreKeyRecord* raw; -} SignalMutPointerPreKeyRecord; -static_assert_64bit(offsetof(SignalMutPointerPreKeyRecord, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalMutPointerPreKeyRecord) == 8); -typedef SignalMutPointerPreKeyRecord* SignalType_MutPointer_SignalMutPointerPreKeyRecord; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerPreKeyRecord) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPreKeyRecord_uint32_t)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerPreKeyRecord, uint32_t); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPreKeyRecord_uint32_t) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPreKeyRecord_uint32_t) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t)(SignalType_MutPointer_void, uint32_t); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerPreKeyRecord)(SignalType_MutPointer_void, uint32_t, SignalMutPointerPreKeyRecord); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerPreKeyRecord) == 8); -typedef struct { - void* ctx; - SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPreKeyRecord_uint32_t load_pre_key; - SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerPreKeyRecord store_pre_key; - SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t remove_pre_key; - SignalType_FunctionPointer_void_MutPointer_void destroy; -} SignalFfiPreKeyStoreStruct; -static_assert_64bit(offsetof(SignalFfiPreKeyStoreStruct, ctx) == 0); -static_assert_64bit(offsetof(SignalFfiPreKeyStoreStruct, load_pre_key) == 8); -static_assert_64bit(offsetof(SignalFfiPreKeyStoreStruct, store_pre_key) == 16); -static_assert_64bit(offsetof(SignalFfiPreKeyStoreStruct, remove_pre_key) == 24); -static_assert_64bit(offsetof(SignalFfiPreKeyStoreStruct, destroy) == 32); -static_assert_64bit(sizeof(SignalFfiPreKeyStoreStruct) == 40); -static_assert_64bit(alignof(SignalFfiPreKeyStoreStruct) == 8); -typedef const SignalFfiPreKeyStoreStruct* SignalType_ConstPointer_SignalFfiPreKeyStoreStruct; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiPreKeyStoreStruct) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiPreKeyStoreStruct) == 8); -typedef struct SignalSenderKeyRecord SignalSenderKeyRecord; -typedef SignalSenderKeyRecord* SignalType_MutPointer_SignalSenderKeyRecord; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalSenderKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalSenderKeyRecord) == 8); -typedef struct { - SignalSenderKeyRecord* raw; -} SignalMutPointerSenderKeyRecord; -static_assert_64bit(offsetof(SignalMutPointerSenderKeyRecord, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerSenderKeyRecord) == 8); -static_assert_64bit(alignof(SignalMutPointerSenderKeyRecord) == 8); -typedef SignalMutPointerSenderKeyRecord* SignalType_MutPointer_SignalMutPointerSenderKeyRecord; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerSenderKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerSenderKeyRecord) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSenderKeyRecord_SignalMutPointerProtocolAddress_SignalUuid)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerSenderKeyRecord, SignalMutPointerProtocolAddress, SignalUuid); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSenderKeyRecord_SignalMutPointerProtocolAddress_SignalUuid) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSenderKeyRecord_SignalMutPointerProtocolAddress_SignalUuid) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalUuid_SignalMutPointerSenderKeyRecord)(SignalType_MutPointer_void, SignalMutPointerProtocolAddress, SignalUuid, SignalMutPointerSenderKeyRecord); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalUuid_SignalMutPointerSenderKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalUuid_SignalMutPointerSenderKeyRecord) == 8); -typedef struct { - void* ctx; - SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSenderKeyRecord_SignalMutPointerProtocolAddress_SignalUuid load_sender_key; - SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalUuid_SignalMutPointerSenderKeyRecord store_sender_key; - SignalType_FunctionPointer_void_MutPointer_void destroy; -} SignalFfiSenderKeyStoreStruct; -static_assert_64bit(offsetof(SignalFfiSenderKeyStoreStruct, ctx) == 0); -static_assert_64bit(offsetof(SignalFfiSenderKeyStoreStruct, load_sender_key) == 8); -static_assert_64bit(offsetof(SignalFfiSenderKeyStoreStruct, store_sender_key) == 16); -static_assert_64bit(offsetof(SignalFfiSenderKeyStoreStruct, destroy) == 24); -static_assert_64bit(sizeof(SignalFfiSenderKeyStoreStruct) == 32); -static_assert_64bit(alignof(SignalFfiSenderKeyStoreStruct) == 8); -typedef const SignalFfiSenderKeyStoreStruct* SignalType_ConstPointer_SignalFfiSenderKeyStoreStruct; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiSenderKeyStoreStruct) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiSenderKeyStoreStruct) == 8); -typedef SignalSessionRecord* SignalType_MutPointer_SignalSessionRecord; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalSessionRecord) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalSessionRecord) == 8); -typedef struct { - SignalSessionRecord* raw; -} SignalMutPointerSessionRecord; -static_assert_64bit(offsetof(SignalMutPointerSessionRecord, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerSessionRecord) == 8); -static_assert_64bit(alignof(SignalMutPointerSessionRecord) == 8); -typedef SignalMutPointerSessionRecord* SignalType_MutPointer_SignalMutPointerSessionRecord; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerSessionRecord) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerSessionRecord) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSessionRecord_SignalMutPointerProtocolAddress)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerSessionRecord, SignalMutPointerProtocolAddress); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSessionRecord_SignalMutPointerProtocolAddress) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSessionRecord_SignalMutPointerProtocolAddress) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalMutPointerSessionRecord)(SignalType_MutPointer_void, SignalMutPointerProtocolAddress, SignalMutPointerSessionRecord); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalMutPointerSessionRecord) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalMutPointerSessionRecord) == 8); -typedef struct { - void* ctx; - SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSessionRecord_SignalMutPointerProtocolAddress load_session; - SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalMutPointerSessionRecord store_session; - SignalType_FunctionPointer_void_MutPointer_void destroy; -} SignalFfiSessionStoreStruct; -static_assert_64bit(offsetof(SignalFfiSessionStoreStruct, ctx) == 0); -static_assert_64bit(offsetof(SignalFfiSessionStoreStruct, load_session) == 8); -static_assert_64bit(offsetof(SignalFfiSessionStoreStruct, store_session) == 16); -static_assert_64bit(offsetof(SignalFfiSessionStoreStruct, destroy) == 24); -static_assert_64bit(sizeof(SignalFfiSessionStoreStruct) == 32); -static_assert_64bit(alignof(SignalFfiSessionStoreStruct) == 8); -typedef const SignalFfiSessionStoreStruct* SignalType_ConstPointer_SignalFfiSessionStoreStruct; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiSessionStoreStruct) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiSessionStoreStruct) == 8); -typedef struct SignalSignedPreKeyRecord SignalSignedPreKeyRecord; -typedef SignalSignedPreKeyRecord* SignalType_MutPointer_SignalSignedPreKeyRecord; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalSignedPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalSignedPreKeyRecord) == 8); -typedef struct { - SignalSignedPreKeyRecord* raw; -} SignalMutPointerSignedPreKeyRecord; -static_assert_64bit(offsetof(SignalMutPointerSignedPreKeyRecord, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerSignedPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalMutPointerSignedPreKeyRecord) == 8); -typedef SignalMutPointerSignedPreKeyRecord* SignalType_MutPointer_SignalMutPointerSignedPreKeyRecord; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerSignedPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerSignedPreKeyRecord) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSignedPreKeyRecord_uint32_t)(SignalType_MutPointer_void, SignalType_MutPointer_SignalMutPointerSignedPreKeyRecord, uint32_t); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSignedPreKeyRecord_uint32_t) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSignedPreKeyRecord_uint32_t) == 8); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerSignedPreKeyRecord)(SignalType_MutPointer_void, uint32_t, SignalMutPointerSignedPreKeyRecord); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerSignedPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerSignedPreKeyRecord) == 8); -typedef struct { - void* ctx; - SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSignedPreKeyRecord_uint32_t load_signed_pre_key; - SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerSignedPreKeyRecord store_signed_pre_key; - SignalType_FunctionPointer_void_MutPointer_void destroy; -} SignalFfiSignedPreKeyStoreStruct; -static_assert_64bit(offsetof(SignalFfiSignedPreKeyStoreStruct, ctx) == 0); -static_assert_64bit(offsetof(SignalFfiSignedPreKeyStoreStruct, load_signed_pre_key) == 8); -static_assert_64bit(offsetof(SignalFfiSignedPreKeyStoreStruct, store_signed_pre_key) == 16); -static_assert_64bit(offsetof(SignalFfiSignedPreKeyStoreStruct, destroy) == 24); -static_assert_64bit(sizeof(SignalFfiSignedPreKeyStoreStruct) == 32); -static_assert_64bit(alignof(SignalFfiSignedPreKeyStoreStruct) == 8); -typedef const SignalFfiSignedPreKeyStoreStruct* SignalType_ConstPointer_SignalFfiSignedPreKeyStoreStruct; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFfiSignedPreKeyStoreStruct) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFfiSignedPreKeyStoreStruct) == 8); -typedef struct SignalSgxClientState SignalSgxClientState; -typedef const SignalSgxClientState* SignalType_ConstPointer_SignalSgxClientState; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalSgxClientState) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalSgxClientState) == 8); -typedef struct SignalBridgedStringMap SignalBridgedStringMap; -typedef const SignalBridgedStringMap* SignalType_ConstPointer_SignalBridgedStringMap; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalBridgedStringMap) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalBridgedStringMap) == 8); -typedef const SignalPrivateKey* SignalType_ConstPointer_SignalPrivateKey; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalPrivateKey) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalPrivateKey) == 8); -typedef struct SignalChatConnectionInfo SignalChatConnectionInfo; -typedef const SignalChatConnectionInfo* SignalType_ConstPointer_SignalChatConnectionInfo; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalChatConnectionInfo) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalChatConnectionInfo) == 8); -typedef const SignalBackupRestoreResponse* SignalType_ConstPointer_SignalBackupRestoreResponse; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalBackupRestoreResponse) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalBackupRestoreResponse) == 8); -typedef const SignalBackupStoreResponse* SignalType_ConstPointer_SignalBackupStoreResponse; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalBackupStoreResponse) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalBackupStoreResponse) == 8); -typedef const SignalRegisterAccountResponse* SignalType_ConstPointer_SignalRegisterAccountResponse; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalRegisterAccountResponse) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalRegisterAccountResponse) == 8); -typedef struct SignalRegistrationSession SignalRegistrationSession; -typedef const SignalRegistrationSession* SignalType_ConstPointer_SignalRegistrationSession; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalRegistrationSession) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalRegistrationSession) == 8); -typedef struct SignalConnectionProxyConfig SignalConnectionProxyConfig; -typedef const SignalConnectionProxyConfig* SignalType_ConstPointer_SignalConnectionProxyConfig; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalConnectionProxyConfig) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalConnectionProxyConfig) == 8); -typedef struct SignalFingerprint SignalFingerprint; -typedef const SignalFingerprint* SignalType_ConstPointer_SignalFingerprint; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalFingerprint) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalFingerprint) == 8); -typedef struct SignalKyberPublicKey SignalKyberPublicKey; -typedef const SignalKyberPublicKey* SignalType_ConstPointer_SignalKyberPublicKey; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalKyberPublicKey) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalKyberPublicKey) == 8); -typedef struct SignalKyberSecretKey SignalKyberSecretKey; -typedef const SignalKyberSecretKey* SignalType_ConstPointer_SignalKyberSecretKey; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalKyberSecretKey) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalKyberSecretKey) == 8); -typedef struct SignalKyberKeyPair SignalKyberKeyPair; -typedef const SignalKyberKeyPair* SignalType_ConstPointer_SignalKyberKeyPair; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalKyberKeyPair) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalKyberKeyPair) == 8); -typedef struct SignalDecryptionErrorMessage SignalDecryptionErrorMessage; -typedef const SignalDecryptionErrorMessage* SignalType_ConstPointer_SignalDecryptionErrorMessage; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalDecryptionErrorMessage) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalDecryptionErrorMessage) == 8); -typedef struct SignalPlaintextContent SignalPlaintextContent; -typedef const SignalPlaintextContent* SignalType_ConstPointer_SignalPlaintextContent; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalPlaintextContent) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalPlaintextContent) == 8); -typedef struct SignalPreKeySignalMessage SignalPreKeySignalMessage; -typedef const SignalPreKeySignalMessage* SignalType_ConstPointer_SignalPreKeySignalMessage; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalPreKeySignalMessage) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalPreKeySignalMessage) == 8); -typedef struct SignalSenderKeyDistributionMessage SignalSenderKeyDistributionMessage; -typedef const SignalSenderKeyDistributionMessage* SignalType_ConstPointer_SignalSenderKeyDistributionMessage; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalSenderKeyDistributionMessage) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalSenderKeyDistributionMessage) == 8); -typedef struct SignalSenderKeyMessage SignalSenderKeyMessage; -typedef const SignalSenderKeyMessage* SignalType_ConstPointer_SignalSenderKeyMessage; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalSenderKeyMessage) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalSenderKeyMessage) == 8); -typedef struct SignalSignalMessage SignalSignalMessage; -typedef const SignalSignalMessage* SignalType_ConstPointer_SignalSignalMessage; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalSignalMessage) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalSignalMessage) == 8); -typedef struct SignalSenderCertificate SignalSenderCertificate; -typedef const SignalSenderCertificate* SignalType_ConstPointer_SignalSenderCertificate; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalSenderCertificate) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalSenderCertificate) == 8); -typedef struct SignalServerCertificate SignalServerCertificate; -typedef const SignalServerCertificate* SignalType_ConstPointer_SignalServerCertificate; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalServerCertificate) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalServerCertificate) == 8); -typedef struct SignalUnidentifiedSenderMessageContent SignalUnidentifiedSenderMessageContent; -typedef const SignalUnidentifiedSenderMessageContent* SignalType_ConstPointer_SignalUnidentifiedSenderMessageContent; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalUnidentifiedSenderMessageContent) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalUnidentifiedSenderMessageContent) == 8); -typedef const SignalSenderKeyRecord* SignalType_ConstPointer_SignalSenderKeyRecord; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalSenderKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalSenderKeyRecord) == 8); -typedef const SignalPreKeyBundle* SignalType_ConstPointer_SignalPreKeyBundle; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalPreKeyBundle) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalPreKeyBundle) == 8); -typedef const SignalKyberPreKeyRecord* SignalType_ConstPointer_SignalKyberPreKeyRecord; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalKyberPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalKyberPreKeyRecord) == 8); -typedef const SignalPreKeyRecord* SignalType_ConstPointer_SignalPreKeyRecord; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalPreKeyRecord) == 8); -typedef const SignalSignedPreKeyRecord* SignalType_ConstPointer_SignalSignedPreKeyRecord; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalSignedPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalSignedPreKeyRecord) == 8); -typedef const uint32_t* SignalType_ConstPointer_uint32_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_uint32_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_uint32_t) == 8); -typedef const size_t* SignalType_ConstPointer_size_t; -static_assert_64bit(sizeof(SignalType_ConstPointer_size_t) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_size_t) == 8); -typedef struct SignalServerPublicParams SignalServerPublicParams; -typedef const SignalServerPublicParams* SignalType_ConstPointer_SignalServerPublicParams; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalServerPublicParams) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalServerPublicParams) == 8); -typedef struct SignalServerSecretParams SignalServerSecretParams; -typedef const SignalServerSecretParams* SignalType_ConstPointer_SignalServerSecretParams; -static_assert_64bit(sizeof(SignalType_ConstPointer_SignalServerSecretParams) == 8); -static_assert_64bit(alignof(SignalType_ConstPointer_SignalServerSecretParams) == 8); -typedef SignalType_FixedArray129_uint8_t* SignalType_MutPointer_FixedArray129_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray129_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_FixedArray129_uint8_t) == 8); -typedef SignalType_FixedArray153_uint8_t* SignalType_MutPointer_FixedArray153_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray153_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_FixedArray153_uint8_t) == 8); -typedef SignalType_FixedArray15_uint8_t* SignalType_MutPointer_FixedArray15_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray15_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_FixedArray15_uint8_t) == 8); -typedef SignalType_FixedArray16_uint8_t* SignalType_MutPointer_FixedArray16_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray16_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_FixedArray16_uint8_t) == 8); -typedef SignalType_FixedArray177_uint8_t* SignalType_MutPointer_FixedArray177_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray177_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_FixedArray177_uint8_t) == 8); -typedef SignalType_FixedArray289_uint8_t* SignalType_MutPointer_FixedArray289_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray289_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_FixedArray289_uint8_t) == 8); -typedef SignalType_FixedArray329_uint8_t* SignalType_MutPointer_FixedArray329_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray329_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_FixedArray329_uint8_t) == 8); -typedef SignalType_FixedArray32_uint8_t* SignalType_MutPointer_FixedArray32_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray32_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_FixedArray32_uint8_t) == 8); -typedef SignalType_FixedArray409_uint8_t* SignalType_MutPointer_FixedArray409_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray409_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_FixedArray409_uint8_t) == 8); -typedef SignalType_FixedArray473_uint8_t* SignalType_MutPointer_FixedArray473_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray473_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_FixedArray473_uint8_t) == 8); -typedef SignalType_FixedArray497_uint8_t* SignalType_MutPointer_FixedArray497_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray497_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_FixedArray497_uint8_t) == 8); -typedef SignalType_FixedArray64_uint8_t* SignalType_MutPointer_FixedArray64_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray64_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_FixedArray64_uint8_t) == 8); -typedef SignalType_FixedArray65_uint8_t* SignalType_MutPointer_FixedArray65_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray65_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_FixedArray65_uint8_t) == 8); -typedef SignalType_FixedArray97_uint8_t* SignalType_MutPointer_FixedArray97_uint8_t; -static_assert_64bit(sizeof(SignalType_MutPointer_FixedArray97_uint8_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_FixedArray97_uint8_t) == 8); -typedef SignalAes256GcmSiv* SignalType_MutPointer_SignalAes256GcmSiv; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalAes256GcmSiv) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalAes256GcmSiv) == 8); -typedef int32_t* SignalType_MutPointer_int32_t; -static_assert_64bit(sizeof(SignalType_MutPointer_int32_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_int32_t) == 8); -typedef SignalPinHash* SignalType_MutPointer_SignalPinHash; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalPinHash) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalPinHash) == 8); -typedef struct SignalAes256GcmDecryption SignalAes256GcmDecryption; -typedef SignalAes256GcmDecryption* SignalType_MutPointer_SignalAes256GcmDecryption; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalAes256GcmDecryption) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalAes256GcmDecryption) == 8); -typedef struct SignalAes256GcmEncryption SignalAes256GcmEncryption; -typedef SignalAes256GcmEncryption* SignalType_MutPointer_SignalAes256GcmEncryption; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalAes256GcmEncryption) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalAes256GcmEncryption) == 8); -typedef SignalBytestringArray* SignalType_MutPointer_SignalBytestringArray; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalBytestringArray) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalBytestringArray) == 8); -typedef struct { - uint32_t* base; - size_t length; -} SignalOwnedBufferOfu32; -static_assert_64bit(offsetof(SignalOwnedBufferOfu32, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfu32, length) == 8); -static_assert_64bit(sizeof(SignalOwnedBufferOfu32) == 16); -static_assert_64bit(alignof(SignalOwnedBufferOfu32) == 8); -typedef struct { - SignalType_FixedArray17_uint8_t account; - SignalOwnedBufferOfu32 missing_devices; - SignalOwnedBufferOfu32 extra_devices; - SignalOwnedBufferOfu32 stale_devices; -} SignalFfiMismatchedDevicesError; -static_assert_64bit(offsetof(SignalFfiMismatchedDevicesError, account) == 0); -static_assert_64bit(offsetof(SignalFfiMismatchedDevicesError, missing_devices) == 24); -static_assert_64bit(offsetof(SignalFfiMismatchedDevicesError, extra_devices) == 40); -static_assert_64bit(offsetof(SignalFfiMismatchedDevicesError, stale_devices) == 56); -static_assert_64bit(sizeof(SignalFfiMismatchedDevicesError) == 72); -static_assert_64bit(alignof(SignalFfiMismatchedDevicesError) == 8); -typedef SignalFfiMismatchedDevicesError* SignalType_MutPointer_SignalFfiMismatchedDevicesError; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalFfiMismatchedDevicesError) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalFfiMismatchedDevicesError) == 8); -static_assert_64bit(sizeof(double) == 8); -static_assert_64bit(alignof(double) == 8); -typedef struct { - const int8_t* id; - bool visible; - double expiration_secs; -} SignalFfiRegisterResponseBadge; -static_assert_64bit(offsetof(SignalFfiRegisterResponseBadge, id) == 0); -static_assert_64bit(offsetof(SignalFfiRegisterResponseBadge, visible) == 8); -static_assert_64bit(offsetof(SignalFfiRegisterResponseBadge, expiration_secs) == 16); -static_assert_64bit(sizeof(SignalFfiRegisterResponseBadge) == 24); -static_assert_64bit(alignof(SignalFfiRegisterResponseBadge) == 8); -typedef SignalFfiRegisterResponseBadge* SignalType_MutPointer_SignalFfiRegisterResponseBadge; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalFfiRegisterResponseBadge) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalFfiRegisterResponseBadge) == 8); -typedef struct { - SignalAes256GcmSiv* raw; -} SignalMutPointerAes256GcmSiv; -static_assert_64bit(offsetof(SignalMutPointerAes256GcmSiv, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerAes256GcmSiv) == 8); -static_assert_64bit(alignof(SignalMutPointerAes256GcmSiv) == 8); -typedef SignalMutPointerAes256GcmSiv* SignalType_MutPointer_SignalMutPointerAes256GcmSiv; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerAes256GcmSiv) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerAes256GcmSiv) == 8); -typedef struct { - SignalPinHash* raw; -} SignalMutPointerPinHash; -static_assert_64bit(offsetof(SignalMutPointerPinHash, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerPinHash) == 8); -static_assert_64bit(alignof(SignalMutPointerPinHash) == 8); -typedef SignalMutPointerPinHash* SignalType_MutPointer_SignalMutPointerPinHash; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerPinHash) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerPinHash) == 8); -typedef struct { - SignalAes256GcmDecryption* raw; -} SignalMutPointerAes256GcmDecryption; -static_assert_64bit(offsetof(SignalMutPointerAes256GcmDecryption, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerAes256GcmDecryption) == 8); -static_assert_64bit(alignof(SignalMutPointerAes256GcmDecryption) == 8); -typedef SignalMutPointerAes256GcmDecryption* SignalType_MutPointer_SignalMutPointerAes256GcmDecryption; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerAes256GcmDecryption) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerAes256GcmDecryption) == 8); -typedef struct { - SignalAes256GcmEncryption* raw; -} SignalMutPointerAes256GcmEncryption; -static_assert_64bit(offsetof(SignalMutPointerAes256GcmEncryption, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerAes256GcmEncryption) == 8); -static_assert_64bit(alignof(SignalMutPointerAes256GcmEncryption) == 8); -typedef SignalMutPointerAes256GcmEncryption* SignalType_MutPointer_SignalMutPointerAes256GcmEncryption; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerAes256GcmEncryption) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerAes256GcmEncryption) == 8); -typedef SignalHsmEnclaveClient* SignalType_MutPointer_SignalHsmEnclaveClient; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalHsmEnclaveClient) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalHsmEnclaveClient) == 8); -typedef struct { - SignalHsmEnclaveClient* raw; -} SignalMutPointerHsmEnclaveClient; -static_assert_64bit(offsetof(SignalMutPointerHsmEnclaveClient, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerHsmEnclaveClient) == 8); -static_assert_64bit(alignof(SignalMutPointerHsmEnclaveClient) == 8); -typedef SignalMutPointerHsmEnclaveClient* SignalType_MutPointer_SignalMutPointerHsmEnclaveClient; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerHsmEnclaveClient) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerHsmEnclaveClient) == 8); -typedef struct SignalIncrementalMac SignalIncrementalMac; -typedef SignalIncrementalMac* SignalType_MutPointer_SignalIncrementalMac; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalIncrementalMac) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalIncrementalMac) == 8); -typedef struct { - SignalIncrementalMac* raw; -} SignalMutPointerIncrementalMac; -static_assert_64bit(offsetof(SignalMutPointerIncrementalMac, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerIncrementalMac) == 8); -static_assert_64bit(alignof(SignalMutPointerIncrementalMac) == 8); -typedef SignalMutPointerIncrementalMac* SignalType_MutPointer_SignalMutPointerIncrementalMac; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerIncrementalMac) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerIncrementalMac) == 8); -typedef struct SignalValidatingMac SignalValidatingMac; -typedef SignalValidatingMac* SignalType_MutPointer_SignalValidatingMac; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalValidatingMac) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalValidatingMac) == 8); -typedef struct { - SignalValidatingMac* raw; -} SignalMutPointerValidatingMac; -static_assert_64bit(offsetof(SignalMutPointerValidatingMac, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerValidatingMac) == 8); -static_assert_64bit(alignof(SignalMutPointerValidatingMac) == 8); -typedef SignalMutPointerValidatingMac* SignalType_MutPointer_SignalMutPointerValidatingMac; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerValidatingMac) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerValidatingMac) == 8); -typedef SignalMessageBackupKey* SignalType_MutPointer_SignalMessageBackupKey; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMessageBackupKey) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMessageBackupKey) == 8); -typedef struct { - SignalMessageBackupKey* raw; -} SignalMutPointerMessageBackupKey; -static_assert_64bit(offsetof(SignalMutPointerMessageBackupKey, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerMessageBackupKey) == 8); -static_assert_64bit(alignof(SignalMutPointerMessageBackupKey) == 8); -typedef SignalMutPointerMessageBackupKey* SignalType_MutPointer_SignalMutPointerMessageBackupKey; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerMessageBackupKey) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerMessageBackupKey) == 8); -typedef SignalMessageBackupValidationOutcome* SignalType_MutPointer_SignalMessageBackupValidationOutcome; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMessageBackupValidationOutcome) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMessageBackupValidationOutcome) == 8); -typedef struct { - SignalMessageBackupValidationOutcome* raw; -} SignalMutPointerMessageBackupValidationOutcome; -static_assert_64bit(offsetof(SignalMutPointerMessageBackupValidationOutcome, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerMessageBackupValidationOutcome) == 8); -static_assert_64bit(alignof(SignalMutPointerMessageBackupValidationOutcome) == 8); -typedef SignalMutPointerMessageBackupValidationOutcome* SignalType_MutPointer_SignalMutPointerMessageBackupValidationOutcome; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerMessageBackupValidationOutcome) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerMessageBackupValidationOutcome) == 8); -typedef struct SignalOnlineBackupValidator SignalOnlineBackupValidator; -typedef SignalOnlineBackupValidator* SignalType_MutPointer_SignalOnlineBackupValidator; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalOnlineBackupValidator) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalOnlineBackupValidator) == 8); -typedef struct { - SignalOnlineBackupValidator* raw; -} SignalMutPointerOnlineBackupValidator; -static_assert_64bit(offsetof(SignalMutPointerOnlineBackupValidator, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerOnlineBackupValidator) == 8); -static_assert_64bit(alignof(SignalMutPointerOnlineBackupValidator) == 8); -typedef SignalMutPointerOnlineBackupValidator* SignalType_MutPointer_SignalMutPointerOnlineBackupValidator; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerOnlineBackupValidator) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerOnlineBackupValidator) == 8); -typedef SignalConnectionManager* SignalType_MutPointer_SignalConnectionManager; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalConnectionManager) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalConnectionManager) == 8); -typedef struct { - SignalConnectionManager* raw; -} SignalMutPointerConnectionManager; -static_assert_64bit(offsetof(SignalMutPointerConnectionManager, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerConnectionManager) == 8); -static_assert_64bit(alignof(SignalMutPointerConnectionManager) == 8); -typedef SignalMutPointerConnectionManager* SignalType_MutPointer_SignalMutPointerConnectionManager; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerConnectionManager) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerConnectionManager) == 8); -typedef SignalLookupRequest* SignalType_MutPointer_SignalLookupRequest; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalLookupRequest) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalLookupRequest) == 8); -typedef struct { - SignalLookupRequest* raw; -} SignalMutPointerLookupRequest; -static_assert_64bit(offsetof(SignalMutPointerLookupRequest, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerLookupRequest) == 8); -static_assert_64bit(alignof(SignalMutPointerLookupRequest) == 8); -typedef SignalMutPointerLookupRequest* SignalType_MutPointer_SignalMutPointerLookupRequest; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerLookupRequest) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerLookupRequest) == 8); -typedef SignalCopyBackupMediaStream* SignalType_MutPointer_SignalCopyBackupMediaStream; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCopyBackupMediaStream) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCopyBackupMediaStream) == 8); -typedef struct { - SignalCopyBackupMediaStream* raw; -} SignalMutPointerCopyBackupMediaStream; -static_assert_64bit(offsetof(SignalMutPointerCopyBackupMediaStream, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerCopyBackupMediaStream) == 8); -static_assert_64bit(alignof(SignalMutPointerCopyBackupMediaStream) == 8); -typedef SignalMutPointerCopyBackupMediaStream* SignalType_MutPointer_SignalMutPointerCopyBackupMediaStream; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerCopyBackupMediaStream) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerCopyBackupMediaStream) == 8); -typedef SignalDeleteBackupMediaStream* SignalType_MutPointer_SignalDeleteBackupMediaStream; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalDeleteBackupMediaStream) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalDeleteBackupMediaStream) == 8); -typedef struct { - SignalDeleteBackupMediaStream* raw; -} SignalMutPointerDeleteBackupMediaStream; -static_assert_64bit(offsetof(SignalMutPointerDeleteBackupMediaStream, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerDeleteBackupMediaStream) == 8); -static_assert_64bit(alignof(SignalMutPointerDeleteBackupMediaStream) == 8); -typedef SignalMutPointerDeleteBackupMediaStream* SignalType_MutPointer_SignalMutPointerDeleteBackupMediaStream; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerDeleteBackupMediaStream) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerDeleteBackupMediaStream) == 8); -typedef SignalHttpRequest* SignalType_MutPointer_SignalHttpRequest; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalHttpRequest) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalHttpRequest) == 8); -typedef struct { - SignalHttpRequest* raw; -} SignalMutPointerHttpRequest; -static_assert_64bit(offsetof(SignalMutPointerHttpRequest, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerHttpRequest) == 8); -static_assert_64bit(alignof(SignalMutPointerHttpRequest) == 8); -typedef SignalMutPointerHttpRequest* SignalType_MutPointer_SignalMutPointerHttpRequest; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerHttpRequest) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerHttpRequest) == 8); -typedef SignalRegistrationAccountAttributes* SignalType_MutPointer_SignalRegistrationAccountAttributes; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalRegistrationAccountAttributes) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalRegistrationAccountAttributes) == 8); -typedef struct { - SignalRegistrationAccountAttributes* raw; -} SignalMutPointerRegistrationAccountAttributes; -static_assert_64bit(offsetof(SignalMutPointerRegistrationAccountAttributes, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerRegistrationAccountAttributes) == 8); -static_assert_64bit(alignof(SignalMutPointerRegistrationAccountAttributes) == 8); -typedef SignalMutPointerRegistrationAccountAttributes* SignalType_MutPointer_SignalMutPointerRegistrationAccountAttributes; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerRegistrationAccountAttributes) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerRegistrationAccountAttributes) == 8); -typedef SignalRegisterAccountRequest* SignalType_MutPointer_SignalRegisterAccountRequest; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalRegisterAccountRequest) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalRegisterAccountRequest) == 8); -typedef struct { - SignalRegisterAccountRequest* raw; -} SignalMutPointerRegisterAccountRequest; -static_assert_64bit(offsetof(SignalMutPointerRegisterAccountRequest, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerRegisterAccountRequest) == 8); -static_assert_64bit(alignof(SignalMutPointerRegisterAccountRequest) == 8); -typedef SignalMutPointerRegisterAccountRequest* SignalType_MutPointer_SignalMutPointerRegisterAccountRequest; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerRegisterAccountRequest) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerRegisterAccountRequest) == 8); -typedef SignalTokioAsyncContext* SignalType_MutPointer_SignalTokioAsyncContext; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalTokioAsyncContext) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalTokioAsyncContext) == 8); -typedef struct { - SignalTokioAsyncContext* raw; -} SignalMutPointerTokioAsyncContext; -static_assert_64bit(offsetof(SignalMutPointerTokioAsyncContext, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerTokioAsyncContext) == 8); -static_assert_64bit(alignof(SignalMutPointerTokioAsyncContext) == 8); -typedef SignalMutPointerTokioAsyncContext* SignalType_MutPointer_SignalMutPointerTokioAsyncContext; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerTokioAsyncContext) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerTokioAsyncContext) == 8); -typedef SignalSgxClientState* SignalType_MutPointer_SignalSgxClientState; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalSgxClientState) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalSgxClientState) == 8); -typedef struct { - SignalSgxClientState* raw; -} SignalMutPointerSgxClientState; -static_assert_64bit(offsetof(SignalMutPointerSgxClientState, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerSgxClientState) == 8); -static_assert_64bit(alignof(SignalMutPointerSgxClientState) == 8); -typedef SignalMutPointerSgxClientState* SignalType_MutPointer_SignalMutPointerSgxClientState; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerSgxClientState) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerSgxClientState) == 8); -typedef SignalBridgedStringMap* SignalType_MutPointer_SignalBridgedStringMap; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalBridgedStringMap) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalBridgedStringMap) == 8); -typedef struct { - SignalBridgedStringMap* raw; -} SignalMutPointerBridgedStringMap; -static_assert_64bit(offsetof(SignalMutPointerBridgedStringMap, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerBridgedStringMap) == 8); -static_assert_64bit(alignof(SignalMutPointerBridgedStringMap) == 8); -typedef SignalMutPointerBridgedStringMap* SignalType_MutPointer_SignalMutPointerBridgedStringMap; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerBridgedStringMap) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerBridgedStringMap) == 8); -typedef SignalMutPointerProtocolAddress* SignalType_MutPointer_SignalMutPointerProtocolAddress; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerProtocolAddress) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerProtocolAddress) == 8); -typedef SignalMutPointerPrivateKey* SignalType_MutPointer_SignalMutPointerPrivateKey; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerPrivateKey) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerPrivateKey) == 8); -typedef SignalChatConnectionInfo* SignalType_MutPointer_SignalChatConnectionInfo; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalChatConnectionInfo) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalChatConnectionInfo) == 8); -typedef struct { - SignalChatConnectionInfo* raw; -} SignalMutPointerChatConnectionInfo; -static_assert_64bit(offsetof(SignalMutPointerChatConnectionInfo, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerChatConnectionInfo) == 8); -static_assert_64bit(alignof(SignalMutPointerChatConnectionInfo) == 8); -typedef SignalMutPointerChatConnectionInfo* SignalType_MutPointer_SignalMutPointerChatConnectionInfo; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerChatConnectionInfo) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerChatConnectionInfo) == 8); -typedef SignalRegistrationSession* SignalType_MutPointer_SignalRegistrationSession; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalRegistrationSession) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalRegistrationSession) == 8); -typedef struct { - SignalRegistrationSession* raw; -} SignalMutPointerRegistrationSession; -static_assert_64bit(offsetof(SignalMutPointerRegistrationSession, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerRegistrationSession) == 8); -static_assert_64bit(alignof(SignalMutPointerRegistrationSession) == 8); -typedef SignalMutPointerRegistrationSession* SignalType_MutPointer_SignalMutPointerRegistrationSession; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerRegistrationSession) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerRegistrationSession) == 8); -typedef SignalConnectionProxyConfig* SignalType_MutPointer_SignalConnectionProxyConfig; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalConnectionProxyConfig) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalConnectionProxyConfig) == 8); -typedef struct { - SignalConnectionProxyConfig* raw; -} SignalMutPointerConnectionProxyConfig; -static_assert_64bit(offsetof(SignalMutPointerConnectionProxyConfig, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerConnectionProxyConfig) == 8); -static_assert_64bit(alignof(SignalMutPointerConnectionProxyConfig) == 8); -typedef SignalMutPointerConnectionProxyConfig* SignalType_MutPointer_SignalMutPointerConnectionProxyConfig; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerConnectionProxyConfig) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerConnectionProxyConfig) == 8); -typedef SignalFingerprint* SignalType_MutPointer_SignalFingerprint; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalFingerprint) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalFingerprint) == 8); -typedef struct { - SignalFingerprint* raw; -} SignalMutPointerFingerprint; -static_assert_64bit(offsetof(SignalMutPointerFingerprint, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerFingerprint) == 8); -static_assert_64bit(alignof(SignalMutPointerFingerprint) == 8); -typedef SignalMutPointerFingerprint* SignalType_MutPointer_SignalMutPointerFingerprint; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerFingerprint) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerFingerprint) == 8); -typedef SignalKyberPublicKey* SignalType_MutPointer_SignalKyberPublicKey; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalKyberPublicKey) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalKyberPublicKey) == 8); -typedef struct { - SignalKyberPublicKey* raw; -} SignalMutPointerKyberPublicKey; -static_assert_64bit(offsetof(SignalMutPointerKyberPublicKey, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerKyberPublicKey) == 8); -static_assert_64bit(alignof(SignalMutPointerKyberPublicKey) == 8); -typedef SignalMutPointerKyberPublicKey* SignalType_MutPointer_SignalMutPointerKyberPublicKey; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerKyberPublicKey) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerKyberPublicKey) == 8); -typedef SignalKyberSecretKey* SignalType_MutPointer_SignalKyberSecretKey; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalKyberSecretKey) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalKyberSecretKey) == 8); -typedef struct { - SignalKyberSecretKey* raw; -} SignalMutPointerKyberSecretKey; -static_assert_64bit(offsetof(SignalMutPointerKyberSecretKey, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerKyberSecretKey) == 8); -static_assert_64bit(alignof(SignalMutPointerKyberSecretKey) == 8); -typedef SignalMutPointerKyberSecretKey* SignalType_MutPointer_SignalMutPointerKyberSecretKey; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerKyberSecretKey) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerKyberSecretKey) == 8); -typedef SignalKyberKeyPair* SignalType_MutPointer_SignalKyberKeyPair; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalKyberKeyPair) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalKyberKeyPair) == 8); -typedef struct { - SignalKyberKeyPair* raw; -} SignalMutPointerKyberKeyPair; -static_assert_64bit(offsetof(SignalMutPointerKyberKeyPair, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerKyberKeyPair) == 8); -static_assert_64bit(alignof(SignalMutPointerKyberKeyPair) == 8); -typedef SignalMutPointerKyberKeyPair* SignalType_MutPointer_SignalMutPointerKyberKeyPair; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerKyberKeyPair) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerKyberKeyPair) == 8); -typedef SignalCiphertextMessage* SignalType_MutPointer_SignalCiphertextMessage; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCiphertextMessage) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCiphertextMessage) == 8); -typedef struct { - SignalCiphertextMessage* raw; -} SignalMutPointerCiphertextMessage; -static_assert_64bit(offsetof(SignalMutPointerCiphertextMessage, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerCiphertextMessage) == 8); -static_assert_64bit(alignof(SignalMutPointerCiphertextMessage) == 8); -typedef SignalMutPointerCiphertextMessage* SignalType_MutPointer_SignalMutPointerCiphertextMessage; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerCiphertextMessage) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerCiphertextMessage) == 8); -typedef SignalDecryptionErrorMessage* SignalType_MutPointer_SignalDecryptionErrorMessage; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalDecryptionErrorMessage) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalDecryptionErrorMessage) == 8); -typedef struct { - SignalDecryptionErrorMessage* raw; -} SignalMutPointerDecryptionErrorMessage; -static_assert_64bit(offsetof(SignalMutPointerDecryptionErrorMessage, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerDecryptionErrorMessage) == 8); -static_assert_64bit(alignof(SignalMutPointerDecryptionErrorMessage) == 8); -typedef SignalMutPointerDecryptionErrorMessage* SignalType_MutPointer_SignalMutPointerDecryptionErrorMessage; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerDecryptionErrorMessage) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerDecryptionErrorMessage) == 8); -typedef SignalPlaintextContent* SignalType_MutPointer_SignalPlaintextContent; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalPlaintextContent) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalPlaintextContent) == 8); -typedef struct { - SignalPlaintextContent* raw; -} SignalMutPointerPlaintextContent; -static_assert_64bit(offsetof(SignalMutPointerPlaintextContent, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerPlaintextContent) == 8); -static_assert_64bit(alignof(SignalMutPointerPlaintextContent) == 8); -typedef SignalMutPointerPlaintextContent* SignalType_MutPointer_SignalMutPointerPlaintextContent; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerPlaintextContent) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerPlaintextContent) == 8); -typedef SignalPreKeySignalMessage* SignalType_MutPointer_SignalPreKeySignalMessage; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalPreKeySignalMessage) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalPreKeySignalMessage) == 8); -typedef struct { - SignalPreKeySignalMessage* raw; -} SignalMutPointerPreKeySignalMessage; -static_assert_64bit(offsetof(SignalMutPointerPreKeySignalMessage, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerPreKeySignalMessage) == 8); -static_assert_64bit(alignof(SignalMutPointerPreKeySignalMessage) == 8); -typedef SignalMutPointerPreKeySignalMessage* SignalType_MutPointer_SignalMutPointerPreKeySignalMessage; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerPreKeySignalMessage) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerPreKeySignalMessage) == 8); -typedef SignalSenderKeyDistributionMessage* SignalType_MutPointer_SignalSenderKeyDistributionMessage; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalSenderKeyDistributionMessage) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalSenderKeyDistributionMessage) == 8); -typedef struct { - SignalSenderKeyDistributionMessage* raw; -} SignalMutPointerSenderKeyDistributionMessage; -static_assert_64bit(offsetof(SignalMutPointerSenderKeyDistributionMessage, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerSenderKeyDistributionMessage) == 8); -static_assert_64bit(alignof(SignalMutPointerSenderKeyDistributionMessage) == 8); -typedef SignalMutPointerSenderKeyDistributionMessage* SignalType_MutPointer_SignalMutPointerSenderKeyDistributionMessage; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerSenderKeyDistributionMessage) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerSenderKeyDistributionMessage) == 8); -typedef SignalSenderKeyMessage* SignalType_MutPointer_SignalSenderKeyMessage; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalSenderKeyMessage) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalSenderKeyMessage) == 8); -typedef struct { - SignalSenderKeyMessage* raw; -} SignalMutPointerSenderKeyMessage; -static_assert_64bit(offsetof(SignalMutPointerSenderKeyMessage, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerSenderKeyMessage) == 8); -static_assert_64bit(alignof(SignalMutPointerSenderKeyMessage) == 8); -typedef SignalMutPointerSenderKeyMessage* SignalType_MutPointer_SignalMutPointerSenderKeyMessage; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerSenderKeyMessage) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerSenderKeyMessage) == 8); -typedef SignalSignalMessage* SignalType_MutPointer_SignalSignalMessage; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalSignalMessage) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalSignalMessage) == 8); -typedef struct { - SignalSignalMessage* raw; -} SignalMutPointerSignalMessage; -static_assert_64bit(offsetof(SignalMutPointerSignalMessage, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerSignalMessage) == 8); -static_assert_64bit(alignof(SignalMutPointerSignalMessage) == 8); -typedef SignalMutPointerSignalMessage* SignalType_MutPointer_SignalMutPointerSignalMessage; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerSignalMessage) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerSignalMessage) == 8); -typedef SignalSenderCertificate* SignalType_MutPointer_SignalSenderCertificate; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalSenderCertificate) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalSenderCertificate) == 8); -typedef struct { - SignalSenderCertificate* raw; -} SignalMutPointerSenderCertificate; -static_assert_64bit(offsetof(SignalMutPointerSenderCertificate, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerSenderCertificate) == 8); -static_assert_64bit(alignof(SignalMutPointerSenderCertificate) == 8); -typedef SignalMutPointerSenderCertificate* SignalType_MutPointer_SignalMutPointerSenderCertificate; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerSenderCertificate) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerSenderCertificate) == 8); -typedef SignalServerCertificate* SignalType_MutPointer_SignalServerCertificate; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalServerCertificate) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalServerCertificate) == 8); -typedef struct { - SignalServerCertificate* raw; -} SignalMutPointerServerCertificate; -static_assert_64bit(offsetof(SignalMutPointerServerCertificate, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerServerCertificate) == 8); -static_assert_64bit(alignof(SignalMutPointerServerCertificate) == 8); -typedef SignalMutPointerServerCertificate* SignalType_MutPointer_SignalMutPointerServerCertificate; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerServerCertificate) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerServerCertificate) == 8); -typedef SignalUnidentifiedSenderMessageContent* SignalType_MutPointer_SignalUnidentifiedSenderMessageContent; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalUnidentifiedSenderMessageContent) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalUnidentifiedSenderMessageContent) == 8); -typedef struct { - SignalUnidentifiedSenderMessageContent* raw; -} SignalMutPointerUnidentifiedSenderMessageContent; -static_assert_64bit(offsetof(SignalMutPointerUnidentifiedSenderMessageContent, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerUnidentifiedSenderMessageContent) == 8); -static_assert_64bit(alignof(SignalMutPointerUnidentifiedSenderMessageContent) == 8); -typedef SignalMutPointerUnidentifiedSenderMessageContent* SignalType_MutPointer_SignalMutPointerUnidentifiedSenderMessageContent; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerUnidentifiedSenderMessageContent) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerUnidentifiedSenderMessageContent) == 8); -typedef struct SignalAes256Ctr32 SignalAes256Ctr32; -typedef SignalAes256Ctr32* SignalType_MutPointer_SignalAes256Ctr32; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalAes256Ctr32) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalAes256Ctr32) == 8); -typedef struct { - SignalAes256Ctr32* raw; -} SignalMutPointerAes256Ctr32; -static_assert_64bit(offsetof(SignalMutPointerAes256Ctr32, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerAes256Ctr32) == 8); -static_assert_64bit(alignof(SignalMutPointerAes256Ctr32) == 8); -typedef SignalMutPointerAes256Ctr32* SignalType_MutPointer_SignalMutPointerAes256Ctr32; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerAes256Ctr32) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerAes256Ctr32) == 8); -typedef SignalServerPublicParams* SignalType_MutPointer_SignalServerPublicParams; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalServerPublicParams) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalServerPublicParams) == 8); -typedef struct { - SignalServerPublicParams* raw; -} SignalMutPointerServerPublicParams; -static_assert_64bit(offsetof(SignalMutPointerServerPublicParams, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerServerPublicParams) == 8); -static_assert_64bit(alignof(SignalMutPointerServerPublicParams) == 8); -typedef SignalMutPointerServerPublicParams* SignalType_MutPointer_SignalMutPointerServerPublicParams; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerServerPublicParams) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerServerPublicParams) == 8); -typedef SignalServerSecretParams* SignalType_MutPointer_SignalServerSecretParams; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalServerSecretParams) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalServerSecretParams) == 8); -typedef struct { - SignalServerSecretParams* raw; -} SignalMutPointerServerSecretParams; -static_assert_64bit(offsetof(SignalMutPointerServerSecretParams, raw) == 0); -static_assert_64bit(sizeof(SignalMutPointerServerSecretParams) == 8); -static_assert_64bit(alignof(SignalMutPointerServerSecretParams) == 8); -typedef SignalMutPointerServerSecretParams* SignalType_MutPointer_SignalMutPointerServerSecretParams; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalMutPointerServerSecretParams) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalMutPointerServerSecretParams) == 8); -typedef enum { - SignalPaymentProviderFfiResultGooglePlayBilling, - SignalPaymentProviderFfiResultAppleAppStore, - SignalPaymentProviderFfiResultStripe, - SignalPaymentProviderFfiResultBraintree, -} SignalPaymentProviderFfiResult; -static_assert_64bit(sizeof(SignalPaymentProviderFfiResult) == 4); -static_assert_64bit(alignof(SignalPaymentProviderFfiResult) == 4); -typedef struct { - SignalPaymentProviderFfiResult processor; - const int8_t* code; - const int8_t* message; - const int8_t* outcome_network_status; - const int8_t* outcome_reason; - const int8_t* outcome_type; -} SignalChargeFailureFfiResult; -static_assert_64bit(offsetof(SignalChargeFailureFfiResult, processor) == 0); -static_assert_64bit(offsetof(SignalChargeFailureFfiResult, code) == 8); -static_assert_64bit(offsetof(SignalChargeFailureFfiResult, message) == 16); -static_assert_64bit(offsetof(SignalChargeFailureFfiResult, outcome_network_status) == 24); -static_assert_64bit(offsetof(SignalChargeFailureFfiResult, outcome_reason) == 32); -static_assert_64bit(offsetof(SignalChargeFailureFfiResult, outcome_type) == 40); -static_assert_64bit(sizeof(SignalChargeFailureFfiResult) == 48); -static_assert_64bit(alignof(SignalChargeFailureFfiResult) == 8); -typedef SignalChargeFailureFfiResult MaybeUninitOfChargeFailureFfiResult; -static_assert_64bit(sizeof(MaybeUninitOfChargeFailureFfiResult) == 48); -static_assert_64bit(alignof(MaybeUninitOfChargeFailureFfiResult) == 8); -typedef struct { - bool present; - MaybeUninitOfChargeFailureFfiResult value; -} SignalOptionalOfChargeFailureFfiResult; -static_assert_64bit(offsetof(SignalOptionalOfChargeFailureFfiResult, present) == 0); -static_assert_64bit(offsetof(SignalOptionalOfChargeFailureFfiResult, value) == 8); -static_assert_64bit(sizeof(SignalOptionalOfChargeFailureFfiResult) == 56); -static_assert_64bit(alignof(SignalOptionalOfChargeFailureFfiResult) == 8); -typedef SignalOptionalOfChargeFailureFfiResult* SignalType_MutPointer_SignalOptionalOfChargeFailureFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalOptionalOfChargeFailureFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalOptionalOfChargeFailureFfiResult) == 8); -typedef SignalOptionalUuid* SignalType_MutPointer_SignalOptionalUuid; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalOptionalUuid) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalOptionalUuid) == 8); -typedef struct { - SignalFfiMismatchedDevicesError* base; - size_t length; -} SignalOwnedBufferOfFfiMismatchedDevicesError; -static_assert_64bit(offsetof(SignalOwnedBufferOfFfiMismatchedDevicesError, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfFfiMismatchedDevicesError, length) == 8); -static_assert_64bit(sizeof(SignalOwnedBufferOfFfiMismatchedDevicesError) == 16); -static_assert_64bit(alignof(SignalOwnedBufferOfFfiMismatchedDevicesError) == 8); -typedef SignalOwnedBufferOfFfiMismatchedDevicesError* SignalType_MutPointer_SignalOwnedBufferOfFfiMismatchedDevicesError; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalOwnedBufferOfFfiMismatchedDevicesError) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalOwnedBufferOfFfiMismatchedDevicesError) == 8); -typedef struct { - SignalFfiRegisterResponseBadge* base; - size_t length; -} SignalOwnedBufferOfFfiRegisterResponseBadge; -static_assert_64bit(offsetof(SignalOwnedBufferOfFfiRegisterResponseBadge, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfFfiRegisterResponseBadge, length) == 8); -static_assert_64bit(sizeof(SignalOwnedBufferOfFfiRegisterResponseBadge) == 16); -static_assert_64bit(alignof(SignalOwnedBufferOfFfiRegisterResponseBadge) == 8); -typedef SignalOwnedBufferOfFfiRegisterResponseBadge* SignalType_MutPointer_SignalOwnedBufferOfFfiRegisterResponseBadge; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalOwnedBufferOfFfiRegisterResponseBadge) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalOwnedBufferOfFfiRegisterResponseBadge) == 8); -typedef SignalOwnedBuffer* SignalType_MutPointer_SignalOwnedBuffer; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalOwnedBuffer) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalOwnedBuffer) == 8); -typedef struct { - const int8_t* first; - bool second; -} SignalPairOfCStringPtrbool; -static_assert_64bit(offsetof(SignalPairOfCStringPtrbool, first) == 0); -static_assert_64bit(offsetof(SignalPairOfCStringPtrbool, second) == 8); -static_assert_64bit(sizeof(SignalPairOfCStringPtrbool) == 16); -static_assert_64bit(alignof(SignalPairOfCStringPtrbool) == 8); -typedef SignalPairOfCStringPtrbool* SignalType_MutPointer_SignalPairOfCStringPtrbool; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalPairOfCStringPtrbool) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalPairOfCStringPtrbool) == 8); -typedef struct { - const int8_t* first; - uint32_t second; -} SignalPairOfCStringPtru32; -static_assert_64bit(offsetof(SignalPairOfCStringPtru32, first) == 0); -static_assert_64bit(offsetof(SignalPairOfCStringPtru32, second) == 8); -static_assert_64bit(sizeof(SignalPairOfCStringPtru32) == 16); -static_assert_64bit(alignof(SignalPairOfCStringPtru32) == 8); -typedef SignalPairOfCStringPtru32* SignalType_MutPointer_SignalPairOfCStringPtru32; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalPairOfCStringPtru32) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalPairOfCStringPtru32) == 8); -typedef struct { - SignalMutPointerPublicKey first; - SignalMutPointerPrivateKey second; -} SignalPairOfMutPointerPublicKeyMutPointerPrivateKey; -static_assert_64bit(offsetof(SignalPairOfMutPointerPublicKeyMutPointerPrivateKey, first) == 0); -static_assert_64bit(offsetof(SignalPairOfMutPointerPublicKeyMutPointerPrivateKey, second) == 8); -static_assert_64bit(sizeof(SignalPairOfMutPointerPublicKeyMutPointerPrivateKey) == 16); -static_assert_64bit(alignof(SignalPairOfMutPointerPublicKeyMutPointerPrivateKey) == 8); -typedef SignalPairOfMutPointerPublicKeyMutPointerPrivateKey* SignalType_MutPointer_SignalPairOfMutPointerPublicKeyMutPointerPrivateKey; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalPairOfMutPointerPublicKeyMutPointerPrivateKey) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalPairOfMutPointerPublicKeyMutPointerPrivateKey) == 8); -typedef struct { - const int8_t* first; - SignalOwnedBuffer second; -} SignalPairOfCStringPtrOwnedBuffer; -static_assert_64bit(offsetof(SignalPairOfCStringPtrOwnedBuffer, first) == 0); -static_assert_64bit(offsetof(SignalPairOfCStringPtrOwnedBuffer, second) == 8); -static_assert_64bit(sizeof(SignalPairOfCStringPtrOwnedBuffer) == 24); -static_assert_64bit(alignof(SignalPairOfCStringPtrOwnedBuffer) == 8); -typedef struct { - SignalPairOfCStringPtrOwnedBuffer first; - int64_t second; -} SignalPairOfPairOfCStringPtrOwnedBufferi64; -static_assert_64bit(offsetof(SignalPairOfPairOfCStringPtrOwnedBufferi64, first) == 0); -static_assert_64bit(offsetof(SignalPairOfPairOfCStringPtrOwnedBufferi64, second) == 24); -static_assert_64bit(sizeof(SignalPairOfPairOfCStringPtrOwnedBufferi64) == 32); -static_assert_64bit(alignof(SignalPairOfPairOfCStringPtrOwnedBufferi64) == 8); -typedef SignalPairOfPairOfCStringPtrOwnedBufferi64* SignalType_MutPointer_SignalPairOfPairOfCStringPtrOwnedBufferi64; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalPairOfPairOfCStringPtrOwnedBufferi64) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalPairOfPairOfCStringPtrOwnedBufferi64) == 8); -typedef SignalUuid* SignalType_MutPointer_SignalUuid; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalUuid) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalUuid) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_FixedArray32_uint8_t_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_FixedArray32_uint8_t, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_FixedArray32_uint8_t_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_FixedArray32_uint8_t_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_FixedArray32_uint8_t_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromisec_uchar32; -static_assert_64bit(offsetof(SignalCPromisec_uchar32, complete) == 0); -static_assert_64bit(offsetof(SignalCPromisec_uchar32, context) == 8); -static_assert_64bit(offsetof(SignalCPromisec_uchar32, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromisec_uchar32) == 24); -static_assert_64bit(alignof(SignalCPromisec_uchar32) == 8); -typedef SignalCPromisec_uchar32* SignalType_MutPointer_SignalCPromisec_uchar32; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromisec_uchar32) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromisec_uchar32) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_bool_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_bool, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_bool_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_bool_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_bool_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromisebool; -static_assert_64bit(offsetof(SignalCPromisebool, complete) == 0); -static_assert_64bit(offsetof(SignalCPromisebool, context) == 8); -static_assert_64bit(offsetof(SignalCPromisebool, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromisebool) == 24); -static_assert_64bit(alignof(SignalCPromisebool) == 8); -typedef SignalCPromisebool* SignalType_MutPointer_SignalCPromisebool; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromisebool) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromisebool) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_int32_t_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_int32_t, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_int32_t_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_int32_t_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_int32_t_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromisei32; -static_assert_64bit(offsetof(SignalCPromisei32, complete) == 0); -static_assert_64bit(offsetof(SignalCPromisei32, context) == 8); -static_assert_64bit(offsetof(SignalCPromisei32, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromisei32) == 24); -static_assert_64bit(alignof(SignalCPromisei32) == 8); -typedef SignalCPromisei32* SignalType_MutPointer_SignalCPromisei32; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromisei32) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromisei32) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiCdsiLookupResponse_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalFfiCdsiLookupResponse, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiCdsiLookupResponse_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiCdsiLookupResponse_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiCdsiLookupResponse_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseFfiCdsiLookupResponse; -static_assert_64bit(offsetof(SignalCPromiseFfiCdsiLookupResponse, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseFfiCdsiLookupResponse, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseFfiCdsiLookupResponse, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseFfiCdsiLookupResponse) == 24); -static_assert_64bit(alignof(SignalCPromiseFfiCdsiLookupResponse) == 8); -typedef SignalCPromiseFfiCdsiLookupResponse* SignalType_MutPointer_SignalCPromiseFfiCdsiLookupResponse; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseFfiCdsiLookupResponse) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseFfiCdsiLookupResponse) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiChatResponse_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalFfiChatResponse, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiChatResponse_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiChatResponse_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiChatResponse_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseFfiChatResponse; -static_assert_64bit(offsetof(SignalCPromiseFfiChatResponse, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseFfiChatResponse, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseFfiChatResponse, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseFfiChatResponse) == 24); -static_assert_64bit(alignof(SignalCPromiseFfiChatResponse) == 8); -typedef SignalCPromiseFfiChatResponse* SignalType_MutPointer_SignalCPromiseFfiChatResponse; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseFfiChatResponse) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseFfiChatResponse) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiCheckSvr2CredentialsResponse_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalFfiCheckSvr2CredentialsResponse, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiCheckSvr2CredentialsResponse_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiCheckSvr2CredentialsResponse_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiCheckSvr2CredentialsResponse_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseFfiCheckSvr2CredentialsResponse; -static_assert_64bit(offsetof(SignalCPromiseFfiCheckSvr2CredentialsResponse, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseFfiCheckSvr2CredentialsResponse, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseFfiCheckSvr2CredentialsResponse, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseFfiCheckSvr2CredentialsResponse) == 24); -static_assert_64bit(alignof(SignalCPromiseFfiCheckSvr2CredentialsResponse) == 8); -typedef SignalCPromiseFfiCheckSvr2CredentialsResponse* SignalType_MutPointer_SignalCPromiseFfiCheckSvr2CredentialsResponse; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseFfiCheckSvr2CredentialsResponse) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseFfiCheckSvr2CredentialsResponse) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiPreKeysResponse_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalFfiPreKeysResponse, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiPreKeysResponse_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiPreKeysResponse_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiPreKeysResponse_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseFfiPreKeysResponse; -static_assert_64bit(offsetof(SignalCPromiseFfiPreKeysResponse, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseFfiPreKeysResponse, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseFfiPreKeysResponse, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseFfiPreKeysResponse) == 24); -static_assert_64bit(alignof(SignalCPromiseFfiPreKeysResponse) == 8); -typedef SignalCPromiseFfiPreKeysResponse* SignalType_MutPointer_SignalCPromiseFfiPreKeysResponse; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseFfiPreKeysResponse) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseFfiPreKeysResponse) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiUploadForm_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalFfiUploadForm, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiUploadForm_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiUploadForm_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalFfiUploadForm_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseFfiUploadForm; -static_assert_64bit(offsetof(SignalCPromiseFfiUploadForm, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseFfiUploadForm, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseFfiUploadForm, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseFfiUploadForm) == 24); -static_assert_64bit(alignof(SignalCPromiseFfiUploadForm) == 8); -typedef SignalCPromiseFfiUploadForm* SignalType_MutPointer_SignalCPromiseFfiUploadForm; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseFfiUploadForm) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseFfiUploadForm) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerCdsiLookup_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerCdsiLookup, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerCdsiLookup_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerCdsiLookup_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerCdsiLookup_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseMutPointerCdsiLookup; -static_assert_64bit(offsetof(SignalCPromiseMutPointerCdsiLookup, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseMutPointerCdsiLookup, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseMutPointerCdsiLookup, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseMutPointerCdsiLookup) == 24); -static_assert_64bit(alignof(SignalCPromiseMutPointerCdsiLookup) == 8); -typedef SignalCPromiseMutPointerCdsiLookup* SignalType_MutPointer_SignalCPromiseMutPointerCdsiLookup; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseMutPointerCdsiLookup) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseMutPointerCdsiLookup) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerAuthenticatedChatConnection_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerAuthenticatedChatConnection, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerAuthenticatedChatConnection_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerAuthenticatedChatConnection_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerAuthenticatedChatConnection_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseMutPointerAuthenticatedChatConnection; -static_assert_64bit(offsetof(SignalCPromiseMutPointerAuthenticatedChatConnection, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseMutPointerAuthenticatedChatConnection, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseMutPointerAuthenticatedChatConnection, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseMutPointerAuthenticatedChatConnection) == 24); -static_assert_64bit(alignof(SignalCPromiseMutPointerAuthenticatedChatConnection) == 8); -typedef SignalCPromiseMutPointerAuthenticatedChatConnection* SignalType_MutPointer_SignalCPromiseMutPointerAuthenticatedChatConnection; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseMutPointerAuthenticatedChatConnection) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseMutPointerAuthenticatedChatConnection) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerProvisioningChatConnection_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerProvisioningChatConnection, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerProvisioningChatConnection_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerProvisioningChatConnection_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerProvisioningChatConnection_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseMutPointerProvisioningChatConnection; -static_assert_64bit(offsetof(SignalCPromiseMutPointerProvisioningChatConnection, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseMutPointerProvisioningChatConnection, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseMutPointerProvisioningChatConnection, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseMutPointerProvisioningChatConnection) == 24); -static_assert_64bit(alignof(SignalCPromiseMutPointerProvisioningChatConnection) == 8); -typedef SignalCPromiseMutPointerProvisioningChatConnection* SignalType_MutPointer_SignalCPromiseMutPointerProvisioningChatConnection; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseMutPointerProvisioningChatConnection) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseMutPointerProvisioningChatConnection) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerUnauthenticatedChatConnection_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerUnauthenticatedChatConnection, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerUnauthenticatedChatConnection_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerUnauthenticatedChatConnection_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerUnauthenticatedChatConnection_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseMutPointerUnauthenticatedChatConnection; -static_assert_64bit(offsetof(SignalCPromiseMutPointerUnauthenticatedChatConnection, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseMutPointerUnauthenticatedChatConnection, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseMutPointerUnauthenticatedChatConnection, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseMutPointerUnauthenticatedChatConnection) == 24); -static_assert_64bit(alignof(SignalCPromiseMutPointerUnauthenticatedChatConnection) == 8); -typedef SignalCPromiseMutPointerUnauthenticatedChatConnection* SignalType_MutPointer_SignalCPromiseMutPointerUnauthenticatedChatConnection; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseMutPointerUnauthenticatedChatConnection) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseMutPointerUnauthenticatedChatConnection) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerRegistrationService_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerRegistrationService, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerRegistrationService_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerRegistrationService_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerRegistrationService_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseMutPointerRegistrationService; -static_assert_64bit(offsetof(SignalCPromiseMutPointerRegistrationService, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseMutPointerRegistrationService, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseMutPointerRegistrationService, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseMutPointerRegistrationService) == 24); -static_assert_64bit(alignof(SignalCPromiseMutPointerRegistrationService) == 8); -typedef SignalCPromiseMutPointerRegistrationService* SignalType_MutPointer_SignalCPromiseMutPointerRegistrationService; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseMutPointerRegistrationService) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseMutPointerRegistrationService) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerBackupRestoreResponse_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerBackupRestoreResponse, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerBackupRestoreResponse_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerBackupRestoreResponse_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerBackupRestoreResponse_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseMutPointerBackupRestoreResponse; -static_assert_64bit(offsetof(SignalCPromiseMutPointerBackupRestoreResponse, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseMutPointerBackupRestoreResponse, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseMutPointerBackupRestoreResponse, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseMutPointerBackupRestoreResponse) == 24); -static_assert_64bit(alignof(SignalCPromiseMutPointerBackupRestoreResponse) == 8); -typedef SignalCPromiseMutPointerBackupRestoreResponse* SignalType_MutPointer_SignalCPromiseMutPointerBackupRestoreResponse; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseMutPointerBackupRestoreResponse) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseMutPointerBackupRestoreResponse) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerBackupStoreResponse_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerBackupStoreResponse, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerBackupStoreResponse_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerBackupStoreResponse_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerBackupStoreResponse_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseMutPointerBackupStoreResponse; -static_assert_64bit(offsetof(SignalCPromiseMutPointerBackupStoreResponse, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseMutPointerBackupStoreResponse, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseMutPointerBackupStoreResponse, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseMutPointerBackupStoreResponse) == 24); -static_assert_64bit(alignof(SignalCPromiseMutPointerBackupStoreResponse) == 8); -typedef SignalCPromiseMutPointerBackupStoreResponse* SignalType_MutPointer_SignalCPromiseMutPointerBackupStoreResponse; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseMutPointerBackupStoreResponse) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseMutPointerBackupStoreResponse) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerRegisterAccountResponse_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalMutPointerRegisterAccountResponse, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerRegisterAccountResponse_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerRegisterAccountResponse_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalMutPointerRegisterAccountResponse_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseMutPointerRegisterAccountResponse; -static_assert_64bit(offsetof(SignalCPromiseMutPointerRegisterAccountResponse, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseMutPointerRegisterAccountResponse, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseMutPointerRegisterAccountResponse, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseMutPointerRegisterAccountResponse) == 24); -static_assert_64bit(alignof(SignalCPromiseMutPointerRegisterAccountResponse) == 8); -typedef SignalCPromiseMutPointerRegisterAccountResponse* SignalType_MutPointer_SignalCPromiseMutPointerRegisterAccountResponse; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseMutPointerRegisterAccountResponse) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseMutPointerRegisterAccountResponse) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOptionalPairOfCStringPtrc_uchar32_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseOptionalPairOfCStringPtrc_uchar32; -static_assert_64bit(offsetof(SignalCPromiseOptionalPairOfCStringPtrc_uchar32, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseOptionalPairOfCStringPtrc_uchar32, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseOptionalPairOfCStringPtrc_uchar32, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseOptionalPairOfCStringPtrc_uchar32) == 24); -static_assert_64bit(alignof(SignalCPromiseOptionalPairOfCStringPtrc_uchar32) == 8); -typedef SignalCPromiseOptionalPairOfCStringPtrc_uchar32* SignalType_MutPointer_SignalCPromiseOptionalPairOfCStringPtrc_uchar32; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOptionalPairOfCStringPtrc_uchar32) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOptionalPairOfCStringPtrc_uchar32) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOptionalUuid_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOptionalUuid, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOptionalUuid_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOptionalUuid_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOptionalUuid_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseOptionalUuid; -static_assert_64bit(offsetof(SignalCPromiseOptionalUuid, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseOptionalUuid, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseOptionalUuid, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseOptionalUuid) == 24); -static_assert_64bit(alignof(SignalCPromiseOptionalUuid) == 8); -typedef SignalCPromiseOptionalUuid* SignalType_MutPointer_SignalCPromiseOptionalUuid; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOptionalUuid) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOptionalUuid) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfc_uchar17_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBufferOfc_uchar17, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfc_uchar17_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfc_uchar17_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfc_uchar17_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseOwnedBufferOfc_uchar17; -static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfc_uchar17, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfc_uchar17, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfc_uchar17, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseOwnedBufferOfc_uchar17) == 24); -static_assert_64bit(alignof(SignalCPromiseOwnedBufferOfc_uchar17) == 8); -typedef SignalCPromiseOwnedBufferOfc_uchar17* SignalType_MutPointer_SignalCPromiseOwnedBufferOfc_uchar17; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfc_uchar17) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfc_uchar17) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBuffer_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBuffer, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBuffer_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBuffer_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBuffer_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseOwnedBuffer; -static_assert_64bit(offsetof(SignalCPromiseOwnedBuffer, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseOwnedBuffer, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseOwnedBuffer, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseOwnedBuffer) == 24); -static_assert_64bit(alignof(SignalCPromiseOwnedBuffer) == 8); -typedef SignalCPromiseOwnedBuffer* SignalType_MutPointer_SignalCPromiseOwnedBuffer; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOwnedBuffer) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOwnedBuffer) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult; -static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult) == 24); -static_assert_64bit(alignof(SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult) == 8); -typedef SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult* SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult; -static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 24); -static_assert_64bit(alignof(SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 8); -typedef SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult* SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult; -static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult) == 24); -static_assert_64bit(alignof(SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult) == 8); -typedef SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult* SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfCStringPtrCStringPtr_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalPairOfCStringPtrCStringPtr, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfCStringPtrCStringPtr_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfCStringPtrCStringPtr_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfCStringPtrCStringPtr_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromisePairOfCStringPtrCStringPtr; -static_assert_64bit(offsetof(SignalCPromisePairOfCStringPtrCStringPtr, complete) == 0); -static_assert_64bit(offsetof(SignalCPromisePairOfCStringPtrCStringPtr, context) == 8); -static_assert_64bit(offsetof(SignalCPromisePairOfCStringPtrCStringPtr, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromisePairOfCStringPtrCStringPtr) == 24); -static_assert_64bit(alignof(SignalCPromisePairOfCStringPtrCStringPtr) == 8); -typedef SignalCPromisePairOfCStringPtrCStringPtr* SignalType_MutPointer_SignalCPromisePairOfCStringPtrCStringPtr; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromisePairOfCStringPtrCStringPtr) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromisePairOfCStringPtrCStringPtr) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr; -static_assert_64bit(offsetof(SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr, complete) == 0); -static_assert_64bit(offsetof(SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr, context) == 8); -static_assert_64bit(offsetof(SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr) == 24); -static_assert_64bit(alignof(SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr) == 8); -typedef SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr* SignalType_MutPointer_SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalPairOfOwnedBufferOwnedBuffer_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromisePairOfOwnedBufferOwnedBuffer; -static_assert_64bit(offsetof(SignalCPromisePairOfOwnedBufferOwnedBuffer, complete) == 0); -static_assert_64bit(offsetof(SignalCPromisePairOfOwnedBufferOwnedBuffer, context) == 8); -static_assert_64bit(offsetof(SignalCPromisePairOfOwnedBufferOwnedBuffer, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromisePairOfOwnedBufferOwnedBuffer) == 24); -static_assert_64bit(alignof(SignalCPromisePairOfOwnedBufferOwnedBuffer) == 8); -typedef SignalCPromisePairOfOwnedBufferOwnedBuffer* SignalType_MutPointer_SignalCPromisePairOfOwnedBufferOwnedBuffer; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromisePairOfOwnedBufferOwnedBuffer) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromisePairOfOwnedBufferOwnedBuffer) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalUuid_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalUuid, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalUuid_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalUuid_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalUuid_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseUuid; -static_assert_64bit(offsetof(SignalCPromiseUuid, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseUuid, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseUuid, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseUuid) == 24); -static_assert_64bit(alignof(SignalCPromiseUuid) == 8); -typedef SignalCPromiseUuid* SignalType_MutPointer_SignalCPromiseUuid; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseUuid) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseUuid) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeMediaBackupInfoFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalBridgeMediaBackupInfoFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeMediaBackupInfoFfiResult_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeMediaBackupInfoFfiResult_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeMediaBackupInfoFfiResult_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseBridgeMediaBackupInfoFfiResult; -static_assert_64bit(offsetof(SignalCPromiseBridgeMediaBackupInfoFfiResult, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseBridgeMediaBackupInfoFfiResult, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseBridgeMediaBackupInfoFfiResult, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseBridgeMediaBackupInfoFfiResult) == 24); -static_assert_64bit(alignof(SignalCPromiseBridgeMediaBackupInfoFfiResult) == 8); -typedef SignalCPromiseBridgeMediaBackupInfoFfiResult* SignalType_MutPointer_SignalCPromiseBridgeMediaBackupInfoFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseBridgeMediaBackupInfoFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseBridgeMediaBackupInfoFfiResult) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeMessageBackupInfoFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalBridgeMessageBackupInfoFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeMessageBackupInfoFfiResult_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeMessageBackupInfoFfiResult_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgeMessageBackupInfoFfiResult_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseBridgeMessageBackupInfoFfiResult; -static_assert_64bit(offsetof(SignalCPromiseBridgeMessageBackupInfoFfiResult, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseBridgeMessageBackupInfoFfiResult, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseBridgeMessageBackupInfoFfiResult, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseBridgeMessageBackupInfoFfiResult) == 24); -static_assert_64bit(alignof(SignalCPromiseBridgeMessageBackupInfoFfiResult) == 8); -typedef SignalCPromiseBridgeMessageBackupInfoFfiResult* SignalType_MutPointer_SignalCPromiseBridgeMessageBackupInfoFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseBridgeMessageBackupInfoFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseBridgeMessageBackupInfoFfiResult) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgePendingTotpKeyFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalBridgePendingTotpKeyFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgePendingTotpKeyFfiResult_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgePendingTotpKeyFfiResult_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgePendingTotpKeyFfiResult_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseBridgePendingTotpKeyFfiResult; -static_assert_64bit(offsetof(SignalCPromiseBridgePendingTotpKeyFfiResult, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseBridgePendingTotpKeyFfiResult, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseBridgePendingTotpKeyFfiResult, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseBridgePendingTotpKeyFfiResult) == 24); -static_assert_64bit(alignof(SignalCPromiseBridgePendingTotpKeyFfiResult) == 8); -typedef SignalCPromiseBridgePendingTotpKeyFfiResult* SignalType_MutPointer_SignalCPromiseBridgePendingTotpKeyFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseBridgePendingTotpKeyFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseBridgePendingTotpKeyFfiResult) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgePreKeyCountsFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalBridgePreKeyCountsFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgePreKeyCountsFfiResult_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgePreKeyCountsFfiResult_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalBridgePreKeyCountsFfiResult_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseBridgePreKeyCountsFfiResult; -static_assert_64bit(offsetof(SignalCPromiseBridgePreKeyCountsFfiResult, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseBridgePreKeyCountsFfiResult, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseBridgePreKeyCountsFfiResult, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseBridgePreKeyCountsFfiResult) == 24); -static_assert_64bit(alignof(SignalCPromiseBridgePreKeyCountsFfiResult) == 8); -typedef SignalCPromiseBridgePreKeyCountsFfiResult* SignalType_MutPointer_SignalCPromiseBridgePreKeyCountsFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseBridgePreKeyCountsFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseBridgePreKeyCountsFfiResult) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCopyBackupMediaNextChunkFfiResult_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseCopyBackupMediaNextChunkFfiResult; -static_assert_64bit(offsetof(SignalCPromiseCopyBackupMediaNextChunkFfiResult, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseCopyBackupMediaNextChunkFfiResult, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseCopyBackupMediaNextChunkFfiResult, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseCopyBackupMediaNextChunkFfiResult) == 24); -static_assert_64bit(alignof(SignalCPromiseCopyBackupMediaNextChunkFfiResult) == 8); -typedef SignalCPromiseCopyBackupMediaNextChunkFfiResult* SignalType_MutPointer_SignalCPromiseCopyBackupMediaNextChunkFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseCopyBackupMediaNextChunkFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseCopyBackupMediaNextChunkFfiResult) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalDeleteBackupMediaNextChunkFfiResult_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseDeleteBackupMediaNextChunkFfiResult; -static_assert_64bit(offsetof(SignalCPromiseDeleteBackupMediaNextChunkFfiResult, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseDeleteBackupMediaNextChunkFfiResult, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseDeleteBackupMediaNextChunkFfiResult, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseDeleteBackupMediaNextChunkFfiResult) == 24); -static_assert_64bit(alignof(SignalCPromiseDeleteBackupMediaNextChunkFfiResult) == 8); -typedef SignalCPromiseDeleteBackupMediaNextChunkFfiResult* SignalType_MutPointer_SignalCPromiseDeleteBackupMediaNextChunkFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseDeleteBackupMediaNextChunkFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseDeleteBackupMediaNextChunkFfiResult) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCurrencyConversionsInternalFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalCurrencyConversionsInternalFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCurrencyConversionsInternalFfiResult_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCurrencyConversionsInternalFfiResult_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalCurrencyConversionsInternalFfiResult_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseCurrencyConversionsInternalFfiResult; -static_assert_64bit(offsetof(SignalCPromiseCurrencyConversionsInternalFfiResult, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseCurrencyConversionsInternalFfiResult, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseCurrencyConversionsInternalFfiResult, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseCurrencyConversionsInternalFfiResult) == 24); -static_assert_64bit(alignof(SignalCPromiseCurrencyConversionsInternalFfiResult) == 8); -typedef SignalCPromiseCurrencyConversionsInternalFfiResult* SignalType_MutPointer_SignalCPromiseCurrencyConversionsInternalFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseCurrencyConversionsInternalFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseCurrencyConversionsInternalFfiResult) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalGetStickerUploadFormsResponseFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalGetStickerUploadFormsResponseFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalGetStickerUploadFormsResponseFfiResult_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalGetStickerUploadFormsResponseFfiResult_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalGetStickerUploadFormsResponseFfiResult_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseGetStickerUploadFormsResponseFfiResult; -static_assert_64bit(offsetof(SignalCPromiseGetStickerUploadFormsResponseFfiResult, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseGetStickerUploadFormsResponseFfiResult, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseGetStickerUploadFormsResponseFfiResult, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseGetStickerUploadFormsResponseFfiResult) == 24); -static_assert_64bit(alignof(SignalCPromiseGetStickerUploadFormsResponseFfiResult) == 8); -typedef SignalCPromiseGetStickerUploadFormsResponseFfiResult* SignalType_MutPointer_SignalCPromiseGetStickerUploadFormsResponseFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseGetStickerUploadFormsResponseFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseGetStickerUploadFormsResponseFfiResult) == 8); -typedef void (*SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalListMediaResponseFfiResult_ConstPointer_void)(SignalType_MutPointer_SignalFfiError, SignalType_ConstPointer_SignalListMediaResponseFfiResult, SignalType_ConstPointer_void); -static_assert_64bit(sizeof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalListMediaResponseFfiResult_ConstPointer_void) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalListMediaResponseFfiResult_ConstPointer_void) == 8); -typedef struct { - SignalType_FunctionPointer_void_MutPointer_SignalFfiError_ConstPointer_SignalListMediaResponseFfiResult_ConstPointer_void complete; - const void* context; - uint64_t cancellation_id; -} SignalCPromiseListMediaResponseFfiResult; -static_assert_64bit(offsetof(SignalCPromiseListMediaResponseFfiResult, complete) == 0); -static_assert_64bit(offsetof(SignalCPromiseListMediaResponseFfiResult, context) == 8); -static_assert_64bit(offsetof(SignalCPromiseListMediaResponseFfiResult, cancellation_id) == 16); -static_assert_64bit(sizeof(SignalCPromiseListMediaResponseFfiResult) == 24); -static_assert_64bit(alignof(SignalCPromiseListMediaResponseFfiResult) == 8); -typedef SignalCPromiseListMediaResponseFfiResult* SignalType_MutPointer_SignalCPromiseListMediaResponseFfiResult; -static_assert_64bit(sizeof(SignalType_MutPointer_SignalCPromiseListMediaResponseFfiResult) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_SignalCPromiseListMediaResponseFfiResult) == 8); -typedef uint16_t* SignalType_MutPointer_uint16_t; -static_assert_64bit(sizeof(SignalType_MutPointer_uint16_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_uint16_t) == 8); -typedef uint64_t* SignalType_MutPointer_uint64_t; -static_assert_64bit(sizeof(SignalType_MutPointer_uint64_t) == 8); -static_assert_64bit(alignof(SignalType_MutPointer_uint64_t) == 8); -static_assert_64bit(sizeof(float) == 4); -static_assert_64bit(alignof(float) == 4); -typedef float MaybeUninitOff32; -static_assert_64bit(sizeof(MaybeUninitOff32) == 4); -static_assert_64bit(alignof(MaybeUninitOff32) == 4); -typedef SignalBorrowedBuffer MaybeUninitOfBorrowedBuffer; -static_assert_64bit(sizeof(MaybeUninitOfBorrowedBuffer) == 16); -static_assert_64bit(alignof(MaybeUninitOfBorrowedBuffer) == 8); -typedef enum { - SignalLogLevelError = 1, - SignalLogLevelWarn = 2, - SignalLogLevelInfo = 3, - SignalLogLevelDebug = 4, - SignalLogLevelTrace = 5, -} SignalLogLevel; -static_assert_64bit(sizeof(SignalLogLevel) == 4); -static_assert_64bit(alignof(SignalLogLevel) == 4); -typedef int32_t (*SignalType_FunctionPointer_int32_t_MutPointer_void_SignalLogLevel_SignalCStringPtr_uint32_t_SignalCStringPtr)(SignalType_MutPointer_void, SignalLogLevel, SignalCStringPtr, uint32_t, SignalCStringPtr); -static_assert_64bit(sizeof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalLogLevel_SignalCStringPtr_uint32_t_SignalCStringPtr) == 8); -static_assert_64bit(alignof(SignalType_FunctionPointer_int32_t_MutPointer_void_SignalLogLevel_SignalCStringPtr_uint32_t_SignalCStringPtr) == 8); -typedef struct { - const size_t* base; - size_t length; -} SignalBorrowedSliceOfusize; -static_assert_64bit(offsetof(SignalBorrowedSliceOfusize, base) == 0); -static_assert_64bit(offsetof(SignalBorrowedSliceOfusize, length) == 8); -static_assert_64bit(sizeof(SignalBorrowedSliceOfusize) == 16); -static_assert_64bit(alignof(SignalBorrowedSliceOfusize) == 8); -typedef struct { - SignalBorrowedBuffer bytes; - SignalBorrowedSliceOfusize lengths; -} SignalBorrowedBytestringArray; -static_assert_64bit(offsetof(SignalBorrowedBytestringArray, bytes) == 0); -static_assert_64bit(offsetof(SignalBorrowedBytestringArray, lengths) == 16); -static_assert_64bit(sizeof(SignalBorrowedBytestringArray) == 32); -static_assert_64bit(alignof(SignalBorrowedBytestringArray) == 8); -typedef struct { - const SignalType_ConstPointer_FixedArray32_uint8_t* base; - size_t length; -} SignalBorrowedSliceOfc_uchar32; -static_assert_64bit(offsetof(SignalBorrowedSliceOfc_uchar32, base) == 0); -static_assert_64bit(offsetof(SignalBorrowedSliceOfc_uchar32, length) == 8); -static_assert_64bit(sizeof(SignalBorrowedSliceOfc_uchar32) == 16); -static_assert_64bit(alignof(SignalBorrowedSliceOfc_uchar32) == 8); -typedef struct { - const SignalCStringPtr* base; - size_t length; -} SignalBorrowedSliceOfCStringPtr; -static_assert_64bit(offsetof(SignalBorrowedSliceOfCStringPtr, base) == 0); -static_assert_64bit(offsetof(SignalBorrowedSliceOfCStringPtr, length) == 8); -static_assert_64bit(sizeof(SignalBorrowedSliceOfCStringPtr) == 16); -static_assert_64bit(alignof(SignalBorrowedSliceOfCStringPtr) == 8); -typedef struct { - const SignalBorrowedBuffer* base; - size_t length; -} SignalBorrowedSliceOfBuffers; -static_assert_64bit(offsetof(SignalBorrowedSliceOfBuffers, base) == 0); -static_assert_64bit(offsetof(SignalBorrowedSliceOfBuffers, length) == 8); -static_assert_64bit(sizeof(SignalBorrowedSliceOfBuffers) == 16); -static_assert_64bit(alignof(SignalBorrowedSliceOfBuffers) == 8); -typedef struct { - const SignalConstPointerProtocolAddress* base; - size_t length; -} SignalBorrowedSliceOfConstPointerProtocolAddress; -static_assert_64bit(offsetof(SignalBorrowedSliceOfConstPointerProtocolAddress, base) == 0); -static_assert_64bit(offsetof(SignalBorrowedSliceOfConstPointerProtocolAddress, length) == 8); -static_assert_64bit(sizeof(SignalBorrowedSliceOfConstPointerProtocolAddress) == 16); -static_assert_64bit(alignof(SignalBorrowedSliceOfConstPointerProtocolAddress) == 8); -typedef struct { - const SignalConstPointerPublicKey* base; - size_t length; -} SignalBorrowedSliceOfConstPointerPublicKey; -static_assert_64bit(offsetof(SignalBorrowedSliceOfConstPointerPublicKey, base) == 0); -static_assert_64bit(offsetof(SignalBorrowedSliceOfConstPointerPublicKey, length) == 8); -static_assert_64bit(sizeof(SignalBorrowedSliceOfConstPointerPublicKey) == 16); -static_assert_64bit(alignof(SignalBorrowedSliceOfConstPointerPublicKey) == 8); -typedef struct { - const SignalConstPointerCiphertextMessage* base; - size_t length; -} SignalBorrowedSliceOfConstPointerCiphertextMessage; -static_assert_64bit(offsetof(SignalBorrowedSliceOfConstPointerCiphertextMessage, base) == 0); -static_assert_64bit(offsetof(SignalBorrowedSliceOfConstPointerCiphertextMessage, length) == 8); -static_assert_64bit(sizeof(SignalBorrowedSliceOfConstPointerCiphertextMessage) == 16); -static_assert_64bit(alignof(SignalBorrowedSliceOfConstPointerCiphertextMessage) == 8); -typedef struct { - const SignalConstPointerSessionRecord* base; - size_t length; -} SignalBorrowedSliceOfConstPointerSessionRecord; -static_assert_64bit(offsetof(SignalBorrowedSliceOfConstPointerSessionRecord, base) == 0); -static_assert_64bit(offsetof(SignalBorrowedSliceOfConstPointerSessionRecord, length) == 8); -static_assert_64bit(sizeof(SignalBorrowedSliceOfConstPointerSessionRecord) == 16); -static_assert_64bit(alignof(SignalBorrowedSliceOfConstPointerSessionRecord) == 8); -typedef struct { - const SignalBridgeCopyBackupMediaItemFfiArg* base; - size_t length; -} SignalBorrowedSliceOfBridgeCopyBackupMediaItemFfiArg; -static_assert_64bit(offsetof(SignalBorrowedSliceOfBridgeCopyBackupMediaItemFfiArg, base) == 0); -static_assert_64bit(offsetof(SignalBorrowedSliceOfBridgeCopyBackupMediaItemFfiArg, length) == 8); -static_assert_64bit(sizeof(SignalBorrowedSliceOfBridgeCopyBackupMediaItemFfiArg) == 16); -static_assert_64bit(alignof(SignalBorrowedSliceOfBridgeCopyBackupMediaItemFfiArg) == 8); -typedef struct { - const SignalBridgeDeleteBackupMediaItemFfiArg* base; - size_t length; -} SignalBorrowedSliceOfBridgeDeleteBackupMediaItemFfiArg; -static_assert_64bit(offsetof(SignalBorrowedSliceOfBridgeDeleteBackupMediaItemFfiArg, base) == 0); -static_assert_64bit(offsetof(SignalBorrowedSliceOfBridgeDeleteBackupMediaItemFfiArg, length) == 8); -static_assert_64bit(sizeof(SignalBorrowedSliceOfBridgeDeleteBackupMediaItemFfiArg) == 16); -static_assert_64bit(alignof(SignalBorrowedSliceOfBridgeDeleteBackupMediaItemFfiArg) == 8); -typedef struct { - const SignalDeviceCapabilityInternalFfiArg* base; - size_t length; -} SignalBorrowedSliceOfDeviceCapabilityInternalFfiArg; -static_assert_64bit(offsetof(SignalBorrowedSliceOfDeviceCapabilityInternalFfiArg, base) == 0); -static_assert_64bit(offsetof(SignalBorrowedSliceOfDeviceCapabilityInternalFfiArg, length) == 8); -static_assert_64bit(sizeof(SignalBorrowedSliceOfDeviceCapabilityInternalFfiArg) == 16); -static_assert_64bit(alignof(SignalBorrowedSliceOfDeviceCapabilityInternalFfiArg) == 8); -typedef struct { - const uint32_t* base; - size_t length; -} SignalBorrowedSliceOfu32; -static_assert_64bit(offsetof(SignalBorrowedSliceOfu32, base) == 0); -static_assert_64bit(offsetof(SignalBorrowedSliceOfu32, length) == 8); -static_assert_64bit(sizeof(SignalBorrowedSliceOfu32) == 16); -static_assert_64bit(alignof(SignalBorrowedSliceOfu32) == 8); -typedef struct { - const SignalAes256GcmSiv* raw; -} SignalConstPointerAes256GcmSiv; -static_assert_64bit(offsetof(SignalConstPointerAes256GcmSiv, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerAes256GcmSiv) == 8); -static_assert_64bit(alignof(SignalConstPointerAes256GcmSiv) == 8); -typedef struct { - const SignalPinHash* raw; -} SignalConstPointerPinHash; -static_assert_64bit(offsetof(SignalConstPointerPinHash, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerPinHash) == 8); -static_assert_64bit(alignof(SignalConstPointerPinHash) == 8); -typedef struct { - const SignalFfiConnectChatBridgeStruct* raw; -} SignalConstPointerFfiConnectChatBridgeStruct; -static_assert_64bit(offsetof(SignalConstPointerFfiConnectChatBridgeStruct, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerFfiConnectChatBridgeStruct) == 8); -static_assert_64bit(alignof(SignalConstPointerFfiConnectChatBridgeStruct) == 8); -typedef struct { - const SignalHsmEnclaveClient* raw; -} SignalConstPointerHsmEnclaveClient; -static_assert_64bit(offsetof(SignalConstPointerHsmEnclaveClient, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerHsmEnclaveClient) == 8); -static_assert_64bit(alignof(SignalConstPointerHsmEnclaveClient) == 8); -typedef struct { - const SignalFfiSyncInputStreamStruct* raw; -} SignalConstPointerFfiSyncInputStreamStruct; -static_assert_64bit(offsetof(SignalConstPointerFfiSyncInputStreamStruct, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerFfiSyncInputStreamStruct) == 8); -static_assert_64bit(alignof(SignalConstPointerFfiSyncInputStreamStruct) == 8); -typedef struct { - const SignalMessageBackupKey* raw; -} SignalConstPointerMessageBackupKey; -static_assert_64bit(offsetof(SignalConstPointerMessageBackupKey, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerMessageBackupKey) == 8); -static_assert_64bit(alignof(SignalConstPointerMessageBackupKey) == 8); -typedef struct { - const SignalMessageBackupValidationOutcome* raw; -} SignalConstPointerMessageBackupValidationOutcome; -static_assert_64bit(offsetof(SignalConstPointerMessageBackupValidationOutcome, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerMessageBackupValidationOutcome) == 8); -static_assert_64bit(alignof(SignalConstPointerMessageBackupValidationOutcome) == 8); -typedef struct { - const SignalConnectionManager* raw; -} SignalConstPointerConnectionManager; -static_assert_64bit(offsetof(SignalConstPointerConnectionManager, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerConnectionManager) == 8); -static_assert_64bit(alignof(SignalConstPointerConnectionManager) == 8); -typedef struct { - const SignalCdsiLookup* raw; -} SignalConstPointerCdsiLookup; -static_assert_64bit(offsetof(SignalConstPointerCdsiLookup, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerCdsiLookup) == 8); -static_assert_64bit(alignof(SignalConstPointerCdsiLookup) == 8); -typedef struct { - const SignalLookupRequest* raw; -} SignalConstPointerLookupRequest; -static_assert_64bit(offsetof(SignalConstPointerLookupRequest, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerLookupRequest) == 8); -static_assert_64bit(alignof(SignalConstPointerLookupRequest) == 8); -typedef struct { - const SignalAuthenticatedChatConnection* raw; -} SignalConstPointerAuthenticatedChatConnection; -static_assert_64bit(offsetof(SignalConstPointerAuthenticatedChatConnection, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerAuthenticatedChatConnection) == 8); -static_assert_64bit(alignof(SignalConstPointerAuthenticatedChatConnection) == 8); -typedef struct { - const SignalCopyBackupMediaStream* raw; -} SignalConstPointerCopyBackupMediaStream; -static_assert_64bit(offsetof(SignalConstPointerCopyBackupMediaStream, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerCopyBackupMediaStream) == 8); -static_assert_64bit(alignof(SignalConstPointerCopyBackupMediaStream) == 8); -typedef struct { - const SignalDeleteBackupMediaStream* raw; -} SignalConstPointerDeleteBackupMediaStream; -static_assert_64bit(offsetof(SignalConstPointerDeleteBackupMediaStream, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerDeleteBackupMediaStream) == 8); -static_assert_64bit(alignof(SignalConstPointerDeleteBackupMediaStream) == 8); -typedef struct { - const SignalFfiChatListenerStruct* raw; -} SignalConstPointerFfiChatListenerStruct; -static_assert_64bit(offsetof(SignalConstPointerFfiChatListenerStruct, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerFfiChatListenerStruct) == 8); -static_assert_64bit(alignof(SignalConstPointerFfiChatListenerStruct) == 8); -typedef struct { - const SignalFfiProvisioningListenerStruct* raw; -} SignalConstPointerFfiProvisioningListenerStruct; -static_assert_64bit(offsetof(SignalConstPointerFfiProvisioningListenerStruct, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerFfiProvisioningListenerStruct) == 8); -static_assert_64bit(alignof(SignalConstPointerFfiProvisioningListenerStruct) == 8); -typedef struct { - const SignalHttpRequest* raw; -} SignalConstPointerHttpRequest; -static_assert_64bit(offsetof(SignalConstPointerHttpRequest, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerHttpRequest) == 8); -static_assert_64bit(alignof(SignalConstPointerHttpRequest) == 8); -typedef struct { - const SignalProvisioningChatConnection* raw; -} SignalConstPointerProvisioningChatConnection; -static_assert_64bit(offsetof(SignalConstPointerProvisioningChatConnection, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerProvisioningChatConnection) == 8); -static_assert_64bit(alignof(SignalConstPointerProvisioningChatConnection) == 8); -typedef struct { - const SignalServerMessageAck* raw; -} SignalConstPointerServerMessageAck; -static_assert_64bit(offsetof(SignalConstPointerServerMessageAck, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerServerMessageAck) == 8); -static_assert_64bit(alignof(SignalConstPointerServerMessageAck) == 8); -typedef struct { - const SignalUnauthenticatedChatConnection* raw; -} SignalConstPointerUnauthenticatedChatConnection; -static_assert_64bit(offsetof(SignalConstPointerUnauthenticatedChatConnection, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerUnauthenticatedChatConnection) == 8); -static_assert_64bit(alignof(SignalConstPointerUnauthenticatedChatConnection) == 8); -typedef struct { - const SignalRegistrationAccountAttributes* raw; -} SignalConstPointerRegistrationAccountAttributes; -static_assert_64bit(offsetof(SignalConstPointerRegistrationAccountAttributes, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerRegistrationAccountAttributes) == 8); -static_assert_64bit(alignof(SignalConstPointerRegistrationAccountAttributes) == 8); -typedef struct { - const SignalRegisterAccountRequest* raw; -} SignalConstPointerRegisterAccountRequest; -static_assert_64bit(offsetof(SignalConstPointerRegisterAccountRequest, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerRegisterAccountRequest) == 8); -static_assert_64bit(alignof(SignalConstPointerRegisterAccountRequest) == 8); -typedef struct { - const SignalRegistrationService* raw; -} SignalConstPointerRegistrationService; -static_assert_64bit(offsetof(SignalConstPointerRegistrationService, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerRegistrationService) == 8); -static_assert_64bit(alignof(SignalConstPointerRegistrationService) == 8); -typedef struct { - const SignalTokioAsyncContext* raw; -} SignalConstPointerTokioAsyncContext; -static_assert_64bit(offsetof(SignalConstPointerTokioAsyncContext, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerTokioAsyncContext) == 8); -static_assert_64bit(alignof(SignalConstPointerTokioAsyncContext) == 8); -typedef struct { - const SignalFfiIdentityKeyStoreStruct* raw; -} SignalConstPointerFfiIdentityKeyStoreStruct; -static_assert_64bit(offsetof(SignalConstPointerFfiIdentityKeyStoreStruct, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerFfiIdentityKeyStoreStruct) == 8); -static_assert_64bit(alignof(SignalConstPointerFfiIdentityKeyStoreStruct) == 8); -typedef struct { - const SignalFfiKyberPreKeyStoreStruct* raw; -} SignalConstPointerFfiKyberPreKeyStoreStruct; -static_assert_64bit(offsetof(SignalConstPointerFfiKyberPreKeyStoreStruct, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerFfiKyberPreKeyStoreStruct) == 8); -static_assert_64bit(alignof(SignalConstPointerFfiKyberPreKeyStoreStruct) == 8); -typedef struct { - const SignalFfiPreKeyStoreStruct* raw; -} SignalConstPointerFfiPreKeyStoreStruct; -static_assert_64bit(offsetof(SignalConstPointerFfiPreKeyStoreStruct, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerFfiPreKeyStoreStruct) == 8); -static_assert_64bit(alignof(SignalConstPointerFfiPreKeyStoreStruct) == 8); -typedef struct { - const SignalFfiSenderKeyStoreStruct* raw; -} SignalConstPointerFfiSenderKeyStoreStruct; -static_assert_64bit(offsetof(SignalConstPointerFfiSenderKeyStoreStruct, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerFfiSenderKeyStoreStruct) == 8); -static_assert_64bit(alignof(SignalConstPointerFfiSenderKeyStoreStruct) == 8); -typedef struct { - const SignalFfiSessionStoreStruct* raw; -} SignalConstPointerFfiSessionStoreStruct; -static_assert_64bit(offsetof(SignalConstPointerFfiSessionStoreStruct, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerFfiSessionStoreStruct) == 8); -static_assert_64bit(alignof(SignalConstPointerFfiSessionStoreStruct) == 8); -typedef struct { - const SignalFfiSignedPreKeyStoreStruct* raw; -} SignalConstPointerFfiSignedPreKeyStoreStruct; -static_assert_64bit(offsetof(SignalConstPointerFfiSignedPreKeyStoreStruct, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerFfiSignedPreKeyStoreStruct) == 8); -static_assert_64bit(alignof(SignalConstPointerFfiSignedPreKeyStoreStruct) == 8); -typedef struct { - const SignalSgxClientState* raw; -} SignalConstPointerSgxClientState; -static_assert_64bit(offsetof(SignalConstPointerSgxClientState, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerSgxClientState) == 8); -static_assert_64bit(alignof(SignalConstPointerSgxClientState) == 8); -typedef struct { - const SignalBridgedStringMap* raw; -} SignalConstPointerBridgedStringMap; -static_assert_64bit(offsetof(SignalConstPointerBridgedStringMap, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerBridgedStringMap) == 8); -static_assert_64bit(alignof(SignalConstPointerBridgedStringMap) == 8); -typedef struct { - const SignalPrivateKey* raw; -} SignalConstPointerPrivateKey; -static_assert_64bit(offsetof(SignalConstPointerPrivateKey, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerPrivateKey) == 8); -static_assert_64bit(alignof(SignalConstPointerPrivateKey) == 8); -typedef struct { - const SignalChatConnectionInfo* raw; -} SignalConstPointerChatConnectionInfo; -static_assert_64bit(offsetof(SignalConstPointerChatConnectionInfo, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerChatConnectionInfo) == 8); -static_assert_64bit(alignof(SignalConstPointerChatConnectionInfo) == 8); -typedef struct { - const SignalBackupRestoreResponse* raw; -} SignalConstPointerBackupRestoreResponse; -static_assert_64bit(offsetof(SignalConstPointerBackupRestoreResponse, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerBackupRestoreResponse) == 8); -static_assert_64bit(alignof(SignalConstPointerBackupRestoreResponse) == 8); -typedef struct { - const SignalBackupStoreResponse* raw; -} SignalConstPointerBackupStoreResponse; -static_assert_64bit(offsetof(SignalConstPointerBackupStoreResponse, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerBackupStoreResponse) == 8); -static_assert_64bit(alignof(SignalConstPointerBackupStoreResponse) == 8); -typedef struct { - const SignalRegisterAccountResponse* raw; -} SignalConstPointerRegisterAccountResponse; -static_assert_64bit(offsetof(SignalConstPointerRegisterAccountResponse, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerRegisterAccountResponse) == 8); -static_assert_64bit(alignof(SignalConstPointerRegisterAccountResponse) == 8); -typedef struct { - const SignalRegistrationSession* raw; -} SignalConstPointerRegistrationSession; -static_assert_64bit(offsetof(SignalConstPointerRegistrationSession, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerRegistrationSession) == 8); -static_assert_64bit(alignof(SignalConstPointerRegistrationSession) == 8); -typedef struct { - const SignalConnectionProxyConfig* raw; -} SignalConstPointerConnectionProxyConfig; -static_assert_64bit(offsetof(SignalConstPointerConnectionProxyConfig, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerConnectionProxyConfig) == 8); -static_assert_64bit(alignof(SignalConstPointerConnectionProxyConfig) == 8); -typedef struct { - const SignalFingerprint* raw; -} SignalConstPointerFingerprint; -static_assert_64bit(offsetof(SignalConstPointerFingerprint, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerFingerprint) == 8); -static_assert_64bit(alignof(SignalConstPointerFingerprint) == 8); -typedef struct { - const SignalKyberPublicKey* raw; -} SignalConstPointerKyberPublicKey; -static_assert_64bit(offsetof(SignalConstPointerKyberPublicKey, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerKyberPublicKey) == 8); -static_assert_64bit(alignof(SignalConstPointerKyberPublicKey) == 8); -typedef struct { - const SignalKyberSecretKey* raw; -} SignalConstPointerKyberSecretKey; -static_assert_64bit(offsetof(SignalConstPointerKyberSecretKey, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerKyberSecretKey) == 8); -static_assert_64bit(alignof(SignalConstPointerKyberSecretKey) == 8); -typedef struct { - const SignalKyberKeyPair* raw; -} SignalConstPointerKyberKeyPair; -static_assert_64bit(offsetof(SignalConstPointerKyberKeyPair, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerKyberKeyPair) == 8); -static_assert_64bit(alignof(SignalConstPointerKyberKeyPair) == 8); -typedef struct { - const SignalDecryptionErrorMessage* raw; -} SignalConstPointerDecryptionErrorMessage; -static_assert_64bit(offsetof(SignalConstPointerDecryptionErrorMessage, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerDecryptionErrorMessage) == 8); -static_assert_64bit(alignof(SignalConstPointerDecryptionErrorMessage) == 8); -typedef struct { - const SignalPlaintextContent* raw; -} SignalConstPointerPlaintextContent; -static_assert_64bit(offsetof(SignalConstPointerPlaintextContent, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerPlaintextContent) == 8); -static_assert_64bit(alignof(SignalConstPointerPlaintextContent) == 8); -typedef struct { - const SignalPreKeySignalMessage* raw; -} SignalConstPointerPreKeySignalMessage; -static_assert_64bit(offsetof(SignalConstPointerPreKeySignalMessage, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerPreKeySignalMessage) == 8); -static_assert_64bit(alignof(SignalConstPointerPreKeySignalMessage) == 8); -typedef struct { - const SignalSenderKeyDistributionMessage* raw; -} SignalConstPointerSenderKeyDistributionMessage; -static_assert_64bit(offsetof(SignalConstPointerSenderKeyDistributionMessage, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerSenderKeyDistributionMessage) == 8); -static_assert_64bit(alignof(SignalConstPointerSenderKeyDistributionMessage) == 8); -typedef struct { - const SignalSenderKeyMessage* raw; -} SignalConstPointerSenderKeyMessage; -static_assert_64bit(offsetof(SignalConstPointerSenderKeyMessage, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerSenderKeyMessage) == 8); -static_assert_64bit(alignof(SignalConstPointerSenderKeyMessage) == 8); -typedef struct { - const SignalSignalMessage* raw; -} SignalConstPointerSignalMessage; -static_assert_64bit(offsetof(SignalConstPointerSignalMessage, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerSignalMessage) == 8); -static_assert_64bit(alignof(SignalConstPointerSignalMessage) == 8); -typedef struct { - const SignalSenderCertificate* raw; -} SignalConstPointerSenderCertificate; -static_assert_64bit(offsetof(SignalConstPointerSenderCertificate, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerSenderCertificate) == 8); -static_assert_64bit(alignof(SignalConstPointerSenderCertificate) == 8); -typedef struct { - const SignalServerCertificate* raw; -} SignalConstPointerServerCertificate; -static_assert_64bit(offsetof(SignalConstPointerServerCertificate, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerServerCertificate) == 8); -static_assert_64bit(alignof(SignalConstPointerServerCertificate) == 8); -typedef struct { - const SignalUnidentifiedSenderMessageContent* raw; -} SignalConstPointerUnidentifiedSenderMessageContent; -static_assert_64bit(offsetof(SignalConstPointerUnidentifiedSenderMessageContent, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerUnidentifiedSenderMessageContent) == 8); -static_assert_64bit(alignof(SignalConstPointerUnidentifiedSenderMessageContent) == 8); -typedef struct { - const SignalSenderKeyRecord* raw; -} SignalConstPointerSenderKeyRecord; -static_assert_64bit(offsetof(SignalConstPointerSenderKeyRecord, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerSenderKeyRecord) == 8); -static_assert_64bit(alignof(SignalConstPointerSenderKeyRecord) == 8); -typedef struct { - const SignalPreKeyBundle* raw; -} SignalConstPointerPreKeyBundle; -static_assert_64bit(offsetof(SignalConstPointerPreKeyBundle, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerPreKeyBundle) == 8); -static_assert_64bit(alignof(SignalConstPointerPreKeyBundle) == 8); -typedef struct { - const SignalKyberPreKeyRecord* raw; -} SignalConstPointerKyberPreKeyRecord; -static_assert_64bit(offsetof(SignalConstPointerKyberPreKeyRecord, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerKyberPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalConstPointerKyberPreKeyRecord) == 8); -typedef struct { - const SignalPreKeyRecord* raw; -} SignalConstPointerPreKeyRecord; -static_assert_64bit(offsetof(SignalConstPointerPreKeyRecord, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalConstPointerPreKeyRecord) == 8); -typedef struct { - const SignalSignedPreKeyRecord* raw; -} SignalConstPointerSignedPreKeyRecord; -static_assert_64bit(offsetof(SignalConstPointerSignedPreKeyRecord, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerSignedPreKeyRecord) == 8); -static_assert_64bit(alignof(SignalConstPointerSignedPreKeyRecord) == 8); -typedef struct { - const SignalServerPublicParams* raw; -} SignalConstPointerServerPublicParams; -static_assert_64bit(offsetof(SignalConstPointerServerPublicParams, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerServerPublicParams) == 8); -static_assert_64bit(alignof(SignalConstPointerServerPublicParams) == 8); -typedef struct { - const SignalServerSecretParams* raw; -} SignalConstPointerServerSecretParams; -static_assert_64bit(offsetof(SignalConstPointerServerSecretParams, raw) == 0); -static_assert_64bit(sizeof(SignalConstPointerServerSecretParams) == 8); -static_assert_64bit(alignof(SignalConstPointerServerSecretParams) == 8); + SignalDirectionSending = 0, + SignalDirectionReceiving = 1, +} SignalDirection; + enum SignalFfiPublicKeyType { SignalFfiPublicKeyTypeECC, SignalFfiPublicKeyTypeKyber, }; typedef uint8_t SignalFfiPublicKeyType; -static_assert_64bit(sizeof(SignalFfiPublicKeyType) == 1); -static_assert_64bit(alignof(SignalFfiPublicKeyType) == 1); -typedef struct { - const int8_t* number; - const int8_t* push_token; - const int8_t* mcc; - const int8_t* mnc; -} SignalFfiRegistrationCreateSessionRequest; -static_assert_64bit(offsetof(SignalFfiRegistrationCreateSessionRequest, number) == 0); -static_assert_64bit(offsetof(SignalFfiRegistrationCreateSessionRequest, push_token) == 8); -static_assert_64bit(offsetof(SignalFfiRegistrationCreateSessionRequest, mcc) == 16); -static_assert_64bit(offsetof(SignalFfiRegistrationCreateSessionRequest, mnc) == 24); -static_assert_64bit(sizeof(SignalFfiRegistrationCreateSessionRequest) == 32); -static_assert_64bit(alignof(SignalFfiRegistrationCreateSessionRequest) == 8); -typedef struct { - uint32_t key_id; - SignalFfiPublicKeyType public_key_type; - const void* public_key; - SignalBorrowedBuffer signature; -} SignalFfiSignedPublicPreKey; -static_assert_64bit(offsetof(SignalFfiSignedPublicPreKey, key_id) == 0); -static_assert_64bit(offsetof(SignalFfiSignedPublicPreKey, public_key_type) == 4); -static_assert_64bit(offsetof(SignalFfiSignedPublicPreKey, public_key) == 8); -static_assert_64bit(offsetof(SignalFfiSignedPublicPreKey, signature) == 16); -static_assert_64bit(sizeof(SignalFfiSignedPublicPreKey) == 32); -static_assert_64bit(alignof(SignalFfiSignedPublicPreKey) == 8); -typedef struct { - bool present; - SignalBorrowedBuffer value; -} SignalOptionalBorrowedSliceOfc_uchar; -static_assert_64bit(offsetof(SignalOptionalBorrowedSliceOfc_uchar, present) == 0); -static_assert_64bit(offsetof(SignalOptionalBorrowedSliceOfc_uchar, value) == 8); -static_assert_64bit(sizeof(SignalOptionalBorrowedSliceOfc_uchar) == 24); -static_assert_64bit(alignof(SignalOptionalBorrowedSliceOfc_uchar) == 8); -typedef struct { - bool present; - MaybeUninitOff32 value; -} SignalOptionalOff32; -static_assert_64bit(offsetof(SignalOptionalOff32, present) == 0); -static_assert_64bit(offsetof(SignalOptionalOff32, value) == 4); -static_assert_64bit(sizeof(SignalOptionalOff32) == 8); -static_assert_64bit(alignof(SignalOptionalOff32) == 4); -typedef struct { - bool present; - MaybeUninitOfBorrowedBuffer value; -} SignalOptionalOfBorrowedBuffer; -static_assert_64bit(offsetof(SignalOptionalOfBorrowedBuffer, present) == 0); -static_assert_64bit(offsetof(SignalOptionalOfBorrowedBuffer, value) == 8); -static_assert_64bit(sizeof(SignalOptionalOfBorrowedBuffer) == 24); -static_assert_64bit(alignof(SignalOptionalOfBorrowedBuffer) == 8); -typedef struct { - void* base; - size_t length; - size_t size_bytes; -} SignalOwnedBufferOfMaxAlignedErased; -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedErased, base) == 0); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedErased, length) == 8); -static_assert_64bit(offsetof(SignalOwnedBufferOfMaxAlignedErased, size_bytes) == 16); -static_assert_64bit(sizeof(SignalOwnedBufferOfMaxAlignedErased) == 24); -static_assert_64bit(alignof(SignalOwnedBufferOfMaxAlignedErased) == 8); + +/** + * The result of saving a new identity key for a protocol address. + */ +typedef enum { + /** + * The protocol address didn't have an identity key or had the same key. + */ + SignalIdentityChangeNewOrUnchanged, + /** + * The new identity key replaced a different key for the protocol address. + */ + SignalIdentityChangeReplacedExisting, +} SignalIdentityChange; + +typedef enum { + SignalLogLevelError = 1, + SignalLogLevelWarn, + SignalLogLevelInfo, + SignalLogLevelDebug, + SignalLogLevelTrace, +} SignalLogLevel; + typedef enum { SignalErrorCodeUnknownError = 1, SignalErrorCodeInvalidState = 2, @@ -3433,3376 +256,2540 @@ typedef enum { SignalErrorCodeRegistrationDeviceTransferPossible = 199, SignalErrorCodeRegistrationRecoveryVerificationFailed = 200, SignalErrorCodeRegistrationLock = 201, - SignalErrorCodeRegisterAccountRequestRejected = 202, - SignalErrorCodeRegistrationRecoveryPasswordRequired = 203, - SignalErrorCodeRegistrationOneTimePasswordRequired = 204, - SignalErrorCodeRegistrationInvalidSession = 205, - SignalErrorCodeRegistrationInvalidReceipt = 206, SignalErrorCodeKeyTransparencyError = 210, SignalErrorCodeKeyTransparencyVerificationFailed = 211, SignalErrorCodeRequestUnauthorized = 220, SignalErrorCodeMismatchedDevices = 221, SignalErrorCodeServiceIdNotFound = 222, - SignalErrorCodeUploadTooLarge = 223, - SignalErrorCodeDeviceIdNotFound = 224, - SignalErrorCodeUsernameNotAvailable = 225, - SignalErrorCodeUsernameNotSet = 226, - SignalErrorCodeUsernameReservationNotFound = 227, - SignalErrorCodeInvalidReceipt = 228, - SignalErrorCodeMissingBackupId = 229, - SignalErrorCodeReceiptCredentialErrorPaymentStillProcessing = 230, - SignalErrorCodeReceiptCredentialErrorPaymentRequired = 231, - SignalErrorCodeReceiptCredentialErrorPaymentNotFound = 232, - SignalErrorCodeReceiptCredentialErrorReceiptAlreadyIssued = 233, - SignalErrorCodeTooManyTotpKeys = 234, - SignalErrorCodeTooManyMfaKeys = 235, - SignalErrorCodeOneTimePasswordNotVerified = 236, - SignalErrorCodeMfaKeyNotFound = 237, } SignalErrorCode; -static_assert_64bit(sizeof(SignalErrorCode) == 4); -static_assert_64bit(alignof(SignalErrorCode) == 4); -typedef enum { - SignalChallengeOptionPushChallenge, - SignalChallengeOptionCaptcha, -} SignalChallengeOption; -static_assert_64bit(sizeof(SignalChallengeOption) == 4); -static_assert_64bit(alignof(SignalChallengeOption) == 4); -typedef enum { - SignalIdentityChangeNewOrUnchanged, - SignalIdentityChangeReplacedExisting, -} SignalIdentityChange; -static_assert_64bit(sizeof(SignalIdentityChange) == 4); -static_assert_64bit(alignof(SignalIdentityChange) == 4); + enum SignalSvr2CredentialsResult { SignalSvr2CredentialsResultMatch, SignalSvr2CredentialsResultNoMatch, SignalSvr2CredentialsResultInvalid, }; typedef uint8_t SignalSvr2CredentialsResult; -static_assert_64bit(sizeof(SignalSvr2CredentialsResult) == 1); -static_assert_64bit(alignof(SignalSvr2CredentialsResult) == 1); + +typedef struct SignalAccountAttributes SignalAccountAttributes; + +/** + * A wrapper around [`ctr::Ctr32BE`] that uses a smaller nonce and supports an initial counter. + */ +typedef struct SignalAes256Ctr32 SignalAes256Ctr32; + +typedef struct SignalAes256GcmDecryption SignalAes256GcmDecryption; + +typedef struct SignalAes256GcmEncryption SignalAes256GcmEncryption; + +typedef struct SignalAes256GcmSiv SignalAes256GcmSiv; + +typedef struct SignalAuthenticatedChatConnection SignalAuthenticatedChatConnection; + +typedef struct SignalBackupRestoreResponse SignalBackupRestoreResponse; + +typedef struct SignalBackupStoreResponse SignalBackupStoreResponse; + +typedef struct SignalBridgedStringMap SignalBridgedStringMap; + +typedef struct SignalCdsiLookup SignalCdsiLookup; + +typedef struct SignalCiphertextMessage SignalCiphertextMessage; + +/** + * Information about an established connection. + */ +typedef struct SignalConnectionInfo SignalConnectionInfo; + +typedef struct SignalConnectionManager SignalConnectionManager; + +typedef struct SignalConnectionProxyConfig SignalConnectionProxyConfig; + +typedef struct SignalDecryptionErrorMessage SignalDecryptionErrorMessage; + +typedef struct SignalFingerprint SignalFingerprint; + +typedef struct SignalHsmEnclaveClient SignalHsmEnclaveClient; + +typedef struct SignalHttpRequest SignalHttpRequest; + +typedef struct SignalIncrementalMac SignalIncrementalMac; + +typedef struct SignalKeyPair SignalKeyPair; + +typedef struct SignalKeySecret SignalKeySecret; + +typedef struct SignalKyberPreKeyRecord SignalKyberPreKeyRecord; + +typedef struct SignalLookupRequest SignalLookupRequest; + +typedef struct SignalMessageBackupKey SignalMessageBackupKey; + +typedef struct SignalMessageBackupValidationOutcome SignalMessageBackupValidationOutcome; + +typedef struct SignalOnlineBackupValidator SignalOnlineBackupValidator; + +typedef struct SignalPinHash SignalPinHash; + +typedef struct SignalPlaintextContent SignalPlaintextContent; + +typedef struct SignalPreKeyBundle SignalPreKeyBundle; + +typedef struct SignalPreKeyRecord SignalPreKeyRecord; + +typedef struct SignalPreKeySignalMessage SignalPreKeySignalMessage; + +typedef struct SignalPrivateKey SignalPrivateKey; + +/** + * Represents a unique Signal client instance as `(, )` pair. + */ +typedef struct SignalProtocolAddress SignalProtocolAddress; + +typedef struct SignalProvisioningChatConnection SignalProvisioningChatConnection; + +typedef struct SignalPublicKey SignalPublicKey; + +typedef struct SignalRegisterAccountRequest SignalRegisterAccountRequest; + +typedef struct SignalRegisterAccountResponse SignalRegisterAccountResponse; + +typedef struct SignalRegistrationService SignalRegistrationService; + +typedef struct SignalRegistrationSession SignalRegistrationSession; + +typedef struct SignalSanitizedMetadata SignalSanitizedMetadata; + +typedef struct SignalSenderCertificate SignalSenderCertificate; + +typedef struct SignalSenderKeyDistributionMessage SignalSenderKeyDistributionMessage; + +typedef struct SignalSenderKeyMessage SignalSenderKeyMessage; + +typedef struct SignalSenderKeyRecord SignalSenderKeyRecord; + +typedef struct SignalServerCertificate SignalServerCertificate; + +/** + * Wraps a named type and a single-use guard around [`chat::server_requests::ResponseEnvelopeSender`]. + */ +typedef struct SignalServerMessageAck SignalServerMessageAck; + +typedef struct SignalServerPublicParams SignalServerPublicParams; + +typedef struct SignalServerSecretParams SignalServerSecretParams; + +typedef struct SignalSessionRecord SignalSessionRecord; + +typedef struct SignalSgxClientState SignalSgxClientState; + +/** + * The top-level error type (opaquely) returned to C clients when something goes wrong. + * + * Ideally this would use [ThinBox][], and then we wouldn't need an extra level of indirection when + * returning it to C, but unfortunately that isn't stable yet. + * + * [ThinBox]: https://doc.rust-lang.org/std/boxed/struct.ThinBox.html + */ +typedef struct SignalFfiError SignalFfiError; + +typedef struct SignalMessage SignalMessage; + +typedef struct SignalSignedPreKeyRecord SignalSignedPreKeyRecord; + +typedef struct SignalTokioAsyncContext SignalTokioAsyncContext; + +typedef struct SignalUnauthenticatedChatConnection SignalUnauthenticatedChatConnection; + +typedef struct SignalUnidentifiedSenderMessageContent SignalUnidentifiedSenderMessageContent; + +typedef struct SignalValidatingMac SignalValidatingMac; + typedef struct { - bool user_satisfied; - SignalBorrowedSliceOfCStringPtr call_quality_issues; - const int8_t* additional_issues_description; - const int8_t* debug_log_url; - uint64_t start_timestamp; - uint64_t end_timestamp; - const int8_t* call_type; - bool success; - const int8_t* call_end_reason; - SignalOptionalOff32 connection_rtt_median; - SignalOptionalOff32 audio_rtt_median; - SignalOptionalOff32 video_rtt_median; - SignalOptionalOff32 audio_recv_jitter_median; - SignalOptionalOff32 video_recv_jitter_median; - SignalOptionalOff32 audio_send_jitter_median; - SignalOptionalOff32 video_send_jitter_median; - SignalOptionalOff32 audio_recv_packet_loss_fraction; - SignalOptionalOff32 video_recv_packet_loss_fraction; - SignalOptionalOff32 audio_send_packet_loss_fraction; - SignalOptionalOff32 video_send_packet_loss_fraction; - SignalOptionalOfBorrowedBuffer call_telemetry; - SignalOptionalOfBorrowedBuffer call_id_hash; -} SignalCallQualitySurveyInternalFfiArg; -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, user_satisfied) == 0); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, call_quality_issues) == 8); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, additional_issues_description) == 24); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, debug_log_url) == 32); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, start_timestamp) == 40); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, end_timestamp) == 48); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, call_type) == 56); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, success) == 64); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, call_end_reason) == 72); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, connection_rtt_median) == 80); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, audio_rtt_median) == 88); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, video_rtt_median) == 96); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, audio_recv_jitter_median) == 104); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, video_recv_jitter_median) == 112); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, audio_send_jitter_median) == 120); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, video_send_jitter_median) == 128); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, audio_recv_packet_loss_fraction) == 136); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, video_recv_packet_loss_fraction) == 144); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, audio_send_packet_loss_fraction) == 152); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, video_send_packet_loss_fraction) == 160); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, call_telemetry) == 168); -static_assert_64bit(offsetof(SignalCallQualitySurveyInternalFfiArg, call_id_hash) == 192); -static_assert_64bit(sizeof(SignalCallQualitySurveyInternalFfiArg) == 216); -static_assert_64bit(alignof(SignalCallQualitySurveyInternalFfiArg) == 8); -typedef enum { - SignalPaymentProviderFfiArgGooglePlayBilling, - SignalPaymentProviderFfiArgAppleAppStore, - SignalPaymentProviderFfiArgStripe, - SignalPaymentProviderFfiArgBraintree, -} SignalPaymentProviderFfiArg; -static_assert_64bit(sizeof(SignalPaymentProviderFfiArg) == 4); -static_assert_64bit(alignof(SignalPaymentProviderFfiArg) == 4); -typedef enum { - SignalCiphertextMessageTypeWhisper = 2, - SignalCiphertextMessageTypePreKey = 3, - SignalCiphertextMessageTypeSenderKey = 7, - SignalCiphertextMessageTypePlaintext = 8, -} SignalCiphertextMessageType; -static_assert_64bit(sizeof(SignalCiphertextMessageType) == 4); -static_assert_64bit(alignof(SignalCiphertextMessageType) == 4); -typedef enum { - SignalContentHintDefault, - SignalContentHintResendable, - SignalContentHintImplicit, -} SignalContentHint; -static_assert_64bit(sizeof(SignalContentHint) == 4); -static_assert_64bit(alignof(SignalContentHint) == 4); -typedef enum { - SignalDirectionSending, - SignalDirectionReceiving, -} SignalDirection; -static_assert_64bit(sizeof(SignalDirection) == 4); -static_assert_64bit(alignof(SignalDirection) == 4); + SignalProtocolAddress *raw; +} SignalMutPointerProtocolAddress; + typedef struct { - void* ctx; - SignalType_FunctionPointer_int32_t_MutPointer_void_SignalLogLevel_SignalCStringPtr_uint32_t_SignalCStringPtr log; - SignalType_FunctionPointer_int32_t_MutPointer_void flush; - SignalType_FunctionPointer_void_MutPointer_void destroy; -} SignalFfiLoggerStruct; -static_assert_64bit(offsetof(SignalFfiLoggerStruct, ctx) == 0); -static_assert_64bit(offsetof(SignalFfiLoggerStruct, log) == 8); -static_assert_64bit(offsetof(SignalFfiLoggerStruct, flush) == 16); -static_assert_64bit(offsetof(SignalFfiLoggerStruct, destroy) == 24); -static_assert_64bit(sizeof(SignalFfiLoggerStruct) == 32); -static_assert_64bit(alignof(SignalFfiLoggerStruct) == 8); -SignalFfiError* signal_account_entropy_pool_derive_backup_key( - SignalType_FixedArray32_uint8_t* out, - const int8_t* account_entropy -); -SignalFfiError* signal_account_entropy_pool_derive_svr_key( - SignalType_FixedArray32_uint8_t* out, - const int8_t* account_entropy -); -SignalFfiError* signal_account_entropy_pool_generate( - SignalCStringPtr* out -); -SignalFfiError* signal_account_entropy_pool_is_valid( - bool* out, - const int8_t* account_entropy -); -SignalFfiError* signal_address_clone( - SignalMutPointerProtocolAddress* new_obj, - SignalConstPointerProtocolAddress obj -); -SignalFfiError* signal_address_destroy( - SignalMutPointerProtocolAddress p -); -SignalFfiError* signal_address_get_device_id( - uint32_t* out, - SignalConstPointerProtocolAddress obj -); -SignalFfiError* signal_address_get_name( - SignalCStringPtr* out, - SignalConstPointerProtocolAddress obj -); -SignalFfiError* signal_address_new( - SignalMutPointerProtocolAddress* out, - const int8_t* name, - uint32_t device_id -); -SignalFfiError* signal_aes256_ctr32_destroy( - SignalMutPointerAes256Ctr32 p -); -SignalFfiError* signal_aes256_ctr32_new( - SignalMutPointerAes256Ctr32* out, - SignalBorrowedBuffer key, - SignalBorrowedBuffer nonce, - uint32_t initial_ctr -); -SignalFfiError* signal_aes256_ctr32_process( - SignalMutPointerAes256Ctr32 ctr, - SignalBorrowedMutableBuffer data, - uint32_t offset, - uint32_t length -); -SignalFfiError* signal_aes256_gcm_decryption_destroy( - SignalMutPointerAes256GcmDecryption p -); -SignalFfiError* signal_aes256_gcm_decryption_new( - SignalMutPointerAes256GcmDecryption* out, - SignalBorrowedBuffer key, - SignalBorrowedBuffer nonce, - SignalBorrowedBuffer associated_data -); -SignalFfiError* signal_aes256_gcm_decryption_update( - SignalMutPointerAes256GcmDecryption gcm, - SignalBorrowedMutableBuffer data, - uint32_t offset, - uint32_t length -); -SignalFfiError* signal_aes256_gcm_decryption_verify_tag( - bool* out, - SignalMutPointerAes256GcmDecryption gcm, - SignalBorrowedBuffer tag -); -SignalFfiError* signal_aes256_gcm_encryption_compute_tag( - SignalOwnedBuffer* out, - SignalMutPointerAes256GcmEncryption gcm -); -SignalFfiError* signal_aes256_gcm_encryption_destroy( - SignalMutPointerAes256GcmEncryption p -); -SignalFfiError* signal_aes256_gcm_encryption_new( - SignalMutPointerAes256GcmEncryption* out, - SignalBorrowedBuffer key, - SignalBorrowedBuffer nonce, - SignalBorrowedBuffer associated_data -); -SignalFfiError* signal_aes256_gcm_encryption_update( - SignalMutPointerAes256GcmEncryption gcm, - SignalBorrowedMutableBuffer data, - uint32_t offset, - uint32_t length -); -SignalFfiError* signal_aes256_gcm_siv_decrypt( - SignalOwnedBuffer* out, - SignalConstPointerAes256GcmSiv aes_gcm_siv, - SignalBorrowedBuffer ctext, - SignalBorrowedBuffer nonce, - SignalBorrowedBuffer associated_data -); -SignalFfiError* signal_aes256_gcm_siv_destroy( - SignalMutPointerAes256GcmSiv p -); -SignalFfiError* signal_aes256_gcm_siv_encrypt( - SignalOwnedBuffer* out, - SignalConstPointerAes256GcmSiv aes_gcm_siv_obj, - SignalBorrowedBuffer ptext, - SignalBorrowedBuffer nonce, - SignalBorrowedBuffer associated_data -); -SignalFfiError* signal_aes256_gcm_siv_new( - SignalMutPointerAes256GcmSiv* out, - SignalBorrowedBuffer key -); -SignalFfiError* signal_auth_credential_presentation_check_valid_contents( - SignalBorrowedBuffer presentation_bytes -); -SignalFfiError* signal_auth_credential_presentation_get_pni_ciphertext( - SignalType_FixedArray65_uint8_t* out, - SignalBorrowedBuffer presentation_bytes -); -SignalFfiError* signal_auth_credential_presentation_get_redemption_time( - uint64_t* out, - SignalBorrowedBuffer presentation_bytes -); -SignalFfiError* signal_auth_credential_presentation_get_uuid_ciphertext( - SignalType_FixedArray65_uint8_t* out, - SignalBorrowedBuffer presentation_bytes -); -SignalFfiError* signal_auth_credential_with_pni_check_valid_contents( - SignalBorrowedBuffer bytes -); -SignalFfiError* signal_auth_credential_with_pni_response_check_valid_contents( - SignalBorrowedBuffer bytes -); -SignalFfiError* signal_authenticated_chat_connection_clear_push_token( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat -); -SignalFfiError* signal_authenticated_chat_connection_clear_registration_lock( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat -); -SignalFfiError* signal_authenticated_chat_connection_confirm_totp_key( - SignalCPromisei32* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - int32_t one_time_password, - const int8_t* name, - uint64_t created_at, - const SignalType_FixedArray32_uint8_t* svr_key, - int64_t rng -); -SignalFfiError* signal_authenticated_chat_connection_confirm_username( - SignalCPromiseUuid* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - const int8_t* username, - SignalBorrowedBuffer username_ciphertext, - int64_t rng -); -SignalFfiError* signal_authenticated_chat_connection_connect( - SignalCPromiseMutPointerAuthenticatedChatConnection* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerConnectionManager connection_manager, - const int8_t* username, - const int8_t* password, - bool receive_stories, - SignalBorrowedBytestringArray languages -); -SignalFfiError* signal_authenticated_chat_connection_delete_account( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat -); -SignalFfiError* signal_authenticated_chat_connection_delete_username_hash( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat -); -SignalFfiError* signal_authenticated_chat_connection_delete_username_link( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat -); -SignalFfiError* signal_authenticated_chat_connection_destroy( - SignalMutPointerAuthenticatedChatConnection p -); -SignalFfiError* signal_authenticated_chat_connection_disconnect( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat -); -SignalFfiError* signal_authenticated_chat_connection_generate_totp_key( - SignalCPromiseBridgePendingTotpKeyFfiResult* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat -); -SignalFfiError* signal_authenticated_chat_connection_get_currency_conversions( - SignalCPromiseCurrencyConversionsInternalFfiResult* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat -); -SignalFfiError* signal_authenticated_chat_connection_get_devices( - SignalCPromiseOwnedBufferOfMaxAlignedLinkedDeviceInternalFfiResult* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat -); -SignalFfiError* signal_authenticated_chat_connection_get_pre_key_count( - SignalCPromiseBridgePreKeyCountsFfiResult* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat -); -SignalFfiError* signal_authenticated_chat_connection_get_sticker_upload_forms( - SignalCPromiseGetStickerUploadFormsResponseFfiResult* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - int32_t number_of_stickers -); -SignalFfiError* signal_authenticated_chat_connection_get_upload_form( - SignalCPromiseFfiUploadForm* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - uint64_t upload_length -); -SignalFfiError* signal_authenticated_chat_connection_info( - SignalMutPointerChatConnectionInfo* out, - SignalConstPointerAuthenticatedChatConnection chat -); -SignalFfiError* signal_authenticated_chat_connection_init_listener( - SignalConstPointerAuthenticatedChatConnection chat, - SignalConstPointerFfiChatListenerStruct listener -); -SignalFfiError* signal_authenticated_chat_connection_list_mfa_keys( - SignalCPromiseOwnedBufferOfMaxAlignedBridgeConfirmedMfaKeyFfiResult* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - const SignalType_FixedArray32_uint8_t* svr_key -); -SignalFfiError* signal_authenticated_chat_connection_preconnect( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerConnectionManager connection_manager -); -SignalFfiError* signal_authenticated_chat_connection_redeem_backup_receipt( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - const SignalType_FixedArray329_uint8_t* presentation -); -SignalFfiError* signal_authenticated_chat_connection_remove_device( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - uint8_t device_id -); -SignalFfiError* signal_authenticated_chat_connection_remove_mfa_key( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - int32_t key_id -); -SignalFfiError* signal_authenticated_chat_connection_reserve_username_hash( - SignalCPromisec_uchar32* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - SignalBorrowedSliceOfc_uchar32 username_hashes -); -SignalFfiError* signal_authenticated_chat_connection_send( - SignalCPromiseFfiChatResponse* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - SignalConstPointerHttpRequest http_request, - uint32_t timeout_millis -); -SignalFfiError* signal_authenticated_chat_connection_send_message( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - const SignalType_FixedArray17_uint8_t* destination, - uint64_t timestamp, - SignalBorrowedSliceOfu32 device_ids, - SignalBorrowedSliceOfu32 registration_ids, - SignalBorrowedSliceOfConstPointerCiphertextMessage contents, - bool online_only, - bool is_urgent -); -SignalFfiError* signal_authenticated_chat_connection_send_sync_message( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - uint64_t timestamp, - SignalBorrowedSliceOfu32 device_ids, - SignalBorrowedSliceOfu32 registration_ids, - SignalBorrowedSliceOfConstPointerCiphertextMessage contents, - bool is_urgent -); -SignalFfiError* signal_authenticated_chat_connection_set_capabilities( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - SignalBorrowedSliceOfDeviceCapabilityInternalFfiArg capabilities -); -SignalFfiError* signal_authenticated_chat_connection_set_device_name( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - uint8_t device_id, - SignalBorrowedBuffer encrypted_name -); -SignalFfiError* signal_authenticated_chat_connection_set_discoverable_by_phone_number( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - bool discoverable -); -SignalFfiError* signal_authenticated_chat_connection_set_mfa_key_metadata( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - int32_t key_id, - const int8_t* name, - uint64_t created_at, - const SignalType_FixedArray32_uint8_t* svr_key, - int64_t rng -); -SignalFfiError* signal_authenticated_chat_connection_set_push_token_apns( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - const int8_t* apns_token -); -SignalFfiError* signal_authenticated_chat_connection_set_registration_lock( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - const SignalType_FixedArray32_uint8_t* svr_key -); -SignalFfiError* signal_authenticated_chat_connection_set_registration_recovery_password( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - const SignalType_FixedArray32_uint8_t* svr_key -); -SignalFfiError* signal_authenticated_chat_connection_set_username_link( - SignalCPromiseUuid* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerAuthenticatedChatConnection chat, - SignalBorrowedBuffer username_ciphertext, - bool keep_link_handle -); -SignalFfiError* signal_avatar_upload_credential_check_valid_contents( - SignalBorrowedBuffer credential_bytes -); -SignalFfiError* signal_avatar_upload_credential_get_cm( - SignalType_FixedArray32_uint8_t* out, - SignalBorrowedBuffer credential_bytes -); -SignalFfiError* signal_avatar_upload_credential_get_redemption_time( - uint64_t* out, - SignalBorrowedBuffer credential_bytes -); -SignalFfiError* signal_avatar_upload_credential_present_deterministic( - SignalOwnedBuffer* out, - SignalBorrowedBuffer credential_bytes, - SignalBorrowedBuffer server_params_bytes, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_avatar_upload_credential_presentation_check_valid_contents( - SignalBorrowedBuffer presentation_bytes -); -SignalFfiError* signal_avatar_upload_credential_presentation_get_cm( - SignalType_FixedArray32_uint8_t* out, - SignalBorrowedBuffer presentation_bytes -); -SignalFfiError* signal_avatar_upload_credential_presentation_get_redemption_time( - uint64_t* out, - SignalBorrowedBuffer presentation_bytes -); -SignalFfiError* signal_avatar_upload_credential_presentation_verify( - SignalBorrowedBuffer presentation_bytes, - uint64_t current_time, - SignalBorrowedBuffer server_params_bytes -); -SignalFfiError* signal_avatar_upload_credential_request_check_valid_contents( - SignalBorrowedBuffer request_bytes -); -SignalFfiError* signal_avatar_upload_credential_request_context_check_valid_contents( - SignalBorrowedBuffer context_bytes -); -SignalFfiError* signal_avatar_upload_credential_request_context_get_request( - SignalOwnedBuffer* out, - SignalBorrowedBuffer context_bytes -); -SignalFfiError* signal_avatar_upload_credential_request_context_new( - SignalOwnedBuffer* out, - const SignalType_FixedArray17_uint8_t* aci, - SignalBorrowedBuffer zk_credential_key_pair_bytes, - uint64_t rotation_id, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_avatar_upload_credential_request_context_receive_response( - SignalOwnedBuffer* out, - SignalBorrowedBuffer context_bytes, - SignalBorrowedBuffer response_bytes, - uint64_t current_time, - SignalBorrowedBuffer params_bytes -); -SignalFfiError* signal_avatar_upload_credential_request_issue_deterministic( - SignalOwnedBuffer* out, - SignalBorrowedBuffer request_bytes, - const SignalType_FixedArray17_uint8_t* aci, - SignalBorrowedBuffer zk_credential_key_pub_bytes, - uint64_t rotation_id, - uint64_t redemption_time, - SignalBorrowedBuffer params_bytes, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_avatar_upload_credential_response_check_valid_contents( - SignalBorrowedBuffer response_bytes -); -SignalFfiError* signal_backup_auth_credential_check_valid_contents( - SignalBorrowedBuffer params_bytes -); -SignalFfiError* signal_backup_auth_credential_get_backup_id( - SignalType_FixedArray16_uint8_t* out, - SignalBorrowedBuffer credential_bytes -); -SignalFfiError* signal_backup_auth_credential_get_backup_level( - uint8_t* out, - SignalBorrowedBuffer credential_bytes -); -SignalFfiError* signal_backup_auth_credential_get_type( - uint8_t* out, - SignalBorrowedBuffer credential_bytes -); -SignalFfiError* signal_backup_auth_credential_present_deterministic( - SignalOwnedBuffer* out, - SignalBorrowedBuffer credential_bytes, - SignalBorrowedBuffer server_params_bytes, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_backup_auth_credential_presentation_check_valid_contents( - SignalBorrowedBuffer presentation_bytes -); -SignalFfiError* signal_backup_auth_credential_presentation_verify( - SignalBorrowedBuffer presentation_bytes, - uint64_t now, - SignalBorrowedBuffer server_params_bytes -); -SignalFfiError* signal_backup_auth_credential_request_check_valid_contents( - SignalBorrowedBuffer request_bytes -); -SignalFfiError* signal_backup_auth_credential_request_context_check_valid_contents( - SignalBorrowedBuffer context_bytes -); -SignalFfiError* signal_backup_auth_credential_request_context_get_request( - SignalOwnedBuffer* out, - SignalBorrowedBuffer context_bytes -); -SignalFfiError* signal_backup_auth_credential_request_context_new( - SignalOwnedBuffer* out, - const SignalType_FixedArray32_uint8_t* backup_key, - SignalUuid uuid -); -SignalFfiError* signal_backup_auth_credential_request_context_receive_response( - SignalOwnedBuffer* out, - SignalBorrowedBuffer context_bytes, - SignalBorrowedBuffer response_bytes, - uint64_t expected_redemption_time, - SignalBorrowedBuffer params_bytes -); -SignalFfiError* signal_backup_auth_credential_request_issue_deterministic( - SignalOwnedBuffer* out, - SignalBorrowedBuffer request_bytes, - uint64_t redemption_time, - uint8_t backup_level, - uint8_t credential_type, - SignalBorrowedBuffer params_bytes, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_backup_auth_credential_response_check_valid_contents( - SignalBorrowedBuffer response_bytes -); -SignalFfiError* signal_backup_key_derive_backup_id( - SignalType_FixedArray16_uint8_t* out, - const SignalType_FixedArray32_uint8_t* backup_key, - const SignalType_FixedArray17_uint8_t* aci -); -SignalFfiError* signal_backup_key_derive_ec_key( - SignalMutPointerPrivateKey* out, - const SignalType_FixedArray32_uint8_t* backup_key, - const SignalType_FixedArray17_uint8_t* aci -); -SignalFfiError* signal_backup_key_derive_local_backup_metadata_key( - SignalType_FixedArray32_uint8_t* out, - const SignalType_FixedArray32_uint8_t* backup_key -); -SignalFfiError* signal_backup_key_derive_media_encryption_key( - SignalType_FixedArray64_uint8_t* out, - const SignalType_FixedArray32_uint8_t* backup_key, - const SignalType_FixedArray15_uint8_t* media_id -); -SignalFfiError* signal_backup_key_derive_media_id( - SignalType_FixedArray15_uint8_t* out, - const SignalType_FixedArray32_uint8_t* backup_key, - const int8_t* media_name -); -SignalFfiError* signal_backup_key_derive_thumbnail_transit_encryption_key( - SignalType_FixedArray64_uint8_t* out, - const SignalType_FixedArray32_uint8_t* backup_key, - const SignalType_FixedArray15_uint8_t* media_id -); -SignalFfiError* signal_backup_restore_response_destroy( - SignalMutPointerBackupRestoreResponse p -); -SignalFfiError* signal_backup_restore_response_get_forward_secrecy_token( - SignalType_FixedArray32_uint8_t* out, - SignalConstPointerBackupRestoreResponse response -); -SignalFfiError* signal_backup_restore_response_get_next_backup_secret_data( - SignalOwnedBuffer* out, - SignalConstPointerBackupRestoreResponse response -); -SignalFfiError* signal_backup_store_response_destroy( - SignalMutPointerBackupStoreResponse p -); -SignalFfiError* signal_backup_store_response_get_forward_secrecy_token( - SignalType_FixedArray32_uint8_t* out, - SignalConstPointerBackupStoreResponse response -); -SignalFfiError* signal_backup_store_response_get_next_backup_secret_data( - SignalOwnedBuffer* out, - SignalConstPointerBackupStoreResponse response -); -SignalFfiError* signal_backup_store_response_get_opaque_metadata( - SignalOwnedBuffer* out, - SignalConstPointerBackupStoreResponse response -); -SignalFfiError* signal_bridged_string_map_clone( - SignalMutPointerBridgedStringMap* new_obj, - SignalConstPointerBridgedStringMap obj -); -SignalFfiError* signal_bridged_string_map_destroy( - SignalMutPointerBridgedStringMap p -); -SignalFfiError* signal_bridged_string_map_insert( - SignalMutPointerBridgedStringMap map, - const int8_t* key, - const int8_t* value -); -SignalFfiError* signal_bridged_string_map_new( - SignalMutPointerBridgedStringMap* out, - uint32_t initial_capacity -); -SignalFfiError* signal_call_link_auth_credential_check_valid_contents( - SignalBorrowedBuffer credential_bytes -); -SignalFfiError* signal_call_link_auth_credential_present_deterministic( - SignalOwnedBuffer* out, - SignalBorrowedBuffer credential_bytes, - const SignalType_FixedArray17_uint8_t* user_id, - uint64_t redemption_time, - SignalBorrowedBuffer server_params_bytes, - SignalBorrowedBuffer call_link_params_bytes, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_call_link_auth_credential_presentation_check_valid_contents( - SignalBorrowedBuffer presentation_bytes -); -SignalFfiError* signal_call_link_auth_credential_presentation_get_user_id( - SignalType_FixedArray65_uint8_t* out, - SignalBorrowedBuffer presentation_bytes -); -SignalFfiError* signal_call_link_auth_credential_presentation_verify( - SignalBorrowedBuffer presentation_bytes, - uint64_t now, - SignalBorrowedBuffer server_params_bytes, - SignalBorrowedBuffer call_link_params_bytes -); -SignalFfiError* signal_call_link_auth_credential_response_check_valid_contents( - SignalBorrowedBuffer response_bytes -); -SignalFfiError* signal_call_link_auth_credential_response_issue_deterministic( - SignalOwnedBuffer* out, - const SignalType_FixedArray17_uint8_t* user_id, - uint64_t redemption_time, - SignalBorrowedBuffer params_bytes, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_call_link_auth_credential_response_receive( - SignalOwnedBuffer* out, - SignalBorrowedBuffer response_bytes, - const SignalType_FixedArray17_uint8_t* user_id, - uint64_t redemption_time, - SignalBorrowedBuffer params_bytes -); -SignalFfiError* signal_call_link_public_params_check_valid_contents( - SignalBorrowedBuffer params_bytes -); -SignalFfiError* signal_call_link_secret_params_check_valid_contents( - SignalBorrowedBuffer params_bytes -); -SignalFfiError* signal_call_link_secret_params_decrypt_user_id( - SignalType_FixedArray17_uint8_t* out, - SignalBorrowedBuffer params_bytes, - const SignalType_FixedArray65_uint8_t* user_id -); -SignalFfiError* signal_call_link_secret_params_derive_from_root_key( - SignalOwnedBuffer* out, - SignalBorrowedBuffer root_key -); -SignalFfiError* signal_call_link_secret_params_encrypt_user_id( - SignalType_FixedArray65_uint8_t* out, - SignalBorrowedBuffer params_bytes, - const SignalType_FixedArray17_uint8_t* user_id -); -SignalFfiError* signal_call_link_secret_params_get_public_params( - SignalOwnedBuffer* out, - SignalBorrowedBuffer params_bytes -); -SignalFfiError* signal_cds2_client_state_new( - SignalMutPointerSgxClientState* out, - SignalBorrowedBuffer mrenclave, - SignalBorrowedBuffer attestation_msg, - uint64_t current_timestamp -); -SignalFfiError* signal_cdsi_lookup_complete( - SignalCPromiseFfiCdsiLookupResponse* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerCdsiLookup lookup -); -SignalFfiError* signal_cdsi_lookup_destroy( - SignalMutPointerCdsiLookup p -); -SignalFfiError* signal_cdsi_lookup_new( - SignalCPromiseMutPointerCdsiLookup* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerConnectionManager connection_manager, - const int8_t* username, - const int8_t* password, - SignalConstPointerLookupRequest request -); -SignalFfiError* signal_cdsi_lookup_token( - SignalOwnedBuffer* out, - SignalConstPointerCdsiLookup lookup -); -SignalFfiError* signal_chat_connection_info_description( - SignalCStringPtr* out, - SignalConstPointerChatConnectionInfo connection_info -); -SignalFfiError* signal_chat_connection_info_destroy( - SignalMutPointerChatConnectionInfo p -); -SignalFfiError* signal_chat_connection_info_ip_version( - uint8_t* out, - SignalConstPointerChatConnectionInfo connection_info -); -SignalFfiError* signal_chat_connection_info_local_port( - uint16_t* out, - SignalConstPointerChatConnectionInfo connection_info -); -SignalFfiError* signal_ciphertext_message_destroy( - SignalMutPointerCiphertextMessage p -); -SignalFfiError* signal_ciphertext_message_from_plaintext_content( - SignalMutPointerCiphertextMessage* out, - SignalConstPointerPlaintextContent m -); -SignalFfiError* signal_ciphertext_message_serialize( - SignalOwnedBuffer* out, - SignalConstPointerCiphertextMessage obj -); -SignalFfiError* signal_ciphertext_message_type( - uint8_t* out, - SignalConstPointerCiphertextMessage msg -); -SignalFfiError* signal_connection_manager_clear_proxy( - SignalConstPointerConnectionManager connection_manager -); -SignalFfiError* signal_connection_manager_destroy( - SignalMutPointerConnectionManager p -); -SignalFfiError* signal_connection_manager_new( - SignalMutPointerConnectionManager* out, - uint8_t environment, - const int8_t* user_agent, - SignalMutPointerBridgedStringMap remote_config, - uint8_t build_variant -); -SignalFfiError* signal_connection_manager_on_network_change( - SignalConstPointerConnectionManager connection_manager -); -SignalFfiError* signal_connection_manager_set_censorship_circumvention_enabled( - SignalConstPointerConnectionManager connection_manager, - bool enabled -); -SignalFfiError* signal_connection_manager_set_invalid_proxy( - SignalConstPointerConnectionManager connection_manager -); -SignalFfiError* signal_connection_manager_set_proxy( - SignalConstPointerConnectionManager connection_manager, - SignalConstPointerConnectionProxyConfig proxy -); -SignalFfiError* signal_connection_manager_set_remote_config( - SignalConstPointerConnectionManager connection_manager, - SignalMutPointerBridgedStringMap remote_config, - uint8_t build_variant -); -SignalFfiError* signal_connection_proxy_config_clone( - SignalMutPointerConnectionProxyConfig* new_obj, - SignalConstPointerConnectionProxyConfig obj -); -SignalFfiError* signal_connection_proxy_config_destroy( - SignalMutPointerConnectionProxyConfig p -); -SignalFfiError* signal_connection_proxy_config_new( - SignalMutPointerConnectionProxyConfig* out, - const int8_t* scheme, - const int8_t* host, - int32_t port, - const int8_t* username, - const int8_t* password -); -SignalFfiError* signal_copy_backup_media_stream_cancel( - SignalConstPointerCopyBackupMediaStream stream -); -SignalFfiError* signal_copy_backup_media_stream_destroy( - SignalMutPointerCopyBackupMediaStream p -); -SignalFfiError* signal_copy_backup_media_stream_next( - SignalCPromiseCopyBackupMediaNextChunkFfiResult* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerCopyBackupMediaStream stream -); -SignalFfiError* signal_create_call_link_credential_check_valid_contents( - SignalBorrowedBuffer params_bytes -); -SignalFfiError* signal_create_call_link_credential_present_deterministic( - SignalOwnedBuffer* out, - SignalBorrowedBuffer credential_bytes, - SignalBorrowedBuffer room_id, - const SignalType_FixedArray17_uint8_t* user_id, - SignalBorrowedBuffer server_params_bytes, - SignalBorrowedBuffer call_link_params_bytes, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_create_call_link_credential_presentation_check_valid_contents( - SignalBorrowedBuffer presentation_bytes -); -SignalFfiError* signal_create_call_link_credential_presentation_verify( - SignalBorrowedBuffer presentation_bytes, - SignalBorrowedBuffer room_id, - uint64_t now, - SignalBorrowedBuffer server_params_bytes, - SignalBorrowedBuffer call_link_params_bytes -); -SignalFfiError* signal_create_call_link_credential_request_check_valid_contents( - SignalBorrowedBuffer request_bytes -); -SignalFfiError* signal_create_call_link_credential_request_context_check_valid_contents( - SignalBorrowedBuffer context_bytes -); -SignalFfiError* signal_create_call_link_credential_request_context_get_request( - SignalOwnedBuffer* out, - SignalBorrowedBuffer context_bytes -); -SignalFfiError* signal_create_call_link_credential_request_context_new_deterministic( - SignalOwnedBuffer* out, - SignalBorrowedBuffer room_id, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_create_call_link_credential_request_context_receive_response( - SignalOwnedBuffer* out, - SignalBorrowedBuffer context_bytes, - SignalBorrowedBuffer response_bytes, - const SignalType_FixedArray17_uint8_t* user_id, - SignalBorrowedBuffer params_bytes -); -SignalFfiError* signal_create_call_link_credential_request_issue_deterministic( - SignalOwnedBuffer* out, - SignalBorrowedBuffer request_bytes, - const SignalType_FixedArray17_uint8_t* user_id, - uint64_t timestamp, - SignalBorrowedBuffer params_bytes, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_create_call_link_credential_response_check_valid_contents( - SignalBorrowedBuffer response_bytes -); -SignalFfiError* signal_decrypt_message( - SignalOwnedBuffer* out, - SignalConstPointerSignalMessage message, - SignalConstPointerProtocolAddress protocol_address, - SignalConstPointerProtocolAddress local_address, - SignalConstPointerFfiSessionStoreStruct session_store, - SignalConstPointerFfiIdentityKeyStoreStruct identity_key_store -); -SignalFfiError* signal_decrypt_pre_key_message( - SignalOwnedBuffer* out, - SignalConstPointerPreKeySignalMessage message, - SignalConstPointerProtocolAddress protocol_address, - SignalConstPointerProtocolAddress local_address, - SignalConstPointerFfiSessionStoreStruct session_store, - SignalConstPointerFfiIdentityKeyStoreStruct identity_key_store, - SignalConstPointerFfiPreKeyStoreStruct prekey_store, - SignalConstPointerFfiSignedPreKeyStoreStruct signed_prekey_store, - SignalConstPointerFfiKyberPreKeyStoreStruct kyber_prekey_store -); -SignalFfiError* signal_decryption_error_message_clone( - SignalMutPointerDecryptionErrorMessage* new_obj, - SignalConstPointerDecryptionErrorMessage obj -); -SignalFfiError* signal_decryption_error_message_deserialize( - SignalMutPointerDecryptionErrorMessage* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_decryption_error_message_destroy( - SignalMutPointerDecryptionErrorMessage p -); -SignalFfiError* signal_decryption_error_message_extract_from_serialized_content( - SignalMutPointerDecryptionErrorMessage* out, - SignalBorrowedBuffer bytes -); -SignalFfiError* signal_decryption_error_message_for_original_message( - SignalMutPointerDecryptionErrorMessage* out, - SignalBorrowedBuffer original_bytes, - uint8_t original_type, - uint64_t original_timestamp, - uint32_t original_sender_device_id -); -SignalFfiError* signal_decryption_error_message_get_device_id( - uint32_t* out, - SignalConstPointerDecryptionErrorMessage obj -); -SignalFfiError* signal_decryption_error_message_get_ratchet_key( - SignalMutPointerPublicKey* out, - SignalConstPointerDecryptionErrorMessage m -); -SignalFfiError* signal_decryption_error_message_get_timestamp( - uint64_t* out, - SignalConstPointerDecryptionErrorMessage obj -); -SignalFfiError* signal_decryption_error_message_serialize( - SignalOwnedBuffer* out, - SignalConstPointerDecryptionErrorMessage obj -); -SignalFfiError* signal_delete_backup_media_stream_cancel( - SignalConstPointerDeleteBackupMediaStream stream -); -SignalFfiError* signal_delete_backup_media_stream_destroy( - SignalMutPointerDeleteBackupMediaStream p -); -SignalFfiError* signal_delete_backup_media_stream_next( - SignalCPromiseDeleteBackupMediaNextChunkFfiResult* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerDeleteBackupMediaStream stream -); -SignalFfiError* signal_device_transfer_generate_certificate( - SignalOwnedBuffer* out, - SignalBorrowedBuffer private_key, - const int8_t* name, - uint32_t days_to_expire -); -SignalFfiError* signal_device_transfer_generate_private_key( - SignalOwnedBuffer* out -); -SignalFfiError* signal_device_transfer_generate_private_key_with_format( - SignalOwnedBuffer* out, - uint8_t key_format -); -SignalFfiError* signal_donation_permit_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_donation_permit_derived_key_pair_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_donation_permit_derived_key_pair_for_expiration( - SignalOwnedBuffer* out, - uint64_t timestamp, - SignalConstPointerServerSecretParams root -); -SignalFfiError* signal_donation_permit_expiration( - uint64_t* out, - SignalBorrowedBuffer donation_permit -); -SignalFfiError* signal_donation_permit_request_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_donation_permit_request_context_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_donation_permit_request_context_new_deterministic( - SignalOwnedBuffer* out, - int32_t count, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_donation_permit_request_context_receive( - SignalBytestringArray* out, - SignalBorrowedBuffer context, - SignalBorrowedBuffer response, - SignalConstPointerServerPublicParams public_params, - uint64_t now -); -SignalFfiError* signal_donation_permit_request_context_request( - SignalOwnedBuffer* out, - SignalBorrowedBuffer ctx -); -SignalFfiError* signal_donation_permit_request_len( - int32_t* out, - SignalBorrowedBuffer donation_permit_request -); -SignalFfiError* signal_donation_permit_response_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_donation_permit_response_default_expiration( - uint64_t* out, - uint64_t current_time -); -SignalFfiError* signal_donation_permit_response_get_expiration( - uint64_t* out, - SignalBorrowedBuffer response -); -SignalFfiError* signal_donation_permit_response_issue_deterministic( - SignalOwnedBuffer* out, - SignalBorrowedBuffer request, - SignalBorrowedBuffer key_pair, - const SignalType_FixedArray32_uint8_t* seed -); -SignalFfiError* signal_donation_permit_spend_id( - SignalOwnedBuffer* out, - SignalBorrowedBuffer donation_permit -); -SignalFfiError* signal_donation_permit_verify( - SignalBorrowedBuffer permit, - uint64_t now, - SignalBorrowedBuffer key_pair -); -SignalFfiError* signal_encrypt_message( - SignalMutPointerCiphertextMessage* out, - SignalBorrowedBuffer ptext, - SignalConstPointerProtocolAddress protocol_address, - SignalConstPointerProtocolAddress local_address, - SignalConstPointerFfiSessionStoreStruct session_store, - SignalConstPointerFfiIdentityKeyStoreStruct identity_key_store, - uint64_t now -); -void signal_error_free( - SignalFfiError* err -); -SignalFfiError* signal_error_get_address( - SignalMutPointerProtocolAddress* out, - const SignalFfiError* err -); -SignalFfiError* signal_error_get_charge_failure( - SignalOptionalOfChargeFailureFfiResult* out, - const SignalFfiError* err -); -SignalFfiError* signal_error_get_invalid_protocol_address( - SignalPairOfCStringPtru32* out, - const SignalFfiError* err -); -SignalFfiError* signal_error_get_message( - SignalCStringPtr* out, - const SignalFfiError* err -); -SignalFfiError* signal_error_get_mismatched_device_errors( - SignalOwnedBufferOfFfiMismatchedDevicesError* out, - const SignalFfiError* err -); -SignalFfiError* signal_error_get_our_fingerprint_version( - uint32_t* out, - const SignalFfiError* err -); -SignalFfiError* signal_error_get_rate_limit_challenge( - SignalPairOfPairOfCStringPtrOwnedBufferi64* out, - const SignalFfiError* err -); -SignalFfiError* signal_error_get_registration_error_not_deliverable( - SignalPairOfCStringPtrbool* out, - const SignalFfiError* err -); -SignalFfiError* signal_error_get_registration_lock( - uint64_t* out_time_remaining_seconds, - SignalPairOfCStringPtrCStringPtr* out_svr2_credentials, - const SignalFfiError* err -); -SignalFfiError* signal_error_get_retry_after_seconds( - uint32_t* out, - const SignalFfiError* err -); -SignalFfiError* signal_error_get_their_fingerprint_version( - uint32_t* out, - const SignalFfiError* err -); -SignalFfiError* signal_error_get_tries_remaining( - uint32_t* out, - const SignalFfiError* err -); -uint32_t signal_error_get_type( - const SignalFfiError* err -); -SignalFfiError* signal_error_get_unknown_fields( - SignalBytestringArray* out, - const SignalFfiError* err -); -SignalFfiError* signal_error_get_uuid( - SignalUuid* out, - const SignalFfiError* err -); -SignalFfiError* signal_expiring_profile_key_credential_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_expiring_profile_key_credential_get_expiration_time( - uint64_t* out, - const SignalType_FixedArray153_uint8_t* credential -); -SignalFfiError* signal_expiring_profile_key_credential_response_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_fingerprint_clone( - SignalMutPointerFingerprint* new_obj, - SignalConstPointerFingerprint obj -); -SignalFfiError* signal_fingerprint_compare( - bool* out, - SignalBorrowedBuffer fprint1, - SignalBorrowedBuffer fprint2 -); -SignalFfiError* signal_fingerprint_destroy( - SignalMutPointerFingerprint p -); -SignalFfiError* signal_fingerprint_display_string( - SignalCStringPtr* out, - SignalConstPointerFingerprint obj -); -SignalFfiError* signal_fingerprint_new( - SignalMutPointerFingerprint* out, - uint32_t iterations, - uint32_t version, - SignalBorrowedBuffer local_identifier, - SignalConstPointerPublicKey local_key, - SignalBorrowedBuffer remote_identifier, - SignalConstPointerPublicKey remote_key -); -SignalFfiError* signal_fingerprint_scannable_encoding( - SignalOwnedBuffer* out, - SignalConstPointerFingerprint obj -); -void signal_free_buffer( - const uint8_t* buf, - size_t buf_len -); -void signal_free_bytestring_array( - SignalBytestringArray array -); -void signal_free_list_of_mismatched_device_errors( - SignalOwnedBufferOfFfiMismatchedDevicesError buffer -); -void signal_free_list_of_register_response_badges( - SignalOwnedBufferOfFfiRegisterResponseBadge buffer -); -void signal_free_list_of_service_ids( - SignalOwnedBufferOfc_uchar17 buffer -); -void signal_free_list_of_strings( - SignalOwnedBufferOfCStringPtr buffer -); -void signal_free_lookup_response_entry_list( - SignalOwnedLookupResponseEntryList buffer -); -void signal_free_outer_buffer_list_of_prekey_bundles( - SignalOwnedBufferOfMutPointerPreKeyBundle buffer -); -void signal_free_owned_buffer_of_max_aligned( - SignalOwnedBufferOfMaxAlignedErased buffer -); -void signal_free_string( - const int8_t* buf -); -SignalFfiError* signal_generic_server_public_params_check_valid_contents( - SignalBorrowedBuffer params_bytes -); -SignalFfiError* signal_generic_server_secret_params_check_valid_contents( - SignalBorrowedBuffer params_bytes -); -SignalFfiError* signal_generic_server_secret_params_generate_deterministic( - SignalOwnedBuffer* out, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_generic_server_secret_params_get_public_params( - SignalOwnedBuffer* out, - SignalBorrowedBuffer params_bytes -); -SignalFfiError* signal_group_decrypt_message( - SignalOwnedBuffer* out, - SignalConstPointerProtocolAddress sender, - SignalBorrowedBuffer message, - SignalConstPointerFfiSenderKeyStoreStruct store -); -SignalFfiError* signal_group_encrypt_message( - SignalMutPointerCiphertextMessage* out, - SignalConstPointerProtocolAddress sender, - SignalUuid distribution_id, - SignalBorrowedBuffer message, - SignalConstPointerFfiSenderKeyStoreStruct store -); -SignalFfiError* signal_group_master_key_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_group_public_params_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_group_public_params_get_group_identifier( - SignalType_FixedArray32_uint8_t* out, - const SignalType_FixedArray97_uint8_t* group_public_params -); -SignalFfiError* signal_group_secret_params_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_group_secret_params_decrypt_blob_with_padding( - SignalOwnedBuffer* out, - const SignalType_FixedArray289_uint8_t* params, - SignalBorrowedBuffer ciphertext -); -SignalFfiError* signal_group_secret_params_decrypt_profile_key( - SignalType_FixedArray32_uint8_t* out, - const SignalType_FixedArray289_uint8_t* params, - const SignalType_FixedArray65_uint8_t* profile_key, - const SignalType_FixedArray17_uint8_t* user_id -); -SignalFfiError* signal_group_secret_params_decrypt_service_id( - SignalType_FixedArray17_uint8_t* out, - const SignalType_FixedArray289_uint8_t* params, - const SignalType_FixedArray65_uint8_t* ciphertext -); -SignalFfiError* signal_group_secret_params_derive_from_master_key( - SignalType_FixedArray289_uint8_t* out, - const SignalType_FixedArray32_uint8_t* master_key -); -SignalFfiError* signal_group_secret_params_encrypt_blob_with_padding_deterministic( - SignalOwnedBuffer* out, - const SignalType_FixedArray289_uint8_t* params, - const SignalType_FixedArray32_uint8_t* randomness, - SignalBorrowedBuffer plaintext, - uint32_t padding_len -); -SignalFfiError* signal_group_secret_params_encrypt_profile_key( - SignalType_FixedArray65_uint8_t* out, - const SignalType_FixedArray289_uint8_t* params, - const SignalType_FixedArray32_uint8_t* profile_key, - const SignalType_FixedArray17_uint8_t* user_id -); -SignalFfiError* signal_group_secret_params_encrypt_service_id( - SignalType_FixedArray65_uint8_t* out, - const SignalType_FixedArray289_uint8_t* params, - const SignalType_FixedArray17_uint8_t* service_id -); -SignalFfiError* signal_group_secret_params_generate_deterministic( - SignalType_FixedArray289_uint8_t* out, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_group_secret_params_get_master_key( - SignalType_FixedArray32_uint8_t* out, - const SignalType_FixedArray289_uint8_t* params -); -SignalFfiError* signal_group_secret_params_get_public_params( - SignalType_FixedArray97_uint8_t* out, - const SignalType_FixedArray289_uint8_t* params -); -SignalFfiError* signal_group_send_derived_key_pair_check_valid_contents( - SignalBorrowedBuffer bytes -); -SignalFfiError* signal_group_send_derived_key_pair_for_expiration( - SignalOwnedBuffer* out, - uint64_t expiration, - SignalConstPointerServerSecretParams server_params -); -SignalFfiError* signal_group_send_endorsement_call_link_params_to_token( - SignalOwnedBuffer* out, - SignalBorrowedBuffer endorsement, - SignalBorrowedBuffer call_link_secret_params_serialized -); -SignalFfiError* signal_group_send_endorsement_check_valid_contents( - SignalBorrowedBuffer bytes -); -SignalFfiError* signal_group_send_endorsement_combine( - SignalOwnedBuffer* out, - SignalBorrowedSliceOfBuffers endorsements -); -SignalFfiError* signal_group_send_endorsement_remove( - SignalOwnedBuffer* out, - SignalBorrowedBuffer endorsement, - SignalBorrowedBuffer to_remove -); -SignalFfiError* signal_group_send_endorsement_to_token( - SignalOwnedBuffer* out, - SignalBorrowedBuffer endorsement, - const SignalType_FixedArray289_uint8_t* group_params -); -SignalFfiError* signal_group_send_endorsements_response_check_valid_contents( - SignalBorrowedBuffer bytes -); -SignalFfiError* signal_group_send_endorsements_response_get_expiration( - uint64_t* out, - SignalBorrowedBuffer response_bytes -); -SignalFfiError* signal_group_send_endorsements_response_issue_deterministic( - SignalOwnedBuffer* out, - SignalBorrowedBuffer concatenated_group_member_ciphertexts, - SignalBorrowedBuffer key_pair, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_group_send_endorsements_response_receive_and_combine_with_ciphertexts( - SignalBytestringArray* out, - SignalBorrowedBuffer response_bytes, - SignalBorrowedBuffer concatenated_group_member_ciphertexts, - SignalBorrowedBuffer local_user_ciphertext, - uint64_t now, - SignalConstPointerServerPublicParams server_params -); -SignalFfiError* signal_group_send_endorsements_response_receive_and_combine_with_service_ids( - SignalBytestringArray* out, - SignalBorrowedBuffer response_bytes, - SignalBorrowedBuffer group_members, - const SignalType_FixedArray17_uint8_t* local_user, - uint64_t now, - const SignalType_FixedArray289_uint8_t* group_params, - SignalConstPointerServerPublicParams server_params -); -SignalFfiError* signal_group_send_full_token_check_valid_contents( - SignalBorrowedBuffer bytes -); -SignalFfiError* signal_group_send_full_token_get_expiration( - uint64_t* out, - SignalBorrowedBuffer token -); -SignalFfiError* signal_group_send_full_token_verify( - SignalBorrowedBuffer token, - SignalBorrowedBuffer user_ids, - uint64_t now, - SignalBorrowedBuffer key_pair -); -SignalFfiError* signal_group_send_token_check_valid_contents( - SignalBorrowedBuffer bytes -); -SignalFfiError* signal_group_send_token_to_full_token( - SignalOwnedBuffer* out, - SignalBorrowedBuffer token, - uint64_t expiration -); -SignalFfiError* signal_hex_encode( - SignalBorrowedMutableBuffer output, - SignalBorrowedBuffer input -); -SignalFfiError* signal_hkdf_derive( - SignalBorrowedMutableBuffer output, - SignalBorrowedBuffer ikm, - SignalBorrowedBuffer label, - SignalBorrowedBuffer salt -); -SignalFfiError* signal_hsm_enclave_client_complete_handshake( - SignalMutPointerHsmEnclaveClient cli, - SignalBorrowedBuffer handshake_received -); -SignalFfiError* signal_hsm_enclave_client_destroy( - SignalMutPointerHsmEnclaveClient p -); -SignalFfiError* signal_hsm_enclave_client_established_recv( - SignalOwnedBuffer* out, - SignalMutPointerHsmEnclaveClient cli, - SignalBorrowedBuffer received_ciphertext -); -SignalFfiError* signal_hsm_enclave_client_established_send( - SignalOwnedBuffer* out, - SignalMutPointerHsmEnclaveClient cli, - SignalBorrowedBuffer plaintext_to_send -); -SignalFfiError* signal_hsm_enclave_client_initial_request( - SignalOwnedBuffer* out, - SignalConstPointerHsmEnclaveClient obj -); -SignalFfiError* signal_hsm_enclave_client_new( - SignalMutPointerHsmEnclaveClient* out, - SignalBorrowedBuffer trusted_public_key, - SignalBorrowedBuffer trusted_code_hashes -); -SignalFfiError* signal_http_request_add_header( - SignalConstPointerHttpRequest request, - const int8_t* name, - const int8_t* value -); -SignalFfiError* signal_http_request_destroy( - SignalMutPointerHttpRequest p -); -SignalFfiError* signal_http_request_new_with_body( - SignalMutPointerHttpRequest* out, - const int8_t* method, - const int8_t* path, - SignalBorrowedBuffer body_as_slice -); -SignalFfiError* signal_http_request_new_without_body( - SignalMutPointerHttpRequest* out, - const int8_t* method, - const int8_t* path -); -SignalFfiError* signal_identitykey_verify_alternate_identity( - bool* out, - SignalConstPointerPublicKey public_key, - SignalConstPointerPublicKey other_identity, - SignalBorrowedBuffer signature -); -SignalFfiError* signal_identitykeypair_deserialize( - SignalPairOfMutPointerPublicKeyMutPointerPrivateKey* out, - SignalBorrowedBuffer input -); -SignalFfiError* signal_identitykeypair_serialize( - SignalOwnedBuffer* out, - SignalConstPointerPublicKey public_key, - SignalConstPointerPrivateKey private_key -); -SignalFfiError* signal_identitykeypair_sign_alternate_identity( - SignalOwnedBuffer* out, - SignalConstPointerPublicKey public_key, - SignalConstPointerPrivateKey private_key, - SignalConstPointerPublicKey other_identity -); -SignalFfiError* signal_incremental_mac_calculate_chunk_size( - uint32_t* out, - uint32_t data_size -); -SignalFfiError* signal_incremental_mac_destroy( - SignalMutPointerIncrementalMac p -); -SignalFfiError* signal_incremental_mac_finalize( - SignalOwnedBuffer* out, - SignalMutPointerIncrementalMac mac -); -SignalFfiError* signal_incremental_mac_initialize( - SignalMutPointerIncrementalMac* out, - SignalBorrowedBuffer key, - uint32_t chunk_size -); -SignalFfiError* signal_incremental_mac_update( - SignalOwnedBuffer* out, - SignalMutPointerIncrementalMac mac, - SignalBorrowedBuffer bytes, - uint32_t offset, - uint32_t length -); -bool signal_init_logger( - SignalLogLevel max_level, - SignalFfiLoggerStruct logger -); -SignalFfiError* signal_key_transparency_aci_search_key( - SignalOwnedBuffer* out, - const SignalType_FixedArray17_uint8_t* aci -); -SignalFfiError* signal_key_transparency_check( - SignalCPromisePairOfOwnedBufferOwnedBuffer* promise, - SignalConstPointerTokioAsyncContext async_runtime, - uint8_t environment, - SignalConstPointerUnauthenticatedChatConnection chat_connection, - const SignalType_FixedArray17_uint8_t* aci, - SignalConstPointerPublicKey aci_identity_key, - const int8_t* e164, - SignalOptionalBorrowedSliceOfc_uchar unidentified_access_key, - SignalOptionalBorrowedSliceOfc_uchar username_hash, - SignalOptionalBorrowedSliceOfc_uchar account_data, - SignalOptionalBorrowedSliceOfc_uchar last_distinguished_tree_head, - bool is_self_check, - bool is_e164_discoverable -); -SignalFfiError* signal_key_transparency_e164_search_key( - SignalOwnedBuffer* out, - const int8_t* e164 -); -SignalFfiError* signal_key_transparency_reset_data_field( - SignalOwnedBuffer* out, - SignalBorrowedBuffer account_data, - uint8_t field -); -SignalFfiError* signal_key_transparency_username_hash_search_key( - SignalOwnedBuffer* out, - SignalBorrowedBuffer hash -); -SignalFfiError* signal_kyber_key_pair_clone( - SignalMutPointerKyberKeyPair* new_obj, - SignalConstPointerKyberKeyPair obj -); -SignalFfiError* signal_kyber_key_pair_destroy( - SignalMutPointerKyberKeyPair p -); -SignalFfiError* signal_kyber_key_pair_generate( - SignalMutPointerKyberKeyPair* out -); -SignalFfiError* signal_kyber_key_pair_get_public_key( - SignalMutPointerKyberPublicKey* out, - SignalConstPointerKyberKeyPair key_pair -); -SignalFfiError* signal_kyber_key_pair_get_secret_key( - SignalMutPointerKyberSecretKey* out, - SignalConstPointerKyberKeyPair key_pair -); -SignalFfiError* signal_kyber_pre_key_record_clone( - SignalMutPointerKyberPreKeyRecord* new_obj, - SignalConstPointerKyberPreKeyRecord obj -); -SignalFfiError* signal_kyber_pre_key_record_deserialize( - SignalMutPointerKyberPreKeyRecord* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_kyber_pre_key_record_destroy( - SignalMutPointerKyberPreKeyRecord p -); -SignalFfiError* signal_kyber_pre_key_record_get_id( - uint32_t* out, - SignalConstPointerKyberPreKeyRecord obj -); -SignalFfiError* signal_kyber_pre_key_record_get_key_pair( - SignalMutPointerKyberKeyPair* out, - SignalConstPointerKyberPreKeyRecord obj -); -SignalFfiError* signal_kyber_pre_key_record_get_public_key( - SignalMutPointerKyberPublicKey* out, - SignalConstPointerKyberPreKeyRecord obj -); -SignalFfiError* signal_kyber_pre_key_record_get_secret_key( - SignalMutPointerKyberSecretKey* out, - SignalConstPointerKyberPreKeyRecord obj -); -SignalFfiError* signal_kyber_pre_key_record_get_signature( - SignalOwnedBuffer* out, - SignalConstPointerKyberPreKeyRecord obj -); -SignalFfiError* signal_kyber_pre_key_record_get_timestamp( - uint64_t* out, - SignalConstPointerKyberPreKeyRecord obj -); -SignalFfiError* signal_kyber_pre_key_record_new( - SignalMutPointerKyberPreKeyRecord* out, - uint32_t id, - uint64_t timestamp, - SignalConstPointerKyberKeyPair key_pair, - SignalBorrowedBuffer signature -); -SignalFfiError* signal_kyber_pre_key_record_serialize( - SignalOwnedBuffer* out, - SignalConstPointerKyberPreKeyRecord obj -); -SignalFfiError* signal_kyber_public_key_clone( - SignalMutPointerKyberPublicKey* new_obj, - SignalConstPointerKyberPublicKey obj -); -SignalFfiError* signal_kyber_public_key_deserialize( - SignalMutPointerKyberPublicKey* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_kyber_public_key_destroy( - SignalMutPointerKyberPublicKey p -); -SignalFfiError* signal_kyber_public_key_equals( - bool* out, - SignalConstPointerKyberPublicKey lhs, - SignalConstPointerKyberPublicKey rhs -); -SignalFfiError* signal_kyber_public_key_serialize( - SignalOwnedBuffer* out, - SignalConstPointerKyberPublicKey obj -); -SignalFfiError* signal_kyber_secret_key_clone( - SignalMutPointerKyberSecretKey* new_obj, - SignalConstPointerKyberSecretKey obj -); -SignalFfiError* signal_kyber_secret_key_deserialize( - SignalMutPointerKyberSecretKey* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_kyber_secret_key_destroy( - SignalMutPointerKyberSecretKey p -); -SignalFfiError* signal_kyber_secret_key_serialize( - SignalOwnedBuffer* out, - SignalConstPointerKyberSecretKey obj -); -SignalFfiError* signal_lookup_request_add_aci_and_access_key( - SignalConstPointerLookupRequest request, - const SignalType_FixedArray17_uint8_t* aci, - SignalBorrowedBuffer access_key -); -SignalFfiError* signal_lookup_request_add_e164( - SignalConstPointerLookupRequest request, - const int8_t* e164 -); -SignalFfiError* signal_lookup_request_add_previous_e164( - SignalConstPointerLookupRequest request, - const int8_t* e164 -); -SignalFfiError* signal_lookup_request_destroy( - SignalMutPointerLookupRequest p -); -SignalFfiError* signal_lookup_request_new( - SignalMutPointerLookupRequest* out -); -SignalFfiError* signal_lookup_request_set_token( - SignalConstPointerLookupRequest request, - SignalBorrowedBuffer token -); -SignalFfiError* signal_message_backup_key_destroy( - SignalMutPointerMessageBackupKey p -); -SignalFfiError* signal_message_backup_key_from_account_entropy_pool( - SignalMutPointerMessageBackupKey* out, - const int8_t* account_entropy, - const SignalType_FixedArray17_uint8_t* aci, - const SignalType_FixedArray32_uint8_t* forward_secrecy_token -); -SignalFfiError* signal_message_backup_key_from_backup_key_and_backup_id( - SignalMutPointerMessageBackupKey* out, - const SignalType_FixedArray32_uint8_t* backup_key, - const SignalType_FixedArray16_uint8_t* backup_id, - const SignalType_FixedArray32_uint8_t* forward_secrecy_token -); -SignalFfiError* signal_message_backup_key_get_aes_key( - SignalType_FixedArray32_uint8_t* out, - SignalConstPointerMessageBackupKey key -); -SignalFfiError* signal_message_backup_key_get_hmac_key( - SignalType_FixedArray32_uint8_t* out, - SignalConstPointerMessageBackupKey key -); -SignalFfiError* signal_message_backup_sizing_flush_interval( - uint64_t* out, - uint64_t uncompressed_len, - uint64_t estimated_total_uncompressed_len -); -SignalFfiError* signal_message_backup_sizing_padding_size( - uint64_t* out, - uint64_t max_interval_bytes, - uint64_t compressed_len -); -SignalFfiError* signal_message_backup_validation_outcome_destroy( - SignalMutPointerMessageBackupValidationOutcome p -); -SignalFfiError* signal_message_backup_validation_outcome_get_error_message( - SignalCStringPtr* out, - SignalConstPointerMessageBackupValidationOutcome outcome -); -SignalFfiError* signal_message_backup_validation_outcome_get_unknown_fields( - SignalBytestringArray* out, - SignalConstPointerMessageBackupValidationOutcome outcome -); -SignalFfiError* signal_message_backup_validator_validate( - SignalMutPointerMessageBackupValidationOutcome* out, - SignalConstPointerMessageBackupKey key, - SignalConstPointerFfiSyncInputStreamStruct first_stream, - SignalConstPointerFfiSyncInputStreamStruct second_stream, - uint64_t len, - uint8_t purpose -); -SignalFfiError* signal_message_clone( - SignalMutPointerSignalMessage* new_obj, - SignalConstPointerSignalMessage obj -); -SignalFfiError* signal_message_deserialize( - SignalMutPointerSignalMessage* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_message_destroy( - SignalMutPointerSignalMessage p -); -SignalFfiError* signal_message_get_body( - SignalOwnedBuffer* out, - SignalConstPointerSignalMessage obj -); -SignalFfiError* signal_message_get_counter( - uint32_t* out, - SignalConstPointerSignalMessage obj -); -SignalFfiError* signal_message_get_message_version( - uint32_t* out, - SignalConstPointerSignalMessage obj -); -SignalFfiError* signal_message_get_pq_ratchet( - SignalOwnedBuffer* out, - SignalConstPointerSignalMessage msg -); -SignalFfiError* signal_message_get_sender_ratchet_key( - SignalMutPointerPublicKey* out, - SignalConstPointerSignalMessage m -); -SignalFfiError* signal_message_get_serialized( - SignalOwnedBuffer* out, - SignalConstPointerSignalMessage obj -); -SignalFfiError* signal_message_new( - SignalMutPointerSignalMessage* out, - uint8_t message_version, - SignalBorrowedBuffer mac_key, - SignalConstPointerPublicKey sender_ratchet_key, - uint32_t counter, - uint32_t previous_counter, - SignalBorrowedBuffer ciphertext, - SignalConstPointerPublicKey sender_identity_key, - SignalConstPointerPublicKey receiver_identity_key, - SignalBorrowedBuffer pq_ratchet -); -SignalFfiError* signal_online_backup_validator_add_frame( - SignalMutPointerOnlineBackupValidator backup, - SignalBorrowedBuffer frame -); -SignalFfiError* signal_online_backup_validator_destroy( - SignalMutPointerOnlineBackupValidator p -); -SignalFfiError* signal_online_backup_validator_finalize( - SignalMutPointerOnlineBackupValidator backup -); -SignalFfiError* signal_online_backup_validator_new( - SignalMutPointerOnlineBackupValidator* out, - SignalBorrowedBuffer backup_info_frame, - uint8_t purpose -); -SignalFfiError* signal_pin_hash_access_key( - SignalType_FixedArray32_uint8_t* out, - SignalConstPointerPinHash ph -); -SignalFfiError* signal_pin_hash_clone( - SignalMutPointerPinHash* new_obj, - SignalConstPointerPinHash obj -); -SignalFfiError* signal_pin_hash_destroy( - SignalMutPointerPinHash p -); -SignalFfiError* signal_pin_hash_encryption_key( - SignalType_FixedArray32_uint8_t* out, - SignalConstPointerPinHash ph -); -SignalFfiError* signal_pin_hash_from_salt( - SignalMutPointerPinHash* out, - SignalBorrowedBuffer pin, - const SignalType_FixedArray32_uint8_t* salt -); -SignalFfiError* signal_pin_hash_from_username_mrenclave( - SignalMutPointerPinHash* out, - SignalBorrowedBuffer pin, - const int8_t* username, - SignalBorrowedBuffer mrenclave -); -SignalFfiError* signal_pin_local_hash( - SignalCStringPtr* out, - SignalBorrowedBuffer pin -); -SignalFfiError* signal_pin_verify_local_hash( - bool* out, - const int8_t* encoded_hash, - SignalBorrowedBuffer pin -); -SignalFfiError* signal_plaintext_content_clone( - SignalMutPointerPlaintextContent* new_obj, - SignalConstPointerPlaintextContent obj -); -SignalFfiError* signal_plaintext_content_deserialize( - SignalMutPointerPlaintextContent* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_plaintext_content_destroy( - SignalMutPointerPlaintextContent p -); -SignalFfiError* signal_plaintext_content_from_decryption_error_message( - SignalMutPointerPlaintextContent* out, - SignalConstPointerDecryptionErrorMessage m -); -SignalFfiError* signal_plaintext_content_get_body( - SignalOwnedBuffer* out, - SignalConstPointerPlaintextContent obj -); -SignalFfiError* signal_plaintext_content_serialize( - SignalOwnedBuffer* out, - SignalConstPointerPlaintextContent obj -); -SignalFfiError* signal_pre_key_bundle_clone( - SignalMutPointerPreKeyBundle* new_obj, - SignalConstPointerPreKeyBundle obj -); -SignalFfiError* signal_pre_key_bundle_destroy( - SignalMutPointerPreKeyBundle p -); -SignalFfiError* signal_pre_key_bundle_get_device_id( - uint32_t* out, - SignalConstPointerPreKeyBundle obj -); -SignalFfiError* signal_pre_key_bundle_get_identity_key( - SignalMutPointerPublicKey* out, - SignalConstPointerPreKeyBundle p -); -SignalFfiError* signal_pre_key_bundle_get_kyber_pre_key_id( - uint32_t* out, - SignalConstPointerPreKeyBundle obj -); -SignalFfiError* signal_pre_key_bundle_get_kyber_pre_key_public( - SignalMutPointerKyberPublicKey* out, - SignalConstPointerPreKeyBundle bundle -); -SignalFfiError* signal_pre_key_bundle_get_kyber_pre_key_signature( - SignalOwnedBuffer* out, - SignalConstPointerPreKeyBundle obj -); -SignalFfiError* signal_pre_key_bundle_get_pre_key_id( - uint32_t* out, - SignalConstPointerPreKeyBundle obj -); -SignalFfiError* signal_pre_key_bundle_get_pre_key_public( - SignalMutPointerPublicKey* out, - SignalConstPointerPreKeyBundle obj -); -SignalFfiError* signal_pre_key_bundle_get_registration_id( - uint32_t* out, - SignalConstPointerPreKeyBundle obj -); -SignalFfiError* signal_pre_key_bundle_get_signed_pre_key_id( - uint32_t* out, - SignalConstPointerPreKeyBundle obj -); -SignalFfiError* signal_pre_key_bundle_get_signed_pre_key_public( - SignalMutPointerPublicKey* out, - SignalConstPointerPreKeyBundle obj -); -SignalFfiError* signal_pre_key_bundle_get_signed_pre_key_signature( - SignalOwnedBuffer* out, - SignalConstPointerPreKeyBundle obj -); -SignalFfiError* signal_pre_key_bundle_new( - SignalMutPointerPreKeyBundle* out, - uint32_t registration_id, - uint32_t device_id, - uint32_t prekey_id, - SignalConstPointerPublicKey prekey, - uint32_t signed_prekey_id, - SignalConstPointerPublicKey signed_prekey, - SignalBorrowedBuffer signed_prekey_signature, - SignalConstPointerPublicKey identity_key, - uint32_t kyber_prekey_id, - SignalConstPointerKyberPublicKey kyber_prekey, - SignalBorrowedBuffer kyber_prekey_signature -); -SignalFfiError* signal_pre_key_record_clone( - SignalMutPointerPreKeyRecord* new_obj, - SignalConstPointerPreKeyRecord obj -); -SignalFfiError* signal_pre_key_record_deserialize( - SignalMutPointerPreKeyRecord* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_pre_key_record_destroy( - SignalMutPointerPreKeyRecord p -); -SignalFfiError* signal_pre_key_record_get_id( - uint32_t* out, - SignalConstPointerPreKeyRecord obj -); -SignalFfiError* signal_pre_key_record_get_private_key( - SignalMutPointerPrivateKey* out, - SignalConstPointerPreKeyRecord obj -); -SignalFfiError* signal_pre_key_record_get_public_key( - SignalMutPointerPublicKey* out, - SignalConstPointerPreKeyRecord obj -); -SignalFfiError* signal_pre_key_record_new( - SignalMutPointerPreKeyRecord* out, - uint32_t id, - SignalConstPointerPublicKey pub_key, - SignalConstPointerPrivateKey priv_key -); -SignalFfiError* signal_pre_key_record_serialize( - SignalOwnedBuffer* out, - SignalConstPointerPreKeyRecord obj -); -SignalFfiError* signal_pre_key_signal_message_clone( - SignalMutPointerPreKeySignalMessage* new_obj, - SignalConstPointerPreKeySignalMessage obj -); -SignalFfiError* signal_pre_key_signal_message_deserialize( - SignalMutPointerPreKeySignalMessage* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_pre_key_signal_message_destroy( - SignalMutPointerPreKeySignalMessage p -); -SignalFfiError* signal_pre_key_signal_message_get_base_key( - SignalMutPointerPublicKey* out, - SignalConstPointerPreKeySignalMessage m -); -SignalFfiError* signal_pre_key_signal_message_get_identity_key( - SignalMutPointerPublicKey* out, - SignalConstPointerPreKeySignalMessage m -); -SignalFfiError* signal_pre_key_signal_message_get_pre_key_id( - uint32_t* out, - SignalConstPointerPreKeySignalMessage obj -); -SignalFfiError* signal_pre_key_signal_message_get_registration_id( - uint32_t* out, - SignalConstPointerPreKeySignalMessage obj -); -SignalFfiError* signal_pre_key_signal_message_get_signal_message( - SignalMutPointerSignalMessage* out, - SignalConstPointerPreKeySignalMessage m -); -SignalFfiError* signal_pre_key_signal_message_get_signed_pre_key_id( - uint32_t* out, - SignalConstPointerPreKeySignalMessage obj -); -SignalFfiError* signal_pre_key_signal_message_get_version( - uint32_t* out, - SignalConstPointerPreKeySignalMessage obj -); -SignalFfiError* signal_pre_key_signal_message_new( - SignalMutPointerPreKeySignalMessage* out, - uint8_t message_version, - uint32_t registration_id, - uint32_t pre_key_id, - uint32_t signed_pre_key_id, - SignalConstPointerPublicKey base_key, - SignalConstPointerPublicKey identity_key, - SignalConstPointerSignalMessage signal_message -); -SignalFfiError* signal_pre_key_signal_message_serialize( - SignalOwnedBuffer* out, - SignalConstPointerPreKeySignalMessage obj -); -void signal_print_ptr( - const void* p -); -SignalFfiError* signal_privatekey_agree( - SignalOwnedBuffer* out, - SignalConstPointerPrivateKey private_key, - SignalConstPointerPublicKey public_key -); -SignalFfiError* signal_privatekey_clone( - SignalMutPointerPrivateKey* new_obj, - SignalConstPointerPrivateKey obj -); -SignalFfiError* signal_privatekey_deserialize( - SignalMutPointerPrivateKey* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_privatekey_destroy( - SignalMutPointerPrivateKey p -); -SignalFfiError* signal_privatekey_generate( - SignalMutPointerPrivateKey* out -); -SignalFfiError* signal_privatekey_get_public_key( - SignalMutPointerPublicKey* out, - SignalConstPointerPrivateKey k -); -SignalFfiError* signal_privatekey_hpke_open( - SignalOwnedBuffer* out, - SignalConstPointerPrivateKey sk, - SignalBorrowedBuffer ciphertext, - SignalBorrowedBuffer info, - SignalBorrowedBuffer associated_data -); -SignalFfiError* signal_privatekey_serialize( - SignalOwnedBuffer* out, - SignalConstPointerPrivateKey obj -); -SignalFfiError* signal_privatekey_sign( - SignalOwnedBuffer* out, - SignalConstPointerPrivateKey key, - SignalBorrowedBuffer message -); -SignalFfiError* signal_process_prekey_bundle( - SignalConstPointerPreKeyBundle bundle, - SignalConstPointerProtocolAddress protocol_address, - SignalConstPointerProtocolAddress local_address, - SignalConstPointerFfiSessionStoreStruct session_store, - SignalConstPointerFfiIdentityKeyStoreStruct identity_key_store, - uint64_t now -); -SignalFfiError* signal_process_sender_key_distribution_message( - SignalConstPointerProtocolAddress sender, - SignalConstPointerSenderKeyDistributionMessage sender_key_distribution_message, - SignalConstPointerFfiSenderKeyStoreStruct store -); -SignalFfiError* signal_profile_key_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_profile_key_ciphertext_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_profile_key_commitment_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_profile_key_credential_presentation_check_valid_contents( - SignalBorrowedBuffer presentation_bytes -); -SignalFfiError* signal_profile_key_credential_presentation_get_profile_key_ciphertext( - SignalType_FixedArray65_uint8_t* out, - SignalBorrowedBuffer presentation_bytes -); -SignalFfiError* signal_profile_key_credential_presentation_get_uuid_ciphertext( - SignalType_FixedArray65_uint8_t* out, - SignalBorrowedBuffer presentation_bytes -); -SignalFfiError* signal_profile_key_credential_request_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_profile_key_credential_request_context_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_profile_key_credential_request_context_get_request( - SignalType_FixedArray329_uint8_t* out, - const SignalType_FixedArray473_uint8_t* context -); -SignalFfiError* signal_profile_key_derive_access_key( - SignalType_FixedArray16_uint8_t* out, - const SignalType_FixedArray32_uint8_t* profile_key -); -SignalFfiError* signal_profile_key_get_commitment( - SignalType_FixedArray97_uint8_t* out, - const SignalType_FixedArray32_uint8_t* profile_key, - const SignalType_FixedArray17_uint8_t* user_id -); -SignalFfiError* signal_profile_key_get_profile_key_version( - SignalType_FixedArray64_uint8_t* out, - const SignalType_FixedArray32_uint8_t* profile_key, - const SignalType_FixedArray17_uint8_t* user_id -); -SignalFfiError* signal_provisioning_chat_connection_connect( - SignalCPromiseMutPointerProvisioningChatConnection* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerConnectionManager connection_manager -); -SignalFfiError* signal_provisioning_chat_connection_destroy( - SignalMutPointerProvisioningChatConnection p -); -SignalFfiError* signal_provisioning_chat_connection_disconnect( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerProvisioningChatConnection chat -); -SignalFfiError* signal_provisioning_chat_connection_info( - SignalMutPointerChatConnectionInfo* out, - SignalConstPointerProvisioningChatConnection chat -); -SignalFfiError* signal_provisioning_chat_connection_init_listener( - SignalConstPointerProvisioningChatConnection chat, - SignalConstPointerFfiProvisioningListenerStruct listener -); -SignalFfiError* signal_publickey_clone( - SignalMutPointerPublicKey* new_obj, - SignalConstPointerPublicKey obj -); -SignalFfiError* signal_publickey_deserialize( - SignalMutPointerPublicKey* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_publickey_destroy( - SignalMutPointerPublicKey p -); -SignalFfiError* signal_publickey_equals( - bool* out, - SignalConstPointerPublicKey lhs, - SignalConstPointerPublicKey rhs -); -SignalFfiError* signal_publickey_get_public_key_bytes( - SignalOwnedBuffer* out, - SignalConstPointerPublicKey obj -); -SignalFfiError* signal_publickey_hpke_seal( - SignalOwnedBuffer* out, - SignalConstPointerPublicKey pk, - SignalBorrowedBuffer plaintext, - SignalBorrowedBuffer info, - SignalBorrowedBuffer associated_data -); -SignalFfiError* signal_publickey_serialize( - SignalOwnedBuffer* out, - SignalConstPointerPublicKey obj -); -SignalFfiError* signal_publickey_verify( - bool* out, - SignalConstPointerPublicKey key, - SignalBorrowedBuffer message, - SignalBorrowedBuffer signature -); -SignalFfiError* signal_receipt_credential_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_receipt_credential_get_receipt_expiration_time( - uint64_t* out, - const SignalType_FixedArray129_uint8_t* receipt_credential -); -SignalFfiError* signal_receipt_credential_get_receipt_level( - uint64_t* out, - const SignalType_FixedArray129_uint8_t* receipt_credential -); -SignalFfiError* signal_receipt_credential_presentation_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_receipt_credential_presentation_get_receipt_expiration_time( - uint64_t* out, - const SignalType_FixedArray329_uint8_t* presentation -); -SignalFfiError* signal_receipt_credential_presentation_get_receipt_level( - uint64_t* out, - const SignalType_FixedArray329_uint8_t* presentation -); -SignalFfiError* signal_receipt_credential_presentation_get_receipt_serial( - SignalType_FixedArray16_uint8_t* out, - const SignalType_FixedArray329_uint8_t* presentation -); -SignalFfiError* signal_receipt_credential_request_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_receipt_credential_request_context_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_receipt_credential_request_context_get_request( - SignalType_FixedArray97_uint8_t* out, - const SignalType_FixedArray177_uint8_t* request_context -); -SignalFfiError* signal_receipt_credential_response_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_register_account_request_create( - SignalMutPointerRegisterAccountRequest* out -); -SignalFfiError* signal_register_account_request_destroy( - SignalMutPointerRegisterAccountRequest p -); -SignalFfiError* signal_register_account_request_set_account_password( - SignalConstPointerRegisterAccountRequest register_account, - const int8_t* account_password -); -SignalFfiError* signal_register_account_request_set_apn_push_token( - SignalConstPointerRegisterAccountRequest register_account, - const int8_t* apn_push_token -); -SignalFfiError* signal_register_account_request_set_identity_pq_last_resort_pre_key( - SignalConstPointerRegisterAccountRequest register_account, - uint8_t identity_type, - SignalFfiSignedPublicPreKey pq_last_resort_pre_key -); -SignalFfiError* signal_register_account_request_set_identity_public_key( - SignalConstPointerRegisterAccountRequest register_account, - uint8_t identity_type, - SignalConstPointerPublicKey identity_key -); -SignalFfiError* signal_register_account_request_set_identity_signed_pre_key( - SignalConstPointerRegisterAccountRequest register_account, - uint8_t identity_type, - SignalFfiSignedPublicPreKey signed_pre_key -); -SignalFfiError* signal_register_account_request_set_one_time_password( - SignalConstPointerRegisterAccountRequest register_account, - uint32_t one_time_password -); -SignalFfiError* signal_register_account_request_set_skip_device_transfer( - SignalConstPointerRegisterAccountRequest register_account -); -SignalFfiError* signal_register_account_response_destroy( - SignalMutPointerRegisterAccountResponse p -); -SignalFfiError* signal_register_account_response_get_aci( - SignalUuid* out, - SignalConstPointerRegisterAccountResponse response -); -SignalFfiError* signal_register_account_response_get_auth_credential_salt( - SignalOwnedBuffer* out, - SignalConstPointerRegisterAccountResponse response -); -SignalFfiError* signal_register_account_response_get_entitlement_backup_expiration_seconds( - uint64_t* out, - SignalConstPointerRegisterAccountResponse response -); -SignalFfiError* signal_register_account_response_get_entitlement_backup_level( - uint64_t* out, - SignalConstPointerRegisterAccountResponse response -); -SignalFfiError* signal_register_account_response_get_entitlement_badges( - SignalOwnedBufferOfFfiRegisterResponseBadge* out, - SignalConstPointerRegisterAccountResponse response -); -SignalFfiError* signal_register_account_response_get_number( - SignalCStringPtr* out, - SignalConstPointerRegisterAccountResponse response -); -SignalFfiError* signal_register_account_response_get_pni( - SignalOptionalUuid* out, - SignalConstPointerRegisterAccountResponse response -); -SignalFfiError* signal_register_account_response_get_reregistration( - bool* out, - SignalConstPointerRegisterAccountResponse response -); -SignalFfiError* signal_register_account_response_get_storage_capable( - bool* out, - SignalConstPointerRegisterAccountResponse response -); -SignalFfiError* signal_register_account_response_get_username_hash( - SignalOwnedBuffer* out, - SignalConstPointerRegisterAccountResponse response -); -SignalFfiError* signal_register_account_response_get_username_link_handle( - SignalOptionalUuid* out, - SignalConstPointerRegisterAccountResponse response -); -SignalFfiError* signal_registration_account_attributes_create( - SignalMutPointerRegistrationAccountAttributes* out, - SignalBorrowedBuffer recovery_password, - uint16_t aci_registration_id, - uint16_t pni_registration_id, - const int8_t* registration_lock, - const SignalType_FixedArray16_uint8_t* unidentified_access_key, - bool unrestricted_unidentified_access, - SignalBorrowedBytestringArray capabilities, - bool discoverable_by_phone_number -); -SignalFfiError* signal_registration_account_attributes_destroy( - SignalMutPointerRegistrationAccountAttributes p -); -SignalFfiError* signal_registration_service_check_svr2_credentials( - SignalCPromiseFfiCheckSvr2CredentialsResponse* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerRegistrationService service, - SignalBorrowedBytestringArray svr_tokens -); -SignalFfiError* signal_registration_service_create_session( - SignalCPromiseMutPointerRegistrationService* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalFfiRegistrationCreateSessionRequest create_session, - SignalConstPointerFfiConnectChatBridgeStruct connect_chat -); -SignalFfiError* signal_registration_service_destroy( - SignalMutPointerRegistrationService p -); -SignalFfiError* signal_registration_service_register_account( - SignalCPromiseMutPointerRegisterAccountResponse* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerRegistrationService service, - SignalConstPointerRegisterAccountRequest register_account, - SignalConstPointerRegistrationAccountAttributes account_attributes -); -SignalFfiError* signal_registration_service_register_account_without_number( - SignalCPromiseMutPointerRegisterAccountResponse* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerFfiConnectChatBridgeStruct connect_chat, - SignalBorrowedBuffer receipt_credential_presentation, - SignalConstPointerRegisterAccountRequest register_account, - SignalConstPointerRegistrationAccountAttributes account_attributes -); -SignalFfiError* signal_registration_service_registration_session( - SignalMutPointerRegistrationSession* out, - SignalConstPointerRegistrationService service -); -SignalFfiError* signal_registration_service_request_push_challenge( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerRegistrationService service, - const int8_t* push_token -); -SignalFfiError* signal_registration_service_request_verification_code( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerRegistrationService service, - const int8_t* transport, - const int8_t* client, - SignalBorrowedBytestringArray languages -); -SignalFfiError* signal_registration_service_reregister_account( - SignalCPromiseMutPointerRegisterAccountResponse* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerFfiConnectChatBridgeStruct connect_chat, - const int8_t* number, - SignalConstPointerRegisterAccountRequest register_account, - SignalConstPointerRegistrationAccountAttributes account_attributes -); -SignalFfiError* signal_registration_service_reregister_account_without_number( - SignalCPromiseMutPointerRegisterAccountResponse* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerFfiConnectChatBridgeStruct connect_chat, - const SignalType_FixedArray17_uint8_t* aci, - SignalConstPointerRegisterAccountRequest register_account, - SignalConstPointerRegistrationAccountAttributes account_attributes -); -SignalFfiError* signal_registration_service_resume_session( - SignalCPromiseMutPointerRegistrationService* promise, - SignalConstPointerTokioAsyncContext async_runtime, - const int8_t* session_id, - const int8_t* number, - SignalConstPointerFfiConnectChatBridgeStruct connect_chat -); -SignalFfiError* signal_registration_service_session_id( - SignalCStringPtr* out, - SignalConstPointerRegistrationService service -); -SignalFfiError* signal_registration_service_submit_captcha( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerRegistrationService service, - const int8_t* captcha_value -); -SignalFfiError* signal_registration_service_submit_push_challenge( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerRegistrationService service, - const int8_t* push_challenge -); -SignalFfiError* signal_registration_service_submit_verification_code( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerRegistrationService service, - const int8_t* code -); -SignalFfiError* signal_registration_session_destroy( - SignalMutPointerRegistrationSession p -); -SignalFfiError* signal_registration_session_get_allowed_to_request_code( - bool* out, - SignalConstPointerRegistrationSession session -); -SignalFfiError* signal_registration_session_get_next_call_seconds( - uint32_t* out, - SignalConstPointerRegistrationSession session -); -SignalFfiError* signal_registration_session_get_next_sms_seconds( - uint32_t* out, - SignalConstPointerRegistrationSession session -); -SignalFfiError* signal_registration_session_get_next_verification_attempt_seconds( - uint32_t* out, - SignalConstPointerRegistrationSession session -); -SignalFfiError* signal_registration_session_get_requested_information( - SignalOwnedBuffer* out, - SignalConstPointerRegistrationSession session -); -SignalFfiError* signal_registration_session_get_verified( - bool* out, - SignalConstPointerRegistrationSession session -); -SignalFfiError* signal_sealed_sender_multi_recipient_encrypt( - SignalOwnedBuffer* out, - SignalBorrowedSliceOfConstPointerProtocolAddress recipients, - SignalBorrowedSliceOfConstPointerSessionRecord recipient_sessions, - SignalBorrowedBuffer excluded_recipients, - SignalConstPointerUnidentifiedSenderMessageContent content, - SignalConstPointerFfiIdentityKeyStoreStruct identity_key_store -); -SignalFfiError* signal_sealed_sender_multi_recipient_message_for_single_recipient( - SignalOwnedBuffer* out, - SignalBorrowedBuffer encoded_multi_recipient_message -); -SignalFfiError* signal_sealed_session_cipher_decrypt_to_usmc( - SignalMutPointerUnidentifiedSenderMessageContent* out, - SignalBorrowedBuffer ctext, - SignalConstPointerFfiIdentityKeyStoreStruct identity_store -); -SignalFfiError* signal_sealed_session_cipher_encrypt( - SignalOwnedBuffer* out, - SignalConstPointerProtocolAddress destination, - SignalConstPointerUnidentifiedSenderMessageContent content, - SignalConstPointerFfiIdentityKeyStoreStruct identity_key_store -); -SignalFfiError* signal_secure_value_recovery_for_backups_create_new_backup_chain( - SignalOwnedBuffer* out, - uint8_t environment, - const SignalType_FixedArray32_uint8_t* backup_key -); -SignalFfiError* signal_secure_value_recovery_for_backups_remove_backup( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerConnectionManager connection_manager, - const int8_t* username, - const int8_t* password -); -SignalFfiError* signal_secure_value_recovery_for_backups_restore_backup_from_server( - SignalCPromiseMutPointerBackupRestoreResponse* promise, - SignalConstPointerTokioAsyncContext async_runtime, - const SignalType_FixedArray32_uint8_t* backup_key, - SignalBorrowedBuffer metadata, - SignalConstPointerConnectionManager connection_manager, - const int8_t* username, - const int8_t* password -); -SignalFfiError* signal_secure_value_recovery_for_backups_store_backup( - SignalCPromiseMutPointerBackupStoreResponse* promise, - SignalConstPointerTokioAsyncContext async_runtime, - const SignalType_FixedArray32_uint8_t* backup_key, - SignalBorrowedBuffer previous_secret_data, - SignalConstPointerConnectionManager connection_manager, - const int8_t* username, - const int8_t* password -); -SignalFfiError* signal_sender_certificate_clone( - SignalMutPointerSenderCertificate* new_obj, - SignalConstPointerSenderCertificate obj -); -SignalFfiError* signal_sender_certificate_deserialize( - SignalMutPointerSenderCertificate* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_sender_certificate_destroy( - SignalMutPointerSenderCertificate p -); -SignalFfiError* signal_sender_certificate_get_certificate( - SignalOwnedBuffer* out, - SignalConstPointerSenderCertificate obj -); -SignalFfiError* signal_sender_certificate_get_device_id( - uint32_t* out, - SignalConstPointerSenderCertificate obj -); -SignalFfiError* signal_sender_certificate_get_expiration( - uint64_t* out, - SignalConstPointerSenderCertificate obj -); -SignalFfiError* signal_sender_certificate_get_key( - SignalMutPointerPublicKey* out, - SignalConstPointerSenderCertificate obj -); -SignalFfiError* signal_sender_certificate_get_sender_e164( - SignalCStringPtr* out, - SignalConstPointerSenderCertificate obj -); -SignalFfiError* signal_sender_certificate_get_sender_uuid( - SignalCStringPtr* out, - SignalConstPointerSenderCertificate obj -); -SignalFfiError* signal_sender_certificate_get_serialized( - SignalOwnedBuffer* out, - SignalConstPointerSenderCertificate obj -); -SignalFfiError* signal_sender_certificate_get_server_certificate( - SignalMutPointerServerCertificate* out, - SignalConstPointerSenderCertificate cert -); -SignalFfiError* signal_sender_certificate_get_signature( - SignalOwnedBuffer* out, - SignalConstPointerSenderCertificate obj -); -SignalFfiError* signal_sender_certificate_new( - SignalMutPointerSenderCertificate* out, - const int8_t* sender_uuid, - const int8_t* sender_e164, - uint32_t sender_device_id, - SignalConstPointerPublicKey sender_key, - uint64_t expiration, - SignalConstPointerServerCertificate signer_cert, - SignalConstPointerPrivateKey signer_key -); -SignalFfiError* signal_sender_certificate_validate( - bool* out, - SignalConstPointerSenderCertificate cert, - SignalBorrowedSliceOfConstPointerPublicKey trust_roots, - uint64_t time -); -SignalFfiError* signal_sender_key_distribution_message_clone( - SignalMutPointerSenderKeyDistributionMessage* new_obj, - SignalConstPointerSenderKeyDistributionMessage obj -); -SignalFfiError* signal_sender_key_distribution_message_create( - SignalMutPointerSenderKeyDistributionMessage* out, - SignalConstPointerProtocolAddress sender, - SignalUuid distribution_id, - SignalConstPointerFfiSenderKeyStoreStruct store -); -SignalFfiError* signal_sender_key_distribution_message_deserialize( - SignalMutPointerSenderKeyDistributionMessage* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_sender_key_distribution_message_destroy( - SignalMutPointerSenderKeyDistributionMessage p -); -SignalFfiError* signal_sender_key_distribution_message_get_chain_id( - uint32_t* out, - SignalConstPointerSenderKeyDistributionMessage obj -); -SignalFfiError* signal_sender_key_distribution_message_get_chain_key( - SignalOwnedBuffer* out, - SignalConstPointerSenderKeyDistributionMessage obj -); -SignalFfiError* signal_sender_key_distribution_message_get_distribution_id( - SignalUuid* out, - SignalConstPointerSenderKeyDistributionMessage obj -); -SignalFfiError* signal_sender_key_distribution_message_get_iteration( - uint32_t* out, - SignalConstPointerSenderKeyDistributionMessage obj -); -SignalFfiError* signal_sender_key_distribution_message_get_signature_key( - SignalMutPointerPublicKey* out, - SignalConstPointerSenderKeyDistributionMessage m -); -SignalFfiError* signal_sender_key_distribution_message_new( - SignalMutPointerSenderKeyDistributionMessage* out, - uint8_t message_version, - SignalUuid distribution_id, - uint32_t chain_id, - uint32_t iteration, - SignalBorrowedBuffer chainkey, - SignalConstPointerPublicKey pk -); -SignalFfiError* signal_sender_key_distribution_message_serialize( - SignalOwnedBuffer* out, - SignalConstPointerSenderKeyDistributionMessage obj -); -SignalFfiError* signal_sender_key_message_clone( - SignalMutPointerSenderKeyMessage* new_obj, - SignalConstPointerSenderKeyMessage obj -); -SignalFfiError* signal_sender_key_message_deserialize( - SignalMutPointerSenderKeyMessage* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_sender_key_message_destroy( - SignalMutPointerSenderKeyMessage p -); -SignalFfiError* signal_sender_key_message_get_chain_id( - uint32_t* out, - SignalConstPointerSenderKeyMessage obj -); -SignalFfiError* signal_sender_key_message_get_cipher_text( - SignalOwnedBuffer* out, - SignalConstPointerSenderKeyMessage obj -); -SignalFfiError* signal_sender_key_message_get_distribution_id( - SignalUuid* out, - SignalConstPointerSenderKeyMessage obj -); -SignalFfiError* signal_sender_key_message_get_iteration( - uint32_t* out, - SignalConstPointerSenderKeyMessage obj -); -SignalFfiError* signal_sender_key_message_new( - SignalMutPointerSenderKeyMessage* out, - uint8_t message_version, - SignalUuid distribution_id, - uint32_t chain_id, - uint32_t iteration, - SignalBorrowedBuffer ciphertext, - SignalConstPointerPrivateKey pk -); -SignalFfiError* signal_sender_key_message_serialize( - SignalOwnedBuffer* out, - SignalConstPointerSenderKeyMessage obj -); -SignalFfiError* signal_sender_key_message_verify_signature( - bool* out, - SignalConstPointerSenderKeyMessage skm, - SignalConstPointerPublicKey pubkey -); -SignalFfiError* signal_sender_key_record_clone( - SignalMutPointerSenderKeyRecord* new_obj, - SignalConstPointerSenderKeyRecord obj -); -SignalFfiError* signal_sender_key_record_deserialize( - SignalMutPointerSenderKeyRecord* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_sender_key_record_destroy( - SignalMutPointerSenderKeyRecord p -); -SignalFfiError* signal_sender_key_record_serialize( - SignalOwnedBuffer* out, - SignalConstPointerSenderKeyRecord obj -); -SignalFfiError* signal_server_certificate_clone( - SignalMutPointerServerCertificate* new_obj, - SignalConstPointerServerCertificate obj -); -SignalFfiError* signal_server_certificate_deserialize( - SignalMutPointerServerCertificate* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_server_certificate_destroy( - SignalMutPointerServerCertificate p -); -SignalFfiError* signal_server_certificate_get_certificate( - SignalOwnedBuffer* out, - SignalConstPointerServerCertificate obj -); -SignalFfiError* signal_server_certificate_get_key( - SignalMutPointerPublicKey* out, - SignalConstPointerServerCertificate obj -); -SignalFfiError* signal_server_certificate_get_key_id( - uint32_t* out, - SignalConstPointerServerCertificate obj -); -SignalFfiError* signal_server_certificate_get_serialized( - SignalOwnedBuffer* out, - SignalConstPointerServerCertificate obj -); -SignalFfiError* signal_server_certificate_get_signature( - SignalOwnedBuffer* out, - SignalConstPointerServerCertificate obj -); -SignalFfiError* signal_server_certificate_new( - SignalMutPointerServerCertificate* out, - uint32_t key_id, - SignalConstPointerPublicKey server_key, - SignalConstPointerPrivateKey trust_root -); -SignalFfiError* signal_server_message_ack_destroy( - SignalMutPointerServerMessageAck p -); -SignalFfiError* signal_server_message_ack_send( - SignalConstPointerServerMessageAck ack -); -SignalFfiError* signal_server_public_params_create_auth_credential_with_pni_presentation_deterministic( - SignalOwnedBuffer* out, - SignalConstPointerServerPublicParams server_public_params, - const SignalType_FixedArray32_uint8_t* randomness, - const SignalType_FixedArray289_uint8_t* group_secret_params, - SignalBorrowedBuffer auth_credential_with_pni_bytes -); -SignalFfiError* signal_server_public_params_create_expiring_profile_key_credential_presentation_deterministic( - SignalOwnedBuffer* out, - SignalConstPointerServerPublicParams server_public_params, - const SignalType_FixedArray32_uint8_t* randomness, - const SignalType_FixedArray289_uint8_t* group_secret_params, - const SignalType_FixedArray153_uint8_t* profile_key_credential -); -SignalFfiError* signal_server_public_params_create_profile_key_credential_request_context_deterministic( - SignalType_FixedArray473_uint8_t* out, - SignalConstPointerServerPublicParams server_public_params, - const SignalType_FixedArray32_uint8_t* randomness, - const SignalType_FixedArray17_uint8_t* user_id, - const SignalType_FixedArray32_uint8_t* profile_key -); -SignalFfiError* signal_server_public_params_create_receipt_credential_presentation_deterministic( - SignalType_FixedArray329_uint8_t* out, - SignalConstPointerServerPublicParams server_public_params, - const SignalType_FixedArray32_uint8_t* randomness, - const SignalType_FixedArray129_uint8_t* receipt_credential -); -SignalFfiError* signal_server_public_params_create_receipt_credential_request_context_deterministic( - SignalType_FixedArray177_uint8_t* out, - SignalConstPointerServerPublicParams server_public_params, - const SignalType_FixedArray32_uint8_t* randomness, - const SignalType_FixedArray16_uint8_t* receipt_serial -); -SignalFfiError* signal_server_public_params_deserialize( - SignalMutPointerServerPublicParams* out, - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_server_public_params_destroy( - SignalMutPointerServerPublicParams p -); -SignalFfiError* signal_server_public_params_get_endorsement_public_key( - SignalOwnedBuffer* out, - SignalConstPointerServerPublicParams params -); -SignalFfiError* signal_server_public_params_receive_auth_credential_with_pni_as_service_id( - SignalOwnedBuffer* out, - SignalConstPointerServerPublicParams params, - const SignalType_FixedArray17_uint8_t* aci, - const SignalType_FixedArray17_uint8_t* pni, - uint64_t redemption_time, - SignalBorrowedBuffer auth_credential_with_pni_response_bytes -); -SignalFfiError* signal_server_public_params_receive_auth_credential_zkc_without_pni( - SignalOwnedBuffer* out, - SignalConstPointerServerPublicParams params, - const SignalType_FixedArray17_uint8_t* aci, - SignalBorrowedBuffer salt, - uint64_t redemption_time, - SignalBorrowedBuffer auth_credential_with_pni_response_bytes -); -SignalFfiError* signal_server_public_params_receive_expiring_profile_key_credential( - SignalType_FixedArray153_uint8_t* out, - SignalConstPointerServerPublicParams server_public_params, - const SignalType_FixedArray473_uint8_t* request_context, - const SignalType_FixedArray497_uint8_t* response, - uint64_t current_time_in_seconds -); -SignalFfiError* signal_server_public_params_receive_receipt_credential( - SignalType_FixedArray129_uint8_t* out, - SignalConstPointerServerPublicParams server_public_params, - const SignalType_FixedArray177_uint8_t* request_context, - const SignalType_FixedArray409_uint8_t* response -); -SignalFfiError* signal_server_public_params_serialize( - SignalOwnedBuffer* out, - SignalConstPointerServerPublicParams handle -); -SignalFfiError* signal_server_public_params_verify_signature( - SignalConstPointerServerPublicParams server_public_params, - SignalBorrowedBuffer message, - const SignalType_FixedArray64_uint8_t* notary_signature -); -SignalFfiError* signal_server_secret_params_deserialize( - SignalMutPointerServerSecretParams* out, - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_server_secret_params_destroy( - SignalMutPointerServerSecretParams p -); -SignalFfiError* signal_server_secret_params_generate_deterministic( - SignalMutPointerServerSecretParams* out, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_server_secret_params_get_public_params( - SignalMutPointerServerPublicParams* out, - SignalConstPointerServerSecretParams params -); -SignalFfiError* signal_server_secret_params_issue_auth_credential_with_pni_zkc_deterministic( - SignalOwnedBuffer* out, - SignalConstPointerServerSecretParams server_secret_params, - const SignalType_FixedArray32_uint8_t* randomness, - const SignalType_FixedArray17_uint8_t* aci, - const SignalType_FixedArray17_uint8_t* pni, - uint64_t redemption_time -); -SignalFfiError* signal_server_secret_params_issue_auth_credential_zkc_without_pni_deterministic( - SignalOwnedBuffer* out, - SignalConstPointerServerSecretParams server_secret_params, - const SignalType_FixedArray32_uint8_t* randomness, - const SignalType_FixedArray17_uint8_t* aci, - SignalBorrowedBuffer salt, - uint64_t redemption_time -); -SignalFfiError* signal_server_secret_params_issue_expiring_profile_key_credential_deterministic( - SignalType_FixedArray497_uint8_t* out, - SignalConstPointerServerSecretParams server_secret_params, - const SignalType_FixedArray32_uint8_t* randomness, - const SignalType_FixedArray329_uint8_t* request, - const SignalType_FixedArray17_uint8_t* user_id, - const SignalType_FixedArray97_uint8_t* commitment, - uint64_t expiration_in_seconds -); -SignalFfiError* signal_server_secret_params_issue_receipt_credential_deterministic( - SignalType_FixedArray409_uint8_t* out, - SignalConstPointerServerSecretParams server_secret_params, - const SignalType_FixedArray32_uint8_t* randomness, - const SignalType_FixedArray97_uint8_t* request, - uint64_t receipt_expiration_time, - uint64_t receipt_level -); -SignalFfiError* signal_server_secret_params_serialize( - SignalOwnedBuffer* out, - SignalConstPointerServerSecretParams handle -); -SignalFfiError* signal_server_secret_params_sign_deterministic( - SignalType_FixedArray64_uint8_t* out, - SignalConstPointerServerSecretParams params, - const SignalType_FixedArray32_uint8_t* randomness, - SignalBorrowedBuffer message -); -SignalFfiError* signal_server_secret_params_verify_auth_credential_presentation( - SignalConstPointerServerSecretParams server_secret_params, - const SignalType_FixedArray97_uint8_t* group_public_params, - SignalBorrowedBuffer presentation_bytes, - uint64_t current_time_in_seconds -); -SignalFfiError* signal_server_secret_params_verify_profile_key_credential_presentation( - SignalConstPointerServerSecretParams server_secret_params, - const SignalType_FixedArray97_uint8_t* group_public_params, - SignalBorrowedBuffer presentation_bytes, - uint64_t current_time_in_seconds -); -SignalFfiError* signal_server_secret_params_verify_receipt_credential_presentation( - SignalConstPointerServerSecretParams server_secret_params, - const SignalType_FixedArray329_uint8_t* presentation -); -SignalFfiError* signal_service_id_parse_from_service_id_binary( - SignalType_FixedArray17_uint8_t* out, - SignalBorrowedBuffer input -); -SignalFfiError* signal_service_id_parse_from_service_id_string( - SignalType_FixedArray17_uint8_t* out, - const int8_t* input -); -SignalFfiError* signal_service_id_service_id_binary( - SignalOwnedBuffer* out, - const SignalType_FixedArray17_uint8_t* value -); -SignalFfiError* signal_service_id_service_id_log( - SignalCStringPtr* out, - const SignalType_FixedArray17_uint8_t* value -); -SignalFfiError* signal_service_id_service_id_string( - SignalCStringPtr* out, - const SignalType_FixedArray17_uint8_t* value -); -SignalFfiError* signal_session_record_archive_current_state( - SignalMutPointerSessionRecord session_record -); -SignalFfiError* signal_session_record_clone( - SignalMutPointerSessionRecord* new_obj, - SignalConstPointerSessionRecord obj -); -SignalFfiError* signal_session_record_current_ratchet_key_matches( - bool* out, - SignalConstPointerSessionRecord s, - SignalConstPointerPublicKey key -); -SignalFfiError* signal_session_record_deserialize( - SignalMutPointerSessionRecord* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_session_record_destroy( - SignalMutPointerSessionRecord p -); -SignalFfiError* signal_session_record_get_local_registration_id( - uint32_t* out, - SignalConstPointerSessionRecord obj -); -SignalFfiError* signal_session_record_get_remote_registration_id( - uint32_t* out, - SignalConstPointerSessionRecord obj -); -SignalFfiError* signal_session_record_has_usable_sender_chain( - bool* out, - SignalConstPointerSessionRecord s, - uint64_t now -); -SignalFfiError* signal_session_record_serialize( - SignalOwnedBuffer* out, - SignalConstPointerSessionRecord obj -); -SignalFfiError* signal_sgx_client_state_complete_handshake( - SignalMutPointerSgxClientState cli, - SignalBorrowedBuffer handshake_received -); -SignalFfiError* signal_sgx_client_state_destroy( - SignalMutPointerSgxClientState p -); -SignalFfiError* signal_sgx_client_state_established_recv( - SignalOwnedBuffer* out, - SignalMutPointerSgxClientState cli, - SignalBorrowedBuffer received_ciphertext -); -SignalFfiError* signal_sgx_client_state_established_send( - SignalOwnedBuffer* out, - SignalMutPointerSgxClientState cli, - SignalBorrowedBuffer plaintext_to_send -); -SignalFfiError* signal_sgx_client_state_initial_request( - SignalOwnedBuffer* out, - SignalConstPointerSgxClientState obj -); -SignalFfiError* signal_signed_pre_key_record_clone( - SignalMutPointerSignedPreKeyRecord* new_obj, - SignalConstPointerSignedPreKeyRecord obj -); -SignalFfiError* signal_signed_pre_key_record_deserialize( - SignalMutPointerSignedPreKeyRecord* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_signed_pre_key_record_destroy( - SignalMutPointerSignedPreKeyRecord p -); -SignalFfiError* signal_signed_pre_key_record_get_id( - uint32_t* out, - SignalConstPointerSignedPreKeyRecord obj -); -SignalFfiError* signal_signed_pre_key_record_get_private_key( - SignalMutPointerPrivateKey* out, - SignalConstPointerSignedPreKeyRecord obj -); -SignalFfiError* signal_signed_pre_key_record_get_public_key( - SignalMutPointerPublicKey* out, - SignalConstPointerSignedPreKeyRecord obj -); -SignalFfiError* signal_signed_pre_key_record_get_signature( - SignalOwnedBuffer* out, - SignalConstPointerSignedPreKeyRecord obj -); -SignalFfiError* signal_signed_pre_key_record_get_timestamp( - uint64_t* out, - SignalConstPointerSignedPreKeyRecord obj -); -SignalFfiError* signal_signed_pre_key_record_new( - SignalMutPointerSignedPreKeyRecord* out, - uint32_t id, - uint64_t timestamp, - SignalConstPointerPublicKey pub_key, - SignalConstPointerPrivateKey priv_key, - SignalBorrowedBuffer signature -); -SignalFfiError* signal_signed_pre_key_record_serialize( - SignalOwnedBuffer* out, - SignalConstPointerSignedPreKeyRecord obj -); -SignalFfiError* signal_svr2_client_new( - SignalMutPointerSgxClientState* out, - SignalBorrowedBuffer mrenclave, - SignalBorrowedBuffer attestation_msg, - uint64_t current_timestamp -); -SignalFfiError* signal_svr_key_derive_logging_key( - SignalType_FixedArray32_uint8_t* out, - const SignalType_FixedArray32_uint8_t* svr_key -); -SignalFfiError* signal_svr_key_derive_registration_lock( - SignalType_FixedArray32_uint8_t* out, - const SignalType_FixedArray32_uint8_t* svr_key -); -SignalFfiError* signal_svr_key_derive_registration_recovery_password( - SignalType_FixedArray32_uint8_t* out, - const SignalType_FixedArray32_uint8_t* svr_key -); -SignalFfiError* signal_svr_key_derive_storage_service_key( - SignalType_FixedArray32_uint8_t* out, - const SignalType_FixedArray32_uint8_t* svr_key -); -SignalFfiError* signal_tokio_async_context_cancel( - SignalConstPointerTokioAsyncContext context, - uint64_t raw_cancellation_id -); -SignalFfiError* signal_tokio_async_context_destroy( - SignalMutPointerTokioAsyncContext p -); -SignalFfiError* signal_tokio_async_context_new( - SignalMutPointerTokioAsyncContext* out -); -SignalFfiError* signal_unauthenticated_chat_connection_account_exists( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - const SignalType_FixedArray17_uint8_t* account -); -SignalFfiError* signal_unauthenticated_chat_connection_backup_copy_media( - SignalMutPointerCopyBackupMediaStream* out, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalBorrowedBuffer credential, - SignalBorrowedBuffer server_keys, - SignalConstPointerPrivateKey signing_key, - SignalBorrowedSliceOfBridgeCopyBackupMediaItemFfiArg items, - int64_t rng -); -SignalFfiError* signal_unauthenticated_chat_connection_backup_delete_all( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalBorrowedBuffer credential, - SignalBorrowedBuffer server_keys, - SignalConstPointerPrivateKey signing_key, - int64_t rng -); -SignalFfiError* signal_unauthenticated_chat_connection_backup_delete_media( - SignalMutPointerDeleteBackupMediaStream* out, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalBorrowedBuffer credential, - SignalBorrowedBuffer server_keys, - SignalConstPointerPrivateKey signing_key, - SignalBorrowedSliceOfBridgeDeleteBackupMediaItemFfiArg items, - int64_t rng -); -SignalFfiError* signal_unauthenticated_chat_connection_backup_get_cdn_credentials( - SignalCPromisePairOfOwnedBufferOfCStringPtrOwnedBufferOfCStringPtr* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalBorrowedBuffer credential, - SignalBorrowedBuffer server_keys, - SignalConstPointerPrivateKey signing_key, - int32_t cdn, - int64_t rng -); -SignalFfiError* signal_unauthenticated_chat_connection_backup_get_media_backup_info( - SignalCPromiseBridgeMediaBackupInfoFfiResult* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalBorrowedBuffer credential, - SignalBorrowedBuffer server_keys, - SignalConstPointerPrivateKey signing_key, - int64_t rng -); -SignalFfiError* signal_unauthenticated_chat_connection_backup_get_media_upload_form( - SignalCPromiseFfiUploadForm* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalBorrowedBuffer credential, - SignalBorrowedBuffer server_keys, - SignalConstPointerPrivateKey signing_key, - uint64_t upload_size, - int64_t rng -); -SignalFfiError* signal_unauthenticated_chat_connection_backup_get_message_backup_info( - SignalCPromiseBridgeMessageBackupInfoFfiResult* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalBorrowedBuffer credential, - SignalBorrowedBuffer server_keys, - SignalConstPointerPrivateKey signing_key, - int64_t rng -); -SignalFfiError* signal_unauthenticated_chat_connection_backup_get_svrb_credentials( - SignalCPromisePairOfCStringPtrCStringPtr* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalBorrowedBuffer credential, - SignalBorrowedBuffer server_keys, - SignalConstPointerPrivateKey signing_key, - int64_t rng -); -SignalFfiError* signal_unauthenticated_chat_connection_backup_get_upload_form( - SignalCPromiseFfiUploadForm* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalBorrowedBuffer credential, - SignalBorrowedBuffer server_keys, - SignalConstPointerPrivateKey signing_key, - uint64_t upload_size, - int64_t rng -); -SignalFfiError* signal_unauthenticated_chat_connection_backup_list_media( - SignalCPromiseListMediaResponseFfiResult* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalBorrowedBuffer credential, - SignalBorrowedBuffer server_keys, - SignalConstPointerPrivateKey signing_key, - const int8_t* cursor, - int32_t limit, - int64_t rng -); -SignalFfiError* signal_unauthenticated_chat_connection_backup_refresh( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalBorrowedBuffer credential, - SignalBorrowedBuffer server_keys, - SignalConstPointerPrivateKey signing_key, - int64_t rng -); -SignalFfiError* signal_unauthenticated_chat_connection_backup_set_public_key( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalBorrowedBuffer credential, - SignalBorrowedBuffer server_keys, - SignalConstPointerPrivateKey signing_key, - int64_t rng -); -SignalFfiError* signal_unauthenticated_chat_connection_check_svr_credentials( - SignalCPromiseOwnedBufferOfMaxAlignedPairOfCStringPtrAuthCheckResultFfiResult* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - const int8_t* number, - SignalBorrowedSliceOfCStringPtr credentials -); -SignalFfiError* signal_unauthenticated_chat_connection_connect( - SignalCPromiseMutPointerUnauthenticatedChatConnection* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerConnectionManager connection_manager, - SignalBorrowedBytestringArray languages -); -SignalFfiError* signal_unauthenticated_chat_connection_create_login_receipt_credential( - SignalCPromiseOwnedBuffer* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalPaymentProviderFfiArg payment_processor, - const int8_t* purchase_identifier, - SignalBorrowedBuffer receipt_credential_request_context, - SignalConstPointerServerPublicParams server_params, - uint64_t purchase_time -); -SignalFfiError* signal_unauthenticated_chat_connection_destroy( - SignalMutPointerUnauthenticatedChatConnection p -); -SignalFfiError* signal_unauthenticated_chat_connection_disconnect( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat -); -SignalFfiError* signal_unauthenticated_chat_connection_get_pre_keys_access_key_auth( - SignalCPromiseFfiPreKeysResponse* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - const SignalType_FixedArray16_uint8_t* auth, - const SignalType_FixedArray17_uint8_t* target, - int32_t device -); -SignalFfiError* signal_unauthenticated_chat_connection_get_pre_keys_group_auth( - SignalCPromiseFfiPreKeysResponse* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalBorrowedBuffer auth, - const SignalType_FixedArray17_uint8_t* target, - int32_t device -); -SignalFfiError* signal_unauthenticated_chat_connection_get_pre_keys_unrestricted_auth( - SignalCPromiseFfiPreKeysResponse* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - const SignalType_FixedArray17_uint8_t* target, - int32_t device -); -SignalFfiError* signal_unauthenticated_chat_connection_info( - SignalMutPointerChatConnectionInfo* out, - SignalConstPointerUnauthenticatedChatConnection chat -); -SignalFfiError* signal_unauthenticated_chat_connection_init_listener( - SignalConstPointerUnauthenticatedChatConnection chat, - SignalConstPointerFfiChatListenerStruct listener -); -SignalFfiError* signal_unauthenticated_chat_connection_look_up_username_hash( - SignalCPromiseOptionalUuid* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalBorrowedBuffer hash -); -SignalFfiError* signal_unauthenticated_chat_connection_look_up_username_link( - SignalCPromiseOptionalPairOfCStringPtrc_uchar32* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalUuid uuid, - SignalBorrowedBuffer entropy -); -SignalFfiError* signal_unauthenticated_chat_connection_send( - SignalCPromiseFfiChatResponse* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalConstPointerHttpRequest http_request, - uint32_t timeout_millis -); -SignalFfiError* signal_unauthenticated_chat_connection_send_message( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - const SignalType_FixedArray17_uint8_t* destination, - uint64_t timestamp, - SignalBorrowedSliceOfu32 device_ids, - SignalBorrowedSliceOfu32 registration_ids, - SignalBorrowedSliceOfBuffers contents, - uint8_t auth_kind, - SignalOptionalBorrowedSliceOfc_uchar auth_buffer, - bool online_only, - bool is_urgent -); -SignalFfiError* signal_unauthenticated_chat_connection_send_multi_recipient_message( - SignalCPromiseOwnedBufferOfc_uchar17* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalBorrowedBuffer payload, - uint64_t timestamp, - SignalBorrowedBuffer auth, - bool online_only, - bool is_urgent -); -SignalFfiError* signal_unauthenticated_chat_connection_submit_call_quality_survey( - SignalCPromisebool* promise, - SignalConstPointerTokioAsyncContext async_runtime, - SignalConstPointerUnauthenticatedChatConnection chat, - SignalCallQualitySurveyInternalFfiArg survey -); -SignalFfiError* signal_unidentified_sender_message_content_deserialize( - SignalMutPointerUnidentifiedSenderMessageContent* out, - SignalBorrowedBuffer data -); -SignalFfiError* signal_unidentified_sender_message_content_destroy( - SignalMutPointerUnidentifiedSenderMessageContent p -); -SignalFfiError* signal_unidentified_sender_message_content_get_content_hint( - uint32_t* out, - SignalConstPointerUnidentifiedSenderMessageContent m -); -SignalFfiError* signal_unidentified_sender_message_content_get_contents( - SignalOwnedBuffer* out, - SignalConstPointerUnidentifiedSenderMessageContent obj -); -SignalFfiError* signal_unidentified_sender_message_content_get_group_id_or_empty( - SignalOwnedBuffer* out, - SignalConstPointerUnidentifiedSenderMessageContent m -); -SignalFfiError* signal_unidentified_sender_message_content_get_msg_type( - uint8_t* out, - SignalConstPointerUnidentifiedSenderMessageContent m -); -SignalFfiError* signal_unidentified_sender_message_content_get_sender_cert( - SignalMutPointerSenderCertificate* out, - SignalConstPointerUnidentifiedSenderMessageContent m -); -SignalFfiError* signal_unidentified_sender_message_content_new( - SignalMutPointerUnidentifiedSenderMessageContent* out, - SignalConstPointerCiphertextMessage message, - SignalConstPointerSenderCertificate sender, - uint32_t content_hint, - SignalBorrowedBuffer group_id -); -SignalFfiError* signal_unidentified_sender_message_content_new_from_content_and_type( - SignalMutPointerUnidentifiedSenderMessageContent* out, - SignalBorrowedBuffer message_content, - uint8_t message_type, - SignalConstPointerSenderCertificate sender, - uint32_t content_hint, - SignalBorrowedBuffer group_id -); -SignalFfiError* signal_unidentified_sender_message_content_serialize( - SignalOwnedBuffer* out, - SignalConstPointerUnidentifiedSenderMessageContent obj -); -SignalFfiError* signal_username_candidates_from( - SignalBytestringArray* out, - const int8_t* nickname, - uint32_t min_len, - uint32_t max_len -); -SignalFfiError* signal_username_hash( - SignalType_FixedArray32_uint8_t* out, - const int8_t* username -); -SignalFfiError* signal_username_hash_from_parts( - SignalType_FixedArray32_uint8_t* out, - const int8_t* nickname, - const int8_t* discriminator, - uint32_t min_len, - uint32_t max_len -); -SignalFfiError* signal_username_link_create( - SignalOwnedBuffer* out, - const int8_t* username, - SignalBorrowedBuffer entropy -); -SignalFfiError* signal_username_link_decrypt_username( - SignalCStringPtr* out, - SignalBorrowedBuffer entropy, - SignalBorrowedBuffer encrypted_username -); -SignalFfiError* signal_username_proof( - SignalOwnedBuffer* out, - const int8_t* username, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_username_verify( - SignalBorrowedBuffer proof, - SignalBorrowedBuffer hash -); -SignalFfiError* signal_uuid_ciphertext_check_valid_contents( - SignalBorrowedBuffer buffer -); -SignalFfiError* signal_validating_mac_destroy( - SignalMutPointerValidatingMac p -); -SignalFfiError* signal_validating_mac_finalize( - int32_t* out, - SignalMutPointerValidatingMac mac -); -SignalFfiError* signal_validating_mac_initialize( - SignalMutPointerValidatingMac* out, - SignalBorrowedBuffer key, - uint32_t chunk_size, - SignalBorrowedBuffer digests -); -SignalFfiError* signal_validating_mac_update( - int32_t* out, - SignalMutPointerValidatingMac mac, - SignalBorrowedBuffer bytes, - uint32_t offset, - uint32_t length -); -SignalFfiError* signal_zk_credential_key_pair_check_valid_contents( - SignalBorrowedBuffer key_pair_bytes -); -SignalFfiError* signal_zk_credential_key_pair_generate_deterministic( - SignalOwnedBuffer* out, - const SignalType_FixedArray32_uint8_t* randomness -); -SignalFfiError* signal_zk_credential_key_pair_get_public_key( - SignalOwnedBuffer* out, - SignalBorrowedBuffer key_pair_bytes -); -SignalFfiError* signal_zk_credential_public_key_check_valid_contents( - SignalBorrowedBuffer public_key_bytes -); -typedef SignalBytestringArray SignalStringArray; -typedef SignalConstPointerFfiSyncInputStreamStruct SignalConstPointerFfiInputStreamStruct; -typedef SignalFfiIdentityKeyStoreStruct SignalIdentityKeyStore; -typedef SignalFfiKyberPreKeyStoreStruct SignalKyberPreKeyStore; -typedef SignalFfiPreKeyStoreStruct SignalPreKeyStore; -typedef SignalFfiSenderKeyStoreStruct SignalSenderKeyStore; -typedef SignalFfiSessionStoreStruct SignalSessionStore; -typedef SignalFfiSignedPreKeyStoreStruct SignalSignedPreKeyStore; -typedef SignalFfiSyncInputStreamStruct SignalFfiInputStreamStruct; -typedef SignalFfiSyncInputStreamStruct SignalInputStream; -typedef SignalFfiSyncInputStreamStruct SignalSyncInputStream; -typedef SignalOwnedBufferOfc_uchar17 SignalOwnedBufferOfServiceIdFixedWidthBinaryBytes; -typedef SignalRegistrationAccountAttributes SignalRegistrationAccountAttributes; -typedef SignalType_FixedArray16_uint8_t SignalReceiptSerialBytes; -typedef SignalType_FixedArray16_uint8_t SignalUidBytes; -typedef SignalType_FixedArray16_uint8_t SignalUnidentifiedAccessKey; -typedef SignalType_FixedArray17_uint8_t SignalServiceIdFixedWidthBinaryBytes; -typedef SignalType_FixedArray32_uint8_t SignalAesKeyBytes; -typedef SignalType_FixedArray32_uint8_t SignalBackupKeyBytes; -typedef SignalType_FixedArray32_uint8_t SignalGroupIdentifierBytes; -typedef SignalType_FixedArray32_uint8_t SignalGroupMasterKeyBytes; -typedef SignalType_FixedArray32_uint8_t SignalProfileKeyBytes; -typedef SignalType_FixedArray32_uint8_t SignalProfileKeyVersionBytes; -typedef SignalType_FixedArray32_uint8_t SignalRandomnessBytes; -typedef SignalType_FixedArray64_uint8_t SignalNotarySignatureBytes; -typedef SignalType_FixedArray64_uint8_t SignalProfileKeyVersionEncodedBytes; -typedef SignalType_FixedArray64_uint8_t SignalSignatureBytes; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void SignalFfiChatListenerReceivedQueueEmpty; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void SignalFfiLoggerFlush; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalFfiError SignalFfiChatListenerConnectionInterrupted; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalFfiError SignalFfiProvisioningListenerConnectionInterrupted; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerKyberPreKeyRecord_uint32_t SignalFfiKyberPreKeyStoreLoadKyberPreKey; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPreKeyRecord_uint32_t SignalFfiPreKeyStoreLoadPreKey; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerPublicKey_SignalMutPointerProtocolAddress SignalFfiIdentityKeyStoreGetIdentityKey; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSenderKeyRecord_SignalMutPointerProtocolAddress_SignalUuid SignalFfiSenderKeyStoreLoadSenderKey; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSessionRecord_SignalMutPointerProtocolAddress SignalFfiSessionStoreLoadSession; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalMutPointerSignedPreKeyRecord_uint32_t SignalFfiSignedPreKeyStoreLoadSignedPreKey; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_SignalPairOfMutPointerPrivateKeyMutPointerPublicKey SignalFfiIdentityKeyStoreGetLocalIdentityKeyPair; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_bool_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey_uint32_t SignalFfiIdentityKeyStoreIsTrustedIdentity; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_size_t_SignalBorrowedMutableBuffer SignalFfiSyncInputStreamRead; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint32_t SignalFfiIdentityKeyStoreGetLocalRegistrationId; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_MutPointer_uint8_t_SignalMutPointerProtocolAddress_SignalMutPointerPublicKey SignalFfiIdentityKeyStoreSaveIdentityKey; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_SignalBytestringArray SignalFfiChatListenerReceivedAlerts; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_SignalCStringPtr_SignalMutPointerServerMessageAck SignalFfiProvisioningListenerReceivedAddress; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_SignalLogLevel_SignalCStringPtr_uint32_t_SignalCStringPtr SignalFfiLoggerLog; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalMutPointerSessionRecord SignalFfiSessionStoreStoreSession; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_SignalMutPointerProtocolAddress_SignalUuid_SignalMutPointerSenderKeyRecord SignalFfiSenderKeyStoreStoreSenderKey; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_SignalMutPointerServerMessageAck SignalFfiProvisioningListenerReceivedEnvelope; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_SignalOwnedBuffer_uint64_t_SignalMutPointerServerMessageAck SignalFfiChatListenerReceivedIncomingMessage; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t SignalFfiPreKeyStoreRemovePreKey; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerKyberPreKeyRecord SignalFfiKyberPreKeyStoreStoreKyberPreKey; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerPreKeyRecord SignalFfiPreKeyStoreStorePreKey; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_SignalMutPointerSignedPreKeyRecord SignalFfiSignedPreKeyStoreStoreSignedPreKey; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_uint32_t_uint32_t_SignalMutPointerPublicKey SignalFfiKyberPreKeyStoreMarkKyberPreKeyUsed; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_uint64_t SignalFfiChatListenerReceivedServerTimestamp; -typedef SignalType_FunctionPointer_int32_t_MutPointer_void_uint64_t SignalFfiSyncInputStreamSkip; -typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiChatListenerDestroy; -typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiIdentityKeyStoreDestroy; -typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiKyberPreKeyStoreDestroy; -typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiLoggerDestroy; -typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiPreKeyStoreDestroy; -typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiProvisioningListenerDestroy; -typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiSenderKeyStoreDestroy; -typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiSessionStoreDestroy; -typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiSignedPreKeyStoreDestroy; -typedef SignalType_FunctionPointer_void_MutPointer_void SignalFfiSyncInputStreamDestroy; + const SignalProtocolAddress *raw; +} SignalConstPointerProtocolAddress; + +typedef struct { + SignalAes256Ctr32 *raw; +} SignalMutPointerAes256Ctr32; + +typedef struct { + const unsigned char *base; + size_t length; +} SignalBorrowedBuffer; + +typedef struct { + unsigned char *base; + size_t length; +} SignalBorrowedMutableBuffer; + +typedef struct { + SignalAes256GcmDecryption *raw; +} SignalMutPointerAes256GcmDecryption; + +/** + * A representation of a array allocated on the Rust heap for use in C code. + */ +typedef struct { + unsigned char *base; + /** + * The number of elements in the buffer (not necessarily the number of bytes). + */ + size_t length; +} SignalOwnedBuffer; + +typedef struct { + SignalAes256GcmEncryption *raw; +} SignalMutPointerAes256GcmEncryption; + +typedef struct { + const SignalAes256GcmSiv *raw; +} SignalConstPointerAes256GcmSiv; + +typedef struct { + SignalAes256GcmSiv *raw; +} SignalMutPointerAes256GcmSiv; + +typedef struct { + SignalAuthenticatedChatConnection *raw; +} SignalMutPointerAuthenticatedChatConnection; + typedef uint64_t SignalCancellationId; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const SignalMutPointerAuthenticatedChatConnection *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromiseMutPointerAuthenticatedChatConnection; + +typedef struct { + const SignalTokioAsyncContext *raw; +} SignalConstPointerTokioAsyncContext; + +typedef struct { + const SignalConnectionManager *raw; +} SignalConstPointerConnectionManager; + +typedef struct { + const size_t *base; + size_t length; +} SignalBorrowedSliceOfusize; + +typedef struct { + SignalBorrowedBuffer bytes; + SignalBorrowedSliceOfusize lengths; +} SignalBorrowedBytestringArray; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const bool *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromisebool; + +typedef struct { + const SignalAuthenticatedChatConnection *raw; +} SignalConstPointerAuthenticatedChatConnection; + +typedef SignalConnectionInfo SignalChatConnectionInfo; + +typedef struct { + SignalChatConnectionInfo *raw; +} SignalMutPointerChatConnectionInfo; + +typedef struct { + SignalServerMessageAck *raw; +} SignalMutPointerServerMessageAck; + +typedef int (*SignalFfiChatListenerReceivedIncomingMessage)(void *ctx, SignalOwnedBuffer envelope, uint64_t timestamp, SignalMutPointerServerMessageAck ack); + +typedef int (*SignalFfiChatListenerReceivedQueueEmpty)(void *ctx); + +/** + * A representation of a array allocated on the Rust heap for use in C code. + */ +typedef struct { + size_t *base; + /** + * The number of elements in the buffer (not necessarily the number of bytes). + */ + size_t length; +} SignalOwnedBufferOfusize; + +typedef struct { + SignalOwnedBuffer bytes; + SignalOwnedBufferOfusize lengths; +} SignalBytestringArray; + +typedef SignalBytestringArray SignalStringArray; + +typedef int (*SignalFfiChatListenerReceivedAlerts)(void *ctx, SignalStringArray alerts); + +typedef int (*SignalFfiChatListenerConnectionInterrupted)(void *ctx, SignalFfiError *disconnect_cause); + +typedef void (*SignalFfiChatListenerDestroy)(void *ctx); + +typedef struct { + void *ctx; + SignalFfiChatListenerReceivedIncomingMessage received_incoming_message; + SignalFfiChatListenerReceivedQueueEmpty received_queue_empty; + SignalFfiChatListenerReceivedAlerts received_alerts; + SignalFfiChatListenerConnectionInterrupted connection_interrupted; + SignalFfiChatListenerDestroy destroy; +} SignalFfiChatListenerStruct; + +typedef struct { + const SignalFfiChatListenerStruct *raw; +} SignalConstPointerFfiChatListenerStruct; + +/** + * A type alias to be used with [`OwnedBufferOf`], so that `OwnedBufferOf` and + * `OwnedBufferOf<*const c_char>` get distinct names. + */ +typedef const char *SignalCStringPtr; + +/** + * A representation of a array allocated on the Rust heap for use in C code. + */ +typedef struct { + SignalCStringPtr *base; + /** + * The number of elements in the buffer (not necessarily the number of bytes). + */ + size_t length; +} SignalOwnedBufferOfCStringPtr; + +typedef struct { + uint16_t status; + const char *message; + SignalOwnedBufferOfCStringPtr headers; + SignalOwnedBuffer body; +} SignalFfiChatResponse; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const SignalFfiChatResponse *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromiseFfiChatResponse; + +typedef struct { + const SignalHttpRequest *raw; +} SignalConstPointerHttpRequest; + +/** + * A wrapper type for raw UUIDs, because C treats arrays specially in argument position. + */ +typedef struct { + uint8_t bytes[16]; +} SignalUuid; + +/** + * The fixed-width binary representation of a ServiceId. + * + * Rarely used. The variable-width format that privileges ACIs is preferred. + */ +typedef uint8_t SignalServiceIdFixedWidthBinaryBytes[17]; + +typedef struct { + SignalPrivateKey *raw; +} SignalMutPointerPrivateKey; + +typedef struct { + SignalBackupRestoreResponse *raw; +} SignalMutPointerBackupRestoreResponse; + +typedef struct { + const SignalBackupRestoreResponse *raw; +} SignalConstPointerBackupRestoreResponse; + +typedef struct { + SignalBackupStoreResponse *raw; +} SignalMutPointerBackupStoreResponse; + +typedef struct { + const SignalBackupStoreResponse *raw; +} SignalConstPointerBackupStoreResponse; + +typedef struct { + SignalBridgedStringMap *raw; +} SignalMutPointerBridgedStringMap; + +typedef struct { + const SignalBridgedStringMap *raw; +} SignalConstPointerBridgedStringMap; + +typedef struct { + SignalSgxClientState *raw; +} SignalMutPointerSgxClientState; + +typedef struct { + /** + * Telephone number, as an unformatted e164. + */ + uint64_t e164; + uint8_t rawAciUuid[16]; + uint8_t rawPniUuid[16]; +} SignalFfiCdsiLookupResponseEntry; + +/** + * A representation of a array allocated on the Rust heap for use in C code. + */ +typedef struct { + SignalFfiCdsiLookupResponseEntry *base; + /** + * The number of elements in the buffer (not necessarily the number of bytes). + */ + size_t length; +} SignalOwnedBufferOfFfiCdsiLookupResponseEntry; + +typedef struct { + SignalOwnedBufferOfFfiCdsiLookupResponseEntry entries; + int32_t debug_permits_used; +} SignalFfiCdsiLookupResponse; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const SignalFfiCdsiLookupResponse *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromiseFfiCdsiLookupResponse; + +typedef struct { + const SignalCdsiLookup *raw; +} SignalConstPointerCdsiLookup; + +typedef struct { + SignalCdsiLookup *raw; +} SignalMutPointerCdsiLookup; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const SignalMutPointerCdsiLookup *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromiseMutPointerCdsiLookup; + +typedef struct { + const SignalLookupRequest *raw; +} SignalConstPointerLookupRequest; + +typedef struct { + const SignalChatConnectionInfo *raw; +} SignalConstPointerChatConnectionInfo; + +typedef struct { + SignalCiphertextMessage *raw; +} SignalMutPointerCiphertextMessage; + +typedef struct { + const SignalPlaintextContent *raw; +} SignalConstPointerPlaintextContent; + +typedef struct { + const SignalCiphertextMessage *raw; +} SignalConstPointerCiphertextMessage; + +typedef struct { + SignalConnectionInfo *raw; +} SignalMutPointerConnectionInfo; + +typedef struct { + SignalConnectionManager *raw; +} SignalMutPointerConnectionManager; + +typedef struct { + const SignalConnectionProxyConfig *raw; +} SignalConstPointerConnectionProxyConfig; + +typedef struct { + SignalConnectionProxyConfig *raw; +} SignalMutPointerConnectionProxyConfig; + +typedef struct { + const SignalMessage *raw; +} SignalConstPointerSignalMessage; + +typedef struct { + SignalSessionRecord *raw; +} SignalMutPointerSessionRecord; + +typedef int (*SignalFfiBridgeSessionStoreLoadSession)(void *ctx, SignalMutPointerSessionRecord *out, SignalMutPointerProtocolAddress address); + +typedef int (*SignalFfiBridgeSessionStoreStoreSession)(void *ctx, SignalMutPointerProtocolAddress address, SignalMutPointerSessionRecord record); + +typedef void (*SignalFfiBridgeSessionStoreDestroy)(void *ctx); + +typedef struct { + void *ctx; + SignalFfiBridgeSessionStoreLoadSession load_session; + SignalFfiBridgeSessionStoreStoreSession store_session; + SignalFfiBridgeSessionStoreDestroy destroy; +} SignalFfiBridgeSessionStoreStruct; + +typedef SignalFfiBridgeSessionStoreStruct SignalSessionStore; + +typedef struct { + const SignalSessionStore *raw; +} SignalConstPointerFfiSessionStoreStruct; + +typedef struct { + SignalPublicKey *raw; +} SignalMutPointerPublicKey; + +typedef struct { + SignalMutPointerPrivateKey first; + SignalMutPointerPublicKey second; +} SignalPairOfMutPointerPrivateKeyMutPointerPublicKey; + +typedef int (*SignalFfiBridgeIdentityKeyStoreGetLocalIdentityKeyPair)(void *ctx, SignalPairOfMutPointerPrivateKeyMutPointerPublicKey *out); + +typedef int (*SignalFfiBridgeIdentityKeyStoreGetLocalRegistrationId)(void *ctx, uint32_t *out); + +typedef int (*SignalFfiBridgeIdentityKeyStoreGetIdentityKey)(void *ctx, SignalMutPointerPublicKey *out, SignalMutPointerProtocolAddress address); + +typedef int (*SignalFfiBridgeIdentityKeyStoreSaveIdentityKey)(void *ctx, uint8_t *out, SignalMutPointerProtocolAddress address, SignalMutPointerPublicKey public_key); + +typedef int (*SignalFfiBridgeIdentityKeyStoreIsTrustedIdentity)(void *ctx, bool *out, SignalMutPointerProtocolAddress address, SignalMutPointerPublicKey public_key, uint32_t direction); + +typedef void (*SignalFfiBridgeIdentityKeyStoreDestroy)(void *ctx); + +typedef struct { + void *ctx; + SignalFfiBridgeIdentityKeyStoreGetLocalIdentityKeyPair get_local_identity_key_pair; + SignalFfiBridgeIdentityKeyStoreGetLocalRegistrationId get_local_registration_id; + SignalFfiBridgeIdentityKeyStoreGetIdentityKey get_identity_key; + SignalFfiBridgeIdentityKeyStoreSaveIdentityKey save_identity_key; + SignalFfiBridgeIdentityKeyStoreIsTrustedIdentity is_trusted_identity; + SignalFfiBridgeIdentityKeyStoreDestroy destroy; +} SignalFfiBridgeIdentityKeyStoreStruct; + +typedef SignalFfiBridgeIdentityKeyStoreStruct SignalIdentityKeyStore; + +typedef struct { + const SignalIdentityKeyStore *raw; +} SignalConstPointerFfiIdentityKeyStoreStruct; + +typedef struct { + const SignalPreKeySignalMessage *raw; +} SignalConstPointerPreKeySignalMessage; + +typedef struct { + SignalPreKeyRecord *raw; +} SignalMutPointerPreKeyRecord; + +typedef int (*SignalFfiBridgePreKeyStoreLoadPreKey)(void *ctx, SignalMutPointerPreKeyRecord *out, uint32_t id); + +typedef int (*SignalFfiBridgePreKeyStoreStorePreKey)(void *ctx, uint32_t id, SignalMutPointerPreKeyRecord record); + +typedef int (*SignalFfiBridgePreKeyStoreRemovePreKey)(void *ctx, uint32_t id); + +typedef void (*SignalFfiBridgePreKeyStoreDestroy)(void *ctx); + +typedef struct { + void *ctx; + SignalFfiBridgePreKeyStoreLoadPreKey load_pre_key; + SignalFfiBridgePreKeyStoreStorePreKey store_pre_key; + SignalFfiBridgePreKeyStoreRemovePreKey remove_pre_key; + SignalFfiBridgePreKeyStoreDestroy destroy; +} SignalFfiBridgePreKeyStoreStruct; + +typedef SignalFfiBridgePreKeyStoreStruct SignalPreKeyStore; + +typedef struct { + const SignalPreKeyStore *raw; +} SignalConstPointerFfiPreKeyStoreStruct; + +typedef struct { + SignalSignedPreKeyRecord *raw; +} SignalMutPointerSignedPreKeyRecord; + +typedef int (*SignalFfiBridgeSignedPreKeyStoreLoadSignedPreKey)(void *ctx, SignalMutPointerSignedPreKeyRecord *out, uint32_t id); + +typedef int (*SignalFfiBridgeSignedPreKeyStoreStoreSignedPreKey)(void *ctx, uint32_t id, SignalMutPointerSignedPreKeyRecord record); + +typedef void (*SignalFfiBridgeSignedPreKeyStoreDestroy)(void *ctx); + +typedef struct { + void *ctx; + SignalFfiBridgeSignedPreKeyStoreLoadSignedPreKey load_signed_pre_key; + SignalFfiBridgeSignedPreKeyStoreStoreSignedPreKey store_signed_pre_key; + SignalFfiBridgeSignedPreKeyStoreDestroy destroy; +} SignalFfiBridgeSignedPreKeyStoreStruct; + +typedef SignalFfiBridgeSignedPreKeyStoreStruct SignalSignedPreKeyStore; + +typedef struct { + const SignalSignedPreKeyStore *raw; +} SignalConstPointerFfiSignedPreKeyStoreStruct; + +typedef struct { + SignalKyberPreKeyRecord *raw; +} SignalMutPointerKyberPreKeyRecord; + +typedef int (*SignalFfiBridgeKyberPreKeyStoreLoadKyberPreKey)(void *ctx, SignalMutPointerKyberPreKeyRecord *out, uint32_t id); + +typedef int (*SignalFfiBridgeKyberPreKeyStoreStoreKyberPreKey)(void *ctx, uint32_t id, SignalMutPointerKyberPreKeyRecord record); + +typedef int (*SignalFfiBridgeKyberPreKeyStoreMarkKyberPreKeyUsed)(void *ctx, uint32_t id, uint32_t ec_prekey_id, SignalMutPointerPublicKey base_key); + +typedef void (*SignalFfiBridgeKyberPreKeyStoreDestroy)(void *ctx); + +typedef struct { + void *ctx; + SignalFfiBridgeKyberPreKeyStoreLoadKyberPreKey load_kyber_pre_key; + SignalFfiBridgeKyberPreKeyStoreStoreKyberPreKey store_kyber_pre_key; + SignalFfiBridgeKyberPreKeyStoreMarkKyberPreKeyUsed mark_kyber_pre_key_used; + SignalFfiBridgeKyberPreKeyStoreDestroy destroy; +} SignalFfiBridgeKyberPreKeyStoreStruct; + +typedef SignalFfiBridgeKyberPreKeyStoreStruct SignalKyberPreKeyStore; + +typedef struct { + const SignalKyberPreKeyStore *raw; +} SignalConstPointerFfiKyberPreKeyStoreStruct; + +typedef struct { + SignalDecryptionErrorMessage *raw; +} SignalMutPointerDecryptionErrorMessage; + +typedef struct { + const SignalDecryptionErrorMessage *raw; +} SignalConstPointerDecryptionErrorMessage; + +/** + * Like [`std::panic::AssertUnwindSafe`], but FFI-compatible. + */ +typedef const SignalFfiError *SignalUnwindSafeArgSignalFfiError; + +typedef struct { + const char *first; + uint32_t second; +} SignalPairOfc_charu32; + +/** + * A representation of a array allocated on the Rust heap for use in C code. + */ +typedef struct { + uint32_t *base; + /** + * The number of elements in the buffer (not necessarily the number of bytes). + */ + size_t length; +} SignalOwnedBufferOfu32; + +typedef struct { + SignalServiceIdFixedWidthBinaryBytes account; + SignalOwnedBufferOfu32 missing_devices; + SignalOwnedBufferOfu32 extra_devices; + SignalOwnedBufferOfu32 stale_devices; +} SignalFfiMismatchedDevicesError; + +/** + * A representation of a array allocated on the Rust heap for use in C code. + */ +typedef struct { + SignalFfiMismatchedDevicesError *base; + /** + * The number of elements in the buffer (not necessarily the number of bytes). + */ + size_t length; +} SignalOwnedBufferOfFfiMismatchedDevicesError; + +typedef struct { + const char *first; + SignalOwnedBuffer second; +} SignalPairOfc_charOwnedBufferOfc_uchar; + +typedef struct { + const char *first; + bool second; +} SignalPairOfc_charbool; + +typedef struct { + SignalFingerprint *raw; +} SignalMutPointerFingerprint; + +typedef struct { + const SignalFingerprint *raw; +} SignalConstPointerFingerprint; + +typedef struct { + const SignalPublicKey *raw; +} SignalConstPointerPublicKey; + +typedef struct { + /** + * The badge ID. + */ + const char *id; + /** + * Whether the badge is currently configured to be visible. + */ + bool visible; + /** + * When the badge expires. + */ + double expiration_secs; +} SignalFfiRegisterResponseBadge; + +/** + * A representation of a array allocated on the Rust heap for use in C code. + */ +typedef struct { + SignalFfiRegisterResponseBadge *base; + /** + * The number of elements in the buffer (not necessarily the number of bytes). + */ + size_t length; +} SignalOwnedBufferOfFfiRegisterResponseBadge; + +/** + * A representation of a array allocated on the Rust heap for use in C code. + */ +typedef struct { + SignalServiceIdFixedWidthBinaryBytes *base; + /** + * The number of elements in the buffer (not necessarily the number of bytes). + */ + size_t length; +} SignalOwnedBufferOfServiceIdFixedWidthBinaryBytes; + +typedef struct { + SignalPreKeyBundle *raw; +} SignalMutPointerPreKeyBundle; + +/** + * A representation of a array allocated on the Rust heap for use in C code. + */ +typedef struct { + SignalMutPointerPreKeyBundle *base; + /** + * The number of elements in the buffer (not necessarily the number of bytes). + */ + size_t length; +} SignalOwnedBufferOfMutPointerPreKeyBundle; + +typedef struct { + SignalSenderKeyRecord *raw; +} SignalMutPointerSenderKeyRecord; + +typedef int (*SignalFfiBridgeSenderKeyStoreLoadSenderKey)(void *ctx, SignalMutPointerSenderKeyRecord *out, SignalMutPointerProtocolAddress sender, SignalUuid distribution_id); + +typedef int (*SignalFfiBridgeSenderKeyStoreStoreSenderKey)(void *ctx, SignalMutPointerProtocolAddress sender, SignalUuid distribution_id, SignalMutPointerSenderKeyRecord record); + +typedef void (*SignalFfiBridgeSenderKeyStoreDestroy)(void *ctx); + +typedef struct { + void *ctx; + SignalFfiBridgeSenderKeyStoreLoadSenderKey load_sender_key; + SignalFfiBridgeSenderKeyStoreStoreSenderKey store_sender_key; + SignalFfiBridgeSenderKeyStoreDestroy destroy; +} SignalFfiBridgeSenderKeyStoreStruct; + +typedef SignalFfiBridgeSenderKeyStoreStruct SignalSenderKeyStore; + +typedef struct { + const SignalSenderKeyStore *raw; +} SignalConstPointerFfiSenderKeyStoreStruct; + +typedef struct { + const SignalServerSecretParams *raw; +} SignalConstPointerServerSecretParams; + +typedef struct { + const SignalBorrowedBuffer *base; + size_t length; +} SignalBorrowedSliceOfBuffers; + +typedef struct { + const SignalServerPublicParams *raw; +} SignalConstPointerServerPublicParams; + +typedef struct { + SignalHsmEnclaveClient *raw; +} SignalMutPointerHsmEnclaveClient; + +typedef struct { + const SignalHsmEnclaveClient *raw; +} SignalConstPointerHsmEnclaveClient; + +typedef struct { + SignalHttpRequest *raw; +} SignalMutPointerHttpRequest; + +typedef struct { + SignalMutPointerPublicKey first; + SignalMutPointerPrivateKey second; +} SignalPairOfMutPointerPublicKeyMutPointerPrivateKey; + +typedef struct { + const SignalPrivateKey *raw; +} SignalConstPointerPrivateKey; + +typedef struct { + SignalIncrementalMac *raw; +} SignalMutPointerIncrementalMac; + +typedef void (*SignalLogCallback)(void *ctx, SignalLogLevel level, const char *file, uint32_t line, const char *message); + +typedef void (*SignalLogFlushCallback)(void *ctx); + +typedef struct { + void *ctx; + SignalLogCallback log; + SignalLogFlushCallback flush; +} SignalFfiLogger; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const SignalOwnedBuffer *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromiseOwnedBufferOfc_uchar; + +typedef struct { + const SignalUnauthenticatedChatConnection *raw; +} SignalConstPointerUnauthenticatedChatConnection; + +typedef struct { + bool present; + SignalBorrowedBuffer value; +} SignalOptionalBorrowedSliceOfc_uchar; + +typedef SignalKeyPair SignalKyberKeyPair; + +typedef struct { + SignalKyberKeyPair *raw; +} SignalMutPointerKyberKeyPair; + +typedef struct { + const SignalKyberKeyPair *raw; +} SignalConstPointerKyberKeyPair; + +typedef SignalPublicKey SignalKyberPublicKey; + +typedef struct { + SignalKyberPublicKey *raw; +} SignalMutPointerKyberPublicKey; + +/** + * A KEM secret key with the ability to decapsulate a shared secret. + */ +typedef SignalKeySecret SignalSecretKey; + +typedef SignalSecretKey SignalKyberSecretKey; + +typedef struct { + SignalKyberSecretKey *raw; +} SignalMutPointerKyberSecretKey; + +typedef struct { + const SignalKyberPreKeyRecord *raw; +} SignalConstPointerKyberPreKeyRecord; + +typedef struct { + const SignalKyberPublicKey *raw; +} SignalConstPointerKyberPublicKey; + +typedef struct { + const SignalKyberSecretKey *raw; +} SignalConstPointerKyberSecretKey; + +typedef struct { + SignalLookupRequest *raw; +} SignalMutPointerLookupRequest; + +typedef struct { + SignalMessageBackupKey *raw; +} SignalMutPointerMessageBackupKey; + +typedef struct { + const SignalMessageBackupKey *raw; +} SignalConstPointerMessageBackupKey; + +typedef struct { + SignalMessageBackupValidationOutcome *raw; +} SignalMutPointerMessageBackupValidationOutcome; + +typedef struct { + const SignalMessageBackupValidationOutcome *raw; +} SignalConstPointerMessageBackupValidationOutcome; + +typedef int (*SignalFfiBridgeInputStreamRead)(void *ctx, size_t *out, SignalBorrowedMutableBuffer buf); + +typedef int (*SignalFfiBridgeInputStreamSkip)(void *ctx, uint64_t amount); + +typedef void (*SignalFfiBridgeInputStreamDestroy)(void *ctx); + +typedef struct { + void *ctx; + SignalFfiBridgeInputStreamRead read; + SignalFfiBridgeInputStreamSkip skip; + SignalFfiBridgeInputStreamDestroy destroy; +} SignalFfiBridgeInputStreamStruct; + +typedef SignalFfiBridgeInputStreamStruct SignalInputStream; + +typedef struct { + const SignalInputStream *raw; +} SignalConstPointerFfiInputStreamStruct; + +typedef struct { + SignalMessage *raw; +} SignalMutPointerSignalMessage; + +typedef struct { + SignalSanitizedMetadata *raw; +} SignalMutPointerSanitizedMetadata; + +typedef struct { + SignalOnlineBackupValidator *raw; +} SignalMutPointerOnlineBackupValidator; + +typedef struct { + const SignalPinHash *raw; +} SignalConstPointerPinHash; + +typedef struct { + SignalPinHash *raw; +} SignalMutPointerPinHash; + +typedef struct { + SignalPlaintextContent *raw; +} SignalMutPointerPlaintextContent; + +typedef struct { + const SignalPreKeyBundle *raw; +} SignalConstPointerPreKeyBundle; + +typedef struct { + const SignalPreKeyRecord *raw; +} SignalConstPointerPreKeyRecord; + +typedef struct { + SignalPreKeySignalMessage *raw; +} SignalMutPointerPreKeySignalMessage; + +typedef struct { + const SignalSenderKeyDistributionMessage *raw; +} SignalConstPointerSenderKeyDistributionMessage; + +typedef struct { + SignalProvisioningChatConnection *raw; +} SignalMutPointerProvisioningChatConnection; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const SignalMutPointerProvisioningChatConnection *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromiseMutPointerProvisioningChatConnection; + +typedef struct { + const SignalProvisioningChatConnection *raw; +} SignalConstPointerProvisioningChatConnection; + +typedef int (*SignalFfiProvisioningListenerReceivedAddress)(void *ctx, const char *address, SignalMutPointerServerMessageAck send_ack); + +typedef int (*SignalFfiProvisioningListenerReceivedEnvelope)(void *ctx, SignalOwnedBuffer envelope, SignalMutPointerServerMessageAck send_ack); + +typedef int (*SignalFfiProvisioningListenerConnectionInterrupted)(void *ctx, SignalFfiError *disconnect_cause); + +typedef void (*SignalFfiProvisioningListenerDestroy)(void *ctx); + +typedef struct { + void *ctx; + SignalFfiProvisioningListenerReceivedAddress received_address; + SignalFfiProvisioningListenerReceivedEnvelope received_envelope; + SignalFfiProvisioningListenerConnectionInterrupted connection_interrupted; + SignalFfiProvisioningListenerDestroy destroy; +} SignalFfiProvisioningListenerStruct; + +typedef struct { + const SignalFfiProvisioningListenerStruct *raw; +} SignalConstPointerFfiProvisioningListenerStruct; + +typedef struct { + SignalRegisterAccountRequest *raw; +} SignalMutPointerRegisterAccountRequest; + +typedef struct { + const SignalRegisterAccountRequest *raw; +} SignalConstPointerRegisterAccountRequest; + +typedef struct { + uint32_t key_id; + SignalFfiPublicKeyType public_key_type; + const void *public_key; + SignalBorrowedBuffer signature; +} SignalFfiSignedPublicPreKey; + +typedef struct { + SignalRegisterAccountResponse *raw; +} SignalMutPointerRegisterAccountResponse; + +typedef struct { + const SignalRegisterAccountResponse *raw; +} SignalConstPointerRegisterAccountResponse; + +typedef struct { + bool present; + uint8_t bytes[16]; +} SignalOptionalUuid; + +typedef SignalAccountAttributes SignalRegistrationAccountAttributes; + +typedef struct { + SignalRegistrationAccountAttributes *raw; +} SignalMutPointerRegistrationAccountAttributes; + +typedef struct { + /** + * Bridged as a string of bytes, but each entry is a UTF-8 `String` key + * concatenated with a byte for the value. + */ + SignalBytestringArray entries; +} SignalFfiCheckSvr2CredentialsResponse; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const SignalFfiCheckSvr2CredentialsResponse *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromiseFfiCheckSvr2CredentialsResponse; + +typedef struct { + const SignalRegistrationService *raw; +} SignalConstPointerRegistrationService; + +typedef struct { + SignalRegistrationService *raw; +} SignalMutPointerRegistrationService; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const SignalMutPointerRegistrationService *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromiseMutPointerRegistrationService; + +typedef struct { + const char *number; + const char *push_token; + const char *mcc; + const char *mnc; +} SignalFfiRegistrationCreateSessionRequest; + +typedef const SignalConnectionManager *(*SignalGetConnectChatConnectionManager)(void *ctx); + +typedef void (*SignalDestroyConnectChatBridge)(void *ctx); + +/** + * A ref-counting pointer to a [`ConnectionManager`] and a callback to + * decrement the count. + */ +typedef struct { + void *ctx; + SignalGetConnectChatConnectionManager get_connection_manager; + SignalDestroyConnectChatBridge destroy; +} SignalFfiConnectChatBridgeStruct; + +typedef struct { + const SignalFfiConnectChatBridgeStruct *raw; +} SignalConstPointerFfiConnectChatBridgeStruct; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const SignalMutPointerRegisterAccountResponse *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromiseMutPointerRegisterAccountResponse; + +typedef struct { + const SignalRegistrationAccountAttributes *raw; +} SignalConstPointerRegistrationAccountAttributes; + +typedef struct { + SignalRegistrationSession *raw; +} SignalMutPointerRegistrationSession; + +typedef struct { + const SignalRegistrationSession *raw; +} SignalConstPointerRegistrationSession; + +typedef struct { + const SignalSanitizedMetadata *raw; +} SignalConstPointerSanitizedMetadata; + +typedef struct { + const SignalConstPointerProtocolAddress *base; + size_t length; +} SignalBorrowedSliceOfConstPointerProtocolAddress; + +typedef struct { + const SignalSessionRecord *raw; +} SignalConstPointerSessionRecord; + +typedef struct { + const SignalConstPointerSessionRecord *base; + size_t length; +} SignalBorrowedSliceOfConstPointerSessionRecord; + +typedef struct { + const SignalUnidentifiedSenderMessageContent *raw; +} SignalConstPointerUnidentifiedSenderMessageContent; + +typedef struct { + SignalUnidentifiedSenderMessageContent *raw; +} SignalMutPointerUnidentifiedSenderMessageContent; + +typedef uint8_t SignalBackupKeyBytes[SignalBACKUP_KEY_LEN]; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const SignalMutPointerBackupRestoreResponse *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromiseMutPointerBackupRestoreResponse; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const SignalMutPointerBackupStoreResponse *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromiseMutPointerBackupStoreResponse; + +typedef struct { + SignalSenderCertificate *raw; +} SignalMutPointerSenderCertificate; + +typedef struct { + const SignalSenderCertificate *raw; +} SignalConstPointerSenderCertificate; + +typedef struct { + SignalServerCertificate *raw; +} SignalMutPointerServerCertificate; + +typedef struct { + const SignalServerCertificate *raw; +} SignalConstPointerServerCertificate; + +typedef struct { + const SignalConstPointerPublicKey *base; + size_t length; +} SignalBorrowedSliceOfConstPointerPublicKey; + +typedef struct { + SignalSenderKeyDistributionMessage *raw; +} SignalMutPointerSenderKeyDistributionMessage; + +typedef struct { + SignalSenderKeyMessage *raw; +} SignalMutPointerSenderKeyMessage; + +typedef struct { + const SignalSenderKeyMessage *raw; +} SignalConstPointerSenderKeyMessage; + +typedef struct { + const SignalSenderKeyRecord *raw; +} SignalConstPointerSenderKeyRecord; + +typedef struct { + const SignalServerMessageAck *raw; +} SignalConstPointerServerMessageAck; + +typedef struct { + SignalServerPublicParams *raw; +} SignalMutPointerServerPublicParams; + +typedef struct { + SignalServerSecretParams *raw; +} SignalMutPointerServerSecretParams; + +typedef struct { + const SignalSgxClientState *raw; +} SignalConstPointerSgxClientState; + +typedef struct { + const SignalSignedPreKeyRecord *raw; +} SignalConstPointerSignedPreKeyRecord; + +typedef struct { + SignalTokioAsyncContext *raw; +} SignalMutPointerTokioAsyncContext; + +typedef struct { + SignalUnauthenticatedChatConnection *raw; +} SignalMutPointerUnauthenticatedChatConnection; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const SignalMutPointerUnauthenticatedChatConnection *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromiseMutPointerUnauthenticatedChatConnection; + +typedef struct { + SignalMutPointerPublicKey identity_key; + SignalOwnedBufferOfMutPointerPreKeyBundle pre_key_bundles; +} SignalFfiPreKeysResponse; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const SignalFfiPreKeysResponse *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromiseFfiPreKeysResponse; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const SignalOptionalUuid *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromiseOptionalUuid; + +typedef struct { + bool present; + const char *first; + uint8_t second[32]; +} SignalOptionalPairOfc_charu832; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const SignalOptionalPairOfc_charu832 *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromiseOptionalPairOfc_charu832; + +/** + * A C callback used to report the results of Rust futures. + * + * cbindgen will produce independent C types like `SignalCPromisei32` and + * `SignalCPromiseProtocolAddress`. + * + * This derives Copy because it behaves like a C type; nevertheless, a promise should still only be + * completed once. + */ +typedef struct { + void (*complete)(SignalFfiError *error, const SignalOwnedBufferOfServiceIdFixedWidthBinaryBytes *result, const void *context); + const void *context; + SignalCancellationId cancellation_id; +} SignalCPromiseOwnedBufferOfServiceIdFixedWidthBinaryBytes; + +typedef struct { + SignalValidatingMac *raw; +} SignalMutPointerValidatingMac; + +typedef SignalFfiBridgeInputStreamStruct SignalFfiBridgeSyncInputStreamStruct; + +typedef SignalFfiBridgeSyncInputStreamStruct SignalSyncInputStream; + +typedef struct { + const SignalSyncInputStream *raw; +} SignalConstPointerFfiSyncInputStreamStruct; + +typedef uint8_t SignalRandomnessBytes[SignalRANDOMNESS_LEN]; + +typedef uint8_t SignalUnidentifiedAccessKey[SignalACCESS_KEY_LEN]; + + + +SignalFfiError *signal_account_entropy_pool_derive_backup_key(uint8_t (*out)[SignalBACKUP_KEY_LEN], const char *account_entropy); + +SignalFfiError *signal_account_entropy_pool_derive_svr_key(uint8_t (*out)[SignalSVR_KEY_LEN], const char *account_entropy); + +SignalFfiError *signal_account_entropy_pool_generate(const char **out); + +SignalFfiError *signal_account_entropy_pool_is_valid(bool *out, const char *account_entropy); + +SignalFfiError *signal_address_clone(SignalMutPointerProtocolAddress *new_obj, SignalConstPointerProtocolAddress obj); + +SignalFfiError *signal_address_destroy(SignalMutPointerProtocolAddress p); + +SignalFfiError *signal_address_get_device_id(uint32_t *out, SignalConstPointerProtocolAddress obj); + +SignalFfiError *signal_address_get_name(const char **out, SignalConstPointerProtocolAddress obj); + +SignalFfiError *signal_address_new(SignalMutPointerProtocolAddress *out, const char *name, uint32_t device_id); + +SignalFfiError *signal_aes256_ctr32_destroy(SignalMutPointerAes256Ctr32 p); + +SignalFfiError *signal_aes256_ctr32_new(SignalMutPointerAes256Ctr32 *out, SignalBorrowedBuffer key, SignalBorrowedBuffer nonce, uint32_t initial_ctr); + +SignalFfiError *signal_aes256_ctr32_process(SignalMutPointerAes256Ctr32 ctr, SignalBorrowedMutableBuffer data, uint32_t offset, uint32_t length); + +SignalFfiError *signal_aes256_gcm_decryption_destroy(SignalMutPointerAes256GcmDecryption p); + +SignalFfiError *signal_aes256_gcm_decryption_new(SignalMutPointerAes256GcmDecryption *out, SignalBorrowedBuffer key, SignalBorrowedBuffer nonce, SignalBorrowedBuffer associated_data); + +SignalFfiError *signal_aes256_gcm_decryption_update(SignalMutPointerAes256GcmDecryption gcm, SignalBorrowedMutableBuffer data, uint32_t offset, uint32_t length); + +SignalFfiError *signal_aes256_gcm_decryption_verify_tag(bool *out, SignalMutPointerAes256GcmDecryption gcm, SignalBorrowedBuffer tag); + +SignalFfiError *signal_aes256_gcm_encryption_compute_tag(SignalOwnedBuffer *out, SignalMutPointerAes256GcmEncryption gcm); + +SignalFfiError *signal_aes256_gcm_encryption_destroy(SignalMutPointerAes256GcmEncryption p); + +SignalFfiError *signal_aes256_gcm_encryption_new(SignalMutPointerAes256GcmEncryption *out, SignalBorrowedBuffer key, SignalBorrowedBuffer nonce, SignalBorrowedBuffer associated_data); + +SignalFfiError *signal_aes256_gcm_encryption_update(SignalMutPointerAes256GcmEncryption gcm, SignalBorrowedMutableBuffer data, uint32_t offset, uint32_t length); + +SignalFfiError *signal_aes256_gcm_siv_decrypt(SignalOwnedBuffer *out, SignalConstPointerAes256GcmSiv aes_gcm_siv, SignalBorrowedBuffer ctext, SignalBorrowedBuffer nonce, SignalBorrowedBuffer associated_data); + +SignalFfiError *signal_aes256_gcm_siv_destroy(SignalMutPointerAes256GcmSiv p); + +SignalFfiError *signal_aes256_gcm_siv_encrypt(SignalOwnedBuffer *out, SignalConstPointerAes256GcmSiv aes_gcm_siv_obj, SignalBorrowedBuffer ptext, SignalBorrowedBuffer nonce, SignalBorrowedBuffer associated_data); + +SignalFfiError *signal_aes256_gcm_siv_new(SignalMutPointerAes256GcmSiv *out, SignalBorrowedBuffer key); + +SignalFfiError *signal_auth_credential_presentation_check_valid_contents(SignalBorrowedBuffer presentation_bytes); + +SignalFfiError *signal_auth_credential_presentation_get_pni_ciphertext(unsigned char (*out)[SignalUUID_CIPHERTEXT_LEN], SignalBorrowedBuffer presentation_bytes); + +SignalFfiError *signal_auth_credential_presentation_get_redemption_time(uint64_t *out, SignalBorrowedBuffer presentation_bytes); + +SignalFfiError *signal_auth_credential_presentation_get_uuid_ciphertext(unsigned char (*out)[SignalUUID_CIPHERTEXT_LEN], SignalBorrowedBuffer presentation_bytes); + +SignalFfiError *signal_auth_credential_with_pni_check_valid_contents(SignalBorrowedBuffer bytes); + +SignalFfiError *signal_auth_credential_with_pni_response_check_valid_contents(SignalBorrowedBuffer bytes); + +SignalFfiError *signal_authenticated_chat_connection_connect(SignalCPromiseMutPointerAuthenticatedChatConnection *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerConnectionManager connection_manager, const char *username, const char *password, bool receive_stories, SignalBorrowedBytestringArray languages); + +SignalFfiError *signal_authenticated_chat_connection_destroy(SignalMutPointerAuthenticatedChatConnection p); + +SignalFfiError *signal_authenticated_chat_connection_disconnect(SignalCPromisebool *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerAuthenticatedChatConnection chat); + +SignalFfiError *signal_authenticated_chat_connection_info(SignalMutPointerChatConnectionInfo *out, SignalConstPointerAuthenticatedChatConnection chat); + +SignalFfiError *signal_authenticated_chat_connection_init_listener(SignalConstPointerAuthenticatedChatConnection chat, SignalConstPointerFfiChatListenerStruct listener); + +SignalFfiError *signal_authenticated_chat_connection_preconnect(SignalCPromisebool *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerConnectionManager connection_manager); + +SignalFfiError *signal_authenticated_chat_connection_send(SignalCPromiseFfiChatResponse *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerAuthenticatedChatConnection chat, SignalConstPointerHttpRequest http_request, uint32_t timeout_millis); + +SignalFfiError *signal_backup_auth_credential_check_valid_contents(SignalBorrowedBuffer params_bytes); + +SignalFfiError *signal_backup_auth_credential_get_backup_id(uint8_t (*out)[16], SignalBorrowedBuffer credential_bytes); + +SignalFfiError *signal_backup_auth_credential_get_backup_level(uint8_t *out, SignalBorrowedBuffer credential_bytes); + +SignalFfiError *signal_backup_auth_credential_get_type(uint8_t *out, SignalBorrowedBuffer credential_bytes); + +SignalFfiError *signal_backup_auth_credential_present_deterministic(SignalOwnedBuffer *out, SignalBorrowedBuffer credential_bytes, SignalBorrowedBuffer server_params_bytes, const uint8_t (*randomness)[SignalRANDOMNESS_LEN]); + +SignalFfiError *signal_backup_auth_credential_presentation_check_valid_contents(SignalBorrowedBuffer presentation_bytes); + +SignalFfiError *signal_backup_auth_credential_presentation_verify(SignalBorrowedBuffer presentation_bytes, uint64_t now, SignalBorrowedBuffer server_params_bytes); + +SignalFfiError *signal_backup_auth_credential_request_check_valid_contents(SignalBorrowedBuffer request_bytes); + +SignalFfiError *signal_backup_auth_credential_request_context_check_valid_contents(SignalBorrowedBuffer context_bytes); + +SignalFfiError *signal_backup_auth_credential_request_context_get_request(SignalOwnedBuffer *out, SignalBorrowedBuffer context_bytes); + +SignalFfiError *signal_backup_auth_credential_request_context_new(SignalOwnedBuffer *out, const uint8_t (*backup_key)[32], SignalUuid uuid); + +SignalFfiError *signal_backup_auth_credential_request_context_receive_response(SignalOwnedBuffer *out, SignalBorrowedBuffer context_bytes, SignalBorrowedBuffer response_bytes, uint64_t expected_redemption_time, SignalBorrowedBuffer params_bytes); + +SignalFfiError *signal_backup_auth_credential_request_issue_deterministic(SignalOwnedBuffer *out, SignalBorrowedBuffer request_bytes, uint64_t redemption_time, uint8_t backup_level, uint8_t credential_type, SignalBorrowedBuffer params_bytes, const uint8_t (*randomness)[SignalRANDOMNESS_LEN]); + +SignalFfiError *signal_backup_auth_credential_response_check_valid_contents(SignalBorrowedBuffer response_bytes); + +SignalFfiError *signal_backup_key_derive_backup_id(uint8_t (*out)[16], const uint8_t (*backup_key)[SignalBACKUP_KEY_LEN], const SignalServiceIdFixedWidthBinaryBytes *aci); + +SignalFfiError *signal_backup_key_derive_ec_key(SignalMutPointerPrivateKey *out, const uint8_t (*backup_key)[SignalBACKUP_KEY_LEN], const SignalServiceIdFixedWidthBinaryBytes *aci); + +SignalFfiError *signal_backup_key_derive_local_backup_metadata_key(uint8_t (*out)[SignalLOCAL_BACKUP_METADATA_KEY_LEN], const uint8_t (*backup_key)[SignalBACKUP_KEY_LEN]); + +SignalFfiError *signal_backup_key_derive_media_encryption_key(uint8_t (*out)[SignalMEDIA_ENCRYPTION_KEY_LEN], const uint8_t (*backup_key)[SignalBACKUP_KEY_LEN], const uint8_t (*media_id)[SignalMEDIA_ID_LEN]); + +SignalFfiError *signal_backup_key_derive_media_id(uint8_t (*out)[SignalMEDIA_ID_LEN], const uint8_t (*backup_key)[SignalBACKUP_KEY_LEN], const char *media_name); + +SignalFfiError *signal_backup_key_derive_thumbnail_transit_encryption_key(uint8_t (*out)[SignalMEDIA_ENCRYPTION_KEY_LEN], const uint8_t (*backup_key)[SignalBACKUP_KEY_LEN], const uint8_t (*media_id)[SignalMEDIA_ID_LEN]); + +SignalFfiError *signal_backup_restore_response_destroy(SignalMutPointerBackupRestoreResponse p); + +SignalFfiError *signal_backup_restore_response_get_forward_secrecy_token(uint8_t (*out)[SignalBACKUP_FORWARD_SECRECY_TOKEN_LEN], SignalConstPointerBackupRestoreResponse response); + +SignalFfiError *signal_backup_restore_response_get_next_backup_secret_data(SignalOwnedBuffer *out, SignalConstPointerBackupRestoreResponse response); + +SignalFfiError *signal_backup_store_response_destroy(SignalMutPointerBackupStoreResponse p); + +SignalFfiError *signal_backup_store_response_get_forward_secrecy_token(uint8_t (*out)[SignalBACKUP_FORWARD_SECRECY_TOKEN_LEN], SignalConstPointerBackupStoreResponse response); + +SignalFfiError *signal_backup_store_response_get_next_backup_secret_data(SignalOwnedBuffer *out, SignalConstPointerBackupStoreResponse response); + +SignalFfiError *signal_backup_store_response_get_opaque_metadata(SignalOwnedBuffer *out, SignalConstPointerBackupStoreResponse response); + +SignalFfiError *signal_bridged_string_map_clone(SignalMutPointerBridgedStringMap *new_obj, SignalConstPointerBridgedStringMap obj); + +SignalFfiError *signal_bridged_string_map_destroy(SignalMutPointerBridgedStringMap p); + +SignalFfiError *signal_bridged_string_map_insert(SignalMutPointerBridgedStringMap map, const char *key, const char *value); + +SignalFfiError *signal_bridged_string_map_new(SignalMutPointerBridgedStringMap *out, uint32_t initial_capacity); + +SignalFfiError *signal_call_link_auth_credential_check_valid_contents(SignalBorrowedBuffer credential_bytes); + +SignalFfiError *signal_call_link_auth_credential_present_deterministic(SignalOwnedBuffer *out, SignalBorrowedBuffer credential_bytes, const SignalServiceIdFixedWidthBinaryBytes *user_id, uint64_t redemption_time, SignalBorrowedBuffer server_params_bytes, SignalBorrowedBuffer call_link_params_bytes, const uint8_t (*randomness)[SignalRANDOMNESS_LEN]); + +SignalFfiError *signal_call_link_auth_credential_presentation_check_valid_contents(SignalBorrowedBuffer presentation_bytes); + +SignalFfiError *signal_call_link_auth_credential_presentation_get_user_id(unsigned char (*out)[SignalUUID_CIPHERTEXT_LEN], SignalBorrowedBuffer presentation_bytes); + +SignalFfiError *signal_call_link_auth_credential_presentation_verify(SignalBorrowedBuffer presentation_bytes, uint64_t now, SignalBorrowedBuffer server_params_bytes, SignalBorrowedBuffer call_link_params_bytes); + +SignalFfiError *signal_call_link_auth_credential_response_check_valid_contents(SignalBorrowedBuffer response_bytes); + +SignalFfiError *signal_call_link_auth_credential_response_issue_deterministic(SignalOwnedBuffer *out, const SignalServiceIdFixedWidthBinaryBytes *user_id, uint64_t redemption_time, SignalBorrowedBuffer params_bytes, const uint8_t (*randomness)[SignalRANDOMNESS_LEN]); + +SignalFfiError *signal_call_link_auth_credential_response_receive(SignalOwnedBuffer *out, SignalBorrowedBuffer response_bytes, const SignalServiceIdFixedWidthBinaryBytes *user_id, uint64_t redemption_time, SignalBorrowedBuffer params_bytes); + +SignalFfiError *signal_call_link_public_params_check_valid_contents(SignalBorrowedBuffer params_bytes); + +SignalFfiError *signal_call_link_secret_params_check_valid_contents(SignalBorrowedBuffer params_bytes); + +SignalFfiError *signal_call_link_secret_params_decrypt_user_id(SignalServiceIdFixedWidthBinaryBytes *out, SignalBorrowedBuffer params_bytes, const unsigned char (*user_id)[SignalUUID_CIPHERTEXT_LEN]); + +SignalFfiError *signal_call_link_secret_params_derive_from_root_key(SignalOwnedBuffer *out, SignalBorrowedBuffer root_key); + +SignalFfiError *signal_call_link_secret_params_encrypt_user_id(unsigned char (*out)[SignalUUID_CIPHERTEXT_LEN], SignalBorrowedBuffer params_bytes, const SignalServiceIdFixedWidthBinaryBytes *user_id); + +SignalFfiError *signal_call_link_secret_params_get_public_params(SignalOwnedBuffer *out, SignalBorrowedBuffer params_bytes); + +SignalFfiError *signal_cds2_client_state_new(SignalMutPointerSgxClientState *out, SignalBorrowedBuffer mrenclave, SignalBorrowedBuffer attestation_msg, uint64_t current_timestamp); + +SignalFfiError *signal_cdsi_lookup_complete(SignalCPromiseFfiCdsiLookupResponse *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerCdsiLookup lookup); + +SignalFfiError *signal_cdsi_lookup_destroy(SignalMutPointerCdsiLookup p); + +SignalFfiError *signal_cdsi_lookup_new(SignalCPromiseMutPointerCdsiLookup *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerConnectionManager connection_manager, const char *username, const char *password, SignalConstPointerLookupRequest request); + +SignalFfiError *signal_cdsi_lookup_token(SignalOwnedBuffer *out, SignalConstPointerCdsiLookup lookup); + +SignalFfiError *signal_chat_connection_info_description(const char **out, SignalConstPointerChatConnectionInfo connection_info); + +SignalFfiError *signal_chat_connection_info_ip_version(uint8_t *out, SignalConstPointerChatConnectionInfo connection_info); + +SignalFfiError *signal_chat_connection_info_local_port(uint16_t *out, SignalConstPointerChatConnectionInfo connection_info); + +SignalFfiError *signal_ciphertext_message_destroy(SignalMutPointerCiphertextMessage p); + +SignalFfiError *signal_ciphertext_message_from_plaintext_content(SignalMutPointerCiphertextMessage *out, SignalConstPointerPlaintextContent m); + +SignalFfiError *signal_ciphertext_message_serialize(SignalOwnedBuffer *out, SignalConstPointerCiphertextMessage obj); + +SignalFfiError *signal_ciphertext_message_type(uint8_t *out, SignalConstPointerCiphertextMessage msg); + +SignalFfiError *signal_connection_info_destroy(SignalMutPointerConnectionInfo p); + +SignalFfiError *signal_connection_manager_clear_proxy(SignalConstPointerConnectionManager connection_manager); + +SignalFfiError *signal_connection_manager_destroy(SignalMutPointerConnectionManager p); + +SignalFfiError *signal_connection_manager_new(SignalMutPointerConnectionManager *out, uint8_t environment, const char *user_agent, SignalMutPointerBridgedStringMap remote_config, uint8_t build_variant); + +SignalFfiError *signal_connection_manager_on_network_change(SignalConstPointerConnectionManager connection_manager); + +SignalFfiError *signal_connection_manager_set_censorship_circumvention_enabled(SignalConstPointerConnectionManager connection_manager, bool enabled); + +SignalFfiError *signal_connection_manager_set_invalid_proxy(SignalConstPointerConnectionManager connection_manager); + +SignalFfiError *signal_connection_manager_set_proxy(SignalConstPointerConnectionManager connection_manager, SignalConstPointerConnectionProxyConfig proxy); + +SignalFfiError *signal_connection_manager_set_remote_config(SignalConstPointerConnectionManager connection_manager, SignalMutPointerBridgedStringMap remote_config, uint8_t build_variant); + +SignalFfiError *signal_connection_proxy_config_clone(SignalMutPointerConnectionProxyConfig *new_obj, SignalConstPointerConnectionProxyConfig obj); + +SignalFfiError *signal_connection_proxy_config_destroy(SignalMutPointerConnectionProxyConfig p); + +SignalFfiError *signal_connection_proxy_config_new(SignalMutPointerConnectionProxyConfig *out, const char *scheme, const char *host, int32_t port, const char *username, const char *password); + +SignalFfiError *signal_create_call_link_credential_check_valid_contents(SignalBorrowedBuffer params_bytes); + +SignalFfiError *signal_create_call_link_credential_present_deterministic(SignalOwnedBuffer *out, SignalBorrowedBuffer credential_bytes, SignalBorrowedBuffer room_id, const SignalServiceIdFixedWidthBinaryBytes *user_id, SignalBorrowedBuffer server_params_bytes, SignalBorrowedBuffer call_link_params_bytes, const uint8_t (*randomness)[SignalRANDOMNESS_LEN]); + +SignalFfiError *signal_create_call_link_credential_presentation_check_valid_contents(SignalBorrowedBuffer presentation_bytes); + +SignalFfiError *signal_create_call_link_credential_presentation_verify(SignalBorrowedBuffer presentation_bytes, SignalBorrowedBuffer room_id, uint64_t now, SignalBorrowedBuffer server_params_bytes, SignalBorrowedBuffer call_link_params_bytes); + +SignalFfiError *signal_create_call_link_credential_request_check_valid_contents(SignalBorrowedBuffer request_bytes); + +SignalFfiError *signal_create_call_link_credential_request_context_check_valid_contents(SignalBorrowedBuffer context_bytes); + +SignalFfiError *signal_create_call_link_credential_request_context_get_request(SignalOwnedBuffer *out, SignalBorrowedBuffer context_bytes); + +SignalFfiError *signal_create_call_link_credential_request_context_new_deterministic(SignalOwnedBuffer *out, SignalBorrowedBuffer room_id, const uint8_t (*randomness)[SignalRANDOMNESS_LEN]); + +SignalFfiError *signal_create_call_link_credential_request_context_receive_response(SignalOwnedBuffer *out, SignalBorrowedBuffer context_bytes, SignalBorrowedBuffer response_bytes, const SignalServiceIdFixedWidthBinaryBytes *user_id, SignalBorrowedBuffer params_bytes); + +SignalFfiError *signal_create_call_link_credential_request_issue_deterministic(SignalOwnedBuffer *out, SignalBorrowedBuffer request_bytes, const SignalServiceIdFixedWidthBinaryBytes *user_id, uint64_t timestamp, SignalBorrowedBuffer params_bytes, const uint8_t (*randomness)[SignalRANDOMNESS_LEN]); + +SignalFfiError *signal_create_call_link_credential_response_check_valid_contents(SignalBorrowedBuffer response_bytes); + +SignalFfiError *signal_decrypt_message(SignalOwnedBuffer *out, SignalConstPointerSignalMessage message, SignalConstPointerProtocolAddress protocol_address, SignalConstPointerFfiSessionStoreStruct session_store, SignalConstPointerFfiIdentityKeyStoreStruct identity_key_store); + +SignalFfiError *signal_decrypt_pre_key_message(SignalOwnedBuffer *out, SignalConstPointerPreKeySignalMessage message, SignalConstPointerProtocolAddress protocol_address, SignalConstPointerFfiSessionStoreStruct session_store, SignalConstPointerFfiIdentityKeyStoreStruct identity_key_store, SignalConstPointerFfiPreKeyStoreStruct prekey_store, SignalConstPointerFfiSignedPreKeyStoreStruct signed_prekey_store, SignalConstPointerFfiKyberPreKeyStoreStruct kyber_prekey_store); + +SignalFfiError *signal_decryption_error_message_clone(SignalMutPointerDecryptionErrorMessage *new_obj, SignalConstPointerDecryptionErrorMessage obj); + +SignalFfiError *signal_decryption_error_message_deserialize(SignalMutPointerDecryptionErrorMessage *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_decryption_error_message_destroy(SignalMutPointerDecryptionErrorMessage p); + +SignalFfiError *signal_decryption_error_message_extract_from_serialized_content(SignalMutPointerDecryptionErrorMessage *out, SignalBorrowedBuffer bytes); + +SignalFfiError *signal_decryption_error_message_for_original_message(SignalMutPointerDecryptionErrorMessage *out, SignalBorrowedBuffer original_bytes, uint8_t original_type, uint64_t original_timestamp, uint32_t original_sender_device_id); + +SignalFfiError *signal_decryption_error_message_get_device_id(uint32_t *out, SignalConstPointerDecryptionErrorMessage obj); + +SignalFfiError *signal_decryption_error_message_get_ratchet_key(SignalMutPointerPublicKey *out, SignalConstPointerDecryptionErrorMessage m); + +SignalFfiError *signal_decryption_error_message_get_timestamp(uint64_t *out, SignalConstPointerDecryptionErrorMessage obj); + +SignalFfiError *signal_decryption_error_message_serialize(SignalOwnedBuffer *out, SignalConstPointerDecryptionErrorMessage obj); + +SignalFfiError *signal_device_transfer_generate_certificate(SignalOwnedBuffer *out, SignalBorrowedBuffer private_key, const char *name, uint32_t days_to_expire); + +SignalFfiError *signal_device_transfer_generate_private_key(SignalOwnedBuffer *out); + +SignalFfiError *signal_device_transfer_generate_private_key_with_format(SignalOwnedBuffer *out, uint8_t key_format); + +SignalFfiError *signal_encrypt_message(SignalMutPointerCiphertextMessage *out, SignalBorrowedBuffer ptext, SignalConstPointerProtocolAddress protocol_address, SignalConstPointerFfiSessionStoreStruct session_store, SignalConstPointerFfiIdentityKeyStoreStruct identity_key_store, uint64_t now); + +void signal_error_free(SignalFfiError *err); + +SignalFfiError *signal_error_get_address(SignalMutPointerProtocolAddress *out, SignalUnwindSafeArgSignalFfiError err); + +SignalFfiError *signal_error_get_invalid_protocol_address(SignalPairOfc_charu32 *out, SignalUnwindSafeArgSignalFfiError err); + +SignalFfiError *signal_error_get_message(const char **out, SignalUnwindSafeArgSignalFfiError err); + +SignalFfiError *signal_error_get_mismatched_device_errors(SignalOwnedBufferOfFfiMismatchedDevicesError *out, SignalUnwindSafeArgSignalFfiError err); + +SignalFfiError *signal_error_get_our_fingerprint_version(uint32_t *out, SignalUnwindSafeArgSignalFfiError err); + +SignalFfiError *signal_error_get_rate_limit_challenge(SignalPairOfc_charOwnedBufferOfc_uchar *out, SignalUnwindSafeArgSignalFfiError err); + +SignalFfiError *signal_error_get_registration_error_not_deliverable(SignalPairOfc_charbool *out, SignalUnwindSafeArgSignalFfiError err); + +SignalFfiError *signal_error_get_registration_lock(uint64_t *out_time_remaining_seconds, const char **out_svr2_username, const char **out_svr2_password, const SignalFfiError *err); + +SignalFfiError *signal_error_get_retry_after_seconds(uint32_t *out, SignalUnwindSafeArgSignalFfiError err); + +SignalFfiError *signal_error_get_their_fingerprint_version(uint32_t *out, SignalUnwindSafeArgSignalFfiError err); + +SignalFfiError *signal_error_get_tries_remaining(uint32_t *out, SignalUnwindSafeArgSignalFfiError err); + +uint32_t signal_error_get_type(const SignalFfiError *err); + +SignalFfiError *signal_error_get_unknown_fields(SignalStringArray *out, SignalUnwindSafeArgSignalFfiError err); + +SignalFfiError *signal_error_get_uuid(SignalUuid *out, SignalUnwindSafeArgSignalFfiError err); + +SignalFfiError *signal_expiring_profile_key_credential_check_valid_contents(SignalBorrowedBuffer buffer); + +SignalFfiError *signal_expiring_profile_key_credential_get_expiration_time(uint64_t *out, const unsigned char (*credential)[SignalEXPIRING_PROFILE_KEY_CREDENTIAL_LEN]); + +SignalFfiError *signal_expiring_profile_key_credential_response_check_valid_contents(SignalBorrowedBuffer buffer); + +SignalFfiError *signal_fingerprint_clone(SignalMutPointerFingerprint *new_obj, SignalConstPointerFingerprint obj); + +SignalFfiError *signal_fingerprint_compare(bool *out, SignalBorrowedBuffer fprint1, SignalBorrowedBuffer fprint2); + +SignalFfiError *signal_fingerprint_destroy(SignalMutPointerFingerprint p); + +SignalFfiError *signal_fingerprint_display_string(const char **out, SignalConstPointerFingerprint obj); + +SignalFfiError *signal_fingerprint_new(SignalMutPointerFingerprint *out, uint32_t iterations, uint32_t version, SignalBorrowedBuffer local_identifier, SignalConstPointerPublicKey local_key, SignalBorrowedBuffer remote_identifier, SignalConstPointerPublicKey remote_key); + +SignalFfiError *signal_fingerprint_scannable_encoding(SignalOwnedBuffer *out, SignalConstPointerFingerprint obj); + +void signal_free_buffer(const unsigned char *buf, size_t buf_len); + +void signal_free_bytestring_array(SignalBytestringArray array); + +void signal_free_list_of_mismatched_device_errors(SignalOwnedBufferOfFfiMismatchedDevicesError buffer); + +void signal_free_list_of_register_response_badges(SignalOwnedBufferOfFfiRegisterResponseBadge buffer); + +void signal_free_list_of_service_ids(SignalOwnedBufferOfServiceIdFixedWidthBinaryBytes buffer); + +void signal_free_list_of_strings(SignalOwnedBufferOfCStringPtr buffer); + +void signal_free_lookup_response_entry_list(SignalOwnedBufferOfFfiCdsiLookupResponseEntry buffer); + +/** + * This frees a buffer of PreKeyBundle pointers, and _does not_ free the + * pointers within the buffer. This _only_ frees the buffer containing + * the pointers. + */ +void signal_free_outer_buffer_list_of_prekey_bundles(SignalOwnedBufferOfMutPointerPreKeyBundle buffer); + +void signal_free_string(const char *buf); + +SignalFfiError *signal_generic_server_public_params_check_valid_contents(SignalBorrowedBuffer params_bytes); + +SignalFfiError *signal_generic_server_secret_params_check_valid_contents(SignalBorrowedBuffer params_bytes); + +SignalFfiError *signal_generic_server_secret_params_generate_deterministic(SignalOwnedBuffer *out, const uint8_t (*randomness)[SignalRANDOMNESS_LEN]); + +SignalFfiError *signal_generic_server_secret_params_get_public_params(SignalOwnedBuffer *out, SignalBorrowedBuffer params_bytes); + +SignalFfiError *signal_group_decrypt_message(SignalOwnedBuffer *out, SignalConstPointerProtocolAddress sender, SignalBorrowedBuffer message, SignalConstPointerFfiSenderKeyStoreStruct store); + +SignalFfiError *signal_group_encrypt_message(SignalMutPointerCiphertextMessage *out, SignalConstPointerProtocolAddress sender, SignalUuid distribution_id, SignalBorrowedBuffer message, SignalConstPointerFfiSenderKeyStoreStruct store); + +SignalFfiError *signal_group_master_key_check_valid_contents(SignalBorrowedBuffer buffer); + +SignalFfiError *signal_group_public_params_check_valid_contents(SignalBorrowedBuffer buffer); + +SignalFfiError *signal_group_public_params_get_group_identifier(uint8_t (*out)[SignalGROUP_IDENTIFIER_LEN], const unsigned char (*group_public_params)[SignalGROUP_PUBLIC_PARAMS_LEN]); + +SignalFfiError *signal_group_secret_params_check_valid_contents(SignalBorrowedBuffer buffer); + +SignalFfiError *signal_group_secret_params_decrypt_blob_with_padding(SignalOwnedBuffer *out, const unsigned char (*params)[SignalGROUP_SECRET_PARAMS_LEN], SignalBorrowedBuffer ciphertext); + +SignalFfiError *signal_group_secret_params_decrypt_profile_key(unsigned char (*out)[SignalPROFILE_KEY_LEN], const unsigned char (*params)[SignalGROUP_SECRET_PARAMS_LEN], const unsigned char (*profile_key)[SignalPROFILE_KEY_CIPHERTEXT_LEN], const SignalServiceIdFixedWidthBinaryBytes *user_id); + +SignalFfiError *signal_group_secret_params_decrypt_service_id(SignalServiceIdFixedWidthBinaryBytes *out, const unsigned char (*params)[SignalGROUP_SECRET_PARAMS_LEN], const unsigned char (*ciphertext)[SignalUUID_CIPHERTEXT_LEN]); + +SignalFfiError *signal_group_secret_params_derive_from_master_key(unsigned char (*out)[SignalGROUP_SECRET_PARAMS_LEN], const unsigned char (*master_key)[SignalGROUP_MASTER_KEY_LEN]); + +SignalFfiError *signal_group_secret_params_encrypt_blob_with_padding_deterministic(SignalOwnedBuffer *out, const unsigned char (*params)[SignalGROUP_SECRET_PARAMS_LEN], const uint8_t (*randomness)[SignalRANDOMNESS_LEN], SignalBorrowedBuffer plaintext, uint32_t padding_len); + +SignalFfiError *signal_group_secret_params_encrypt_profile_key(unsigned char (*out)[SignalPROFILE_KEY_CIPHERTEXT_LEN], const unsigned char (*params)[SignalGROUP_SECRET_PARAMS_LEN], const unsigned char (*profile_key)[SignalPROFILE_KEY_LEN], const SignalServiceIdFixedWidthBinaryBytes *user_id); + +SignalFfiError *signal_group_secret_params_encrypt_service_id(unsigned char (*out)[SignalUUID_CIPHERTEXT_LEN], const unsigned char (*params)[SignalGROUP_SECRET_PARAMS_LEN], const SignalServiceIdFixedWidthBinaryBytes *service_id); + +SignalFfiError *signal_group_secret_params_generate_deterministic(unsigned char (*out)[SignalGROUP_SECRET_PARAMS_LEN], const uint8_t (*randomness)[SignalRANDOMNESS_LEN]); + +SignalFfiError *signal_group_secret_params_get_master_key(unsigned char (*out)[SignalGROUP_MASTER_KEY_LEN], const unsigned char (*params)[SignalGROUP_SECRET_PARAMS_LEN]); + +SignalFfiError *signal_group_secret_params_get_public_params(unsigned char (*out)[SignalGROUP_PUBLIC_PARAMS_LEN], const unsigned char (*params)[SignalGROUP_SECRET_PARAMS_LEN]); + +SignalFfiError *signal_group_send_derived_key_pair_check_valid_contents(SignalBorrowedBuffer bytes); + +SignalFfiError *signal_group_send_derived_key_pair_for_expiration(SignalOwnedBuffer *out, uint64_t expiration, SignalConstPointerServerSecretParams server_params); + +SignalFfiError *signal_group_send_endorsement_call_link_params_to_token(SignalOwnedBuffer *out, SignalBorrowedBuffer endorsement, SignalBorrowedBuffer call_link_secret_params_serialized); + +SignalFfiError *signal_group_send_endorsement_check_valid_contents(SignalBorrowedBuffer bytes); + +SignalFfiError *signal_group_send_endorsement_combine(SignalOwnedBuffer *out, SignalBorrowedSliceOfBuffers endorsements); + +SignalFfiError *signal_group_send_endorsement_remove(SignalOwnedBuffer *out, SignalBorrowedBuffer endorsement, SignalBorrowedBuffer to_remove); + +SignalFfiError *signal_group_send_endorsement_to_token(SignalOwnedBuffer *out, SignalBorrowedBuffer endorsement, const unsigned char (*group_params)[SignalGROUP_SECRET_PARAMS_LEN]); + +SignalFfiError *signal_group_send_endorsements_response_check_valid_contents(SignalBorrowedBuffer bytes); + +SignalFfiError *signal_group_send_endorsements_response_get_expiration(uint64_t *out, SignalBorrowedBuffer response_bytes); + +SignalFfiError *signal_group_send_endorsements_response_issue_deterministic(SignalOwnedBuffer *out, SignalBorrowedBuffer concatenated_group_member_ciphertexts, SignalBorrowedBuffer key_pair, const uint8_t (*randomness)[SignalRANDOMNESS_LEN]); + +SignalFfiError *signal_group_send_endorsements_response_receive_and_combine_with_ciphertexts(SignalBytestringArray *out, SignalBorrowedBuffer response_bytes, SignalBorrowedBuffer concatenated_group_member_ciphertexts, SignalBorrowedBuffer local_user_ciphertext, uint64_t now, SignalConstPointerServerPublicParams server_params); + +SignalFfiError *signal_group_send_endorsements_response_receive_and_combine_with_service_ids(SignalBytestringArray *out, SignalBorrowedBuffer response_bytes, SignalBorrowedBuffer group_members, const SignalServiceIdFixedWidthBinaryBytes *local_user, uint64_t now, const unsigned char (*group_params)[SignalGROUP_SECRET_PARAMS_LEN], SignalConstPointerServerPublicParams server_params); + +SignalFfiError *signal_group_send_full_token_check_valid_contents(SignalBorrowedBuffer bytes); + +SignalFfiError *signal_group_send_full_token_get_expiration(uint64_t *out, SignalBorrowedBuffer token); + +SignalFfiError *signal_group_send_full_token_verify(SignalBorrowedBuffer token, SignalBorrowedBuffer user_ids, uint64_t now, SignalBorrowedBuffer key_pair); + +SignalFfiError *signal_group_send_token_check_valid_contents(SignalBorrowedBuffer bytes); + +SignalFfiError *signal_group_send_token_to_full_token(SignalOwnedBuffer *out, SignalBorrowedBuffer token, uint64_t expiration); + +SignalFfiError *signal_hex_encode(SignalBorrowedMutableBuffer output, SignalBorrowedBuffer input); + +SignalFfiError *signal_hkdf_derive(SignalBorrowedMutableBuffer output, SignalBorrowedBuffer ikm, SignalBorrowedBuffer label, SignalBorrowedBuffer salt); + +SignalFfiError *signal_hsm_enclave_client_complete_handshake(SignalMutPointerHsmEnclaveClient cli, SignalBorrowedBuffer handshake_received); + +SignalFfiError *signal_hsm_enclave_client_destroy(SignalMutPointerHsmEnclaveClient p); + +SignalFfiError *signal_hsm_enclave_client_established_recv(SignalOwnedBuffer *out, SignalMutPointerHsmEnclaveClient cli, SignalBorrowedBuffer received_ciphertext); + +SignalFfiError *signal_hsm_enclave_client_established_send(SignalOwnedBuffer *out, SignalMutPointerHsmEnclaveClient cli, SignalBorrowedBuffer plaintext_to_send); + +SignalFfiError *signal_hsm_enclave_client_initial_request(SignalOwnedBuffer *out, SignalConstPointerHsmEnclaveClient obj); + +SignalFfiError *signal_hsm_enclave_client_new(SignalMutPointerHsmEnclaveClient *out, SignalBorrowedBuffer trusted_public_key, SignalBorrowedBuffer trusted_code_hashes); + +SignalFfiError *signal_http_request_add_header(SignalConstPointerHttpRequest request, const char *name, const char *value); + +SignalFfiError *signal_http_request_destroy(SignalMutPointerHttpRequest p); + +SignalFfiError *signal_http_request_new_with_body(SignalMutPointerHttpRequest *out, const char *method, const char *path, SignalBorrowedBuffer body_as_slice); + +SignalFfiError *signal_http_request_new_without_body(SignalMutPointerHttpRequest *out, const char *method, const char *path); + +SignalFfiError *signal_identitykey_verify_alternate_identity(bool *out, SignalConstPointerPublicKey public_key, SignalConstPointerPublicKey other_identity, SignalBorrowedBuffer signature); + +SignalFfiError *signal_identitykeypair_deserialize(SignalPairOfMutPointerPublicKeyMutPointerPrivateKey *out, SignalBorrowedBuffer input); + +SignalFfiError *signal_identitykeypair_serialize(SignalOwnedBuffer *out, SignalConstPointerPublicKey public_key, SignalConstPointerPrivateKey private_key); + +SignalFfiError *signal_identitykeypair_sign_alternate_identity(SignalOwnedBuffer *out, SignalConstPointerPublicKey public_key, SignalConstPointerPrivateKey private_key, SignalConstPointerPublicKey other_identity); + +SignalFfiError *signal_incremental_mac_calculate_chunk_size(uint32_t *out, uint32_t data_size); + +SignalFfiError *signal_incremental_mac_destroy(SignalMutPointerIncrementalMac p); + +SignalFfiError *signal_incremental_mac_finalize(SignalOwnedBuffer *out, SignalMutPointerIncrementalMac mac); + +SignalFfiError *signal_incremental_mac_initialize(SignalMutPointerIncrementalMac *out, SignalBorrowedBuffer key, uint32_t chunk_size); + +SignalFfiError *signal_incremental_mac_update(SignalOwnedBuffer *out, SignalMutPointerIncrementalMac mac, SignalBorrowedBuffer bytes, uint32_t offset, uint32_t length); + +bool signal_init_logger(SignalLogLevel max_level, SignalFfiLogger logger); + +SignalFfiError *signal_key_transparency_aci_search_key(SignalOwnedBuffer *out, const SignalServiceIdFixedWidthBinaryBytes *aci); + +SignalFfiError *signal_key_transparency_distinguished(SignalCPromiseOwnedBufferOfc_uchar *promise, SignalConstPointerTokioAsyncContext async_runtime, uint8_t environment, SignalConstPointerUnauthenticatedChatConnection chat_connection, SignalOptionalBorrowedSliceOfc_uchar last_distinguished_tree_head); + +SignalFfiError *signal_key_transparency_e164_search_key(SignalOwnedBuffer *out, const char *e164); + +SignalFfiError *signal_key_transparency_monitor(SignalCPromiseOwnedBufferOfc_uchar *promise, SignalConstPointerTokioAsyncContext async_runtime, uint8_t environment, SignalConstPointerUnauthenticatedChatConnection chat_connection, const SignalServiceIdFixedWidthBinaryBytes *aci, SignalConstPointerPublicKey aci_identity_key, const char *e164, SignalOptionalBorrowedSliceOfc_uchar unidentified_access_key, SignalOptionalBorrowedSliceOfc_uchar username_hash, SignalOptionalBorrowedSliceOfc_uchar account_data, SignalBorrowedBuffer last_distinguished_tree_head, bool is_self_monitor); + +SignalFfiError *signal_key_transparency_search(SignalCPromiseOwnedBufferOfc_uchar *promise, SignalConstPointerTokioAsyncContext async_runtime, uint8_t environment, SignalConstPointerUnauthenticatedChatConnection chat_connection, const SignalServiceIdFixedWidthBinaryBytes *aci, SignalConstPointerPublicKey aci_identity_key, const char *e164, SignalOptionalBorrowedSliceOfc_uchar unidentified_access_key, SignalOptionalBorrowedSliceOfc_uchar username_hash, SignalOptionalBorrowedSliceOfc_uchar account_data, SignalBorrowedBuffer last_distinguished_tree_head); + +SignalFfiError *signal_key_transparency_username_hash_search_key(SignalOwnedBuffer *out, SignalBorrowedBuffer hash); + +SignalFfiError *signal_kyber_key_pair_clone(SignalMutPointerKyberKeyPair *new_obj, SignalConstPointerKyberKeyPair obj); + +SignalFfiError *signal_kyber_key_pair_destroy(SignalMutPointerKyberKeyPair p); + +SignalFfiError *signal_kyber_key_pair_generate(SignalMutPointerKyberKeyPair *out); + +SignalFfiError *signal_kyber_key_pair_get_public_key(SignalMutPointerKyberPublicKey *out, SignalConstPointerKyberKeyPair key_pair); + +SignalFfiError *signal_kyber_key_pair_get_secret_key(SignalMutPointerKyberSecretKey *out, SignalConstPointerKyberKeyPair key_pair); + +SignalFfiError *signal_kyber_pre_key_record_clone(SignalMutPointerKyberPreKeyRecord *new_obj, SignalConstPointerKyberPreKeyRecord obj); + +SignalFfiError *signal_kyber_pre_key_record_deserialize(SignalMutPointerKyberPreKeyRecord *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_kyber_pre_key_record_destroy(SignalMutPointerKyberPreKeyRecord p); + +SignalFfiError *signal_kyber_pre_key_record_get_id(uint32_t *out, SignalConstPointerKyberPreKeyRecord obj); + +SignalFfiError *signal_kyber_pre_key_record_get_key_pair(SignalMutPointerKyberKeyPair *out, SignalConstPointerKyberPreKeyRecord obj); + +SignalFfiError *signal_kyber_pre_key_record_get_public_key(SignalMutPointerKyberPublicKey *out, SignalConstPointerKyberPreKeyRecord obj); + +SignalFfiError *signal_kyber_pre_key_record_get_secret_key(SignalMutPointerKyberSecretKey *out, SignalConstPointerKyberPreKeyRecord obj); + +SignalFfiError *signal_kyber_pre_key_record_get_signature(SignalOwnedBuffer *out, SignalConstPointerKyberPreKeyRecord obj); + +SignalFfiError *signal_kyber_pre_key_record_get_timestamp(uint64_t *out, SignalConstPointerKyberPreKeyRecord obj); + +SignalFfiError *signal_kyber_pre_key_record_new(SignalMutPointerKyberPreKeyRecord *out, uint32_t id, uint64_t timestamp, SignalConstPointerKyberKeyPair key_pair, SignalBorrowedBuffer signature); + +SignalFfiError *signal_kyber_pre_key_record_serialize(SignalOwnedBuffer *out, SignalConstPointerKyberPreKeyRecord obj); + +SignalFfiError *signal_kyber_public_key_clone(SignalMutPointerKyberPublicKey *new_obj, SignalConstPointerKyberPublicKey obj); + +SignalFfiError *signal_kyber_public_key_deserialize(SignalMutPointerKyberPublicKey *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_kyber_public_key_destroy(SignalMutPointerKyberPublicKey p); + +SignalFfiError *signal_kyber_public_key_equals(bool *out, SignalConstPointerKyberPublicKey lhs, SignalConstPointerKyberPublicKey rhs); + +SignalFfiError *signal_kyber_public_key_serialize(SignalOwnedBuffer *out, SignalConstPointerKyberPublicKey obj); + +SignalFfiError *signal_kyber_secret_key_clone(SignalMutPointerKyberSecretKey *new_obj, SignalConstPointerKyberSecretKey obj); + +SignalFfiError *signal_kyber_secret_key_deserialize(SignalMutPointerKyberSecretKey *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_kyber_secret_key_destroy(SignalMutPointerKyberSecretKey p); + +SignalFfiError *signal_kyber_secret_key_serialize(SignalOwnedBuffer *out, SignalConstPointerKyberSecretKey obj); + +SignalFfiError *signal_lookup_request_add_aci_and_access_key(SignalConstPointerLookupRequest request, const SignalServiceIdFixedWidthBinaryBytes *aci, SignalBorrowedBuffer access_key); + +SignalFfiError *signal_lookup_request_add_e164(SignalConstPointerLookupRequest request, const char *e164); + +SignalFfiError *signal_lookup_request_add_previous_e164(SignalConstPointerLookupRequest request, const char *e164); + +SignalFfiError *signal_lookup_request_destroy(SignalMutPointerLookupRequest p); + +SignalFfiError *signal_lookup_request_new(SignalMutPointerLookupRequest *out); + +SignalFfiError *signal_lookup_request_set_token(SignalConstPointerLookupRequest request, SignalBorrowedBuffer token); + +SignalFfiError *signal_message_backup_key_destroy(SignalMutPointerMessageBackupKey p); + +SignalFfiError *signal_message_backup_key_from_account_entropy_pool(SignalMutPointerMessageBackupKey *out, const char *account_entropy, const SignalServiceIdFixedWidthBinaryBytes *aci, const uint8_t (*forward_secrecy_token)[SignalBACKUP_FORWARD_SECRECY_TOKEN_LEN]); + +SignalFfiError *signal_message_backup_key_from_backup_key_and_backup_id(SignalMutPointerMessageBackupKey *out, const uint8_t (*backup_key)[32], const uint8_t (*backup_id)[16], const uint8_t (*forward_secrecy_token)[SignalBACKUP_FORWARD_SECRECY_TOKEN_LEN]); + +SignalFfiError *signal_message_backup_key_get_aes_key(uint8_t (*out)[32], SignalConstPointerMessageBackupKey key); + +SignalFfiError *signal_message_backup_key_get_hmac_key(uint8_t (*out)[32], SignalConstPointerMessageBackupKey key); + +SignalFfiError *signal_message_backup_validation_outcome_destroy(SignalMutPointerMessageBackupValidationOutcome p); + +SignalFfiError *signal_message_backup_validation_outcome_get_error_message(const char **out, SignalConstPointerMessageBackupValidationOutcome outcome); + +SignalFfiError *signal_message_backup_validation_outcome_get_unknown_fields(SignalStringArray *out, SignalConstPointerMessageBackupValidationOutcome outcome); + +SignalFfiError *signal_message_backup_validator_validate(SignalMutPointerMessageBackupValidationOutcome *out, SignalConstPointerMessageBackupKey key, SignalConstPointerFfiInputStreamStruct first_stream, SignalConstPointerFfiInputStreamStruct second_stream, uint64_t len, uint8_t purpose); + +SignalFfiError *signal_message_clone(SignalMutPointerSignalMessage *new_obj, SignalConstPointerSignalMessage obj); + +SignalFfiError *signal_message_deserialize(SignalMutPointerSignalMessage *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_message_destroy(SignalMutPointerSignalMessage p); + +SignalFfiError *signal_message_get_body(SignalOwnedBuffer *out, SignalConstPointerSignalMessage obj); + +SignalFfiError *signal_message_get_counter(uint32_t *out, SignalConstPointerSignalMessage obj); + +SignalFfiError *signal_message_get_message_version(uint32_t *out, SignalConstPointerSignalMessage obj); + +SignalFfiError *signal_message_get_pq_ratchet(SignalOwnedBuffer *out, SignalConstPointerSignalMessage msg); + +SignalFfiError *signal_message_get_sender_ratchet_key(SignalMutPointerPublicKey *out, SignalConstPointerSignalMessage m); + +SignalFfiError *signal_message_get_serialized(SignalOwnedBuffer *out, SignalConstPointerSignalMessage obj); + +SignalFfiError *signal_message_new(SignalMutPointerSignalMessage *out, uint8_t message_version, SignalBorrowedBuffer mac_key, SignalConstPointerPublicKey sender_ratchet_key, uint32_t counter, uint32_t previous_counter, SignalBorrowedBuffer ciphertext, SignalConstPointerPublicKey sender_identity_key, SignalConstPointerPublicKey receiver_identity_key, SignalBorrowedBuffer pq_ratchet); + +SignalFfiError *signal_message_verify_mac(bool *out, SignalConstPointerSignalMessage msg, SignalConstPointerPublicKey sender_identity_key, SignalConstPointerPublicKey receiver_identity_key, SignalBorrowedBuffer mac_key); + +SignalFfiError *signal_mp4_sanitizer_sanitize(SignalMutPointerSanitizedMetadata *out, SignalConstPointerFfiInputStreamStruct input, uint64_t len); + +SignalFfiError *signal_online_backup_validator_add_frame(SignalMutPointerOnlineBackupValidator backup, SignalBorrowedBuffer frame); + +SignalFfiError *signal_online_backup_validator_destroy(SignalMutPointerOnlineBackupValidator p); + +SignalFfiError *signal_online_backup_validator_finalize(SignalMutPointerOnlineBackupValidator backup); + +SignalFfiError *signal_online_backup_validator_new(SignalMutPointerOnlineBackupValidator *out, SignalBorrowedBuffer backup_info_frame, uint8_t purpose); + +SignalFfiError *signal_pin_hash_access_key(uint8_t (*out)[32], SignalConstPointerPinHash ph); + +SignalFfiError *signal_pin_hash_clone(SignalMutPointerPinHash *new_obj, SignalConstPointerPinHash obj); + +SignalFfiError *signal_pin_hash_destroy(SignalMutPointerPinHash p); + +SignalFfiError *signal_pin_hash_encryption_key(uint8_t (*out)[32], SignalConstPointerPinHash ph); + +SignalFfiError *signal_pin_hash_from_salt(SignalMutPointerPinHash *out, SignalBorrowedBuffer pin, const uint8_t (*salt)[32]); + +SignalFfiError *signal_pin_hash_from_username_mrenclave(SignalMutPointerPinHash *out, SignalBorrowedBuffer pin, const char *username, SignalBorrowedBuffer mrenclave); + +SignalFfiError *signal_pin_local_hash(const char **out, SignalBorrowedBuffer pin); + +SignalFfiError *signal_pin_verify_local_hash(bool *out, const char *encoded_hash, SignalBorrowedBuffer pin); + +SignalFfiError *signal_plaintext_content_clone(SignalMutPointerPlaintextContent *new_obj, SignalConstPointerPlaintextContent obj); + +SignalFfiError *signal_plaintext_content_deserialize(SignalMutPointerPlaintextContent *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_plaintext_content_destroy(SignalMutPointerPlaintextContent p); + +SignalFfiError *signal_plaintext_content_from_decryption_error_message(SignalMutPointerPlaintextContent *out, SignalConstPointerDecryptionErrorMessage m); + +SignalFfiError *signal_plaintext_content_get_body(SignalOwnedBuffer *out, SignalConstPointerPlaintextContent obj); + +SignalFfiError *signal_plaintext_content_serialize(SignalOwnedBuffer *out, SignalConstPointerPlaintextContent obj); + +SignalFfiError *signal_pre_key_bundle_clone(SignalMutPointerPreKeyBundle *new_obj, SignalConstPointerPreKeyBundle obj); + +SignalFfiError *signal_pre_key_bundle_destroy(SignalMutPointerPreKeyBundle p); + +SignalFfiError *signal_pre_key_bundle_get_device_id(uint32_t *out, SignalConstPointerPreKeyBundle obj); + +SignalFfiError *signal_pre_key_bundle_get_identity_key(SignalMutPointerPublicKey *out, SignalConstPointerPreKeyBundle p); + +SignalFfiError *signal_pre_key_bundle_get_kyber_pre_key_id(uint32_t *out, SignalConstPointerPreKeyBundle obj); + +SignalFfiError *signal_pre_key_bundle_get_kyber_pre_key_public(SignalMutPointerKyberPublicKey *out, SignalConstPointerPreKeyBundle bundle); + +SignalFfiError *signal_pre_key_bundle_get_kyber_pre_key_signature(SignalOwnedBuffer *out, SignalConstPointerPreKeyBundle obj); + +SignalFfiError *signal_pre_key_bundle_get_pre_key_id(uint32_t *out, SignalConstPointerPreKeyBundle obj); + +SignalFfiError *signal_pre_key_bundle_get_pre_key_public(SignalMutPointerPublicKey *out, SignalConstPointerPreKeyBundle obj); + +SignalFfiError *signal_pre_key_bundle_get_registration_id(uint32_t *out, SignalConstPointerPreKeyBundle obj); + +SignalFfiError *signal_pre_key_bundle_get_signed_pre_key_id(uint32_t *out, SignalConstPointerPreKeyBundle obj); + +SignalFfiError *signal_pre_key_bundle_get_signed_pre_key_public(SignalMutPointerPublicKey *out, SignalConstPointerPreKeyBundle obj); + +SignalFfiError *signal_pre_key_bundle_get_signed_pre_key_signature(SignalOwnedBuffer *out, SignalConstPointerPreKeyBundle obj); + +SignalFfiError *signal_pre_key_bundle_new(SignalMutPointerPreKeyBundle *out, uint32_t registration_id, uint32_t device_id, uint32_t prekey_id, SignalConstPointerPublicKey prekey, uint32_t signed_prekey_id, SignalConstPointerPublicKey signed_prekey, SignalBorrowedBuffer signed_prekey_signature, SignalConstPointerPublicKey identity_key, uint32_t kyber_prekey_id, SignalConstPointerKyberPublicKey kyber_prekey, SignalBorrowedBuffer kyber_prekey_signature); + +SignalFfiError *signal_pre_key_record_clone(SignalMutPointerPreKeyRecord *new_obj, SignalConstPointerPreKeyRecord obj); + +SignalFfiError *signal_pre_key_record_deserialize(SignalMutPointerPreKeyRecord *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_pre_key_record_destroy(SignalMutPointerPreKeyRecord p); + +SignalFfiError *signal_pre_key_record_get_id(uint32_t *out, SignalConstPointerPreKeyRecord obj); + +SignalFfiError *signal_pre_key_record_get_private_key(SignalMutPointerPrivateKey *out, SignalConstPointerPreKeyRecord obj); + +SignalFfiError *signal_pre_key_record_get_public_key(SignalMutPointerPublicKey *out, SignalConstPointerPreKeyRecord obj); + +SignalFfiError *signal_pre_key_record_new(SignalMutPointerPreKeyRecord *out, uint32_t id, SignalConstPointerPublicKey pub_key, SignalConstPointerPrivateKey priv_key); + +SignalFfiError *signal_pre_key_record_serialize(SignalOwnedBuffer *out, SignalConstPointerPreKeyRecord obj); + +SignalFfiError *signal_pre_key_signal_message_clone(SignalMutPointerPreKeySignalMessage *new_obj, SignalConstPointerPreKeySignalMessage obj); + +SignalFfiError *signal_pre_key_signal_message_deserialize(SignalMutPointerPreKeySignalMessage *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_pre_key_signal_message_destroy(SignalMutPointerPreKeySignalMessage p); + +SignalFfiError *signal_pre_key_signal_message_get_base_key(SignalMutPointerPublicKey *out, SignalConstPointerPreKeySignalMessage m); + +SignalFfiError *signal_pre_key_signal_message_get_identity_key(SignalMutPointerPublicKey *out, SignalConstPointerPreKeySignalMessage m); + +SignalFfiError *signal_pre_key_signal_message_get_pre_key_id(uint32_t *out, SignalConstPointerPreKeySignalMessage obj); + +SignalFfiError *signal_pre_key_signal_message_get_registration_id(uint32_t *out, SignalConstPointerPreKeySignalMessage obj); + +SignalFfiError *signal_pre_key_signal_message_get_signal_message(SignalMutPointerSignalMessage *out, SignalConstPointerPreKeySignalMessage m); + +SignalFfiError *signal_pre_key_signal_message_get_signed_pre_key_id(uint32_t *out, SignalConstPointerPreKeySignalMessage obj); + +SignalFfiError *signal_pre_key_signal_message_get_version(uint32_t *out, SignalConstPointerPreKeySignalMessage obj); + +SignalFfiError *signal_pre_key_signal_message_new(SignalMutPointerPreKeySignalMessage *out, uint8_t message_version, uint32_t registration_id, uint32_t pre_key_id, uint32_t signed_pre_key_id, SignalConstPointerPublicKey base_key, SignalConstPointerPublicKey identity_key, SignalConstPointerSignalMessage signal_message); + +SignalFfiError *signal_pre_key_signal_message_serialize(SignalOwnedBuffer *out, SignalConstPointerPreKeySignalMessage obj); + +void signal_print_ptr(const void *p); + +SignalFfiError *signal_privatekey_agree(SignalOwnedBuffer *out, SignalConstPointerPrivateKey private_key, SignalConstPointerPublicKey public_key); + +SignalFfiError *signal_privatekey_clone(SignalMutPointerPrivateKey *new_obj, SignalConstPointerPrivateKey obj); + +SignalFfiError *signal_privatekey_deserialize(SignalMutPointerPrivateKey *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_privatekey_destroy(SignalMutPointerPrivateKey p); + +SignalFfiError *signal_privatekey_generate(SignalMutPointerPrivateKey *out); + +SignalFfiError *signal_privatekey_get_public_key(SignalMutPointerPublicKey *out, SignalConstPointerPrivateKey k); + +SignalFfiError *signal_privatekey_hpke_open(SignalOwnedBuffer *out, SignalConstPointerPrivateKey sk, SignalBorrowedBuffer ciphertext, SignalBorrowedBuffer info, SignalBorrowedBuffer associated_data); + +SignalFfiError *signal_privatekey_serialize(SignalOwnedBuffer *out, SignalConstPointerPrivateKey obj); + +SignalFfiError *signal_privatekey_sign(SignalOwnedBuffer *out, SignalConstPointerPrivateKey key, SignalBorrowedBuffer message); + +SignalFfiError *signal_process_prekey_bundle(SignalConstPointerPreKeyBundle bundle, SignalConstPointerProtocolAddress protocol_address, SignalConstPointerFfiSessionStoreStruct session_store, SignalConstPointerFfiIdentityKeyStoreStruct identity_key_store, uint64_t now); + +SignalFfiError *signal_process_sender_key_distribution_message(SignalConstPointerProtocolAddress sender, SignalConstPointerSenderKeyDistributionMessage sender_key_distribution_message, SignalConstPointerFfiSenderKeyStoreStruct store); + +SignalFfiError *signal_profile_key_check_valid_contents(SignalBorrowedBuffer buffer); + +SignalFfiError *signal_profile_key_ciphertext_check_valid_contents(SignalBorrowedBuffer buffer); + +SignalFfiError *signal_profile_key_commitment_check_valid_contents(SignalBorrowedBuffer buffer); + +SignalFfiError *signal_profile_key_credential_presentation_check_valid_contents(SignalBorrowedBuffer presentation_bytes); + +SignalFfiError *signal_profile_key_credential_presentation_get_profile_key_ciphertext(unsigned char (*out)[SignalPROFILE_KEY_CIPHERTEXT_LEN], SignalBorrowedBuffer presentation_bytes); + +SignalFfiError *signal_profile_key_credential_presentation_get_uuid_ciphertext(unsigned char (*out)[SignalUUID_CIPHERTEXT_LEN], SignalBorrowedBuffer presentation_bytes); + +SignalFfiError *signal_profile_key_credential_request_check_valid_contents(SignalBorrowedBuffer buffer); + +SignalFfiError *signal_profile_key_credential_request_context_check_valid_contents(SignalBorrowedBuffer buffer); + +SignalFfiError *signal_profile_key_credential_request_context_get_request(unsigned char (*out)[SignalPROFILE_KEY_CREDENTIAL_REQUEST_LEN], const unsigned char (*context)[SignalPROFILE_KEY_CREDENTIAL_REQUEST_CONTEXT_LEN]); + +SignalFfiError *signal_profile_key_derive_access_key(uint8_t (*out)[SignalACCESS_KEY_LEN], const unsigned char (*profile_key)[SignalPROFILE_KEY_LEN]); + +SignalFfiError *signal_profile_key_get_commitment(unsigned char (*out)[SignalPROFILE_KEY_COMMITMENT_LEN], const unsigned char (*profile_key)[SignalPROFILE_KEY_LEN], const SignalServiceIdFixedWidthBinaryBytes *user_id); + +SignalFfiError *signal_profile_key_get_profile_key_version(uint8_t (*out)[SignalPROFILE_KEY_VERSION_ENCODED_LEN], const unsigned char (*profile_key)[SignalPROFILE_KEY_LEN], const SignalServiceIdFixedWidthBinaryBytes *user_id); + +SignalFfiError *signal_provisioning_chat_connection_connect(SignalCPromiseMutPointerProvisioningChatConnection *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerConnectionManager connection_manager); + +SignalFfiError *signal_provisioning_chat_connection_destroy(SignalMutPointerProvisioningChatConnection p); + +SignalFfiError *signal_provisioning_chat_connection_disconnect(SignalCPromisebool *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerProvisioningChatConnection chat); + +SignalFfiError *signal_provisioning_chat_connection_info(SignalMutPointerChatConnectionInfo *out, SignalConstPointerProvisioningChatConnection chat); + +SignalFfiError *signal_provisioning_chat_connection_init_listener(SignalConstPointerProvisioningChatConnection chat, SignalConstPointerFfiProvisioningListenerStruct listener); + +SignalFfiError *signal_publickey_clone(SignalMutPointerPublicKey *new_obj, SignalConstPointerPublicKey obj); + +SignalFfiError *signal_publickey_deserialize(SignalMutPointerPublicKey *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_publickey_destroy(SignalMutPointerPublicKey p); + +SignalFfiError *signal_publickey_equals(bool *out, SignalConstPointerPublicKey lhs, SignalConstPointerPublicKey rhs); + +SignalFfiError *signal_publickey_get_public_key_bytes(SignalOwnedBuffer *out, SignalConstPointerPublicKey obj); + +SignalFfiError *signal_publickey_hpke_seal(SignalOwnedBuffer *out, SignalConstPointerPublicKey pk, SignalBorrowedBuffer plaintext, SignalBorrowedBuffer info, SignalBorrowedBuffer associated_data); + +SignalFfiError *signal_publickey_serialize(SignalOwnedBuffer *out, SignalConstPointerPublicKey obj); + +SignalFfiError *signal_publickey_verify(bool *out, SignalConstPointerPublicKey key, SignalBorrowedBuffer message, SignalBorrowedBuffer signature); + +SignalFfiError *signal_receipt_credential_check_valid_contents(SignalBorrowedBuffer buffer); + +SignalFfiError *signal_receipt_credential_get_receipt_expiration_time(uint64_t *out, const unsigned char (*receipt_credential)[SignalRECEIPT_CREDENTIAL_LEN]); + +SignalFfiError *signal_receipt_credential_get_receipt_level(uint64_t *out, const unsigned char (*receipt_credential)[SignalRECEIPT_CREDENTIAL_LEN]); + +SignalFfiError *signal_receipt_credential_presentation_check_valid_contents(SignalBorrowedBuffer buffer); + +SignalFfiError *signal_receipt_credential_presentation_get_receipt_expiration_time(uint64_t *out, const unsigned char (*presentation)[SignalRECEIPT_CREDENTIAL_PRESENTATION_LEN]); + +SignalFfiError *signal_receipt_credential_presentation_get_receipt_level(uint64_t *out, const unsigned char (*presentation)[SignalRECEIPT_CREDENTIAL_PRESENTATION_LEN]); + +SignalFfiError *signal_receipt_credential_presentation_get_receipt_serial(uint8_t (*out)[SignalRECEIPT_SERIAL_LEN], const unsigned char (*presentation)[SignalRECEIPT_CREDENTIAL_PRESENTATION_LEN]); + +SignalFfiError *signal_receipt_credential_request_check_valid_contents(SignalBorrowedBuffer buffer); + +SignalFfiError *signal_receipt_credential_request_context_check_valid_contents(SignalBorrowedBuffer buffer); + +SignalFfiError *signal_receipt_credential_request_context_get_request(unsigned char (*out)[SignalRECEIPT_CREDENTIAL_REQUEST_LEN], const unsigned char (*request_context)[SignalRECEIPT_CREDENTIAL_REQUEST_CONTEXT_LEN]); + +SignalFfiError *signal_receipt_credential_response_check_valid_contents(SignalBorrowedBuffer buffer); + +SignalFfiError *signal_register_account_request_create(SignalMutPointerRegisterAccountRequest *out); + +SignalFfiError *signal_register_account_request_destroy(SignalMutPointerRegisterAccountRequest p); + +SignalFfiError *signal_register_account_request_set_account_password(SignalConstPointerRegisterAccountRequest register_account, const char *account_password); + +SignalFfiError *signal_register_account_request_set_apn_push_token(SignalConstPointerRegisterAccountRequest register_account, const char *apn_push_token); + +SignalFfiError *signal_register_account_request_set_identity_pq_last_resort_pre_key(SignalConstPointerRegisterAccountRequest register_account, uint8_t identity_type, SignalFfiSignedPublicPreKey pq_last_resort_pre_key); + +SignalFfiError *signal_register_account_request_set_identity_public_key(SignalConstPointerRegisterAccountRequest register_account, uint8_t identity_type, SignalConstPointerPublicKey identity_key); + +SignalFfiError *signal_register_account_request_set_identity_signed_pre_key(SignalConstPointerRegisterAccountRequest register_account, uint8_t identity_type, SignalFfiSignedPublicPreKey signed_pre_key); + +SignalFfiError *signal_register_account_request_set_skip_device_transfer(SignalConstPointerRegisterAccountRequest register_account); + +SignalFfiError *signal_register_account_response_destroy(SignalMutPointerRegisterAccountResponse p); + +SignalFfiError *signal_register_account_response_get_entitlement_backup_expiration_seconds(uint64_t *out, SignalConstPointerRegisterAccountResponse response); + +SignalFfiError *signal_register_account_response_get_entitlement_backup_level(uint64_t *out, SignalConstPointerRegisterAccountResponse response); + +SignalFfiError *signal_register_account_response_get_entitlement_badges(SignalOwnedBufferOfFfiRegisterResponseBadge *out, SignalConstPointerRegisterAccountResponse response); + +SignalFfiError *signal_register_account_response_get_identity(SignalServiceIdFixedWidthBinaryBytes *out, SignalConstPointerRegisterAccountResponse response, uint8_t identity_type); + +SignalFfiError *signal_register_account_response_get_number(const char **out, SignalConstPointerRegisterAccountResponse response); + +SignalFfiError *signal_register_account_response_get_reregistration(bool *out, SignalConstPointerRegisterAccountResponse response); + +SignalFfiError *signal_register_account_response_get_storage_capable(bool *out, SignalConstPointerRegisterAccountResponse response); + +SignalFfiError *signal_register_account_response_get_username_hash(SignalOwnedBuffer *out, SignalConstPointerRegisterAccountResponse response); + +SignalFfiError *signal_register_account_response_get_username_link_handle(SignalOptionalUuid *out, SignalConstPointerRegisterAccountResponse response); + +SignalFfiError *signal_registration_account_attributes_create(SignalMutPointerRegistrationAccountAttributes *out, SignalBorrowedBuffer recovery_password, uint16_t aci_registration_id, uint16_t pni_registration_id, const char *registration_lock, const uint8_t (*unidentified_access_key)[16], bool unrestricted_unidentified_access, SignalBorrowedBytestringArray capabilities, bool discoverable_by_phone_number); + +SignalFfiError *signal_registration_account_attributes_destroy(SignalMutPointerRegistrationAccountAttributes p); + +SignalFfiError *signal_registration_service_check_svr2_credentials(SignalCPromiseFfiCheckSvr2CredentialsResponse *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerRegistrationService service, SignalBorrowedBytestringArray svr_tokens); + +SignalFfiError *signal_registration_service_create_session(SignalCPromiseMutPointerRegistrationService *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalFfiRegistrationCreateSessionRequest create_session, SignalConstPointerFfiConnectChatBridgeStruct connect_chat); + +SignalFfiError *signal_registration_service_destroy(SignalMutPointerRegistrationService p); + +SignalFfiError *signal_registration_service_register_account(SignalCPromiseMutPointerRegisterAccountResponse *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerRegistrationService service, SignalConstPointerRegisterAccountRequest register_account, SignalConstPointerRegistrationAccountAttributes account_attributes); + +SignalFfiError *signal_registration_service_registration_session(SignalMutPointerRegistrationSession *out, SignalConstPointerRegistrationService service); + +SignalFfiError *signal_registration_service_request_push_challenge(SignalCPromisebool *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerRegistrationService service, const char *push_token); + +SignalFfiError *signal_registration_service_request_verification_code(SignalCPromisebool *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerRegistrationService service, const char *transport, const char *client, SignalBorrowedBytestringArray languages); + +SignalFfiError *signal_registration_service_reregister_account(SignalCPromiseMutPointerRegisterAccountResponse *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerFfiConnectChatBridgeStruct connect_chat, const char *number, SignalConstPointerRegisterAccountRequest register_account, SignalConstPointerRegistrationAccountAttributes account_attributes); + +SignalFfiError *signal_registration_service_resume_session(SignalCPromiseMutPointerRegistrationService *promise, SignalConstPointerTokioAsyncContext async_runtime, const char *session_id, const char *number, SignalConstPointerFfiConnectChatBridgeStruct connect_chat); + +SignalFfiError *signal_registration_service_session_id(const char **out, SignalConstPointerRegistrationService service); + +SignalFfiError *signal_registration_service_submit_captcha(SignalCPromisebool *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerRegistrationService service, const char *captcha_value); + +SignalFfiError *signal_registration_service_submit_push_challenge(SignalCPromisebool *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerRegistrationService service, const char *push_challenge); + +SignalFfiError *signal_registration_service_submit_verification_code(SignalCPromisebool *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerRegistrationService service, const char *code); + +SignalFfiError *signal_registration_session_destroy(SignalMutPointerRegistrationSession p); + +SignalFfiError *signal_registration_session_get_allowed_to_request_code(bool *out, SignalConstPointerRegistrationSession session); + +SignalFfiError *signal_registration_session_get_next_call_seconds(uint32_t *out, SignalConstPointerRegistrationSession session); + +SignalFfiError *signal_registration_session_get_next_sms_seconds(uint32_t *out, SignalConstPointerRegistrationSession session); + +SignalFfiError *signal_registration_session_get_next_verification_attempt_seconds(uint32_t *out, SignalConstPointerRegistrationSession session); + +SignalFfiError *signal_registration_session_get_requested_information(SignalOwnedBuffer *out, SignalConstPointerRegistrationSession session); + +SignalFfiError *signal_registration_session_get_verified(bool *out, SignalConstPointerRegistrationSession session); + +SignalFfiError *signal_sanitized_metadata_clone(SignalMutPointerSanitizedMetadata *new_obj, SignalConstPointerSanitizedMetadata obj); + +SignalFfiError *signal_sanitized_metadata_destroy(SignalMutPointerSanitizedMetadata p); + +SignalFfiError *signal_sanitized_metadata_get_data_len(uint64_t *out, SignalConstPointerSanitizedMetadata sanitized); + +SignalFfiError *signal_sanitized_metadata_get_data_offset(uint64_t *out, SignalConstPointerSanitizedMetadata sanitized); + +SignalFfiError *signal_sanitized_metadata_get_metadata(SignalOwnedBuffer *out, SignalConstPointerSanitizedMetadata sanitized); + +SignalFfiError *signal_sealed_sender_multi_recipient_encrypt(SignalOwnedBuffer *out, SignalBorrowedSliceOfConstPointerProtocolAddress recipients, SignalBorrowedSliceOfConstPointerSessionRecord recipient_sessions, SignalBorrowedBuffer excluded_recipients, SignalConstPointerUnidentifiedSenderMessageContent content, SignalConstPointerFfiIdentityKeyStoreStruct identity_key_store); + +SignalFfiError *signal_sealed_sender_multi_recipient_message_for_single_recipient(SignalOwnedBuffer *out, SignalBorrowedBuffer encoded_multi_recipient_message); + +SignalFfiError *signal_sealed_session_cipher_decrypt_to_usmc(SignalMutPointerUnidentifiedSenderMessageContent *out, SignalBorrowedBuffer ctext, SignalConstPointerFfiIdentityKeyStoreStruct identity_store); + +SignalFfiError *signal_sealed_session_cipher_encrypt(SignalOwnedBuffer *out, SignalConstPointerProtocolAddress destination, SignalConstPointerUnidentifiedSenderMessageContent content, SignalConstPointerFfiIdentityKeyStoreStruct identity_key_store); + +SignalFfiError *signal_secure_value_recovery_for_backups_create_new_backup_chain(SignalOwnedBuffer *out, uint8_t environment, const SignalBackupKeyBytes *backup_key); + +SignalFfiError *signal_secure_value_recovery_for_backups_remove_backup(SignalCPromisebool *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerConnectionManager connection_manager, const char *username, const char *password); + +SignalFfiError *signal_secure_value_recovery_for_backups_restore_backup_from_server(SignalCPromiseMutPointerBackupRestoreResponse *promise, SignalConstPointerTokioAsyncContext async_runtime, const SignalBackupKeyBytes *backup_key, SignalBorrowedBuffer metadata, SignalConstPointerConnectionManager connection_manager, const char *username, const char *password); + +SignalFfiError *signal_secure_value_recovery_for_backups_store_backup(SignalCPromiseMutPointerBackupStoreResponse *promise, SignalConstPointerTokioAsyncContext async_runtime, const SignalBackupKeyBytes *backup_key, SignalBorrowedBuffer previous_secret_data, SignalConstPointerConnectionManager connection_manager, const char *username, const char *password); + +SignalFfiError *signal_sender_certificate_clone(SignalMutPointerSenderCertificate *new_obj, SignalConstPointerSenderCertificate obj); + +SignalFfiError *signal_sender_certificate_deserialize(SignalMutPointerSenderCertificate *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_sender_certificate_destroy(SignalMutPointerSenderCertificate p); + +SignalFfiError *signal_sender_certificate_get_certificate(SignalOwnedBuffer *out, SignalConstPointerSenderCertificate obj); + +SignalFfiError *signal_sender_certificate_get_device_id(uint32_t *out, SignalConstPointerSenderCertificate obj); + +SignalFfiError *signal_sender_certificate_get_expiration(uint64_t *out, SignalConstPointerSenderCertificate obj); + +SignalFfiError *signal_sender_certificate_get_key(SignalMutPointerPublicKey *out, SignalConstPointerSenderCertificate obj); + +SignalFfiError *signal_sender_certificate_get_sender_e164(const char **out, SignalConstPointerSenderCertificate obj); + +SignalFfiError *signal_sender_certificate_get_sender_uuid(const char **out, SignalConstPointerSenderCertificate obj); + +SignalFfiError *signal_sender_certificate_get_serialized(SignalOwnedBuffer *out, SignalConstPointerSenderCertificate obj); + +SignalFfiError *signal_sender_certificate_get_server_certificate(SignalMutPointerServerCertificate *out, SignalConstPointerSenderCertificate cert); + +SignalFfiError *signal_sender_certificate_get_signature(SignalOwnedBuffer *out, SignalConstPointerSenderCertificate obj); + +SignalFfiError *signal_sender_certificate_new(SignalMutPointerSenderCertificate *out, const char *sender_uuid, const char *sender_e164, uint32_t sender_device_id, SignalConstPointerPublicKey sender_key, uint64_t expiration, SignalConstPointerServerCertificate signer_cert, SignalConstPointerPrivateKey signer_key); + +SignalFfiError *signal_sender_certificate_validate(bool *out, SignalConstPointerSenderCertificate cert, SignalBorrowedSliceOfConstPointerPublicKey trust_roots, uint64_t time); + +SignalFfiError *signal_sender_key_distribution_message_clone(SignalMutPointerSenderKeyDistributionMessage *new_obj, SignalConstPointerSenderKeyDistributionMessage obj); + +SignalFfiError *signal_sender_key_distribution_message_create(SignalMutPointerSenderKeyDistributionMessage *out, SignalConstPointerProtocolAddress sender, SignalUuid distribution_id, SignalConstPointerFfiSenderKeyStoreStruct store); + +SignalFfiError *signal_sender_key_distribution_message_deserialize(SignalMutPointerSenderKeyDistributionMessage *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_sender_key_distribution_message_destroy(SignalMutPointerSenderKeyDistributionMessage p); + +SignalFfiError *signal_sender_key_distribution_message_get_chain_id(uint32_t *out, SignalConstPointerSenderKeyDistributionMessage obj); + +SignalFfiError *signal_sender_key_distribution_message_get_chain_key(SignalOwnedBuffer *out, SignalConstPointerSenderKeyDistributionMessage obj); + +SignalFfiError *signal_sender_key_distribution_message_get_distribution_id(SignalUuid *out, SignalConstPointerSenderKeyDistributionMessage obj); + +SignalFfiError *signal_sender_key_distribution_message_get_iteration(uint32_t *out, SignalConstPointerSenderKeyDistributionMessage obj); + +SignalFfiError *signal_sender_key_distribution_message_get_signature_key(SignalMutPointerPublicKey *out, SignalConstPointerSenderKeyDistributionMessage m); + +SignalFfiError *signal_sender_key_distribution_message_new(SignalMutPointerSenderKeyDistributionMessage *out, uint8_t message_version, SignalUuid distribution_id, uint32_t chain_id, uint32_t iteration, SignalBorrowedBuffer chainkey, SignalConstPointerPublicKey pk); + +SignalFfiError *signal_sender_key_distribution_message_serialize(SignalOwnedBuffer *out, SignalConstPointerSenderKeyDistributionMessage obj); + +SignalFfiError *signal_sender_key_message_clone(SignalMutPointerSenderKeyMessage *new_obj, SignalConstPointerSenderKeyMessage obj); + +SignalFfiError *signal_sender_key_message_deserialize(SignalMutPointerSenderKeyMessage *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_sender_key_message_destroy(SignalMutPointerSenderKeyMessage p); + +SignalFfiError *signal_sender_key_message_get_chain_id(uint32_t *out, SignalConstPointerSenderKeyMessage obj); + +SignalFfiError *signal_sender_key_message_get_cipher_text(SignalOwnedBuffer *out, SignalConstPointerSenderKeyMessage obj); + +SignalFfiError *signal_sender_key_message_get_distribution_id(SignalUuid *out, SignalConstPointerSenderKeyMessage obj); + +SignalFfiError *signal_sender_key_message_get_iteration(uint32_t *out, SignalConstPointerSenderKeyMessage obj); + +SignalFfiError *signal_sender_key_message_new(SignalMutPointerSenderKeyMessage *out, uint8_t message_version, SignalUuid distribution_id, uint32_t chain_id, uint32_t iteration, SignalBorrowedBuffer ciphertext, SignalConstPointerPrivateKey pk); + +SignalFfiError *signal_sender_key_message_serialize(SignalOwnedBuffer *out, SignalConstPointerSenderKeyMessage obj); + +SignalFfiError *signal_sender_key_message_verify_signature(bool *out, SignalConstPointerSenderKeyMessage skm, SignalConstPointerPublicKey pubkey); + +SignalFfiError *signal_sender_key_record_clone(SignalMutPointerSenderKeyRecord *new_obj, SignalConstPointerSenderKeyRecord obj); + +SignalFfiError *signal_sender_key_record_deserialize(SignalMutPointerSenderKeyRecord *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_sender_key_record_destroy(SignalMutPointerSenderKeyRecord p); + +SignalFfiError *signal_sender_key_record_serialize(SignalOwnedBuffer *out, SignalConstPointerSenderKeyRecord obj); + +SignalFfiError *signal_server_certificate_clone(SignalMutPointerServerCertificate *new_obj, SignalConstPointerServerCertificate obj); + +SignalFfiError *signal_server_certificate_deserialize(SignalMutPointerServerCertificate *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_server_certificate_destroy(SignalMutPointerServerCertificate p); + +SignalFfiError *signal_server_certificate_get_certificate(SignalOwnedBuffer *out, SignalConstPointerServerCertificate obj); + +SignalFfiError *signal_server_certificate_get_key(SignalMutPointerPublicKey *out, SignalConstPointerServerCertificate obj); + +SignalFfiError *signal_server_certificate_get_key_id(uint32_t *out, SignalConstPointerServerCertificate obj); + +SignalFfiError *signal_server_certificate_get_serialized(SignalOwnedBuffer *out, SignalConstPointerServerCertificate obj); + +SignalFfiError *signal_server_certificate_get_signature(SignalOwnedBuffer *out, SignalConstPointerServerCertificate obj); + +SignalFfiError *signal_server_certificate_new(SignalMutPointerServerCertificate *out, uint32_t key_id, SignalConstPointerPublicKey server_key, SignalConstPointerPrivateKey trust_root); + +SignalFfiError *signal_server_message_ack_destroy(SignalMutPointerServerMessageAck p); + +SignalFfiError *signal_server_message_ack_send(SignalConstPointerServerMessageAck ack); + +SignalFfiError *signal_server_public_params_create_auth_credential_with_pni_presentation_deterministic(SignalOwnedBuffer *out, SignalConstPointerServerPublicParams server_public_params, const uint8_t (*randomness)[SignalRANDOMNESS_LEN], const unsigned char (*group_secret_params)[SignalGROUP_SECRET_PARAMS_LEN], SignalBorrowedBuffer auth_credential_with_pni_bytes); + +SignalFfiError *signal_server_public_params_create_expiring_profile_key_credential_presentation_deterministic(SignalOwnedBuffer *out, SignalConstPointerServerPublicParams server_public_params, const uint8_t (*randomness)[SignalRANDOMNESS_LEN], const unsigned char (*group_secret_params)[SignalGROUP_SECRET_PARAMS_LEN], const unsigned char (*profile_key_credential)[SignalEXPIRING_PROFILE_KEY_CREDENTIAL_LEN]); + +SignalFfiError *signal_server_public_params_create_profile_key_credential_request_context_deterministic(unsigned char (*out)[SignalPROFILE_KEY_CREDENTIAL_REQUEST_CONTEXT_LEN], SignalConstPointerServerPublicParams server_public_params, const uint8_t (*randomness)[SignalRANDOMNESS_LEN], const SignalServiceIdFixedWidthBinaryBytes *user_id, const unsigned char (*profile_key)[SignalPROFILE_KEY_LEN]); + +SignalFfiError *signal_server_public_params_create_receipt_credential_presentation_deterministic(unsigned char (*out)[SignalRECEIPT_CREDENTIAL_PRESENTATION_LEN], SignalConstPointerServerPublicParams server_public_params, const uint8_t (*randomness)[SignalRANDOMNESS_LEN], const unsigned char (*receipt_credential)[SignalRECEIPT_CREDENTIAL_LEN]); + +SignalFfiError *signal_server_public_params_create_receipt_credential_request_context_deterministic(unsigned char (*out)[SignalRECEIPT_CREDENTIAL_REQUEST_CONTEXT_LEN], SignalConstPointerServerPublicParams server_public_params, const uint8_t (*randomness)[SignalRANDOMNESS_LEN], const uint8_t (*receipt_serial)[SignalRECEIPT_SERIAL_LEN]); + +SignalFfiError *signal_server_public_params_deserialize(SignalMutPointerServerPublicParams *out, SignalBorrowedBuffer buffer); + +SignalFfiError *signal_server_public_params_destroy(SignalMutPointerServerPublicParams p); + +SignalFfiError *signal_server_public_params_get_endorsement_public_key(SignalOwnedBuffer *out, SignalConstPointerServerPublicParams params); + +SignalFfiError *signal_server_public_params_receive_auth_credential_with_pni_as_service_id(SignalOwnedBuffer *out, SignalConstPointerServerPublicParams params, const SignalServiceIdFixedWidthBinaryBytes *aci, const SignalServiceIdFixedWidthBinaryBytes *pni, uint64_t redemption_time, SignalBorrowedBuffer auth_credential_with_pni_response_bytes); + +SignalFfiError *signal_server_public_params_receive_expiring_profile_key_credential(unsigned char (*out)[SignalEXPIRING_PROFILE_KEY_CREDENTIAL_LEN], SignalConstPointerServerPublicParams server_public_params, const unsigned char (*request_context)[SignalPROFILE_KEY_CREDENTIAL_REQUEST_CONTEXT_LEN], const unsigned char (*response)[SignalEXPIRING_PROFILE_KEY_CREDENTIAL_RESPONSE_LEN], uint64_t current_time_in_seconds); + +SignalFfiError *signal_server_public_params_receive_receipt_credential(unsigned char (*out)[SignalRECEIPT_CREDENTIAL_LEN], SignalConstPointerServerPublicParams server_public_params, const unsigned char (*request_context)[SignalRECEIPT_CREDENTIAL_REQUEST_CONTEXT_LEN], const unsigned char (*response)[SignalRECEIPT_CREDENTIAL_RESPONSE_LEN]); + +SignalFfiError *signal_server_public_params_serialize(SignalOwnedBuffer *out, SignalConstPointerServerPublicParams handle); + +SignalFfiError *signal_server_public_params_verify_signature(SignalConstPointerServerPublicParams server_public_params, SignalBorrowedBuffer message, const uint8_t (*notary_signature)[SignalSIGNATURE_LEN]); + +SignalFfiError *signal_server_secret_params_deserialize(SignalMutPointerServerSecretParams *out, SignalBorrowedBuffer buffer); + +SignalFfiError *signal_server_secret_params_destroy(SignalMutPointerServerSecretParams p); + +SignalFfiError *signal_server_secret_params_generate_deterministic(SignalMutPointerServerSecretParams *out, const uint8_t (*randomness)[SignalRANDOMNESS_LEN]); + +SignalFfiError *signal_server_secret_params_get_public_params(SignalMutPointerServerPublicParams *out, SignalConstPointerServerSecretParams params); + +SignalFfiError *signal_server_secret_params_issue_auth_credential_with_pni_zkc_deterministic(SignalOwnedBuffer *out, SignalConstPointerServerSecretParams server_secret_params, const uint8_t (*randomness)[SignalRANDOMNESS_LEN], const SignalServiceIdFixedWidthBinaryBytes *aci, const SignalServiceIdFixedWidthBinaryBytes *pni, uint64_t redemption_time); + +SignalFfiError *signal_server_secret_params_issue_expiring_profile_key_credential_deterministic(unsigned char (*out)[SignalEXPIRING_PROFILE_KEY_CREDENTIAL_RESPONSE_LEN], SignalConstPointerServerSecretParams server_secret_params, const uint8_t (*randomness)[SignalRANDOMNESS_LEN], const unsigned char (*request)[SignalPROFILE_KEY_CREDENTIAL_REQUEST_LEN], const SignalServiceIdFixedWidthBinaryBytes *user_id, const unsigned char (*commitment)[SignalPROFILE_KEY_COMMITMENT_LEN], uint64_t expiration_in_seconds); + +SignalFfiError *signal_server_secret_params_issue_receipt_credential_deterministic(unsigned char (*out)[SignalRECEIPT_CREDENTIAL_RESPONSE_LEN], SignalConstPointerServerSecretParams server_secret_params, const uint8_t (*randomness)[SignalRANDOMNESS_LEN], const unsigned char (*request)[SignalRECEIPT_CREDENTIAL_REQUEST_LEN], uint64_t receipt_expiration_time, uint64_t receipt_level); + +SignalFfiError *signal_server_secret_params_serialize(SignalOwnedBuffer *out, SignalConstPointerServerSecretParams handle); + +SignalFfiError *signal_server_secret_params_sign_deterministic(uint8_t (*out)[SignalSIGNATURE_LEN], SignalConstPointerServerSecretParams params, const uint8_t (*randomness)[SignalRANDOMNESS_LEN], SignalBorrowedBuffer message); + +SignalFfiError *signal_server_secret_params_verify_auth_credential_presentation(SignalConstPointerServerSecretParams server_secret_params, const unsigned char (*group_public_params)[SignalGROUP_PUBLIC_PARAMS_LEN], SignalBorrowedBuffer presentation_bytes, uint64_t current_time_in_seconds); + +SignalFfiError *signal_server_secret_params_verify_profile_key_credential_presentation(SignalConstPointerServerSecretParams server_secret_params, const unsigned char (*group_public_params)[SignalGROUP_PUBLIC_PARAMS_LEN], SignalBorrowedBuffer presentation_bytes, uint64_t current_time_in_seconds); + +SignalFfiError *signal_server_secret_params_verify_receipt_credential_presentation(SignalConstPointerServerSecretParams server_secret_params, const unsigned char (*presentation)[SignalRECEIPT_CREDENTIAL_PRESENTATION_LEN]); + +SignalFfiError *signal_service_id_parse_from_service_id_binary(SignalServiceIdFixedWidthBinaryBytes *out, SignalBorrowedBuffer input); + +SignalFfiError *signal_service_id_parse_from_service_id_string(SignalServiceIdFixedWidthBinaryBytes *out, const char *input); + +SignalFfiError *signal_service_id_service_id_binary(SignalOwnedBuffer *out, const SignalServiceIdFixedWidthBinaryBytes *value); + +SignalFfiError *signal_service_id_service_id_log(const char **out, const SignalServiceIdFixedWidthBinaryBytes *value); + +SignalFfiError *signal_service_id_service_id_string(const char **out, const SignalServiceIdFixedWidthBinaryBytes *value); + +SignalFfiError *signal_session_record_archive_current_state(SignalMutPointerSessionRecord session_record); + +SignalFfiError *signal_session_record_clone(SignalMutPointerSessionRecord *new_obj, SignalConstPointerSessionRecord obj); + +SignalFfiError *signal_session_record_current_ratchet_key_matches(bool *out, SignalConstPointerSessionRecord s, SignalConstPointerPublicKey key); + +SignalFfiError *signal_session_record_deserialize(SignalMutPointerSessionRecord *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_session_record_destroy(SignalMutPointerSessionRecord p); + +SignalFfiError *signal_session_record_get_local_registration_id(uint32_t *out, SignalConstPointerSessionRecord obj); + +SignalFfiError *signal_session_record_get_remote_registration_id(uint32_t *out, SignalConstPointerSessionRecord obj); + +SignalFfiError *signal_session_record_has_usable_sender_chain(bool *out, SignalConstPointerSessionRecord s, uint64_t now); + +SignalFfiError *signal_session_record_serialize(SignalOwnedBuffer *out, SignalConstPointerSessionRecord obj); + +SignalFfiError *signal_sgx_client_state_complete_handshake(SignalMutPointerSgxClientState cli, SignalBorrowedBuffer handshake_received); + +SignalFfiError *signal_sgx_client_state_destroy(SignalMutPointerSgxClientState p); + +SignalFfiError *signal_sgx_client_state_established_recv(SignalOwnedBuffer *out, SignalMutPointerSgxClientState cli, SignalBorrowedBuffer received_ciphertext); + +SignalFfiError *signal_sgx_client_state_established_send(SignalOwnedBuffer *out, SignalMutPointerSgxClientState cli, SignalBorrowedBuffer plaintext_to_send); + +SignalFfiError *signal_sgx_client_state_initial_request(SignalOwnedBuffer *out, SignalConstPointerSgxClientState obj); + +SignalFfiError *signal_signal_media_check_available(void); + +SignalFfiError *signal_signed_pre_key_record_clone(SignalMutPointerSignedPreKeyRecord *new_obj, SignalConstPointerSignedPreKeyRecord obj); + +SignalFfiError *signal_signed_pre_key_record_deserialize(SignalMutPointerSignedPreKeyRecord *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_signed_pre_key_record_destroy(SignalMutPointerSignedPreKeyRecord p); + +SignalFfiError *signal_signed_pre_key_record_get_id(uint32_t *out, SignalConstPointerSignedPreKeyRecord obj); + +SignalFfiError *signal_signed_pre_key_record_get_private_key(SignalMutPointerPrivateKey *out, SignalConstPointerSignedPreKeyRecord obj); + +SignalFfiError *signal_signed_pre_key_record_get_public_key(SignalMutPointerPublicKey *out, SignalConstPointerSignedPreKeyRecord obj); + +SignalFfiError *signal_signed_pre_key_record_get_signature(SignalOwnedBuffer *out, SignalConstPointerSignedPreKeyRecord obj); + +SignalFfiError *signal_signed_pre_key_record_get_timestamp(uint64_t *out, SignalConstPointerSignedPreKeyRecord obj); + +SignalFfiError *signal_signed_pre_key_record_new(SignalMutPointerSignedPreKeyRecord *out, uint32_t id, uint64_t timestamp, SignalConstPointerPublicKey pub_key, SignalConstPointerPrivateKey priv_key, SignalBorrowedBuffer signature); + +SignalFfiError *signal_signed_pre_key_record_serialize(SignalOwnedBuffer *out, SignalConstPointerSignedPreKeyRecord obj); + +SignalFfiError *signal_svr2_client_new(SignalMutPointerSgxClientState *out, SignalBorrowedBuffer mrenclave, SignalBorrowedBuffer attestation_msg, uint64_t current_timestamp); + +SignalFfiError *signal_tokio_async_context_cancel(SignalConstPointerTokioAsyncContext context, uint64_t raw_cancellation_id); + +SignalFfiError *signal_tokio_async_context_destroy(SignalMutPointerTokioAsyncContext p); + +SignalFfiError *signal_tokio_async_context_new(SignalMutPointerTokioAsyncContext *out); + +SignalFfiError *signal_unauthenticated_chat_connection_account_exists(SignalCPromisebool *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerUnauthenticatedChatConnection chat, const SignalServiceIdFixedWidthBinaryBytes *account); + +SignalFfiError *signal_unauthenticated_chat_connection_connect(SignalCPromiseMutPointerUnauthenticatedChatConnection *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerConnectionManager connection_manager, SignalBorrowedBytestringArray languages); + +SignalFfiError *signal_unauthenticated_chat_connection_destroy(SignalMutPointerUnauthenticatedChatConnection p); + +SignalFfiError *signal_unauthenticated_chat_connection_disconnect(SignalCPromisebool *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerUnauthenticatedChatConnection chat); + +SignalFfiError *signal_unauthenticated_chat_connection_get_pre_keys_access_group_auth(SignalCPromiseFfiPreKeysResponse *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerUnauthenticatedChatConnection chat, SignalBorrowedBuffer auth, const SignalServiceIdFixedWidthBinaryBytes *target, int32_t device); + +SignalFfiError *signal_unauthenticated_chat_connection_get_pre_keys_access_key_auth(SignalCPromiseFfiPreKeysResponse *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerUnauthenticatedChatConnection chat, const uint8_t (*auth)[16], const SignalServiceIdFixedWidthBinaryBytes *target, int32_t device); + +SignalFfiError *signal_unauthenticated_chat_connection_info(SignalMutPointerChatConnectionInfo *out, SignalConstPointerUnauthenticatedChatConnection chat); + +SignalFfiError *signal_unauthenticated_chat_connection_init_listener(SignalConstPointerUnauthenticatedChatConnection chat, SignalConstPointerFfiChatListenerStruct listener); + +SignalFfiError *signal_unauthenticated_chat_connection_look_up_username_hash(SignalCPromiseOptionalUuid *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerUnauthenticatedChatConnection chat, SignalBorrowedBuffer hash); + +SignalFfiError *signal_unauthenticated_chat_connection_look_up_username_link(SignalCPromiseOptionalPairOfc_charu832 *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerUnauthenticatedChatConnection chat, SignalUuid uuid, SignalBorrowedBuffer entropy); + +SignalFfiError *signal_unauthenticated_chat_connection_send(SignalCPromiseFfiChatResponse *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerUnauthenticatedChatConnection chat, SignalConstPointerHttpRequest http_request, uint32_t timeout_millis); + +SignalFfiError *signal_unauthenticated_chat_connection_send_multi_recipient_message(SignalCPromiseOwnedBufferOfServiceIdFixedWidthBinaryBytes *promise, SignalConstPointerTokioAsyncContext async_runtime, SignalConstPointerUnauthenticatedChatConnection chat, SignalBorrowedBuffer payload, uint64_t timestamp, SignalBorrowedBuffer auth, bool online_only, bool is_urgent); + +SignalFfiError *signal_unidentified_sender_message_content_deserialize(SignalMutPointerUnidentifiedSenderMessageContent *out, SignalBorrowedBuffer data); + +SignalFfiError *signal_unidentified_sender_message_content_destroy(SignalMutPointerUnidentifiedSenderMessageContent p); + +SignalFfiError *signal_unidentified_sender_message_content_get_content_hint(uint32_t *out, SignalConstPointerUnidentifiedSenderMessageContent m); + +SignalFfiError *signal_unidentified_sender_message_content_get_contents(SignalOwnedBuffer *out, SignalConstPointerUnidentifiedSenderMessageContent obj); + +SignalFfiError *signal_unidentified_sender_message_content_get_group_id_or_empty(SignalOwnedBuffer *out, SignalConstPointerUnidentifiedSenderMessageContent m); + +SignalFfiError *signal_unidentified_sender_message_content_get_msg_type(uint8_t *out, SignalConstPointerUnidentifiedSenderMessageContent m); + +SignalFfiError *signal_unidentified_sender_message_content_get_sender_cert(SignalMutPointerSenderCertificate *out, SignalConstPointerUnidentifiedSenderMessageContent m); + +SignalFfiError *signal_unidentified_sender_message_content_new(SignalMutPointerUnidentifiedSenderMessageContent *out, SignalConstPointerCiphertextMessage message, SignalConstPointerSenderCertificate sender, uint32_t content_hint, SignalBorrowedBuffer group_id); + +SignalFfiError *signal_unidentified_sender_message_content_new_from_content_and_type(SignalMutPointerUnidentifiedSenderMessageContent *out, SignalBorrowedBuffer message_content, uint8_t message_type, SignalConstPointerSenderCertificate sender, uint32_t content_hint, SignalBorrowedBuffer group_id); + +SignalFfiError *signal_unidentified_sender_message_content_serialize(SignalOwnedBuffer *out, SignalConstPointerUnidentifiedSenderMessageContent obj); + +SignalFfiError *signal_username_candidates_from(SignalStringArray *out, const char *nickname, uint32_t min_len, uint32_t max_len); + +SignalFfiError *signal_username_hash(uint8_t (*out)[32], const char *username); + +SignalFfiError *signal_username_hash_from_parts(uint8_t (*out)[32], const char *nickname, const char *discriminator, uint32_t min_len, uint32_t max_len); + +SignalFfiError *signal_username_link_create(SignalOwnedBuffer *out, const char *username, SignalBorrowedBuffer entropy); + +SignalFfiError *signal_username_link_decrypt_username(const char **out, SignalBorrowedBuffer entropy, SignalBorrowedBuffer encrypted_username); + +SignalFfiError *signal_username_proof(SignalOwnedBuffer *out, const char *username, const uint8_t (*randomness)[32]); + +SignalFfiError *signal_username_verify(SignalBorrowedBuffer proof, SignalBorrowedBuffer hash); + +SignalFfiError *signal_uuid_ciphertext_check_valid_contents(SignalBorrowedBuffer buffer); + +SignalFfiError *signal_validating_mac_destroy(SignalMutPointerValidatingMac p); + +SignalFfiError *signal_validating_mac_finalize(int32_t *out, SignalMutPointerValidatingMac mac); + +SignalFfiError *signal_validating_mac_initialize(SignalMutPointerValidatingMac *out, SignalBorrowedBuffer key, uint32_t chunk_size, SignalBorrowedBuffer digests); + +SignalFfiError *signal_validating_mac_update(int32_t *out, SignalMutPointerValidatingMac mac, SignalBorrowedBuffer bytes, uint32_t offset, uint32_t length); + +SignalFfiError *signal_webp_sanitizer_sanitize(SignalConstPointerFfiSyncInputStreamStruct input); + +#endif /* SIGNAL_FFI_H_ */ diff --git a/pkg/libsignalgo/logging.go b/pkg/libsignalgo/logging.go index 6a35e4d..9d21afa 100644 --- a/pkg/libsignalgo/logging.go +++ b/pkg/libsignalgo/logging.go @@ -19,9 +19,8 @@ package libsignalgo /* #include <./libsignal-ffi.h> -extern int signal_log_callback(void *ctx, SignalLogLevel level, SignalCStringPtr file, uint32_t line, SignalCStringPtr message); -extern int signal_log_flush_callback(void *ctx); -extern void signal_log_destroy_callback(void *ctx); +extern void signal_log_callback(void *ctx, SignalLogLevel level, char *file, uint32_t line, char *message); +extern void signal_log_flush_callback(void *ctx); */ import "C" import ( @@ -32,20 +31,13 @@ import ( var ffiLogger Logger //export signal_log_callback -func signal_log_callback(ctx unsafe.Pointer, level C.SignalLogLevel, file C.SignalCStringPtr, line C.uint32_t, message C.SignalCStringPtr) C.int { - ffiLogger.Log(LogLevel(int(level)), CopyCStringToString(file), uint(line), CopyCStringToString(message)) - return 0 +func signal_log_callback(ctx unsafe.Pointer, level C.SignalLogLevel, file *C.char, line C.uint32_t, message *C.char) { + ffiLogger.Log(LogLevel(int(level)), C.GoString(file), uint(line), C.GoString(message)) } //export signal_log_flush_callback -func signal_log_flush_callback(ctx unsafe.Pointer) C.int { +func signal_log_flush_callback(ctx unsafe.Pointer) { ffiLogger.Flush() - return 0 -} - -//export signal_log_destroy_callback -func signal_log_destroy_callback(ctx unsafe.Pointer) { - ffiLogger.Destroy() } type LogLevel int @@ -61,14 +53,12 @@ const ( type Logger interface { Log(level LogLevel, file string, line uint, message string) Flush() - Destroy() } func InitLogger(level LogLevel, logger Logger) { ffiLogger = logger - C.signal_init_logger(C.SignalLogLevel(level), C.SignalFfiLoggerStruct{ - log: C.SignalFfiLoggerLog(C.signal_log_callback), - flush: C.SignalFfiLoggerFlush(C.signal_log_flush_callback), - destroy: C.SignalFfiLoggerDestroy(C.signal_log_destroy_callback), + C.signal_init_logger(C.SignalLogLevel(level), C.SignalFfiLogger{ + log: C.SignalLogCallback(C.signal_log_callback), + flush: C.SignalLogFlushCallback(C.signal_log_flush_callback), }) } diff --git a/pkg/libsignalgo/message.go b/pkg/libsignalgo/message.go index 91aa7f0..f016daa 100644 --- a/pkg/libsignalgo/message.go +++ b/pkg/libsignalgo/message.go @@ -27,7 +27,7 @@ import ( "time" ) -func Encrypt(ctx context.Context, plaintext []byte, forAddress, localAddress *Address, sessionStore SessionStore, identityKeyStore IdentityKeyStore) (*CiphertextMessage, error) { +func Encrypt(ctx context.Context, plaintext []byte, forAddress *Address, sessionStore SessionStore, identityKeyStore IdentityKeyStore) (*CiphertextMessage, error) { var ciphertextMessage C.SignalMutPointerCiphertextMessage var now C.uint64_t = C.uint64_t(time.Now().Unix()) callbackCtx := NewCallbackContext(ctx) @@ -36,21 +36,19 @@ func Encrypt(ctx context.Context, plaintext []byte, forAddress, localAddress *Ad &ciphertextMessage, BytesToBuffer(plaintext), forAddress.constPtr(), - localAddress.constPtr(), callbackCtx.wrapSessionStore(sessionStore), callbackCtx.wrapIdentityKeyStore(identityKeyStore), now, ) runtime.KeepAlive(plaintext) runtime.KeepAlive(forAddress) - runtime.KeepAlive(localAddress) if signalFfiError != nil { return nil, callbackCtx.wrapError(signalFfiError) } return wrapCiphertextMessage(ciphertextMessage.raw), nil } -func Decrypt(ctx context.Context, message *Message, fromAddress, localAddress *Address, sessionStore SessionStore, identityStore IdentityKeyStore) ([]byte, error) { +func Decrypt(ctx context.Context, message *Message, fromAddress *Address, sessionStore SessionStore, identityStore IdentityKeyStore) ([]byte, error) { callbackCtx := NewCallbackContext(ctx) defer callbackCtx.Unref() var decrypted C.SignalOwnedBuffer = C.SignalOwnedBuffer{} @@ -58,13 +56,11 @@ func Decrypt(ctx context.Context, message *Message, fromAddress, localAddress *A &decrypted, message.constPtr(), fromAddress.constPtr(), - localAddress.constPtr(), callbackCtx.wrapSessionStore(sessionStore), callbackCtx.wrapIdentityKeyStore(identityStore), ) runtime.KeepAlive(message) runtime.KeepAlive(fromAddress) - runtime.KeepAlive(localAddress) if signalFfiError != nil { return nil, callbackCtx.wrapError(signalFfiError) } @@ -73,10 +69,10 @@ func Decrypt(ctx context.Context, message *Message, fromAddress, localAddress *A type Message struct { nc noCopy - ptr *C.SignalSignalMessage + ptr *C.SignalMessage } -func wrapMessage(ptr *C.SignalSignalMessage) *Message { +func wrapMessage(ptr *C.SignalMessage) *Message { message := &Message{ptr: ptr} runtime.SetFinalizer(message, (*Message).Destroy) return message @@ -158,3 +154,22 @@ func (m *Message) GetCounter() (uint32, error) { } return uint32(counter), nil } + +func (m *Message) VerifyMAC(sender, receiver *PublicKey, macKey []byte) (bool, error) { + var result C.bool + signalFfiError := C.signal_message_verify_mac( + &result, + m.constPtr(), + sender.constPtr(), + receiver.constPtr(), + BytesToBuffer(macKey), + ) + runtime.KeepAlive(m) + runtime.KeepAlive(sender) + runtime.KeepAlive(receiver) + runtime.KeepAlive(macKey) + if signalFfiError != nil { + return false, wrapError(signalFfiError) + } + return bool(result), nil +} diff --git a/pkg/libsignalgo/messagebackupkey.go b/pkg/libsignalgo/messagebackupkey.go index 0bee04c..65b4136 100644 --- a/pkg/libsignalgo/messagebackupkey.go +++ b/pkg/libsignalgo/messagebackupkey.go @@ -20,17 +20,16 @@ package libsignalgo #include "./libsignal-ffi.h" */ import "C" -import "runtime" +import ( + "runtime" + "unsafe" +) type MessageBackupKey struct { nc noCopy ptr *C.SignalMessageBackupKey } -const MessageBackupKeyBytesLength = 32 - -type messageBackupKeyBytes = fixedArray32 - func wrapMessageBackupKey(ptr *C.SignalMessageBackupKey) *MessageBackupKey { backupKey := &MessageBackupKey{ptr: ptr} runtime.SetFinalizer(backupKey, (*MessageBackupKey).Destroy) @@ -39,12 +38,10 @@ func wrapMessageBackupKey(ptr *C.SignalMessageBackupKey) *MessageBackupKey { func MessageBackupKeyFromAccountEntropyPool(aep AccountEntropyPool, aci ServiceID) (*MessageBackupKey, error) { var bk C.SignalMutPointerMessageBackupKey - aepC, free := GoStringToCString(string(aep)) - defer free() signalFfiError := C.signal_message_backup_key_from_account_entropy_pool( &bk, - aepC, - aci.cConstFixedArray(), + C.CString(string(aep)), + aci.CFixedBytes(), nil, // TODO what's a forward secrecy token? ) runtime.KeepAlive(aep) @@ -58,8 +55,8 @@ func MessageBackupKeyFromBackupKeyAndID(backupKey *BackupKey, backupID *BackupID var bk C.SignalMutPointerMessageBackupKey signalFfiError := C.signal_message_backup_key_from_backup_key_and_backup_id( &bk, - backupKey.cConstFixedArray(), - backupID.cConstFixedArray(), + (*[C.SignalBACKUP_KEY_LEN]C.uint8_t)(unsafe.Pointer(backupKey)), + (*[BackupIDLength]C.uint8_t)(unsafe.Pointer(backupID)), nil, // TODO what's a forward secrecy token? ) runtime.KeepAlive(backupKey) @@ -83,28 +80,26 @@ func (bk *MessageBackupKey) Destroy() error { return wrapError(C.signal_message_backup_key_destroy(bk.mutPtr())) } -func (bk *MessageBackupKey) GetHMACKey() ([MessageBackupKeyBytesLength]byte, error) { - var out messageBackupKeyBytes +func (bk *MessageBackupKey) GetHMACKey() ([32]byte, error) { + var out [32]byte signalFfiError := C.signal_message_backup_key_get_hmac_key( - out.cFixedArray(), + (*[32]C.uint8_t)(unsafe.Pointer(&out)), bk.constPtr(), ) - runtime.KeepAlive(bk) if signalFfiError != nil { - return [MessageBackupKeyBytesLength]byte(out), wrapError(signalFfiError) + return out, wrapError(signalFfiError) } - return [MessageBackupKeyBytesLength]byte(out), nil + return out, nil } -func (bk *MessageBackupKey) GetAESKey() ([MessageBackupKeyBytesLength]byte, error) { - var out messageBackupKeyBytes +func (bk *MessageBackupKey) GetAESKey() ([32]byte, error) { + var out [32]byte signalFfiError := C.signal_message_backup_key_get_aes_key( - out.cFixedArray(), + (*[32]C.uint8_t)(unsafe.Pointer(&out)), bk.constPtr(), ) - runtime.KeepAlive(bk) if signalFfiError != nil { - return [MessageBackupKeyBytesLength]byte(out), wrapError(signalFfiError) + return out, wrapError(signalFfiError) } - return [MessageBackupKeyBytesLength]byte(out), nil + return out, nil } diff --git a/pkg/libsignalgo/prekey.go b/pkg/libsignalgo/prekey.go index e742ecd..4d01f89 100644 --- a/pkg/libsignalgo/prekey.go +++ b/pkg/libsignalgo/prekey.go @@ -26,7 +26,7 @@ import ( "runtime" ) -func DecryptPreKey(ctx context.Context, preKeyMessage *PreKeyMessage, fromAddress, localAddress *Address, sessionStore SessionStore, identityStore IdentityKeyStore, preKeyStore PreKeyStore, signedPreKeyStore SignedPreKeyStore, kyberPreKeyStore KyberPreKeyStore) ([]byte, error) { +func DecryptPreKey(ctx context.Context, preKeyMessage *PreKeyMessage, fromAddress *Address, sessionStore SessionStore, identityStore IdentityKeyStore, preKeyStore PreKeyStore, signedPreKeyStore SignedPreKeyStore, kyberPreKeyStore KyberPreKeyStore) ([]byte, error) { callbackCtx := NewCallbackContext(ctx) defer callbackCtx.Unref() var decrypted C.SignalOwnedBuffer = C.SignalOwnedBuffer{} @@ -34,7 +34,6 @@ func DecryptPreKey(ctx context.Context, preKeyMessage *PreKeyMessage, fromAddres &decrypted, preKeyMessage.constPtr(), fromAddress.constPtr(), - localAddress.constPtr(), callbackCtx.wrapSessionStore(sessionStore), callbackCtx.wrapIdentityKeyStore(identityStore), callbackCtx.wrapPreKeyStore(preKeyStore), @@ -43,7 +42,6 @@ func DecryptPreKey(ctx context.Context, preKeyMessage *PreKeyMessage, fromAddres ) runtime.KeepAlive(preKeyMessage) runtime.KeepAlive(fromAddress) - runtime.KeepAlive(localAddress) if signalFfiError != nil { return nil, callbackCtx.wrapError(signalFfiError) } diff --git a/pkg/libsignalgo/prekeybundle.go b/pkg/libsignalgo/prekeybundle.go index d8e2516..4cd5547 100644 --- a/pkg/libsignalgo/prekeybundle.go +++ b/pkg/libsignalgo/prekeybundle.go @@ -27,21 +27,19 @@ import ( "time" ) -func ProcessPreKeyBundle(ctx context.Context, bundle *PreKeyBundle, forAddress, localAddress *Address, sessionStore SessionStore, identityStore IdentityKeyStore) error { +func ProcessPreKeyBundle(ctx context.Context, bundle *PreKeyBundle, forAddress *Address, sessionStore SessionStore, identityStore IdentityKeyStore) error { callbackCtx := NewCallbackContext(ctx) defer callbackCtx.Unref() var now C.uint64_t = C.uint64_t(time.Now().Unix()) signalFfiError := C.signal_process_prekey_bundle( bundle.constPtr(), forAddress.constPtr(), - localAddress.constPtr(), callbackCtx.wrapSessionStore(sessionStore), callbackCtx.wrapIdentityKeyStore(identityStore), now, ) runtime.KeepAlive(bundle) runtime.KeepAlive(forAddress) - runtime.KeepAlive(localAddress) return callbackCtx.wrapError(signalFfiError) } @@ -119,10 +117,10 @@ func (pkb *PreKeyBundle) constPtr() C.SignalConstPointerPreKeyBundle { func (pkb *PreKeyBundle) Clone() (*PreKeyBundle, error) { var cloned C.SignalMutPointerPreKeyBundle signalFfiError := C.signal_pre_key_bundle_clone(&cloned, pkb.constPtr()) - runtime.KeepAlive(pkb) if signalFfiError != nil { return nil, wrapError(signalFfiError) } + runtime.KeepAlive(pkb) return wrapPreKeyBundle(cloned.raw), nil } @@ -138,9 +136,9 @@ func (pkb *PreKeyBundle) CancelFinalizer() { func (pkb *PreKeyBundle) GetIdentityKey() (*IdentityKey, error) { var pk C.SignalMutPointerPublicKey signalFfiError := C.signal_pre_key_bundle_get_identity_key(&pk, pkb.constPtr()) - runtime.KeepAlive(pkb) if signalFfiError != nil { return nil, wrapError(signalFfiError) } + runtime.KeepAlive(pkb) return NewIdentityKeyFromPublicKey(wrapPublicKey(pk.raw)) } diff --git a/pkg/libsignalgo/prekeystore.go b/pkg/libsignalgo/prekeystore.go index 8c3c36f..ed8ea21 100644 --- a/pkg/libsignalgo/prekeystore.go +++ b/pkg/libsignalgo/prekeystore.go @@ -76,9 +76,9 @@ func signal_destroy_pre_key_store_callback(storeCtx unsafe.Pointer) { func (ctx *CallbackContext) wrapPreKeyStore(store PreKeyStore) C.SignalConstPointerFfiPreKeyStoreStruct { return C.SignalConstPointerFfiPreKeyStoreStruct{&C.SignalPreKeyStore{ ctx: wrapStore(ctx, store), - load_pre_key: C.SignalFfiPreKeyStoreLoadPreKey(C.signal_load_pre_key_callback), - store_pre_key: C.SignalFfiPreKeyStoreStorePreKey(C.signal_store_pre_key_callback), - remove_pre_key: C.SignalFfiPreKeyStoreRemovePreKey(C.signal_remove_pre_key_callback), - destroy: C.SignalFfiPreKeyStoreDestroy(C.signal_destroy_pre_key_store_callback), + load_pre_key: C.SignalFfiBridgePreKeyStoreLoadPreKey(C.signal_load_pre_key_callback), + store_pre_key: C.SignalFfiBridgePreKeyStoreStorePreKey(C.signal_store_pre_key_callback), + remove_pre_key: C.SignalFfiBridgePreKeyStoreRemovePreKey(C.signal_remove_pre_key_callback), + destroy: C.SignalFfiBridgePreKeyStoreDestroy(C.signal_destroy_pre_key_store_callback), }} } diff --git a/pkg/libsignalgo/profilekey.go b/pkg/libsignalgo/profilekey.go index 0c21aff..e49801a 100644 --- a/pkg/libsignalgo/profilekey.go +++ b/pkg/libsignalgo/profilekey.go @@ -25,7 +25,6 @@ import "C" import ( "encoding/base64" "errors" - "fmt" "runtime" "unsafe" @@ -33,38 +32,12 @@ import ( "go.mau.fi/util/random" ) -const ProfileKeyLength = 32 -const AccessKeyLength = 16 -const ProfileKeyVersionLength = 64 +const ProfileKeyLength = C.SignalPROFILE_KEY_LEN type ProfileKey [ProfileKeyLength]byte -type ProfileKeyCommitment = fixedArray97 -type ProfileKeyVersion [ProfileKeyVersionLength]byte -type AccessKey [AccessKeyLength]byte - -func (pk *ProfileKey) cFixedArray() *C.SignalType_FixedArray32_uint8_t { - return (*C.SignalType_FixedArray32_uint8_t)(unsafe.Pointer(pk)) -} - -func (pk *ProfileKey) cConstFixedArray() cFixedArray32Compat { - return cFixedArray32Compat(pk.cFixedArray()) -} - -func (pkv *ProfileKeyVersion) cFixedArray() *C.SignalType_FixedArray64_uint8_t { - return (*C.SignalType_FixedArray64_uint8_t)(unsafe.Pointer(pkv)) -} - -func (pkv *ProfileKeyVersion) cConstFixedArray() cFixedArray64Compat { - return cFixedArray64Compat(pkv.cFixedArray()) -} - -func (ak *AccessKey) cFixedArray() *C.SignalType_FixedArray16_uint8_t { - return (*C.SignalType_FixedArray16_uint8_t)(unsafe.Pointer(ak)) -} - -func (ak *AccessKey) cConstFixedArray() cFixedArray16Compat { - return cFixedArray16Compat(ak.cFixedArray()) -} +type ProfileKeyCommitment [C.SignalPROFILE_KEY_COMMITMENT_LEN]byte +type ProfileKeyVersion [C.SignalPROFILE_KEY_VERSION_ENCODED_LEN]byte +type AccessKey [C.SignalACCESS_KEY_LEN]byte func DeserializeProfileKey(bytes []byte) (*ProfileKey, error) { if len(bytes) == 0 { @@ -100,7 +73,7 @@ func (ak *AccessKey) Xor(other *AccessKey) *AccessKey { return ak } var result AccessKey - for i := 0; i < AccessKeyLength; i++ { + for i := 0; i < C.SignalACCESS_KEY_LEN; i++ { result[i] = ak[i] ^ other[i] } return &result @@ -111,12 +84,13 @@ func (ak *AccessKey) String() string { } func (pk *ProfileKey) GetCommitment(u uuid.UUID) (*ProfileKeyCommitment, error) { - var result ProfileKeyCommitment - c_uuid := NewACIServiceID(u).cConstFixedArray() + c_result := [C.SignalPROFILE_KEY_COMMITMENT_LEN]C.uchar{} + c_profileKey := (*[C.SignalPROFILE_KEY_LEN]C.uchar)(unsafe.Pointer(pk)) + c_uuid := NewACIServiceID(u).CFixedBytes() signalFfiError := C.signal_profile_key_get_commitment( - result.cFixedArray(), - pk.cConstFixedArray(), + &c_result, + c_profileKey, c_uuid, ) runtime.KeepAlive(pk) @@ -126,16 +100,19 @@ func (pk *ProfileKey) GetCommitment(u uuid.UUID) (*ProfileKeyCommitment, error) return nil, wrapError(signalFfiError) } + var result ProfileKeyCommitment + copy(result[:], C.GoBytes(unsafe.Pointer(&c_result), C.int(C.SignalPROFILE_KEY_COMMITMENT_LEN))) return &result, nil } func (pk *ProfileKey) GetProfileKeyVersion(u uuid.UUID) (*ProfileKeyVersion, error) { - var result ProfileKeyVersion - c_uuid := NewACIServiceID(u).cConstFixedArray() + c_result := [C.SignalPROFILE_KEY_VERSION_ENCODED_LEN]C.uchar{} + c_profileKey := (*[C.SignalPROFILE_KEY_LEN]C.uchar)(unsafe.Pointer(pk)) + c_uuid := NewACIServiceID(u).CFixedBytes() signalFfiError := C.signal_profile_key_get_profile_key_version( - result.cFixedArray(), - pk.cConstFixedArray(), + &c_result, + c_profileKey, c_uuid, ) runtime.KeepAlive(pk) @@ -145,15 +122,18 @@ func (pk *ProfileKey) GetProfileKeyVersion(u uuid.UUID) (*ProfileKeyVersion, err return nil, wrapError(signalFfiError) } + var result ProfileKeyVersion + copy(result[:], C.GoBytes(unsafe.Pointer(&c_result), C.int(C.SignalPROFILE_KEY_VERSION_ENCODED_LEN))) return &result, nil } func (pk *ProfileKey) DeriveAccessKey() (*AccessKey, error) { - var result AccessKey + c_result := [C.SignalACCESS_KEY_LEN]C.uchar{} + c_profileKey := (*[C.SignalPROFILE_KEY_LEN]C.uchar)(unsafe.Pointer(pk)) signalFfiError := C.signal_profile_key_derive_access_key( - result.cFixedArray(), - pk.cConstFixedArray(), + &c_result, + c_profileKey, ) runtime.KeepAlive(pk) @@ -161,37 +141,31 @@ func (pk *ProfileKey) DeriveAccessKey() (*AccessKey, error) { return nil, wrapError(signalFfiError) } + var result AccessKey + copy(result[:], C.GoBytes(unsafe.Pointer(&c_result), C.int(C.SignalACCESS_KEY_LEN))) return &result, nil } -const ExpiringProfileKeyCredentialResponseLength = 497 - -type ProfileKeyCredentialRequestContext [473]byte -type ProfileKeyCredentialRequest = fixedArray329 +type ProfileKeyCredentialRequestContext [C.SignalPROFILE_KEY_CREDENTIAL_REQUEST_CONTEXT_LEN]byte +type ProfileKeyCredentialRequest [C.SignalPROFILE_KEY_CREDENTIAL_REQUEST_LEN]byte type ProfileKeyCredentialResponse []byte type ProfileKeyCredentialPresentation []byte -type ExpiringProfileKeyCredential = fixedArray153 -type ExpiringProfileKeyCredentialResponse = fixedArray497 - -func (p *ProfileKeyCredentialRequestContext) cFixedArray() *C.SignalType_FixedArray473_uint8_t { - return (*C.SignalType_FixedArray473_uint8_t)(unsafe.Pointer(p)) -} - -func (p *ProfileKeyCredentialRequestContext) cConstFixedArray() cFixedArray473Compat { - return cFixedArray473Compat(p.cFixedArray()) -} +type ExpiringProfileKeyCredential [C.SignalEXPIRING_PROFILE_KEY_CREDENTIAL_LEN]byte +type ExpiringProfileKeyCredentialResponse [C.SignalEXPIRING_PROFILE_KEY_CREDENTIAL_RESPONSE_LEN]byte func CreateProfileKeyCredentialRequestContext(serverPublicParams *ServerPublicParams, u uuid.UUID, profileKey ProfileKey) (*ProfileKeyCredentialRequestContext, error) { - var result ProfileKeyCredentialRequestContext - randBytes := Randomness(random.Bytes(RandomnessLength)) - c_uuid := NewACIServiceID(u).cConstFixedArray() + c_result := [C.SignalPROFILE_KEY_CREDENTIAL_REQUEST_CONTEXT_LEN]C.uchar{} + randBytes := [32]byte(random.Bytes(32)) + c_random := (*[32]C.uchar)(unsafe.Pointer(&randBytes[0])) + c_profileKey := (*[C.SignalPROFILE_KEY_LEN]C.uchar)(unsafe.Pointer(&profileKey[0])) + c_uuid := NewACIServiceID(u).CFixedBytes() signalFfiError := C.signal_server_public_params_create_profile_key_credential_request_context_deterministic( - result.cFixedArray(), + &c_result, C.SignalConstPointerServerPublicParams{serverPublicParams}, - randBytes.cConstFixedArray(), + c_random, c_uuid, - profileKey.cConstFixedArray(), + c_profileKey, ) runtime.KeepAlive(u) runtime.KeepAlive(profileKey) @@ -199,27 +173,27 @@ func CreateProfileKeyCredentialRequestContext(serverPublicParams *ServerPublicPa if signalFfiError != nil { return nil, wrapError(signalFfiError) } + result := ProfileKeyCredentialRequestContext(C.GoBytes(unsafe.Pointer(&c_result), C.int(C.SignalPROFILE_KEY_CREDENTIAL_REQUEST_CONTEXT_LEN))) return &result, nil } func (p *ProfileKeyCredentialRequestContext) ProfileKeyCredentialRequestContextGetRequest() (*ProfileKeyCredentialRequest, error) { - var result ProfileKeyCredentialRequest + c_result := [C.SignalPROFILE_KEY_CREDENTIAL_REQUEST_LEN]C.uchar{} + c_context := (*[C.SignalPROFILE_KEY_CREDENTIAL_REQUEST_CONTEXT_LEN]C.uchar)(unsafe.Pointer(p)) signalFfiError := C.signal_profile_key_credential_request_context_get_request( - result.cFixedArray(), - p.cConstFixedArray(), + &c_result, + c_context, ) runtime.KeepAlive(p) if signalFfiError != nil { return nil, wrapError(signalFfiError) } + result := ProfileKeyCredentialRequest(C.GoBytes(unsafe.Pointer(&c_result), C.int(C.SignalPROFILE_KEY_CREDENTIAL_REQUEST_LEN))) return &result, nil } func NewExpiringProfileKeyCredentialResponse(b []byte) (*ExpiringProfileKeyCredentialResponse, error) { - if len(b) != ExpiringProfileKeyCredentialResponseLength { - return nil, fmt.Errorf("invalid expiring profile key credential response length %d (expected %d)", len(b), ExpiringProfileKeyCredentialResponseLength) - } borrowedBuffer := BytesToBuffer(b) signalFfiError := C.signal_expiring_profile_key_credential_response_check_valid_contents(borrowedBuffer) runtime.KeepAlive(b) @@ -231,12 +205,12 @@ func NewExpiringProfileKeyCredentialResponse(b []byte) (*ExpiringProfileKeyCrede } func ReceiveExpiringProfileKeyCredential(spp *ServerPublicParams, requestContext *ProfileKeyCredentialRequestContext, response *ExpiringProfileKeyCredentialResponse, currentTimeInSeconds uint64) (*ExpiringProfileKeyCredential, error) { - var credential ExpiringProfileKeyCredential + c_credential := [C.SignalEXPIRING_PROFILE_KEY_CREDENTIAL_LEN]C.uchar{} signalFfiError := C.signal_server_public_params_receive_expiring_profile_key_credential( - credential.cFixedArray(), + &c_credential, C.SignalConstPointerServerPublicParams{spp}, - requestContext.cConstFixedArray(), - response.cConstFixedArray(), + (*[C.SignalPROFILE_KEY_CREDENTIAL_REQUEST_CONTEXT_LEN]C.uchar)(unsafe.Pointer(requestContext)), + (*[C.SignalEXPIRING_PROFILE_KEY_CREDENTIAL_RESPONSE_LEN]C.uchar)(unsafe.Pointer(response)), (C.uint64_t)(currentTimeInSeconds), ) runtime.KeepAlive(requestContext) @@ -245,6 +219,8 @@ func ReceiveExpiringProfileKeyCredential(spp *ServerPublicParams, requestContext if signalFfiError != nil { return nil, wrapError(signalFfiError) } + credential := ExpiringProfileKeyCredential{} + copy(credential[:], C.GoBytes(unsafe.Pointer(&c_credential), C.int(C.SignalEXPIRING_PROFILE_KEY_CREDENTIAL_LEN))) return &credential, nil } @@ -255,21 +231,25 @@ func (a ProfileKeyCredentialPresentation) CheckValidContents() error { } func (a ProfileKeyCredentialPresentation) UUIDCiphertext() (UUIDCiphertext, error) { - var out UUIDCiphertext - signalFfiError := C.signal_profile_key_credential_presentation_get_uuid_ciphertext(out.cFixedArray(), BytesToBuffer(a)) + out := [C.SignalUUID_CIPHERTEXT_LEN]C.uchar{} + signalFfiError := C.signal_profile_key_credential_presentation_get_uuid_ciphertext(&out, BytesToBuffer(a)) runtime.KeepAlive(a) if signalFfiError != nil { return UUIDCiphertext{}, wrapError(signalFfiError) } - return out, nil + var result UUIDCiphertext + copy(result[:], C.GoBytes(unsafe.Pointer(&out), C.int(C.SignalUUID_CIPHERTEXT_LEN))) + return result, nil } func (a ProfileKeyCredentialPresentation) ProfileKeyCiphertext() (ProfileKeyCiphertext, error) { - var out ProfileKeyCiphertext - signalFfiError := C.signal_profile_key_credential_presentation_get_profile_key_ciphertext(out.cFixedArray(), BytesToBuffer(a)) + out := [C.SignalPROFILE_KEY_CIPHERTEXT_LEN]C.uchar{} + signalFfiError := C.signal_profile_key_credential_presentation_get_profile_key_ciphertext(&out, BytesToBuffer(a)) runtime.KeepAlive(a) if signalFfiError != nil { return ProfileKeyCiphertext{}, wrapError(signalFfiError) } - return out, nil + var result ProfileKeyCiphertext + copy(result[:], C.GoBytes(unsafe.Pointer(&out), C.int(C.SignalPROFILE_KEY_CIPHERTEXT_LEN))) + return result, nil } diff --git a/pkg/libsignalgo/sealedsender.go b/pkg/libsignalgo/sealedsender.go index ac7a0a0..56ffe8b 100644 --- a/pkg/libsignalgo/sealedsender.go +++ b/pkg/libsignalgo/sealedsender.go @@ -44,17 +44,8 @@ func NewSealedSenderAddress(e164 string, uuid uuid.UUID, deviceID uint32) *Seale } } -func SealedSenderEncryptPlaintext( - ctx context.Context, - message []byte, - contentHint UnidentifiedSenderMessageContentHint, - forAddress, localAddress *Address, - fromSenderCert *SenderCertificate, - sessionStore SessionStore, - identityStore IdentityKeyStore, - groupID *GroupIdentifier, -) ([]byte, error) { - ciphertextMessage, err := Encrypt(ctx, message, forAddress, localAddress, sessionStore, identityStore) +func SealedSenderEncryptPlaintext(ctx context.Context, message []byte, contentHint UnidentifiedSenderMessageContentHint, forAddress *Address, fromSenderCert *SenderCertificate, sessionStore SessionStore, identityStore IdentityKeyStore, groupID *GroupIdentifier) ([]byte, error) { + ciphertextMessage, err := Encrypt(ctx, message, forAddress, sessionStore, identityStore) if err != nil { return nil, err } @@ -169,19 +160,6 @@ const ( UnidentifiedSenderMessageContentHintImplicit UnidentifiedSenderMessageContentHint = 2 ) -func (hint UnidentifiedSenderMessageContentHint) String() string { - switch hint { - case UnidentifiedSenderMessageContentHintDefault: - return "Default" - case UnidentifiedSenderMessageContentHintResendable: - return "Resendable" - case UnidentifiedSenderMessageContentHintImplicit: - return "Implicit" - default: - return fmt.Sprintf("Unknown(%d)", hint) - } -} - type UnidentifiedSenderMessageContent struct { nc noCopy ptr *C.SignalUnidentifiedSenderMessageContent diff --git a/pkg/libsignalgo/sendercertificate.go b/pkg/libsignalgo/sendercertificate.go index cf39fd6..47cf958 100644 --- a/pkg/libsignalgo/sendercertificate.go +++ b/pkg/libsignalgo/sendercertificate.go @@ -44,14 +44,10 @@ func wrapSenderCertificate(ptr *C.SignalSenderCertificate) *SenderCertificate { // the Swift bindings). func NewSenderCertificate(sender *SealedSenderAddress, publicKey *PublicKey, expiration time.Time, signerCertificate *ServerCertificate, signerKey *PrivateKey) (*SenderCertificate, error) { var sc C.SignalMutPointerSenderCertificate - senderUUIDStr, freeSenderUUIDStr := GoStringToCString(sender.UUID.String()) - defer freeSenderUUIDStr() - senderE164Str, freeSenderE164Str := GoStringToCString(sender.E164) - defer freeSenderE164Str() signalFfiError := C.signal_sender_certificate_new( &sc, - senderUUIDStr, - senderE164Str, + C.CString(sender.UUID.String()), + C.CString(sender.E164), C.uint32_t(sender.DeviceID), publicKey.constPtr(), C.uint64_t(expiration.UnixMilli()), @@ -139,7 +135,7 @@ func (sc *SenderCertificate) GetSignature() ([]byte, error) { } func (sc *SenderCertificate) GetSenderUUID() (uuid.UUID, error) { - var rawUUID C.SignalCStringPtr + var rawUUID *C.char signalFfiError := C.signal_sender_certificate_get_sender_uuid(&rawUUID, sc.constPtr()) runtime.KeepAlive(sc) if signalFfiError != nil { @@ -149,7 +145,7 @@ func (sc *SenderCertificate) GetSenderUUID() (uuid.UUID, error) { } func (sc *SenderCertificate) GetSenderE164() (string, error) { - var e164 C.SignalCStringPtr + var e164 *C.char signalFfiError := C.signal_sender_certificate_get_sender_e164(&e164, sc.constPtr()) runtime.KeepAlive(sc) if signalFfiError != nil { @@ -208,7 +204,6 @@ func (sc *SenderCertificate) Validate(trustRoots []*PublicKey, ts time.Time) (bo C.uint64_t(ts.UnixMilli()), ) runtime.KeepAlive(sc) - runtime.KeepAlive(trustRoots) runtime.KeepAlive(constRoots) if signalFfiError != nil { return false, wrapError(signalFfiError) diff --git a/pkg/libsignalgo/senderkeydistributionmessage.go b/pkg/libsignalgo/senderkeydistributionmessage.go index 48c0226..c9f6099 100644 --- a/pkg/libsignalgo/senderkeydistributionmessage.go +++ b/pkg/libsignalgo/senderkeydistributionmessage.go @@ -101,7 +101,6 @@ func (sc *SenderKeyDistributionMessage) CancelFinalizer() { func (sc *SenderKeyDistributionMessage) Serialize() ([]byte, error) { var serialized C.SignalOwnedBuffer = C.SignalOwnedBuffer{} signalFfiError := C.signal_sender_key_distribution_message_serialize(&serialized, sc.constPtr()) - runtime.KeepAlive(sc) if signalFfiError != nil { return nil, wrapError(signalFfiError) } @@ -117,7 +116,6 @@ func (sc *SenderKeyDistributionMessage) Process(ctx context.Context, sender *Add callbackCtx.wrapSenderKeyStore(store), ) runtime.KeepAlive(sender) - runtime.KeepAlive(sc) if signalFfiError != nil { return callbackCtx.wrapError(signalFfiError) } diff --git a/pkg/libsignalgo/senderkeystore.go b/pkg/libsignalgo/senderkeystore.go index 1649216..a07a287 100644 --- a/pkg/libsignalgo/senderkeystore.go +++ b/pkg/libsignalgo/senderkeystore.go @@ -70,8 +70,8 @@ func signal_destroy_sender_key_store_callback(storeCtx unsafe.Pointer) { func (ctx *CallbackContext) wrapSenderKeyStore(store SenderKeyStore) C.SignalConstPointerFfiSenderKeyStoreStruct { return C.SignalConstPointerFfiSenderKeyStoreStruct{&C.SignalSenderKeyStore{ ctx: wrapStore(ctx, store), - load_sender_key: C.SignalFfiSenderKeyStoreLoadSenderKey(C.signal_load_sender_key_callback), - store_sender_key: C.SignalFfiSenderKeyStoreStoreSenderKey(C.signal_store_sender_key_callback), - destroy: C.SignalFfiSenderKeyStoreDestroy(C.signal_destroy_sender_key_store_callback), + load_sender_key: C.SignalFfiBridgeSenderKeyStoreLoadSenderKey(C.signal_load_sender_key_callback), + store_sender_key: C.SignalFfiBridgeSenderKeyStoreStoreSenderKey(C.signal_store_sender_key_callback), + destroy: C.SignalFfiBridgeSenderKeyStoreDestroy(C.signal_destroy_sender_key_store_callback), }} } diff --git a/pkg/libsignalgo/serverpublicparams.go b/pkg/libsignalgo/serverpublicparams.go index 752bc2d..c1de0cd 100644 --- a/pkg/libsignalgo/serverpublicparams.go +++ b/pkg/libsignalgo/serverpublicparams.go @@ -24,16 +24,15 @@ import "C" import ( "fmt" "runtime" + "unsafe" ) type ServerPublicParams = C.SignalServerPublicParams -type NotarySignature = fixedArray64 - -const ServerPublicParamsLength = 673 +type NotarySignature [C.SignalSIGNATURE_LEN]byte func DeserializeServerPublicParams(params []byte) (*ServerPublicParams, error) { - if len(params) != ServerPublicParamsLength { - return nil, fmt.Errorf("invalid server public params length: %d (expected %d)", len(params), ServerPublicParamsLength) + if len(params) != C.SignalSERVER_PUBLIC_PARAMS_LEN { + return nil, fmt.Errorf("invalid server public params length: %d (expected %d)", len(params), int(C.SignalSERVER_PUBLIC_PARAMS_LEN)) } var out C.SignalMutPointerServerPublicParams signalFfiError := C.signal_server_public_params_deserialize(&out, BytesToBuffer(params[:])) @@ -48,10 +47,11 @@ func ServerPublicParamsVerifySignature( messageBytes []byte, NotarySignature NotarySignature, ) error { + c_notarySignature := (*[C.SignalSIGNATURE_LEN]C.uint8_t)(unsafe.Pointer(&NotarySignature[0])) signalFfiError := C.signal_server_public_params_verify_signature( C.SignalConstPointerServerPublicParams{serverPublicParams}, BytesToBuffer(messageBytes), - NotarySignature.cConstFixedArray(), + c_notarySignature, ) runtime.KeepAlive(messageBytes) return wrapError(signalFfiError) diff --git a/pkg/libsignalgo/serviceid.go b/pkg/libsignalgo/serviceid.go index 38631ee..21d64b2 100644 --- a/pkg/libsignalgo/serviceid.go +++ b/pkg/libsignalgo/serviceid.go @@ -133,10 +133,7 @@ func (s ServiceID) MarshalZerologObject(e *zerolog.Event) { e.Stringer("uuid", s.UUID) } -const ServiceIDUUIDLength = 16 -const ServiceIDFixedBytesLength = 17 - -type ServiceIDFixedBytes = fixedArray17 +type ServiceIDFixedBytes [17]byte func (s ServiceID) FixedBytes() *ServiceIDFixedBytes { var result ServiceIDFixedBytes @@ -165,18 +162,18 @@ func ServiceIDFromString(val string) (ServiceID, error) { } func ServiceIDFromBytes(bytes []byte) (ServiceID, error) { - if len(bytes) == ServiceIDUUIDLength { + if len(bytes) == 16 { return NewACIServiceID(uuid.UUID(bytes)), nil - } else if len(bytes) == ServiceIDFixedBytesLength { + } else if len(bytes) == 17 { return ServiceID{ Type: ServiceIDType(bytes[0]), UUID: uuid.UUID(bytes[1:]), }, nil } - return EmptyServiceID, fmt.Errorf("invalid ServiceID byte length: %d (expected %d or %d)", len(bytes), ServiceIDUUIDLength, ServiceIDFixedBytesLength) + return EmptyServiceID, fmt.Errorf("invalid ServiceID byte length: %d (expected 16 or 17)", len(bytes)) } -func ServiceIDFromCFixedBytes(serviceID *C.SignalType_FixedArray17_uint8_t) ServiceID { +func ServiceIDFromCFixedBytes(serviceID *C.SignalServiceIdFixedWidthBinaryBytes) ServiceID { var id ServiceID fixedBytes := (*ServiceIDFixedBytes)(unsafe.Pointer(serviceID)) id.Type = ServiceIDType(fixedBytes[0]) @@ -184,10 +181,6 @@ func ServiceIDFromCFixedBytes(serviceID *C.SignalType_FixedArray17_uint8_t) Serv return id } -func (s ServiceID) cFixedArray() *C.SignalType_FixedArray17_uint8_t { - return s.FixedBytes().cFixedArray() -} - -func (s ServiceID) cConstFixedArray() cFixedArray17Compat { - return cFixedArray17Compat(s.cFixedArray()) +func (s ServiceID) CFixedBytes() cPNIType { + return cPNIType(unsafe.Pointer(s.FixedBytes())) } diff --git a/pkg/libsignalgo/serviceid_clang.go b/pkg/libsignalgo/serviceid_clang.go new file mode 100644 index 0000000..89197b6 --- /dev/null +++ b/pkg/libsignalgo/serviceid_clang.go @@ -0,0 +1,11 @@ +//go:build darwin || android || ios || (windows && arm64) + +package libsignalgo + +/* +#include "./libsignal-ffi.h" +#include +*/ +import "C" + +type cPNIType = *C.SignalServiceIdFixedWidthBinaryBytes diff --git a/pkg/libsignalgo/serviceid_gcc.go b/pkg/libsignalgo/serviceid_gcc.go new file mode 100644 index 0000000..0feb627 --- /dev/null +++ b/pkg/libsignalgo/serviceid_gcc.go @@ -0,0 +1,14 @@ +//go:build !(darwin || android || ios || (windows && arm64)) + +package libsignalgo + +/* +#include "./libsignal-ffi.h" +#include +*/ +import "C" + +// Hack for https://github.com/golang/go/issues/7270 +// The clang version is more correct, but doesn't work with gcc + +type cPNIType = *[17]C.uint8_t diff --git a/pkg/libsignalgo/session_test.go b/pkg/libsignalgo/session_test.go index dd05718..6d0b720 100644 --- a/pkg/libsignalgo/session_test.go +++ b/pkg/libsignalgo/session_test.go @@ -30,7 +30,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/libsignalgo" ) -func initializeSessions(t *testing.T, aliceStore, bobStore *InMemorySignalProtocolStore, bobAddress, aliceAddress *libsignalgo.Address) { +func initializeSessions(t *testing.T, aliceStore, bobStore *InMemorySignalProtocolStore, bobAddress *libsignalgo.Address) { ctx := context.TODO() bobPreKey, err := libsignalgo.GeneratePrivateKey() @@ -86,7 +86,7 @@ func initializeSessions(t *testing.T, aliceStore, bobStore *InMemorySignalProtoc assert.NoError(t, err) // Alice processes the bundle - err = libsignalgo.ProcessPreKeyBundle(ctx, bobBundle, bobAddress, aliceAddress, aliceStore, aliceStore) + err = libsignalgo.ProcessPreKeyBundle(ctx, bobBundle, bobAddress, aliceStore, aliceStore) assert.NoError(t, err) record, err := aliceStore.LoadSession(ctx, bobAddress) @@ -132,11 +132,11 @@ func TestSessionCipher(t *testing.T) { aliceStore := NewInMemorySignalProtocolStore() bobStore := NewInMemorySignalProtocolStore() - initializeSessions(t, aliceStore, bobStore, bobAddress, aliceAddress) + initializeSessions(t, aliceStore, bobStore, bobAddress) alicePlaintext := []byte{8, 6, 7, 5, 3, 0, 9} - aliceCiphertext, err := libsignalgo.Encrypt(ctx, alicePlaintext, bobAddress, aliceAddress, aliceStore, aliceStore) + aliceCiphertext, err := libsignalgo.Encrypt(ctx, alicePlaintext, bobAddress, aliceStore, aliceStore) assert.NoError(t, err) aliceCiphertextMessageType, err := aliceCiphertext.MessageType() assert.NoError(t, err) @@ -147,13 +147,13 @@ func TestSessionCipher(t *testing.T) { bobCiphertext, err := libsignalgo.DeserializePreKeyMessage(aliceCiphertextSerialized) assert.NoError(t, err) - bobPlaintext, err := libsignalgo.DecryptPreKey(ctx, bobCiphertext, aliceAddress, bobAddress, bobStore, bobStore, bobStore, bobStore, bobStore) + bobPlaintext, err := libsignalgo.DecryptPreKey(ctx, bobCiphertext, aliceAddress, bobStore, bobStore, bobStore, bobStore, bobStore) assert.NoError(t, err) assert.Equal(t, alicePlaintext, bobPlaintext) bobPlaintext2 := []byte{23} - bobCiphertext2, err := libsignalgo.Encrypt(ctx, bobPlaintext2, aliceAddress, bobAddress, bobStore, bobStore) + bobCiphertext2, err := libsignalgo.Encrypt(ctx, bobPlaintext2, aliceAddress, bobStore, bobStore) assert.NoError(t, err) bobCiphertext2MessageType, err := bobCiphertext2.MessageType() assert.NoError(t, err) @@ -163,7 +163,7 @@ func TestSessionCipher(t *testing.T) { assert.NoError(t, err) aliceCiphertext2, err := libsignalgo.DeserializeMessage(bobCiphertext2Serialized) assert.NoError(t, err) - alicePlaintext2, err := libsignalgo.Decrypt(ctx, aliceCiphertext2, bobAddress, aliceAddress, aliceStore, aliceStore) + alicePlaintext2, err := libsignalgo.Decrypt(ctx, aliceCiphertext2, bobAddress, aliceStore, aliceStore) assert.NoError(t, err) assert.Equal(t, bobPlaintext2, alicePlaintext2) } @@ -183,11 +183,11 @@ func TestSessionCipherWithBadStore(t *testing.T) { aliceStore := NewInMemorySignalProtocolStore() bobStore := &BadInMemorySignalProtocolStore{NewInMemorySignalProtocolStore()} - initializeSessions(t, aliceStore, bobStore.InMemorySignalProtocolStore, bobAddress, aliceAddress) + initializeSessions(t, aliceStore, bobStore.InMemorySignalProtocolStore, bobAddress) alicePlaintext := []byte{8, 6, 7, 5, 3, 0, 9} - aliceCiphertext, err := libsignalgo.Encrypt(ctx, alicePlaintext, bobAddress, aliceAddress, aliceStore, aliceStore) + aliceCiphertext, err := libsignalgo.Encrypt(ctx, alicePlaintext, bobAddress, aliceStore, aliceStore) assert.NoError(t, err) aliceCiphertextMessageType, err := aliceCiphertext.MessageType() assert.NoError(t, err) @@ -198,7 +198,7 @@ func TestSessionCipherWithBadStore(t *testing.T) { bobCiphertext, err := libsignalgo.DeserializePreKeyMessage(aliceCiphertextSerialized) assert.NoError(t, err) t.Skip("This test is broken") // TODO fix - _, err = libsignalgo.DecryptPreKey(ctx, bobCiphertext, aliceAddress, bobAddress, bobStore, bobStore, bobStore, bobStore, bobStore) + _, err = libsignalgo.DecryptPreKey(ctx, bobCiphertext, aliceAddress, bobStore, bobStore, bobStore, bobStore, bobStore) require.Error(t, err) assert.Equal(t, "Test error", err.Error()) } @@ -216,7 +216,7 @@ func TestSealedSenderEncrypt_Repeated(t *testing.T) { aliceStore := NewInMemorySignalProtocolStore() bobStore := NewInMemorySignalProtocolStore() - initializeSessions(t, aliceStore, bobStore, bobAddress, aliceAddress) + initializeSessions(t, aliceStore, bobStore, bobAddress) trustRoot, err := libsignalgo.GenerateIdentityKeyPair() assert.NoError(t, err) @@ -241,7 +241,7 @@ func TestSealedSenderEncrypt_Repeated(t *testing.T) { }() for i := 0; i < 100; i++ { message := []byte(fmt.Sprintf("%04d vision", i)) - ciphertext, err := libsignalgo.SealedSenderEncryptPlaintext(ctx, message, libsignalgo.UnidentifiedSenderMessageContentHintDefault, bobAddress, aliceAddress, senderCert, aliceStore, aliceStore, nil) + ciphertext, err := libsignalgo.SealedSenderEncryptPlaintext(ctx, message, libsignalgo.UnidentifiedSenderMessageContentHintDefault, bobAddress, senderCert, aliceStore, aliceStore, nil) require.NoError(t, err) assert.NotNil(t, ciphertext) } @@ -252,18 +252,15 @@ func TestArchiveSession(t *testing.T) { ctx := context.TODO() setupLogging() - aliceACI := uuid.New() bobACI := uuid.New() - aliceAddress, err := libsignalgo.NewACIServiceID(aliceACI).Address(1) - assert.NoError(t, err) bobAddress, err := libsignalgo.NewACIServiceID(bobACI).Address(1) assert.NoError(t, err) aliceStore := NewInMemorySignalProtocolStore() bobStore := NewInMemorySignalProtocolStore() - initializeSessions(t, aliceStore, bobStore, bobAddress, aliceAddress) + initializeSessions(t, aliceStore, bobStore, bobAddress) session, err := aliceStore.LoadSession(ctx, bobAddress) assert.NoError(t, err) @@ -318,7 +315,7 @@ func TestSealedSenderGroupCipher(t *testing.T) { bobStore := NewInMemorySignalProtocolStore() - initializeSessions(t, aliceStore, bobStore, bobAddress, aliceAddress) + initializeSessions(t, aliceStore, bobStore, bobAddress) trustRoot, err := libsignalgo.GenerateIdentityKeyPair() assert.NoError(t, err) diff --git a/pkg/libsignalgo/sessionstore.go b/pkg/libsignalgo/sessionstore.go index 99000e5..2515232 100644 --- a/pkg/libsignalgo/sessionstore.go +++ b/pkg/libsignalgo/sessionstore.go @@ -67,8 +67,8 @@ func signal_destroy_session_store_callback(storeCtx unsafe.Pointer) { func (ctx *CallbackContext) wrapSessionStore(store SessionStore) C.SignalConstPointerFfiSessionStoreStruct { return C.SignalConstPointerFfiSessionStoreStruct{&C.SignalSessionStore{ ctx: wrapStore(ctx, store), - load_session: C.SignalFfiSessionStoreLoadSession(C.signal_load_session_callback), - store_session: C.SignalFfiSessionStoreStoreSession(C.signal_store_session_callback), - destroy: C.SignalFfiSessionStoreDestroy(C.signal_destroy_session_store_callback), + load_session: C.SignalFfiBridgeSessionStoreLoadSession(C.signal_load_session_callback), + store_session: C.SignalFfiBridgeSessionStoreStoreSession(C.signal_store_session_callback), + destroy: C.SignalFfiBridgeSessionStoreDestroy(C.signal_destroy_session_store_callback), }} } diff --git a/pkg/libsignalgo/setup_test.go b/pkg/libsignalgo/setup_test.go index 47d7d77..c22149d 100644 --- a/pkg/libsignalgo/setup_test.go +++ b/pkg/libsignalgo/setup_test.go @@ -54,8 +54,6 @@ func (FFILogger) Log(level libsignalgo.LogLevel, file string, line uint, message func (FFILogger) Flush() {} -func (FFILogger) Destroy() {} - var loggingSetup = false func setupLogging() { diff --git a/pkg/libsignalgo/signalversion/version.go b/pkg/libsignalgo/signalversion/version.go deleted file mode 100644 index d66cd3e..0000000 --- a/pkg/libsignalgo/signalversion/version.go +++ /dev/null @@ -1,5 +0,0 @@ -// Generated by update-ffi.sh; DO NOT EDIT. - -package signalversion - -const Version = "v0.102.2" diff --git a/pkg/libsignalgo/signedprekeystore.go b/pkg/libsignalgo/signedprekeystore.go index b1306e2..cfb3015 100644 --- a/pkg/libsignalgo/signedprekeystore.go +++ b/pkg/libsignalgo/signedprekeystore.go @@ -67,8 +67,8 @@ func signal_destroy_signed_pre_key_store_callback(storeCtx unsafe.Pointer) { func (ctx *CallbackContext) wrapSignedPreKeyStore(store SignedPreKeyStore) C.SignalConstPointerFfiSignedPreKeyStoreStruct { return C.SignalConstPointerFfiSignedPreKeyStoreStruct{&C.SignalSignedPreKeyStore{ ctx: wrapStore(ctx, store), - load_signed_pre_key: C.SignalFfiSignedPreKeyStoreLoadSignedPreKey(C.signal_load_signed_pre_key_callback), - store_signed_pre_key: C.SignalFfiSignedPreKeyStoreStoreSignedPreKey(C.signal_store_signed_pre_key_callback), - destroy: C.SignalFfiSignedPreKeyStoreDestroy(C.signal_destroy_signed_pre_key_store_callback), + load_signed_pre_key: C.SignalFfiBridgeSignedPreKeyStoreLoadSignedPreKey(C.signal_load_signed_pre_key_callback), + store_signed_pre_key: C.SignalFfiBridgeSignedPreKeyStoreStoreSignedPreKey(C.signal_store_signed_pre_key_callback), + destroy: C.SignalFfiBridgeSignedPreKeyStoreDestroy(C.signal_destroy_signed_pre_key_store_callback), }} } diff --git a/pkg/libsignalgo/update-ffi-docker-inner.sh b/pkg/libsignalgo/update-ffi-docker-inner.sh index af8d851..e343887 100755 --- a/pkg/libsignalgo/update-ffi-docker-inner.sh +++ b/pkg/libsignalgo/update-ffi-docker-inner.sh @@ -1,10 +1,11 @@ #!/bin/sh cd /data export RUSTFLAGS="-Ctarget-feature=-crt-static" RUSTC_WRAPPER="" -apk add --no-cache git make cmake protobuf-dev musl-dev g++ clang-dev +apk add --no-cache git make cmake protobuf-dev musl-dev g++ clang-dev cbindgen cd libsignal cargo build -p libsignal-ffi --release +cbindgen --profile release rust/bridge/ffi -o libsignal-ffi.h cd .. mv libsignal/target/release/libsignal_ffi.a . -cp libsignal/swift/Sources/SignalFfi/signal_ffi.h libsignal-ffi.h -chown 1000:1000 libsignal_ffi.a libsignal-ffi.h +mv libsignal/libsignal-ffi.h . +chown 1000:1000 libsignal_ffi.a libsignal-ffi.h version.go diff --git a/pkg/libsignalgo/update-ffi-docker.sh b/pkg/libsignalgo/update-ffi-docker.sh index 73f8947..5fb6dda 100755 --- a/pkg/libsignalgo/update-ffi-docker.sh +++ b/pkg/libsignalgo/update-ffi-docker.sh @@ -1,9 +1,9 @@ #!/bin/bash docker run --rm -itv $(pwd):/data rust:1-alpine /data/update-ffi-docker-inner.sh -echo "// Generated by update-ffi.sh; DO NOT EDIT." > signalversion/version.go -echo >> signalversion/version.go -echo "package signalversion" >> signalversion/version.go -echo >> signalversion/version.go +echo "// Generated by update-ffi.sh; DO NOT EDIT." > version.go +echo >> version.go +echo "package libsignalgo" >> version.go +echo >> version.go cd libsignal -echo "const Version = \"$(git describe --tags --always)\"" >> ../signalversion/version.go +echo "const Version = \"$(git describe --tags --always)\"" >> ../version.go diff --git a/pkg/libsignalgo/update-ffi.sh b/pkg/libsignalgo/update-ffi.sh index d04986c..7561b61 100755 --- a/pkg/libsignalgo/update-ffi.sh +++ b/pkg/libsignalgo/update-ffi.sh @@ -12,10 +12,10 @@ if [ ! -d "$LIBSIGNAL_DIRECTORY" ]; then exit 1 fi -echo "// Generated by update-ffi.sh; DO NOT EDIT." > signalversion/version.go -echo >> signalversion/version.go -echo "package signalversion" >> signalversion/version.go -echo >> signalversion/version.go +echo "// Generated by update-ffi.sh; DO NOT EDIT." > version.go +echo >> version.go +echo "package libsignalgo" >> version.go +echo >> version.go # Store the current working directory ORIGINAL_DIR="$(pwd)" @@ -23,16 +23,19 @@ ORIGINAL_DIR="$(pwd)" # Navigate to libsignal directory cd "$LIBSIGNAL_DIRECTORY" -echo "const Version = \"$(git describe --tags --always)\"" >> ../signalversion/version.go +echo "const Version = \"$(git describe --tags --always)\"" >> ../version.go # Build libsignal cargo build -p libsignal-ffi --release +# Regenerate the header file +cbindgen --profile release rust/bridge/ffi -o libsignal-ffi.h + # Navigate back to the original directory cd "$ORIGINAL_DIR" # Copy files from the libsignal directory cp "${LIBSIGNAL_DIRECTORY}/target/release/libsignal_ffi.a" . -cp "${LIBSIGNAL_DIRECTORY}/swift/Sources/SignalFfi/signal_ffi.h" libsignal-ffi.h +cp "${LIBSIGNAL_DIRECTORY}/libsignal-ffi.h" . echo "Files copied successfully." diff --git a/pkg/libsignalgo/version.go b/pkg/libsignalgo/version.go new file mode 100644 index 0000000..ccd0d51 --- /dev/null +++ b/pkg/libsignalgo/version.go @@ -0,0 +1,5 @@ +// Generated by update-ffi.sh; DO NOT EDIT. + +package libsignalgo + +const Version = "v0.89.1" diff --git a/pkg/msgconv/from-matrix.go b/pkg/msgconv/from-matrix.go index 3c8f840..89b0181 100644 --- a/pkg/msgconv/from-matrix.go +++ b/pkg/msgconv/from-matrix.go @@ -35,7 +35,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/msgconv/matrixfmt" "go.mau.fi/mautrix-signal/pkg/signalid" "go.mau.fi/mautrix-signal/pkg/signalmeow" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" ) func (mc *MessageConverter) ToSignal( @@ -110,24 +110,21 @@ func (mc *MessageConverter) ToSignal( return nil, fmt.Errorf("failed to convert sticker: %w", err) } att.Flags = proto.Uint32(uint32(signalpb.AttachmentPointer_BORDERLESS)) - - dm.Sticker = ParseStickerMeta(content.Info.BridgedSticker) - if dm.Sticker == nil { - var emoji *string - // TODO check for single grapheme cluster? - if len([]rune(content.Body)) == 1 { - emoji = proto.String(variationselector.Remove(content.Body)) - } - dm.Sticker = &signalpb.DataMessage_Sticker{ - // Signal iOS validates that pack id/key are of the correct length. - // Android is fine with any non-nil values (like a zero-length byte string). - PackId: make([]byte, 16), - PackKey: make([]byte, 32), - StickerId: proto.Uint32(0), - Emoji: emoji, - } + var emoji *string + // TODO check for single grapheme cluster? + if len([]rune(content.Body)) == 1 { + emoji = proto.String(variationselector.Remove(content.Body)) + } + dm.Sticker = &signalpb.DataMessage_Sticker{ + // Signal iOS validates that pack id/key are of the correct length. + // Android is fine with any non-nil values (like a zero-length byte string). + PackId: make([]byte, 16), + PackKey: make([]byte, 32), + StickerId: proto.Uint32(0), + + Data: att, + Emoji: emoji, } - dm.Sticker.Data = att case event.MsgLocation: lat, lon, err := parseGeoURI(content.GeoURI) if err != nil { diff --git a/pkg/msgconv/from-signal-backup.go b/pkg/msgconv/from-signal-backup.go index 372c9a4..978c6a6 100644 --- a/pkg/msgconv/from-signal-backup.go +++ b/pkg/msgconv/from-signal-backup.go @@ -23,8 +23,8 @@ import ( "go.mau.fi/util/exslices" "go.mau.fi/util/ptr" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/backuppb" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" ) func boolToInt(b bool) int { diff --git a/pkg/msgconv/from-signal.go b/pkg/msgconv/from-signal.go index 3ec4fdb..96b4f10 100644 --- a/pkg/msgconv/from-signal.go +++ b/pkg/msgconv/from-signal.go @@ -23,7 +23,6 @@ import ( "errors" "fmt" "io" - "mime" "net/http" "os" "strconv" @@ -43,7 +42,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/msgconv/signalfmt" "go.mau.fi/mautrix-signal/pkg/signalid" "go.mau.fi/mautrix-signal/pkg/signalmeow" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" ) var ( @@ -115,7 +114,7 @@ func (mc *MessageConverter) ToMatrix( return cm } if dm.PollVote != nil { - cm.Parts = append(cm.Parts, mc.convertPollVoteToMatrix(ctx, sender, dm.PollVote)) + cm.Parts = append(cm.Parts, mc.convertPollVoteToMatrix(ctx, dm.PollVote)) return cm } if dm.PollCreate != nil { @@ -469,16 +468,20 @@ func (mc *MessageConverter) convertStickerToMatrix(ctx context.Context, sticker converted.Content.Info.Height = 200 } converted.Content.Body = sticker.GetEmoji() - if len(sticker.GetPackId()) == PackIDLength && len(sticker.GetPackKey()) == PackKeyLength && !bytes.Equal(sticker.GetPackId(), zeroPackID) { - converted.Content.Info.BridgedSticker = &event.BridgedSticker{ - Network: StickerSourceID, - ID: strconv.FormatUint(uint64(sticker.GetStickerId()), 10), - Emoji: sticker.GetEmoji(), - PackURL: fmt.Sprintf(PackURLFormat, sticker.GetPackId(), sticker.GetPackKey()), - } - } converted.Type = event.EventSticker converted.Content.MsgType = "" + if converted.Extra == nil { + converted.Extra = map[string]any{} + } + // TODO fetch full pack metadata like the old bridge did? + converted.Extra["fi.mau.signal.sticker"] = map[string]any{ + "id": sticker.GetStickerId(), + "emoji": sticker.GetEmoji(), + "pack": map[string]any{ + "id": sticker.GetPackId(), + "key": sticker.GetPackKey(), + }, + } return converted } @@ -570,20 +573,15 @@ func (mc *MessageConverter) reuploadAttachment(ctx context.Context, att *signalp content.Info.Blurhash = att.GetBlurHash() content.Info.AnoaBlurhash = att.GetBlurHash() } - plainMime, _, _ := mime.ParseMediaType(content.Info.MimeType) - // Supported mime types from https://github.com/signalapp/Signal-Desktop/blob/main/ts/util/GoogleChrome.std.ts - switch plainMime { - case "image/avif", "image/bmp", "image/gif", "image/jpeg", "image/webp", "image/x-xbitmap", - "image/vnd.microsoft.icon", "image/ico", "image/icon", "image/x-icon", "image/png", "image/apng": + switch strings.Split(content.Info.MimeType, "/")[0] { + case "image": content.MsgType = event.MsgImage - case "video/mp4", "video/ogg", "video/webm": + case "video": content.MsgType = event.MsgVideo + case "audio": + content.MsgType = event.MsgAudio default: - if strings.HasPrefix(plainMime, "audio/") && !strings.HasSuffix(plainMime, "aiff") { - content.MsgType = event.MsgAudio - } else { - content.MsgType = event.MsgFile - } + content.MsgType = event.MsgFile } var extra map[string]any if att.GetFlags()&uint32(signalpb.AttachmentPointer_GIF) != 0 { @@ -749,7 +747,7 @@ var invalidPollVote = &bridgev2.ConvertedMessagePart{ DontBridge: true, } -func (mc *MessageConverter) convertPollVoteToMatrix(ctx context.Context, senderACI uuid.UUID, vote *signalpb.DataMessage_PollVote) *bridgev2.ConvertedMessagePart { +func (mc *MessageConverter) convertPollVoteToMatrix(ctx context.Context, vote *signalpb.DataMessage_PollVote) *bridgev2.ConvertedMessagePart { if len(vote.GetTargetAuthorAciBinary()) != 16 { zerolog.Ctx(ctx).Debug(). Str("author_aci_b64", base64.StdEncoding.EncodeToString(vote.GetTargetAuthorAciBinary())). @@ -765,24 +763,7 @@ func (mc *MessageConverter) convertPollVoteToMatrix(ctx context.Context, senderA zerolog.Ctx(ctx).Warn().Msg("Poll vote target message not found") return invalidPollVote } - meta := pollMessage.Metadata.(*signalid.MessageMetadata) - if prevCount, ok := meta.VoteCount[senderACI.String()]; ok && vote.GetVoteCount() <= prevCount { - zerolog.Ctx(ctx).Debug(). - Stringer("sender_aci", senderACI). - Uint32("vote_count", vote.GetVoteCount()). - Uint32("previous_vote_count", prevCount). - Msg("Ignoring poll vote with lower vote count") - return invalidPollVote - } - if meta.VoteCount == nil { - meta.VoteCount = make(map[string]uint32) - } - meta.VoteCount[senderACI.String()] = vote.GetVoteCount() - err = mc.Bridge.DB.Message.Update(ctx, pollMessage) - if err != nil { - zerolog.Ctx(ctx).Warn().Err(err).Msg("Failed to update poll message with new vote count") - } - mxOptionIDs := meta.MatrixPollOptionIDs + mxOptionIDs := pollMessage.Metadata.(*signalid.MessageMetadata).MatrixPollOptionIDs optionIDs := make([]string, len(vote.GetOptionIndexes())) for i, optionIndex := range vote.GetOptionIndexes() { if int(optionIndex) < len(mxOptionIDs) { diff --git a/pkg/msgconv/imagepack.go b/pkg/msgconv/imagepack.go deleted file mode 100644 index 310f810..0000000 --- a/pkg/msgconv/imagepack.go +++ /dev/null @@ -1,199 +0,0 @@ -// mautrix-signal - A Matrix-Signal puppeting bridge. -// Copyright (C) 2026 Tulir Asokan -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package msgconv - -import ( - "bytes" - "context" - "encoding/hex" - "fmt" - "net/url" - "strconv" - "strings" - - "go.mau.fi/util/emojishortcodes" - "google.golang.org/protobuf/proto" - "maunium.net/go/mautrix" - "maunium.net/go/mautrix/bridgev2" - "maunium.net/go/mautrix/bridgev2/database" - "maunium.net/go/mautrix/event" - "maunium.net/go/mautrix/id" - - "go.mau.fi/mautrix-signal/pkg/signalid" - "go.mau.fi/mautrix-signal/pkg/signalmeow" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" -) - -const StickerSourceID = "signal" -const PackURLFormat = "https://signal.art/addstickers/#pack_id=%x&pack_key=%x" - -const PackIDLength = 16 -const PackKeyLength = 32 -const PackURLLength = len(PackURLFormat) - len("%x")*2 + PackIDLength*2 + PackKeyLength*2 - -var zeroPackID = make([]byte, PackIDLength) - -func ParseStickerMeta(info *event.BridgedSticker) *signalpb.DataMessage_Sticker { - if info == nil || info.Network != StickerSourceID || len(info.PackURL) != PackURLLength { - return nil - } - stickerID, err := strconv.ParseUint(info.ID, 10, 32) - if err != nil { - return nil - } - packID, packKey, err := parsePackURL(info.PackURL) - if err != nil || len(packID) != PackIDLength || len(packKey) != PackKeyLength || bytes.Equal(packID, zeroPackID) { - return nil - } - return &signalpb.DataMessage_Sticker{ - PackId: packID, - PackKey: packKey, - StickerId: proto.Uint32(uint32(stickerID)), - Emoji: &info.Emoji, - } -} - -func parsePackURL(rawURL string) (packID, packKey []byte, err error) { - parsed, err := url.Parse(rawURL) - if err != nil { - return nil, nil, fmt.Errorf("invalid URL: %w", err) - } else if parsed.Host != "signal.art" || !strings.HasPrefix(parsed.Path, "/addstickers") { - return nil, nil, fmt.Errorf("invalid host or path in URL") - } - q, err := url.ParseQuery(parsed.Fragment) - if err != nil { - return nil, nil, fmt.Errorf("invalid URL fragment: %w", err) - } - packID, err = hex.DecodeString(q.Get("pack_id")) - if err != nil { - return nil, nil, fmt.Errorf("invalid pack ID in URL: %w", err) - } - packKey, err = hex.DecodeString(q.Get("pack_key")) - if err != nil { - return nil, nil, fmt.Errorf("invalid pack key in URL: %w", err) - } - return -} - -func (mc *MessageConverter) DownloadImagePack(ctx context.Context, url string) (*bridgev2.ImportedImagePack, error) { - packID, packKey, err := parsePackURL(url) - if err != nil { - return nil, bridgev2.WrapRespErr(err, mautrix.MNotFound) - } - manifest, err := signalmeow.DownloadStickerPackManifest(ctx, packID, packKey) - if err != nil { - return nil, fmt.Errorf("failed to download sticker pack manifest: %w", err) - } - topLevelExtra := map[string]any{ - "fi.mau.signal.stickerpack": map[string]any{ - "pack_id": hex.EncodeToString(packID), - "pack_key": hex.EncodeToString(packKey), - }, - } - content := &event.ImagePackEventContent{ - Images: make(map[string]*event.ImagePackImage, len(manifest.Stickers)), - Metadata: event.ImagePackMetadata{ - DisplayName: manifest.GetTitle(), - AvatarURL: "", - Usage: []event.ImagePackUsage{event.ImagePackUsageSticker}, - Attribution: manifest.GetAuthor(), - BridgedPack: &event.BridgedStickerPack{ - Network: StickerSourceID, - URL: fmt.Sprintf(PackURLFormat, packID, packKey), - }, - }, - } - imagesByID := make(map[uint32]id.ContentURIString, len(manifest.Stickers)) - uploadImage := func(sticker *signalpb.Pack_Sticker) (id.ContentURIString, error) { - stickerID := sticker.GetId() - existing, ok := imagesByID[stickerID] - if ok { - return existing, nil - } - var mxc id.ContentURIString - if mc.DirectMedia { - mediaID, err := signalid.DirectMediaSticker{ - PackID: packID, - PackKey: packKey, - StickerID: stickerID, - }.AsMediaID() - if err != nil { - return "", fmt.Errorf("failed to create media ID for sticker %d: %w", stickerID, err) - } - mxc, err = mc.Bridge.Matrix.GenerateContentURI(ctx, mediaID) - if err != nil { - return "", fmt.Errorf("failed to generate content URI for sticker %d: %w", stickerID, err) - } - } else { - dbKey := database.Key(fmt.Sprintf("stickercache:%x:%d", packID, stickerID)) - if cached := mc.Bridge.DB.KV.Get(ctx, dbKey); cached != "" { - mxc = id.ContentURIString(cached) - imagesByID[stickerID] = mxc - return mxc, nil - } - data, err := signalmeow.DownloadStickerPackItem(ctx, packID, packKey, stickerID) - if err != nil { - return "", fmt.Errorf("failed to download sticker %d: %w", stickerID, err) - } - mxc, _, err = mc.Bridge.Bot.UploadMedia(ctx, "", data, "", sticker.GetContentType()) - if err != nil { - return "", fmt.Errorf("failed to upload sticker %d: %w", stickerID, err) - } - mc.Bridge.DB.KV.Set(ctx, dbKey, string(mxc)) - } - imagesByID[stickerID] = mxc - return mxc, nil - } - for _, sticker := range manifest.Stickers { - mxc, err := uploadImage(sticker) - if err != nil { - return nil, err - } - shortcode := emojishortcodes.Get(sticker.GetEmoji()) - realShortcode := shortcode - i := 2 - for _, alreadyExists := content.Images[realShortcode]; alreadyExists; i++ { - realShortcode = fmt.Sprintf("%s_%d", shortcode, i) - } - content.Images[realShortcode] = &event.ImagePackImage{ - URL: mxc, - Body: sticker.GetEmoji(), - Info: &event.FileInfo{ - MimeType: sticker.GetContentType(), - Width: 200, - Height: 200, - BridgedSticker: &event.BridgedSticker{ - Network: StickerSourceID, - ID: strconv.FormatUint(uint64(sticker.GetId()), 10), - Emoji: sticker.GetEmoji(), - PackURL: content.Metadata.BridgedPack.URL, - }, - }, - } - } - if manifest.Cover != nil { - content.Metadata.AvatarURL, err = uploadImage(manifest.Cover) - if err != nil { - return nil, fmt.Errorf("failed to upload sticker pack cover: %w", err) - } - } - return &bridgev2.ImportedImagePack{ - Content: content, - Extra: topLevelExtra, - Shortcode: hex.EncodeToString(packID), - }, nil -} diff --git a/pkg/msgconv/matrixfmt/convert.go b/pkg/msgconv/matrixfmt/convert.go index ddc5cba..5318735 100644 --- a/pkg/msgconv/matrixfmt/convert.go +++ b/pkg/msgconv/matrixfmt/convert.go @@ -21,7 +21,7 @@ import ( "maunium.net/go/mautrix/event" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" ) func Parse(ctx context.Context, parser *HTMLParser, content *event.MessageEventContent) (string, []*signalpb.BodyRange) { diff --git a/pkg/msgconv/matrixfmt/convert_test.go b/pkg/msgconv/matrixfmt/convert_test.go index 5e243e3..1ade316 100644 --- a/pkg/msgconv/matrixfmt/convert_test.go +++ b/pkg/msgconv/matrixfmt/convert_test.go @@ -111,13 +111,22 @@ func TestParse_HTML(t *testing.T) { { name: "List", in: "
  • woof
  • meow
  • hmm\nmeow
  • meow

    meow

", - out: "* woof\n* meow\n* ```\n hmm\n meow\n ```\n* > meow\n > \n > # meow", + out: "* woof\n* meow\n* hmm\n meow\n* > meow\n > \n > # meow", ent: signalfmt.BodyRangeList{{ Start: 9, Length: 4, Value: signalfmt.StyleBold, }, { - Start: 57, + Start: 16, + Length: 3, + Value: signalfmt.StyleMonospace, + }, { + // FIXME optimally this would be a single range with the previous one so the indent is also monospace + Start: 22, + Length: 4, + Value: signalfmt.StyleMonospace, + }, { + Start: 45, Length: 6, Value: signalfmt.StyleBold, }}, @@ -125,13 +134,21 @@ func TestParse_HTML(t *testing.T) { { name: "OrderedList", in: "
  1. woof
  2. meow
  3. hmm\nmeow
  4. meow

    meow

", - out: "9. woof\n10. meow\n11. ```\n hmm\n meow\n ```\n12. > meow\n > \n > # meow", + out: "9. woof\n10. meow\n11. hmm\n meow\n12. > meow\n > \n > # meow", ent: signalfmt.BodyRangeList{{ Start: 13, Length: 4, Value: signalfmt.StyleBold, }, { - Start: 75, + Start: 22, + Length: 3, + Value: signalfmt.StyleMonospace, + }, { + Start: 30, + Length: 4, + Value: signalfmt.StyleMonospace, + }, { + Start: 59, Length: 6, Value: signalfmt.StyleBold, }}, diff --git a/pkg/msgconv/matrixfmt/html.go b/pkg/msgconv/matrixfmt/html.go index b60c0ad..958ccc3 100644 --- a/pkg/msgconv/matrixfmt/html.go +++ b/pkg/msgconv/matrixfmt/html.go @@ -404,17 +404,17 @@ func (parser *HTMLParser) tagToString(node *html.Node, ctx Context) *EntityStrin return NewEntityString("---") case "pre": var preStr *EntityString - var language string + //var language string if node.FirstChild != nil && node.FirstChild.Type == html.ElementNode && node.FirstChild.Data == "code" { - class := parser.getAttribute(node.FirstChild, "class") - if strings.HasPrefix(class, "language-") { - language = class[len("language-"):] - } + //class := parser.getAttribute(node.FirstChild, "class") + //if strings.HasPrefix(class, "language-") { + // language = class[len("language-"):] + //} preStr = parser.nodeToString(node.FirstChild.FirstChild, ctx.WithWhitespace()) } else { preStr = parser.nodeToString(node.FirstChild, ctx.WithWhitespace()) } - return NewEntityString(fmt.Sprintf("```%s\n", language)).Append(preStr).AppendString("\n```") + return preStr.Format(signalfmt.StyleMonospace) default: return parser.nodeToTagAwareString(node.FirstChild, ctx) } diff --git a/pkg/msgconv/signalfmt/convert.go b/pkg/msgconv/signalfmt/convert.go index d237703..412af36 100644 --- a/pkg/msgconv/signalfmt/convert.go +++ b/pkg/msgconv/signalfmt/convert.go @@ -28,7 +28,7 @@ import ( "maunium.net/go/mautrix/event" "maunium.net/go/mautrix/id" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" ) type UserInfo struct { @@ -86,9 +86,6 @@ func Parse(ctx context.Context, message string, ranges []*signalpb.BodyRange, pa Start: int(*r.Start), Length: int(*r.Length), }.TruncateEnd(maxLength) - if br.Start >= maxLength { - continue - } var mentionACI uuid.UUID switch rv := r.GetAssociatedValue().(type) { case *signalpb.BodyRange_Style_: diff --git a/pkg/msgconv/signalfmt/convert_test.go b/pkg/msgconv/signalfmt/convert_test.go index ac9f201..eb65542 100644 --- a/pkg/msgconv/signalfmt/convert_test.go +++ b/pkg/msgconv/signalfmt/convert_test.go @@ -27,7 +27,7 @@ import ( "maunium.net/go/mautrix/id" "go.mau.fi/mautrix-signal/pkg/msgconv/signalfmt" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" ) var realUser = uuid.New() diff --git a/pkg/msgconv/signalfmt/tags.go b/pkg/msgconv/signalfmt/tags.go index 4862fe9..b273e0e 100644 --- a/pkg/msgconv/signalfmt/tags.go +++ b/pkg/msgconv/signalfmt/tags.go @@ -21,7 +21,7 @@ import ( "github.com/google/uuid" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" ) type BodyRangeValue interface { diff --git a/pkg/msgconv/signalfmt/tree.go b/pkg/msgconv/signalfmt/tree.go index 955b128..5f37b1c 100644 --- a/pkg/msgconv/signalfmt/tree.go +++ b/pkg/msgconv/signalfmt/tree.go @@ -22,7 +22,7 @@ import ( "google.golang.org/protobuf/proto" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" ) type BodyRange struct { diff --git a/pkg/msgconv/urlpreview.go b/pkg/msgconv/urlpreview.go index 3b3bd06..66b186a 100644 --- a/pkg/msgconv/urlpreview.go +++ b/pkg/msgconv/urlpreview.go @@ -24,7 +24,7 @@ import ( "google.golang.org/protobuf/proto" "maunium.net/go/mautrix/event" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" ) func (mc *MessageConverter) convertURLPreviewsToBeeper(ctx context.Context, preview []*signalpb.Preview, attMap AttachmentMap) []*event.BeeperLinkPreview { diff --git a/pkg/signalid/dbmeta.go b/pkg/signalid/dbmeta.go index 35893c0..8f42e6f 100644 --- a/pkg/signalid/dbmeta.go +++ b/pkg/signalid/dbmeta.go @@ -28,9 +28,8 @@ type PortalMetadata struct { } type MessageMetadata struct { - ContainsAttachments bool `json:"contains_attachments,omitempty"` - MatrixPollOptionIDs []string `json:"matrix_poll_option_ids,omitempty"` - VoteCount map[string]uint32 `json:"vote_count,omitempty"` + ContainsAttachments bool `json:"contains_attachments,omitempty"` + MatrixPollOptionIDs []string `json:"matrix_poll_option_ids,omitempty"` } type UserLoginMetadata struct { diff --git a/pkg/signalid/media.go b/pkg/signalid/media.go index a530c22..8c91b6a 100644 --- a/pkg/signalid/media.go +++ b/pkg/signalid/media.go @@ -34,7 +34,6 @@ const ( directMediaTypeGroupAvatar directMediaType = 1 directMediaTypeProfileAvatar directMediaType = 2 directMediaTypePlaintextDigestAttachment directMediaType = 3 - directMediaTypeSticker directMediaType = 4 ) type DirectMediaInfo interface { @@ -45,7 +44,6 @@ var ( _ DirectMediaInfo = (*DirectMediaAttachment)(nil) _ DirectMediaInfo = (*DirectMediaGroupAvatar)(nil) _ DirectMediaInfo = (*DirectMediaProfileAvatar)(nil) - _ DirectMediaInfo = (*DirectMediaSticker)(nil) ) type DirectMediaAttachment struct { @@ -129,30 +127,6 @@ func (m DirectMediaProfileAvatar) AsMediaID() (mediaID networkid.MediaID, err er return networkid.MediaID(buf.Bytes()), nil } -type DirectMediaSticker struct { - PackID []byte - PackKey []byte - StickerID uint32 -} - -const packIDLen = 16 -const packKeyLen = 32 -const directMediaStickerLen = 1 + packIDLen + packKeyLen + 4 - -func (m DirectMediaSticker) AsMediaID() (mediaID networkid.MediaID, err error) { - if len(m.PackID) != packIDLen { - return nil, fmt.Errorf("invalid pack ID length: %d", len(m.PackID)) - } else if len(m.PackKey) != packKeyLen { - return nil, fmt.Errorf("invalid pack key length: %d", len(m.PackKey)) - } - mediaID = make(networkid.MediaID, directMediaStickerLen) - mediaID[0] = byte(directMediaTypeSticker) - copy(mediaID[1:], m.PackID) - copy(mediaID[1+packIDLen:], m.PackKey) - binary.BigEndian.PutUint32(mediaID[1+packIDLen+packKeyLen:], m.StickerID) - return mediaID, nil -} - func ParseDirectMediaInfo(mediaID networkid.MediaID) (_ DirectMediaInfo, err error) { mediaIDLen := len(mediaID) if mediaIDLen == 0 { @@ -226,15 +200,6 @@ func ParseDirectMediaInfo(mediaID networkid.MediaID) (_ DirectMediaInfo, err err info.ProfileAvatarPath = string(profileAvatarPath) } return &info, nil - case directMediaTypeSticker: - var info DirectMediaSticker - if len(mediaID) != directMediaStickerLen { - return info, fmt.Errorf("invalid media ID length for sticker: %d", len(mediaID)) - } - info.PackID = mediaID[1 : 1+packIDLen] - info.PackKey = mediaID[1+packIDLen : 1+packIDLen+packKeyLen] - info.StickerID = binary.BigEndian.Uint32(mediaID[1+packIDLen+packKeyLen:]) - return &info, nil } return nil, fmt.Errorf("invalid direct media type %d", mediaType) diff --git a/pkg/signalmeow/attachments.go b/pkg/signalmeow/attachments.go index de89fb2..fd15c0b 100644 --- a/pkg/signalmeow/attachments.go +++ b/pkg/signalmeow/attachments.go @@ -35,12 +35,11 @@ import ( "github.com/rs/zerolog" "go.mau.fi/util/fallocate" - "go.mau.fi/util/pkcs7" "go.mau.fi/util/random" "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" ) @@ -94,19 +93,14 @@ func DownloadAttachment( var body []byte var downloadedSize int64 - if resp.StatusCode > 400 { - body, err = io.ReadAll(io.LimitReader(resp.Body, 4096)) - } else if into == nil { - if resp.ContentLength > 0 { - body = make([]byte, resp.ContentLength) - _, err = io.ReadFull(resp.Body, body) - } else { - body, err = io.ReadAll(http.MaxBytesReader(nil, resp.Body, max(int64(size), 32*1024)*2)) - } + if into == nil || resp.StatusCode > 400 { + body, err = io.ReadAll(resp.Body) } else { - err = fallocate.Fallocate(into, int(resp.ContentLength)) - if err != nil { - return nil, fmt.Errorf("failed to pre-allocate file for attachment: %w", err) + if resp.ContentLength > 0 { + err = fallocate.Fallocate(into, int(resp.ContentLength)) + if err != nil { + return nil, fmt.Errorf("failed to pre-allocate file for attachment: %w", err) + } } downloadedSize, err = io.Copy(into, resp.Body) } @@ -137,15 +131,6 @@ func DownloadAttachment( const MACLength = 32 const IVLength = 16 -func macAndAESDecrypt(body, key []byte) ([]byte, error) { - l := len(body) - MACLength - if !verifyMAC(key[MACLength:], body[:l], body[l:]) { - return nil, ErrInvalidMACForAttachment - } - - return aesDecrypt(key[:MACLength], body[:l]) -} - func decryptAttachment(body, key, digest []byte, plaintextDigest bool, size uint32) ([]byte, error) { if !plaintextDigest { hash := sha256.Sum256(body) @@ -153,7 +138,12 @@ func decryptAttachment(body, key, digest []byte, plaintextDigest bool, size uint return nil, ErrInvalidDigestForAttachment } } - decrypted, err := macAndAESDecrypt(body, key) + l := len(body) - MACLength + if !verifyMAC(key[MACLength:], body[:l], body[l:]) { + return nil, ErrInvalidMACForAttachment + } + + decrypted, err := aesDecrypt(key[:MACLength], body[:l]) if err != nil { return nil, err } @@ -245,14 +235,6 @@ func extend(data []byte, paddedLen int) []byte { } } -func macAndAESEncrypt(keys, plaintext []byte) ([]byte, error) { - encrypted, err := aesEncrypt(keys[:32], plaintext) - if err != nil { - return nil, err - } - return appendMAC(keys[32:], encrypted), nil -} - func (cli *Client) UploadAttachment(ctx context.Context, body []byte) (*signalpb.AttachmentPointer, error) { log := zerolog.Ctx(ctx).With().Str("func", "upload attachment").Logger() keys := random.Bytes(64) // combined AES and MAC keys @@ -268,10 +250,11 @@ func (cli *Client) UploadAttachment(ctx context.Context, body []byte) (*signalpb } body = extend(body, paddedLen) - encryptedWithMAC, err := macAndAESEncrypt(keys, body) + encrypted, err := aesEncrypt(keys[:32], body) if err != nil { return nil, err } + encryptedWithMAC := appendMAC(keys[32:], encrypted) // Get upload attributes from Signal server attributesPath := "/v4/attachments/form/upload" @@ -381,17 +364,12 @@ func (cli *Client) uploadAttachmentTUS( return nil } -func (cli *Client) UploadGroupAvatar(ctx context.Context, avatarBytes []byte, gid types.GroupIdentifier, groupMasterKey types.SerializedGroupMasterKey) (string, error) { +func (cli *Client) UploadGroupAvatar(ctx context.Context, avatarBytes []byte, gid types.GroupIdentifier) (string, error) { log := zerolog.Ctx(ctx) - if groupMasterKey == "" { - var err error - groupMasterKey, err = cli.Store.GroupStore.MasterKeyFromGroupIdentifier(ctx, gid) - if err != nil { - log.Err(err).Msg("Could not get master key from group id") - return "", err - } else if groupMasterKey == "" { - return "", fmt.Errorf("no master key found for group %s", gid) - } + groupMasterKey, err := cli.Store.GroupStore.MasterKeyFromGroupIdentifier(ctx, gid) + if err != nil { + log.Err(err).Msg("Could not get master key from group id") + return "", err } groupAuth, err := cli.GetAuthorizationForToday(ctx, masterKeyToBytes(groupMasterKey)) if err != nil { @@ -479,10 +457,13 @@ func aesDecrypt(key, ciphertext []byte) ([]byte, error) { } iv := ciphertext[:IVLength] - ciphertext = ciphertext[IVLength:] mode := cipher.NewCBCDecrypter(block, iv) mode.CryptBlocks(ciphertext, ciphertext) - return pkcs7.Unpad(ciphertext) + pad := ciphertext[len(ciphertext)-1] + if pad > aes.BlockSize { + return nil, fmt.Errorf("pad value (%d) larger than AES blocksize (%d)", pad, aes.BlockSize) + } + return ciphertext[aes.BlockSize : len(ciphertext)-int(pad)], nil } func aesDecryptFile(key []byte, file *os.File, downloadedSize int64) (int64, error) { @@ -542,11 +523,14 @@ func aesEncrypt(key, plaintext []byte) ([]byte, error) { return nil, err } - plaintext = pkcs7.Pad(plaintext, aes.BlockSize) + pad := aes.BlockSize - len(plaintext)%aes.BlockSize + plaintext = append(plaintext, bytes.Repeat([]byte{byte(pad)}, pad)...) + + ciphertext := make([]byte, len(plaintext)) iv := random.Bytes(16) mode := cipher.NewCBCEncrypter(block, iv) - mode.CryptBlocks(plaintext, plaintext) + mode.CryptBlocks(ciphertext, plaintext) - return append(iv, plaintext...), nil + return append(iv, ciphertext...), nil } diff --git a/pkg/signalmeow/backup.go b/pkg/signalmeow/backup.go index f003e19..fcbfff0 100644 --- a/pkg/signalmeow/backup.go +++ b/pkg/signalmeow/backup.go @@ -282,11 +282,7 @@ func (cli *Client) WaitForTransfer(ctx context.Context) (*TransferArchiveMetadat } reqDuration := time.Since(reqStart) if reqDuration < reqTimeout-10*time.Second { - select { - case <-time.After(15 * time.Second): - case <-ctx.Done(): - return nil, ctx.Err() - } + time.Sleep(15 * time.Second) } } } diff --git a/pkg/signalmeow/client.go b/pkg/signalmeow/client.go index b72e33b..57598cd 100644 --- a/pkg/signalmeow/client.go +++ b/pkg/signalmeow/client.go @@ -30,7 +30,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/libsignalgo" "go.mau.fi/mautrix-signal/pkg/signalmeow/events" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/store" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" @@ -55,7 +55,6 @@ type Client struct { AuthedWS *web.SignalWebsocket UnauthedWS *web.SignalWebsocket - GRPC *web.GRPCClient lastConnectionStatus SignalConnectionStatus loopCancel context.CancelFunc diff --git a/pkg/signalmeow/contact.go b/pkg/signalmeow/contact.go index 616434d..f30f54f 100644 --- a/pkg/signalmeow/contact.go +++ b/pkg/signalmeow/contact.go @@ -31,7 +31,7 @@ import ( "github.com/rs/zerolog" "google.golang.org/protobuf/proto" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" ) diff --git a/pkg/signalmeow/contactdiscovery.go b/pkg/signalmeow/contactdiscovery.go index 14b7fd6..07d9b49 100644 --- a/pkg/signalmeow/contactdiscovery.go +++ b/pkg/signalmeow/contactdiscovery.go @@ -35,14 +35,12 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/cds2pb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" ) -// ProdContactDiscoveryMrenclave should always match ENCLAVE_ID_CDSI_PROD from libsignal -// https://github.com/signalapp/libsignal/blob/main/rust/attest/src/constants.rs#L69 -const ProdContactDiscoveryMrenclave = "15637fa1e54fe655176d3df1a9f94b87c01ed377acaa570682dc5d72c95ef07b" const ProdContactDiscoveryServer = "cdsi.signal.org" +const ProdContactDiscoveryMrenclave = "ee9503070127120074612b6688e593b67e486b1541449f54d71e387484eb40a3" const ContactDiscoveryAuthTTL = 23 * time.Hour const rateLimitCloseCode = websocket.StatusCode(4008) @@ -83,7 +81,7 @@ func (cli *Client) LookupPhone(ctx context.Context, e164s ...uint64) (ContactDis } ctx, cancel := context.WithTimeout(ctx, 20*time.Second) defer cancel() - resp, token, err := cli.doContactDiscovery(ctx, &cds2pb.ClientRequest{ + resp, token, err := cli.doContactDiscovery(ctx, &signalpb.CDSClientRequest{ // TODO figure out if tokens are useful // (it's meant for old_e164s) //Token: cli.cdToken, @@ -95,7 +93,7 @@ func (cli *Client) LookupPhone(ctx context.Context, e164s ...uint64) (ContactDis return resp, err } -func (cli *Client) doContactDiscovery(ctx context.Context, req *cds2pb.ClientRequest) (ContactDiscoveryResponse, []byte, error) { +func (cli *Client) doContactDiscovery(ctx context.Context, req *signalpb.CDSClientRequest) (ContactDiscoveryResponse, []byte, error) { creds, err := cli.getContactDiscoveryCredentials(ctx) if err != nil { return nil, nil, fmt.Errorf("failed to fetch contact discovery auth: %w", err) @@ -187,7 +185,7 @@ func (cdc *ContactDiscoveryClient) Handshake(ctx context.Context) error { return nil } -func (cdc *ContactDiscoveryClient) SendRequest(ctx context.Context, req *cds2pb.ClientRequest) error { +func (cdc *ContactDiscoveryClient) SendRequest(ctx context.Context, req *signalpb.CDSClientRequest) error { plaintext, err := proto.Marshal(req) if err != nil { return fmt.Errorf("failed to marshal request: %w", err) @@ -224,15 +222,15 @@ func (cdc *ContactDiscoveryClient) handleResponse(ctx context.Context, msg []byt if err != nil { return fmt.Errorf("failed to decrypt message: %w", err) } - var cdsClientResp cds2pb.ClientResponse + var cdsClientResp signalpb.CDSClientResponse err = proto.Unmarshal(decrypted, &cdsClientResp) if err != nil { return fmt.Errorf("failed to unmarshal message: %w", err) } if cdsClientResp.Token != nil { cdc.Token = cdsClientResp.Token - err = cdc.SendRequest(ctx, &cds2pb.ClientRequest{ - TokenAck: true, + err = cdc.SendRequest(ctx, &signalpb.CDSClientRequest{ + TokenAck: proto.Bool(true), }) if err != nil { return fmt.Errorf("failed to send token ack request: %w", err) diff --git a/pkg/signalmeow/devicename.go b/pkg/signalmeow/devicename.go index 03e4a9c..ceca1e4 100644 --- a/pkg/signalmeow/devicename.go +++ b/pkg/signalmeow/devicename.go @@ -29,7 +29,7 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" ) func hmacSHA256(key, input []byte) []byte { diff --git a/pkg/signalmeow/events/message.go b/pkg/signalmeow/events/message.go index 475ac02..7d3732a 100644 --- a/pkg/signalmeow/events/message.go +++ b/pkg/signalmeow/events/message.go @@ -20,7 +20,7 @@ import ( "github.com/google/uuid" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" ) diff --git a/pkg/signalmeow/groups.go b/pkg/signalmeow/groups.go index cafe4d3..b02687b 100644 --- a/pkg/signalmeow/groups.go +++ b/pkg/signalmeow/groups.go @@ -37,7 +37,7 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" ) @@ -619,7 +619,7 @@ func (cli *Client) fetchGroupByID(ctx context.Context, gid types.GroupIdentifier return nil, fmt.Errorf("failed to get group master key: %w", err) } if groupMasterKey == "" { - return nil, fmt.Errorf("%w for %s", ErrGroupMasterKeyNotFound, gid) + return nil, fmt.Errorf("No group master key found for group identifier %s", gid) } return cli.fetchGroupWithMasterKey(ctx, groupMasterKey) } @@ -641,7 +641,7 @@ func (cli *Client) fetchGroupWithMasterKey(ctx context.Context, groupMasterKey t return nil, err } if response.StatusCode != 200 { - return nil, fmt.Errorf("unexpected response status: %d", response.StatusCode) + return nil, fmt.Errorf("fetchGroupByID SendHTTPRequest bad status: %d", response.StatusCode) } return cli.parseGroupResponse(ctx, response, groupMasterKey) } @@ -1513,15 +1513,11 @@ func (cli *Client) patchGroup(ctx context.Context, groupChange *signalpb.GroupCh return &changeResp, nil } -var ErrGroupMasterKeyNotFound = errors.New("group master key not found in store") - func (cli *Client) UpdateGroup(ctx context.Context, groupChange *GroupChange, gid types.GroupIdentifier) (uint32, error) { log := zerolog.Ctx(ctx).With().Str("action", "UpdateGroup").Logger() groupMasterKey, err := cli.Store.GroupStore.MasterKeyFromGroupIdentifier(ctx, gid) if err != nil { return 0, fmt.Errorf("failed to get master key for group: %w", err) - } else if groupMasterKey == "" { - return 0, ErrGroupMasterKeyNotFound } groupChange.GroupMasterKey = groupMasterKey masterKeyBytes := masterKeyToBytes(groupMasterKey) @@ -1666,7 +1662,7 @@ func PrepareGroupCreation(decryptedGroup *Group) (libsignalgo.GroupMasterKey, er return masterKeyBytes, nil } -func (cli *Client) createGroupOnServer(ctx context.Context, decryptedGroup *Group) (*Group, error) { +func (cli *Client) createGroupOnServer(ctx context.Context, decryptedGroup *Group, avatarBytes []byte) (*Group, error) { log := zerolog.Ctx(ctx).With().Str("action", "CreateGroupOnServer").Logger() masterKeyBytes, err := PrepareGroupCreation(decryptedGroup) if err != nil { @@ -1681,6 +1677,14 @@ func (cli *Client) createGroupOnServer(ctx context.Context, decryptedGroup *Grou log.Err(err).Msg("DeriveGroupSecretParamsFromMasterKey error") return nil, err } + if len(avatarBytes) > 0 { + avatarPath, err := cli.UploadGroupAvatar(ctx, avatarBytes, decryptedGroup.GroupIdentifier) + if err != nil { + log.Err(err).Msg("Failed to upload group avatar") + return nil, err + } + decryptedGroup.AvatarPath = avatarPath + } encryptedGroup, err := cli.EncryptGroup(ctx, decryptedGroup, groupSecretParams) if err != nil { log.Err(err).Msg("Failed to encrypt group") @@ -1731,9 +1735,9 @@ func GenerateInviteLinkPassword() types.SerializedInviteLinkPassword { return InviteLinkPasswordFromBytes(random.Bytes(16)) } -func (cli *Client) CreateGroup(ctx context.Context, decryptedGroup *Group) (*Group, error) { +func (cli *Client) CreateGroup(ctx context.Context, decryptedGroup *Group, avatarBytes []byte) (*Group, error) { log := zerolog.Ctx(ctx).With().Str("action", "CreateGroup").Logger() - group, err := cli.createGroupOnServer(ctx, decryptedGroup) + group, err := cli.createGroupOnServer(ctx, decryptedGroup, avatarBytes) if err != nil { log.Err(err).Msg("Error creating group on server") return nil, err @@ -1756,7 +1760,7 @@ func (cli *Client) GetGroupHistoryPage(ctx context.Context, gid types.GroupIdent return nil, err } if groupMasterKey == "" { - return nil, ErrGroupMasterKeyNotFound + return nil, fmt.Errorf("No group master key found for group identifier %s", gid) } masterKeyBytes := masterKeyToBytes(groupMasterKey) groupAuth, err := cli.GetAuthorizationForToday(ctx, masterKeyBytes) @@ -1780,7 +1784,7 @@ func (cli *Client) GetGroupHistoryPage(ctx context.Context, gid types.GroupIdent return nil, err } if response.StatusCode != 200 { - return nil, fmt.Errorf("unexpected response status: %d", response.StatusCode) + return nil, fmt.Errorf("fetchGroupByID SendHTTPRequest bad status: %d", response.StatusCode) } var encryptedGroupChanges signalpb.GroupChanges groupChangesBytes, err := io.ReadAll(response.Body) diff --git a/pkg/signalmeow/keys.go b/pkg/signalmeow/keys.go index 5439755..f1801e5 100644 --- a/pkg/signalmeow/keys.go +++ b/pkg/signalmeow/keys.go @@ -413,10 +413,6 @@ func (cli *Client) FetchAndProcessPreKey(ctx context.Context, theirServiceID lib if cli.Store.RecipientStore.IsUnregistered(ctx, theirServiceID) { return fmt.Errorf("%w (cached)", ErrUnregisteredUser) } - localAddress, err := cli.Store.ACIServiceID().Address(uint(cli.Store.DeviceID)) - if err != nil { - return fmt.Errorf("failed to get own address: %w", err) - } // Fetch prekey deviceIDPath := "/*" if specificDeviceID >= 0 { @@ -522,7 +518,6 @@ func (cli *Client) FetchAndProcessPreKey(ctx context.Context, theirServiceID lib ctx, preKeyBundle, address, - localAddress, cli.Store.ACISessionStore, cli.Store.ACIIdentityStore, ) diff --git a/pkg/signalmeow/misc.go b/pkg/signalmeow/misc.go index 70d3ba5..467f646 100644 --- a/pkg/signalmeow/misc.go +++ b/pkg/signalmeow/misc.go @@ -69,8 +69,6 @@ func (l FFILogger) Log(level libsignalgo.LogLevel, file string, line uint, messa func (FFILogger) Flush() {} -func (FFILogger) Destroy() {} - // Ensure FFILogger implements the Logger interface var _ libsignalgo.Logger = FFILogger{} diff --git a/pkg/signalmeow/protobuf/ContactDiscovery.pb.go b/pkg/signalmeow/protobuf/ContactDiscovery.pb.go new file mode 100644 index 0000000..637a2d2 --- /dev/null +++ b/pkg/signalmeow/protobuf/ContactDiscovery.pb.go @@ -0,0 +1,272 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v6.33.5 +// source: ContactDiscovery.proto + +// Copyright 2021 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +package signalpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CDSClientRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Each ACI/UAK pair is a 32-byte buffer, containing the 16-byte ACI followed + // by its 16-byte UAK. + AciUakPairs []byte `protobuf:"bytes,1,opt,name=aci_uak_pairs,json=aciUakPairs" json:"aci_uak_pairs,omitempty"` + // Each E164 is an 8-byte big-endian number, as 8 bytes. + PrevE164S []byte `protobuf:"bytes,2,opt,name=prev_e164s,json=prevE164s" json:"prev_e164s,omitempty"` + NewE164S []byte `protobuf:"bytes,3,opt,name=new_e164s,json=newE164s" json:"new_e164s,omitempty"` + DiscardE164S []byte `protobuf:"bytes,4,opt,name=discard_e164s,json=discardE164s" json:"discard_e164s,omitempty"` + // If true, the client has more pairs or e164s to send. If false or unset, + // this is the client's last request, and processing should commence. + HasMore *bool `protobuf:"varint,5,opt,name=has_more,json=hasMore" json:"has_more,omitempty"` + // If set, a token which allows rate limiting to discount the e164s in + // the request's prev_e164s, only counting new_e164s. If not set, then + // rate limiting considers both prev_e164s' and new_e164s' size. + Token []byte `protobuf:"bytes,6,opt,name=token" json:"token,omitempty"` + // After receiving a new token from the server, send back a message just + // containing a token_ack. + TokenAck *bool `protobuf:"varint,7,opt,name=token_ack,json=tokenAck" json:"token_ack,omitempty"` + // Request that, if the server allows, both ACI and PNI be returned even + // if the aci_uak_pairs don't match. + ReturnAcisWithoutUaks *bool `protobuf:"varint,8,opt,name=return_acis_without_uaks,json=returnAcisWithoutUaks" json:"return_acis_without_uaks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CDSClientRequest) Reset() { + *x = CDSClientRequest{} + mi := &file_ContactDiscovery_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CDSClientRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CDSClientRequest) ProtoMessage() {} + +func (x *CDSClientRequest) ProtoReflect() protoreflect.Message { + mi := &file_ContactDiscovery_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CDSClientRequest.ProtoReflect.Descriptor instead. +func (*CDSClientRequest) Descriptor() ([]byte, []int) { + return file_ContactDiscovery_proto_rawDescGZIP(), []int{0} +} + +func (x *CDSClientRequest) GetAciUakPairs() []byte { + if x != nil { + return x.AciUakPairs + } + return nil +} + +func (x *CDSClientRequest) GetPrevE164S() []byte { + if x != nil { + return x.PrevE164S + } + return nil +} + +func (x *CDSClientRequest) GetNewE164S() []byte { + if x != nil { + return x.NewE164S + } + return nil +} + +func (x *CDSClientRequest) GetDiscardE164S() []byte { + if x != nil { + return x.DiscardE164S + } + return nil +} + +func (x *CDSClientRequest) GetHasMore() bool { + if x != nil && x.HasMore != nil { + return *x.HasMore + } + return false +} + +func (x *CDSClientRequest) GetToken() []byte { + if x != nil { + return x.Token + } + return nil +} + +func (x *CDSClientRequest) GetTokenAck() bool { + if x != nil && x.TokenAck != nil { + return *x.TokenAck + } + return false +} + +func (x *CDSClientRequest) GetReturnAcisWithoutUaks() bool { + if x != nil && x.ReturnAcisWithoutUaks != nil { + return *x.ReturnAcisWithoutUaks + } + return false +} + +type CDSClientResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Each triple is an 8-byte e164, a 16-byte PNI, and a 16-byte ACI. + // If the e164 was not found, PNI and ACI are all zeros. If the PNI + // was found but the ACI was not, the PNI will be non-zero and the ACI + // will be all zeros. ACI will be returned if one of the returned + // PNIs has an ACI/UAK pair that matches. + // + // Should the request be successful (IE: a successful status returned), + // |e164_pni_aci_triple| will always equal |e164| of the request, + // so the entire marshalled size of the response will be (2+32)*|e164|, + // where the additional 2 bytes are the id/type/length additions of the + // protobuf marshaling added to each byte array. This avoids any data + // leakage based on the size of the encrypted output. + E164PniAciTriples []byte `protobuf:"bytes,1,opt,name=e164_pni_aci_triples,json=e164PniAciTriples" json:"e164_pni_aci_triples,omitempty"` + // A token which allows subsequent calls' rate limiting to discount the + // e164s sent up in this request, only counting those in the next + // request's new_e164s. + Token []byte `protobuf:"bytes,3,opt,name=token" json:"token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CDSClientResponse) Reset() { + *x = CDSClientResponse{} + mi := &file_ContactDiscovery_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CDSClientResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CDSClientResponse) ProtoMessage() {} + +func (x *CDSClientResponse) ProtoReflect() protoreflect.Message { + mi := &file_ContactDiscovery_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CDSClientResponse.ProtoReflect.Descriptor instead. +func (*CDSClientResponse) Descriptor() ([]byte, []int) { + return file_ContactDiscovery_proto_rawDescGZIP(), []int{1} +} + +func (x *CDSClientResponse) GetE164PniAciTriples() []byte { + if x != nil { + return x.E164PniAciTriples + } + return nil +} + +func (x *CDSClientResponse) GetToken() []byte { + if x != nil { + return x.Token + } + return nil +} + +var File_ContactDiscovery_proto protoreflect.FileDescriptor + +const file_ContactDiscovery_proto_rawDesc = "" + + "\n" + + "\x16ContactDiscovery.proto\x12\rsignalservice\"\x9e\x02\n" + + "\x10CDSClientRequest\x12\"\n" + + "\raci_uak_pairs\x18\x01 \x01(\fR\vaciUakPairs\x12\x1d\n" + + "\n" + + "prev_e164s\x18\x02 \x01(\fR\tprevE164s\x12\x1b\n" + + "\tnew_e164s\x18\x03 \x01(\fR\bnewE164s\x12#\n" + + "\rdiscard_e164s\x18\x04 \x01(\fR\fdiscardE164s\x12\x19\n" + + "\bhas_more\x18\x05 \x01(\bR\ahasMore\x12\x14\n" + + "\x05token\x18\x06 \x01(\fR\x05token\x12\x1b\n" + + "\ttoken_ack\x18\a \x01(\bR\btokenAck\x127\n" + + "\x18return_acis_without_uaks\x18\b \x01(\bR\x15returnAcisWithoutUaks\"Z\n" + + "\x11CDSClientResponse\x12/\n" + + "\x14e164_pni_aci_triples\x18\x01 \x01(\fR\x11e164PniAciTriples\x12\x14\n" + + "\x05token\x18\x03 \x01(\fR\x05token" + +var ( + file_ContactDiscovery_proto_rawDescOnce sync.Once + file_ContactDiscovery_proto_rawDescData []byte +) + +func file_ContactDiscovery_proto_rawDescGZIP() []byte { + file_ContactDiscovery_proto_rawDescOnce.Do(func() { + file_ContactDiscovery_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ContactDiscovery_proto_rawDesc), len(file_ContactDiscovery_proto_rawDesc))) + }) + return file_ContactDiscovery_proto_rawDescData +} + +var file_ContactDiscovery_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_ContactDiscovery_proto_goTypes = []any{ + (*CDSClientRequest)(nil), // 0: signalservice.CDSClientRequest + (*CDSClientResponse)(nil), // 1: signalservice.CDSClientResponse +} +var file_ContactDiscovery_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_ContactDiscovery_proto_init() } +func file_ContactDiscovery_proto_init() { + if File_ContactDiscovery_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_ContactDiscovery_proto_rawDesc), len(file_ContactDiscovery_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ContactDiscovery_proto_goTypes, + DependencyIndexes: file_ContactDiscovery_proto_depIdxs, + MessageInfos: file_ContactDiscovery_proto_msgTypes, + }.Build() + File_ContactDiscovery_proto = out.File + file_ContactDiscovery_proto_goTypes = nil + file_ContactDiscovery_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/cds2pb/cds2.proto b/pkg/signalmeow/protobuf/ContactDiscovery.proto similarity index 70% rename from pkg/signalmeow/protobuf/cds2pb/cds2.proto rename to pkg/signalmeow/protobuf/ContactDiscovery.proto index 0b5cd3f..d1f5e04 100644 --- a/pkg/signalmeow/protobuf/cds2pb/cds2.proto +++ b/pkg/signalmeow/protobuf/ContactDiscovery.proto @@ -1,36 +1,37 @@ -syntax = "proto3"; +// Copyright 2021 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only -package org.signal.cdsi; +package signalservice; -message ClientRequest { +message CDSClientRequest { // Each ACI/UAK pair is a 32-byte buffer, containing the 16-byte ACI followed // by its 16-byte UAK. - bytes aci_uak_pairs = 1; + optional bytes aci_uak_pairs = 1; // Each E164 is an 8-byte big-endian number, as 8 bytes. - bytes prev_e164s = 2; - bytes new_e164s = 3; - bytes discard_e164s = 4; + optional bytes prev_e164s = 2; + optional bytes new_e164s = 3; + optional bytes discard_e164s = 4; // If true, the client has more pairs or e164s to send. If false or unset, // this is the client's last request, and processing should commence. - // bool has_more = 5; - reserved 5; + optional bool has_more = 5; // If set, a token which allows rate limiting to discount the e164s in // the request's prev_e164s, only counting new_e164s. If not set, then // rate limiting considers both prev_e164s' and new_e164s' size. - bytes token = 6; + optional bytes token = 6; // After receiving a new token from the server, send back a message just // containing a token_ack. - bool token_ack = 7; + optional bool token_ack = 7; - // [deprecated] bool return_acis_without_uaks = 8 - reserved 8; + // Request that, if the server allows, both ACI and PNI be returned even + // if the aci_uak_pairs don't match. + optional bool return_acis_without_uaks = 8; } -message ClientResponse { +message CDSClientResponse { // Each triple is an 8-byte e164, a 16-byte PNI, and a 16-byte ACI. // If the e164 was not found, PNI and ACI are all zeros. If the PNI // was found but the ACI was not, the PNI will be non-zero and the ACI @@ -43,18 +44,10 @@ message ClientResponse { // where the additional 2 bytes are the id/type/length additions of the // protobuf marshaling added to each byte array. This avoids any data // leakage based on the size of the encrypted output. - bytes e164_pni_aci_triples = 1; - - // int32 retry_after_secs = 2 [deprecated] - reserved 2; + optional bytes e164_pni_aci_triples = 1; // A token which allows subsequent calls' rate limiting to discount the // e164s sent up in this request, only counting those in the next // request's new_e164s. - bytes token = 3; - - // On a successful response to a token_ack request, the number of permits - // that were deducted from the user's rate-limit in order to process the - // request - int32 debug_permits_used = 4; + optional bytes token = 3; } diff --git a/pkg/signalmeow/protobuf/signalpb/DeviceName.pb.go b/pkg/signalmeow/protobuf/DeviceName.pb.go similarity index 60% rename from pkg/signalmeow/protobuf/signalpb/DeviceName.pb.go rename to pkg/signalmeow/protobuf/DeviceName.pb.go index 3e88778..5666b7e 100644 --- a/pkg/signalmeow/protobuf/signalpb/DeviceName.pb.go +++ b/pkg/signalmeow/protobuf/DeviceName.pb.go @@ -1,13 +1,11 @@ -//* -// Copyright (C) 2014-2016 Open Whisper Systems -// -// Licensed according to the LICENSE file in this repository. - // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: signalpb/DeviceName.proto +// protoc v6.33.5 +// source: DeviceName.proto + +// Copyright 2018 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only package signalpb @@ -37,7 +35,7 @@ type DeviceName struct { func (x *DeviceName) Reset() { *x = DeviceName{} - mi := &file_signalpb_DeviceName_proto_msgTypes[0] + mi := &file_DeviceName_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -49,7 +47,7 @@ func (x *DeviceName) String() string { func (*DeviceName) ProtoMessage() {} func (x *DeviceName) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_DeviceName_proto_msgTypes[0] + mi := &file_DeviceName_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62,7 +60,7 @@ func (x *DeviceName) ProtoReflect() protoreflect.Message { // Deprecated: Use DeviceName.ProtoReflect.Descriptor instead. func (*DeviceName) Descriptor() ([]byte, []int) { - return file_signalpb_DeviceName_proto_rawDescGZIP(), []int{0} + return file_DeviceName_proto_rawDescGZIP(), []int{0} } func (x *DeviceName) GetEphemeralPublic() []byte { @@ -86,37 +84,36 @@ func (x *DeviceName) GetCiphertext() []byte { return nil } -var File_signalpb_DeviceName_proto protoreflect.FileDescriptor +var File_DeviceName_proto protoreflect.FileDescriptor -const file_signalpb_DeviceName_proto_rawDesc = "" + +const file_DeviceName_proto_rawDesc = "" + "\n" + - "\x19signalpb/DeviceName.proto\x12\rsignalservice\"x\n" + + "\x10DeviceName.proto\x12\rsignalservice\"x\n" + "\n" + "DeviceName\x12(\n" + "\x0fephemeralPublic\x18\x01 \x01(\fR\x0fephemeralPublic\x12 \n" + "\vsyntheticIv\x18\x02 \x01(\fR\vsyntheticIv\x12\x1e\n" + "\n" + "ciphertext\x18\x03 \x01(\fR\n" + - "ciphertextB\x1d\n" + - "\x1borg.signal.core.util.crypto" + "ciphertext" var ( - file_signalpb_DeviceName_proto_rawDescOnce sync.Once - file_signalpb_DeviceName_proto_rawDescData []byte + file_DeviceName_proto_rawDescOnce sync.Once + file_DeviceName_proto_rawDescData []byte ) -func file_signalpb_DeviceName_proto_rawDescGZIP() []byte { - file_signalpb_DeviceName_proto_rawDescOnce.Do(func() { - file_signalpb_DeviceName_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_signalpb_DeviceName_proto_rawDesc), len(file_signalpb_DeviceName_proto_rawDesc))) +func file_DeviceName_proto_rawDescGZIP() []byte { + file_DeviceName_proto_rawDescOnce.Do(func() { + file_DeviceName_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_DeviceName_proto_rawDesc), len(file_DeviceName_proto_rawDesc))) }) - return file_signalpb_DeviceName_proto_rawDescData + return file_DeviceName_proto_rawDescData } -var file_signalpb_DeviceName_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_signalpb_DeviceName_proto_goTypes = []any{ +var file_DeviceName_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_DeviceName_proto_goTypes = []any{ (*DeviceName)(nil), // 0: signalservice.DeviceName } -var file_signalpb_DeviceName_proto_depIdxs = []int32{ +var file_DeviceName_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -124,26 +121,26 @@ var file_signalpb_DeviceName_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_signalpb_DeviceName_proto_init() } -func file_signalpb_DeviceName_proto_init() { - if File_signalpb_DeviceName_proto != nil { +func init() { file_DeviceName_proto_init() } +func file_DeviceName_proto_init() { + if File_DeviceName_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalpb_DeviceName_proto_rawDesc), len(file_signalpb_DeviceName_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_DeviceName_proto_rawDesc), len(file_DeviceName_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_signalpb_DeviceName_proto_goTypes, - DependencyIndexes: file_signalpb_DeviceName_proto_depIdxs, - MessageInfos: file_signalpb_DeviceName_proto_msgTypes, + GoTypes: file_DeviceName_proto_goTypes, + DependencyIndexes: file_DeviceName_proto_depIdxs, + MessageInfos: file_DeviceName_proto_msgTypes, }.Build() - File_signalpb_DeviceName_proto = out.File - file_signalpb_DeviceName_proto_goTypes = nil - file_signalpb_DeviceName_proto_depIdxs = nil + File_DeviceName_proto = out.File + file_DeviceName_proto_goTypes = nil + file_DeviceName_proto_depIdxs = nil } diff --git a/pkg/signalmeow/protobuf/DeviceName.proto b/pkg/signalmeow/protobuf/DeviceName.proto new file mode 100644 index 0000000..af14c1b --- /dev/null +++ b/pkg/signalmeow/protobuf/DeviceName.proto @@ -0,0 +1,10 @@ +// Copyright 2018 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +package signalservice; + +message DeviceName { + optional bytes ephemeralPublic = 1; + optional bytes syntheticIv = 2; + optional bytes ciphertext = 3; +} diff --git a/pkg/signalmeow/protobuf/signalpb/Groups.pb.go b/pkg/signalmeow/protobuf/Groups.pb.go similarity index 84% rename from pkg/signalmeow/protobuf/signalpb/Groups.pb.go rename to pkg/signalmeow/protobuf/Groups.pb.go index 4b37c4a..c7717ff 100644 --- a/pkg/signalmeow/protobuf/signalpb/Groups.pb.go +++ b/pkg/signalmeow/protobuf/Groups.pb.go @@ -5,8 +5,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: signalpb/Groups.proto +// protoc v6.33.5 +// source: Groups.proto package signalpb @@ -58,11 +58,11 @@ func (x Member_Role) String() string { } func (Member_Role) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_Groups_proto_enumTypes[0].Descriptor() + return file_Groups_proto_enumTypes[0].Descriptor() } func (Member_Role) Type() protoreflect.EnumType { - return &file_signalpb_Groups_proto_enumTypes[0] + return &file_Groups_proto_enumTypes[0] } func (x Member_Role) Number() protoreflect.EnumNumber { @@ -71,7 +71,7 @@ func (x Member_Role) Number() protoreflect.EnumNumber { // Deprecated: Use Member_Role.Descriptor instead. func (Member_Role) EnumDescriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{1, 0} + return file_Groups_proto_rawDescGZIP(), []int{1, 0} } type AccessControl_AccessRequired int32 @@ -113,11 +113,11 @@ func (x AccessControl_AccessRequired) String() string { } func (AccessControl_AccessRequired) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_Groups_proto_enumTypes[1].Descriptor() + return file_Groups_proto_enumTypes[1].Descriptor() } func (AccessControl_AccessRequired) Type() protoreflect.EnumType { - return &file_signalpb_Groups_proto_enumTypes[1] + return &file_Groups_proto_enumTypes[1] } func (x AccessControl_AccessRequired) Number() protoreflect.EnumNumber { @@ -126,7 +126,7 @@ func (x AccessControl_AccessRequired) Number() protoreflect.EnumNumber { // Deprecated: Use AccessControl_AccessRequired.Descriptor instead. func (AccessControl_AccessRequired) EnumDescriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{5, 0} + return file_Groups_proto_rawDescGZIP(), []int{5, 0} } type AvatarUploadAttributes struct { @@ -144,7 +144,7 @@ type AvatarUploadAttributes struct { func (x *AvatarUploadAttributes) Reset() { *x = AvatarUploadAttributes{} - mi := &file_signalpb_Groups_proto_msgTypes[0] + mi := &file_Groups_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -156,7 +156,7 @@ func (x *AvatarUploadAttributes) String() string { func (*AvatarUploadAttributes) ProtoMessage() {} func (x *AvatarUploadAttributes) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[0] + mi := &file_Groups_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -169,7 +169,7 @@ func (x *AvatarUploadAttributes) ProtoReflect() protoreflect.Message { // Deprecated: Use AvatarUploadAttributes.ProtoReflect.Descriptor instead. func (*AvatarUploadAttributes) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{0} + return file_Groups_proto_rawDescGZIP(), []int{0} } func (x *AvatarUploadAttributes) GetKey() string { @@ -236,7 +236,7 @@ type Member struct { func (x *Member) Reset() { *x = Member{} - mi := &file_signalpb_Groups_proto_msgTypes[1] + mi := &file_Groups_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -248,7 +248,7 @@ func (x *Member) String() string { func (*Member) ProtoMessage() {} func (x *Member) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[1] + mi := &file_Groups_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -261,7 +261,7 @@ func (x *Member) ProtoReflect() protoreflect.Message { // Deprecated: Use Member.ProtoReflect.Descriptor instead. func (*Member) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{1} + return file_Groups_proto_rawDescGZIP(), []int{1} } func (x *Member) GetUserId() []byte { @@ -324,7 +324,7 @@ type MemberPendingProfileKey struct { func (x *MemberPendingProfileKey) Reset() { *x = MemberPendingProfileKey{} - mi := &file_signalpb_Groups_proto_msgTypes[2] + mi := &file_Groups_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -336,7 +336,7 @@ func (x *MemberPendingProfileKey) String() string { func (*MemberPendingProfileKey) ProtoMessage() {} func (x *MemberPendingProfileKey) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[2] + mi := &file_Groups_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -349,7 +349,7 @@ func (x *MemberPendingProfileKey) ProtoReflect() protoreflect.Message { // Deprecated: Use MemberPendingProfileKey.ProtoReflect.Descriptor instead. func (*MemberPendingProfileKey) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{2} + return file_Groups_proto_rawDescGZIP(), []int{2} } func (x *MemberPendingProfileKey) GetMember() *Member { @@ -385,7 +385,7 @@ type MemberPendingAdminApproval struct { func (x *MemberPendingAdminApproval) Reset() { *x = MemberPendingAdminApproval{} - mi := &file_signalpb_Groups_proto_msgTypes[3] + mi := &file_Groups_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -397,7 +397,7 @@ func (x *MemberPendingAdminApproval) String() string { func (*MemberPendingAdminApproval) ProtoMessage() {} func (x *MemberPendingAdminApproval) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[3] + mi := &file_Groups_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -410,7 +410,7 @@ func (x *MemberPendingAdminApproval) ProtoReflect() protoreflect.Message { // Deprecated: Use MemberPendingAdminApproval.ProtoReflect.Descriptor instead. func (*MemberPendingAdminApproval) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{3} + return file_Groups_proto_rawDescGZIP(), []int{3} } func (x *MemberPendingAdminApproval) GetUserId() []byte { @@ -451,7 +451,7 @@ type MemberBanned struct { func (x *MemberBanned) Reset() { *x = MemberBanned{} - mi := &file_signalpb_Groups_proto_msgTypes[4] + mi := &file_Groups_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -463,7 +463,7 @@ func (x *MemberBanned) String() string { func (*MemberBanned) ProtoMessage() {} func (x *MemberBanned) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[4] + mi := &file_Groups_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -476,7 +476,7 @@ func (x *MemberBanned) ProtoReflect() protoreflect.Message { // Deprecated: Use MemberBanned.ProtoReflect.Descriptor instead. func (*MemberBanned) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{4} + return file_Groups_proto_rawDescGZIP(), []int{4} } func (x *MemberBanned) GetUserId() []byte { @@ -498,14 +498,13 @@ type AccessControl struct { Attributes AccessControl_AccessRequired `protobuf:"varint,1,opt,name=attributes,proto3,enum=signal.AccessControl_AccessRequired" json:"attributes,omitempty"` Members AccessControl_AccessRequired `protobuf:"varint,2,opt,name=members,proto3,enum=signal.AccessControl_AccessRequired" json:"members,omitempty"` AddFromInviteLink AccessControl_AccessRequired `protobuf:"varint,3,opt,name=addFromInviteLink,proto3,enum=signal.AccessControl_AccessRequired" json:"addFromInviteLink,omitempty"` - MemberLabel AccessControl_AccessRequired `protobuf:"varint,4,opt,name=memberLabel,proto3,enum=signal.AccessControl_AccessRequired" json:"memberLabel,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *AccessControl) Reset() { *x = AccessControl{} - mi := &file_signalpb_Groups_proto_msgTypes[5] + mi := &file_Groups_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -517,7 +516,7 @@ func (x *AccessControl) String() string { func (*AccessControl) ProtoMessage() {} func (x *AccessControl) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[5] + mi := &file_Groups_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -530,7 +529,7 @@ func (x *AccessControl) ProtoReflect() protoreflect.Message { // Deprecated: Use AccessControl.ProtoReflect.Descriptor instead. func (*AccessControl) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{5} + return file_Groups_proto_rawDescGZIP(), []int{5} } func (x *AccessControl) GetAttributes() AccessControl_AccessRequired { @@ -554,13 +553,6 @@ func (x *AccessControl) GetAddFromInviteLink() AccessControl_AccessRequired { return AccessControl_UNKNOWN } -func (x *AccessControl) GetMemberLabel() AccessControl_AccessRequired { - if x != nil { - return x.MemberLabel - } - return AccessControl_UNKNOWN -} - type Group struct { state protoimpl.MessageState `protogen:"open.v1"` PublicKey []byte `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` @@ -577,15 +569,14 @@ type Group struct { MembersPendingAdminApproval []*MemberPendingAdminApproval `protobuf:"bytes,9,rep,name=membersPendingAdminApproval,proto3" json:"membersPendingAdminApproval,omitempty"` InviteLinkPassword []byte `protobuf:"bytes,10,opt,name=inviteLinkPassword,proto3" json:"inviteLinkPassword,omitempty"` AnnouncementsOnly bool `protobuf:"varint,12,opt,name=announcements_only,json=announcementsOnly,proto3" json:"announcements_only,omitempty"` - MembersBanned []*MemberBanned `protobuf:"bytes,13,rep,name=members_banned,json=membersBanned,proto3" json:"members_banned,omitempty"` - Terminated bool `protobuf:"varint,14,opt,name=terminated,proto3" json:"terminated,omitempty"` // next: 15 + MembersBanned []*MemberBanned `protobuf:"bytes,13,rep,name=members_banned,json=membersBanned,proto3" json:"members_banned,omitempty"` // next: 14 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Group) Reset() { *x = Group{} - mi := &file_signalpb_Groups_proto_msgTypes[6] + mi := &file_Groups_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -597,7 +588,7 @@ func (x *Group) String() string { func (*Group) ProtoMessage() {} func (x *Group) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[6] + mi := &file_Groups_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -610,7 +601,7 @@ func (x *Group) ProtoReflect() protoreflect.Message { // Deprecated: Use Group.ProtoReflect.Descriptor instead. func (*Group) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{6} + return file_Groups_proto_rawDescGZIP(), []int{6} } func (x *Group) GetPublicKey() []byte { @@ -704,13 +695,6 @@ func (x *Group) GetMembersBanned() []*MemberBanned { return nil } -func (x *Group) GetTerminated() bool { - if x != nil { - return x.Terminated - } - return false -} - type GroupAttributeBlob struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Content: @@ -726,7 +710,7 @@ type GroupAttributeBlob struct { func (x *GroupAttributeBlob) Reset() { *x = GroupAttributeBlob{} - mi := &file_signalpb_Groups_proto_msgTypes[7] + mi := &file_Groups_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -738,7 +722,7 @@ func (x *GroupAttributeBlob) String() string { func (*GroupAttributeBlob) ProtoMessage() {} func (x *GroupAttributeBlob) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[7] + mi := &file_Groups_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -751,7 +735,7 @@ func (x *GroupAttributeBlob) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupAttributeBlob.ProtoReflect.Descriptor instead. func (*GroupAttributeBlob) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{7} + return file_Groups_proto_rawDescGZIP(), []int{7} } func (x *GroupAttributeBlob) GetContent() isGroupAttributeBlob_Content { @@ -837,7 +821,7 @@ type GroupInviteLink struct { func (x *GroupInviteLink) Reset() { *x = GroupInviteLink{} - mi := &file_signalpb_Groups_proto_msgTypes[8] + mi := &file_Groups_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -849,7 +833,7 @@ func (x *GroupInviteLink) String() string { func (*GroupInviteLink) ProtoMessage() {} func (x *GroupInviteLink) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[8] + mi := &file_Groups_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -862,7 +846,7 @@ func (x *GroupInviteLink) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupInviteLink.ProtoReflect.Descriptor instead. func (*GroupInviteLink) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{8} + return file_Groups_proto_rawDescGZIP(), []int{8} } func (x *GroupInviteLink) GetContents() isGroupInviteLink_Contents { @@ -907,7 +891,7 @@ type GroupJoinInfo struct { func (x *GroupJoinInfo) Reset() { *x = GroupJoinInfo{} - mi := &file_signalpb_Groups_proto_msgTypes[9] + mi := &file_Groups_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -919,7 +903,7 @@ func (x *GroupJoinInfo) String() string { func (*GroupJoinInfo) ProtoMessage() {} func (x *GroupJoinInfo) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[9] + mi := &file_Groups_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -932,7 +916,7 @@ func (x *GroupJoinInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupJoinInfo.ProtoReflect.Descriptor instead. func (*GroupJoinInfo) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{9} + return file_Groups_proto_rawDescGZIP(), []int{9} } func (x *GroupJoinInfo) GetPublicKey() []byte { @@ -1002,7 +986,7 @@ type GroupChange struct { func (x *GroupChange) Reset() { *x = GroupChange{} - mi := &file_signalpb_Groups_proto_msgTypes[10] + mi := &file_Groups_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1014,7 +998,7 @@ func (x *GroupChange) String() string { func (*GroupChange) ProtoMessage() {} func (x *GroupChange) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[10] + mi := &file_Groups_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1027,7 +1011,7 @@ func (x *GroupChange) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupChange.ProtoReflect.Descriptor instead. func (*GroupChange) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10} + return file_Groups_proto_rawDescGZIP(), []int{10} } func (x *GroupChange) GetActions() []byte { @@ -1060,7 +1044,7 @@ type ExternalGroupCredential struct { func (x *ExternalGroupCredential) Reset() { *x = ExternalGroupCredential{} - mi := &file_signalpb_Groups_proto_msgTypes[11] + mi := &file_Groups_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1072,7 +1056,7 @@ func (x *ExternalGroupCredential) String() string { func (*ExternalGroupCredential) ProtoMessage() {} func (x *ExternalGroupCredential) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[11] + mi := &file_Groups_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1085,7 +1069,7 @@ func (x *ExternalGroupCredential) ProtoReflect() protoreflect.Message { // Deprecated: Use ExternalGroupCredential.ProtoReflect.Descriptor instead. func (*ExternalGroupCredential) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{11} + return file_Groups_proto_rawDescGZIP(), []int{11} } func (x *ExternalGroupCredential) GetToken() string { @@ -1105,7 +1089,7 @@ type GroupResponse struct { func (x *GroupResponse) Reset() { *x = GroupResponse{} - mi := &file_signalpb_Groups_proto_msgTypes[12] + mi := &file_Groups_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1117,7 +1101,7 @@ func (x *GroupResponse) String() string { func (*GroupResponse) ProtoMessage() {} func (x *GroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[12] + mi := &file_Groups_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1130,7 +1114,7 @@ func (x *GroupResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupResponse.ProtoReflect.Descriptor instead. func (*GroupResponse) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{12} + return file_Groups_proto_rawDescGZIP(), []int{12} } func (x *GroupResponse) GetGroup() *Group { @@ -1157,7 +1141,7 @@ type GroupChanges struct { func (x *GroupChanges) Reset() { *x = GroupChanges{} - mi := &file_signalpb_Groups_proto_msgTypes[13] + mi := &file_Groups_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1169,7 +1153,7 @@ func (x *GroupChanges) String() string { func (*GroupChanges) ProtoMessage() {} func (x *GroupChanges) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[13] + mi := &file_Groups_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1182,7 +1166,7 @@ func (x *GroupChanges) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupChanges.ProtoReflect.Descriptor instead. func (*GroupChanges) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{13} + return file_Groups_proto_rawDescGZIP(), []int{13} } func (x *GroupChanges) GetGroupChanges() []*GroupChanges_GroupChangeState { @@ -1209,7 +1193,7 @@ type GroupChangeResponse struct { func (x *GroupChangeResponse) Reset() { *x = GroupChangeResponse{} - mi := &file_signalpb_Groups_proto_msgTypes[14] + mi := &file_Groups_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1221,7 +1205,7 @@ func (x *GroupChangeResponse) String() string { func (*GroupChangeResponse) ProtoMessage() {} func (x *GroupChangeResponse) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[14] + mi := &file_Groups_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1234,7 +1218,7 @@ func (x *GroupChangeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupChangeResponse.ProtoReflect.Descriptor instead. func (*GroupChangeResponse) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{14} + return file_Groups_proto_rawDescGZIP(), []int{14} } func (x *GroupChangeResponse) GetGroupChange() *GroupChange { @@ -1261,7 +1245,7 @@ type GroupInviteLink_GroupInviteLinkContentsV1 struct { func (x *GroupInviteLink_GroupInviteLinkContentsV1) Reset() { *x = GroupInviteLink_GroupInviteLinkContentsV1{} - mi := &file_signalpb_Groups_proto_msgTypes[15] + mi := &file_Groups_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1273,7 +1257,7 @@ func (x *GroupInviteLink_GroupInviteLinkContentsV1) String() string { func (*GroupInviteLink_GroupInviteLinkContentsV1) ProtoMessage() {} func (x *GroupInviteLink_GroupInviteLinkContentsV1) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[15] + mi := &file_Groups_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1286,7 +1270,7 @@ func (x *GroupInviteLink_GroupInviteLinkContentsV1) ProtoReflect() protoreflect. // Deprecated: Use GroupInviteLink_GroupInviteLinkContentsV1.ProtoReflect.Descriptor instead. func (*GroupInviteLink_GroupInviteLinkContentsV1) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{8, 0} + return file_Groups_proto_rawDescGZIP(), []int{8, 0} } func (x *GroupInviteLink_GroupInviteLinkContentsV1) GetGroupMasterKey() []byte { @@ -1333,15 +1317,13 @@ type GroupChange_Actions struct { DeleteMembersBanned []*GroupChange_Actions_DeleteMemberBannedAction `protobuf:"bytes,23,rep,name=delete_members_banned,json=deleteMembersBanned,proto3" json:"delete_members_banned,omitempty"` // change epoch = 4 PromoteMembersPendingPniAciProfileKey []*GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction `protobuf:"bytes,24,rep,name=promote_members_pending_pni_aci_profile_key,json=promoteMembersPendingPniAciProfileKey,proto3" json:"promote_members_pending_pni_aci_profile_key,omitempty"` // change epoch = 5 ModifyMemberLabels []*GroupChange_Actions_ModifyMemberLabelAction `protobuf:"bytes,26,rep,name=modifyMemberLabels,proto3" json:"modifyMemberLabels,omitempty"` // change epoch = 6; - ModifyMemberLabelAccess *GroupChange_Actions_ModifyMemberLabelAccessControlAction `protobuf:"bytes,27,opt,name=modifyMemberLabelAccess,proto3" json:"modifyMemberLabelAccess,omitempty"` // change epoch = 6 - TerminateGroup *GroupChange_Actions_TerminateGroupAction `protobuf:"bytes,28,opt,name=terminate_group,json=terminateGroup,proto3" json:"terminate_group,omitempty"` // change epoch = 7 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *GroupChange_Actions) Reset() { *x = GroupChange_Actions{} - mi := &file_signalpb_Groups_proto_msgTypes[16] + mi := &file_Groups_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1353,7 +1335,7 @@ func (x *GroupChange_Actions) String() string { func (*GroupChange_Actions) ProtoMessage() {} func (x *GroupChange_Actions) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[16] + mi := &file_Groups_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1366,7 +1348,7 @@ func (x *GroupChange_Actions) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupChange_Actions.ProtoReflect.Descriptor instead. func (*GroupChange_Actions) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0} + return file_Groups_proto_rawDescGZIP(), []int{10, 0} } func (x *GroupChange_Actions) GetSourceUserId() []byte { @@ -1551,20 +1533,6 @@ func (x *GroupChange_Actions) GetModifyMemberLabels() []*GroupChange_Actions_Mod return nil } -func (x *GroupChange_Actions) GetModifyMemberLabelAccess() *GroupChange_Actions_ModifyMemberLabelAccessControlAction { - if x != nil { - return x.ModifyMemberLabelAccess - } - return nil -} - -func (x *GroupChange_Actions) GetTerminateGroup() *GroupChange_Actions_TerminateGroupAction { - if x != nil { - return x.TerminateGroup - } - return nil -} - type GroupChange_Actions_AddMemberAction struct { state protoimpl.MessageState `protogen:"open.v1"` Added *Member `protobuf:"bytes,1,opt,name=added,proto3" json:"added,omitempty"` @@ -1575,7 +1543,7 @@ type GroupChange_Actions_AddMemberAction struct { func (x *GroupChange_Actions_AddMemberAction) Reset() { *x = GroupChange_Actions_AddMemberAction{} - mi := &file_signalpb_Groups_proto_msgTypes[17] + mi := &file_Groups_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1587,7 +1555,7 @@ func (x *GroupChange_Actions_AddMemberAction) String() string { func (*GroupChange_Actions_AddMemberAction) ProtoMessage() {} func (x *GroupChange_Actions_AddMemberAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[17] + mi := &file_Groups_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1600,7 +1568,7 @@ func (x *GroupChange_Actions_AddMemberAction) ProtoReflect() protoreflect.Messag // Deprecated: Use GroupChange_Actions_AddMemberAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_AddMemberAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 0} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 0} } func (x *GroupChange_Actions_AddMemberAction) GetAdded() *Member { @@ -1626,7 +1594,7 @@ type GroupChange_Actions_DeleteMemberAction struct { func (x *GroupChange_Actions_DeleteMemberAction) Reset() { *x = GroupChange_Actions_DeleteMemberAction{} - mi := &file_signalpb_Groups_proto_msgTypes[18] + mi := &file_Groups_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1638,7 +1606,7 @@ func (x *GroupChange_Actions_DeleteMemberAction) String() string { func (*GroupChange_Actions_DeleteMemberAction) ProtoMessage() {} func (x *GroupChange_Actions_DeleteMemberAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[18] + mi := &file_Groups_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1651,7 +1619,7 @@ func (x *GroupChange_Actions_DeleteMemberAction) ProtoReflect() protoreflect.Mes // Deprecated: Use GroupChange_Actions_DeleteMemberAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_DeleteMemberAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 1} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 1} } func (x *GroupChange_Actions_DeleteMemberAction) GetDeletedUserId() []byte { @@ -1671,7 +1639,7 @@ type GroupChange_Actions_ModifyMemberRoleAction struct { func (x *GroupChange_Actions_ModifyMemberRoleAction) Reset() { *x = GroupChange_Actions_ModifyMemberRoleAction{} - mi := &file_signalpb_Groups_proto_msgTypes[19] + mi := &file_Groups_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1683,7 +1651,7 @@ func (x *GroupChange_Actions_ModifyMemberRoleAction) String() string { func (*GroupChange_Actions_ModifyMemberRoleAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyMemberRoleAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[19] + mi := &file_Groups_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1696,7 +1664,7 @@ func (x *GroupChange_Actions_ModifyMemberRoleAction) ProtoReflect() protoreflect // Deprecated: Use GroupChange_Actions_ModifyMemberRoleAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyMemberRoleAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 2} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 2} } func (x *GroupChange_Actions_ModifyMemberRoleAction) GetUserId() []byte { @@ -1724,7 +1692,7 @@ type GroupChange_Actions_ModifyMemberLabelAction struct { func (x *GroupChange_Actions_ModifyMemberLabelAction) Reset() { *x = GroupChange_Actions_ModifyMemberLabelAction{} - mi := &file_signalpb_Groups_proto_msgTypes[20] + mi := &file_Groups_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1736,7 +1704,7 @@ func (x *GroupChange_Actions_ModifyMemberLabelAction) String() string { func (*GroupChange_Actions_ModifyMemberLabelAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyMemberLabelAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[20] + mi := &file_Groups_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1749,7 +1717,7 @@ func (x *GroupChange_Actions_ModifyMemberLabelAction) ProtoReflect() protoreflec // Deprecated: Use GroupChange_Actions_ModifyMemberLabelAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyMemberLabelAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 3} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 3} } func (x *GroupChange_Actions_ModifyMemberLabelAction) GetUserId() []byte { @@ -1784,7 +1752,7 @@ type GroupChange_Actions_ModifyMemberProfileKeyAction struct { func (x *GroupChange_Actions_ModifyMemberProfileKeyAction) Reset() { *x = GroupChange_Actions_ModifyMemberProfileKeyAction{} - mi := &file_signalpb_Groups_proto_msgTypes[21] + mi := &file_Groups_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1796,7 +1764,7 @@ func (x *GroupChange_Actions_ModifyMemberProfileKeyAction) String() string { func (*GroupChange_Actions_ModifyMemberProfileKeyAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyMemberProfileKeyAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[21] + mi := &file_Groups_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1809,7 +1777,7 @@ func (x *GroupChange_Actions_ModifyMemberProfileKeyAction) ProtoReflect() protor // Deprecated: Use GroupChange_Actions_ModifyMemberProfileKeyAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyMemberProfileKeyAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 4} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 4} } func (x *GroupChange_Actions_ModifyMemberProfileKeyAction) GetPresentation() []byte { @@ -1842,7 +1810,7 @@ type GroupChange_Actions_AddMemberPendingProfileKeyAction struct { func (x *GroupChange_Actions_AddMemberPendingProfileKeyAction) Reset() { *x = GroupChange_Actions_AddMemberPendingProfileKeyAction{} - mi := &file_signalpb_Groups_proto_msgTypes[22] + mi := &file_Groups_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1854,7 +1822,7 @@ func (x *GroupChange_Actions_AddMemberPendingProfileKeyAction) String() string { func (*GroupChange_Actions_AddMemberPendingProfileKeyAction) ProtoMessage() {} func (x *GroupChange_Actions_AddMemberPendingProfileKeyAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[22] + mi := &file_Groups_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1867,7 +1835,7 @@ func (x *GroupChange_Actions_AddMemberPendingProfileKeyAction) ProtoReflect() pr // Deprecated: Use GroupChange_Actions_AddMemberPendingProfileKeyAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_AddMemberPendingProfileKeyAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 5} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 5} } func (x *GroupChange_Actions_AddMemberPendingProfileKeyAction) GetAdded() *MemberPendingProfileKey { @@ -1886,7 +1854,7 @@ type GroupChange_Actions_DeleteMemberPendingProfileKeyAction struct { func (x *GroupChange_Actions_DeleteMemberPendingProfileKeyAction) Reset() { *x = GroupChange_Actions_DeleteMemberPendingProfileKeyAction{} - mi := &file_signalpb_Groups_proto_msgTypes[23] + mi := &file_Groups_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1898,7 +1866,7 @@ func (x *GroupChange_Actions_DeleteMemberPendingProfileKeyAction) String() strin func (*GroupChange_Actions_DeleteMemberPendingProfileKeyAction) ProtoMessage() {} func (x *GroupChange_Actions_DeleteMemberPendingProfileKeyAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[23] + mi := &file_Groups_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1911,7 +1879,7 @@ func (x *GroupChange_Actions_DeleteMemberPendingProfileKeyAction) ProtoReflect() // Deprecated: Use GroupChange_Actions_DeleteMemberPendingProfileKeyAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_DeleteMemberPendingProfileKeyAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 6} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 6} } func (x *GroupChange_Actions_DeleteMemberPendingProfileKeyAction) GetDeletedUserId() []byte { @@ -1932,7 +1900,7 @@ type GroupChange_Actions_PromoteMemberPendingProfileKeyAction struct { func (x *GroupChange_Actions_PromoteMemberPendingProfileKeyAction) Reset() { *x = GroupChange_Actions_PromoteMemberPendingProfileKeyAction{} - mi := &file_signalpb_Groups_proto_msgTypes[24] + mi := &file_Groups_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1944,7 +1912,7 @@ func (x *GroupChange_Actions_PromoteMemberPendingProfileKeyAction) String() stri func (*GroupChange_Actions_PromoteMemberPendingProfileKeyAction) ProtoMessage() {} func (x *GroupChange_Actions_PromoteMemberPendingProfileKeyAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[24] + mi := &file_Groups_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1957,7 +1925,7 @@ func (x *GroupChange_Actions_PromoteMemberPendingProfileKeyAction) ProtoReflect( // Deprecated: Use GroupChange_Actions_PromoteMemberPendingProfileKeyAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_PromoteMemberPendingProfileKeyAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 7} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 7} } func (x *GroupChange_Actions_PromoteMemberPendingProfileKeyAction) GetPresentation() []byte { @@ -1993,7 +1961,7 @@ type GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction struct { func (x *GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction) Reset() { *x = GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction{} - mi := &file_signalpb_Groups_proto_msgTypes[25] + mi := &file_Groups_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2005,7 +1973,7 @@ func (x *GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction) String( func (*GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction) ProtoMessage() {} func (x *GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[25] + mi := &file_Groups_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2018,7 +1986,7 @@ func (x *GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction) ProtoRe // Deprecated: Use GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 8} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 8} } func (x *GroupChange_Actions_PromoteMemberPendingPniAciProfileKeyAction) GetPresentation() []byte { @@ -2058,7 +2026,7 @@ type GroupChange_Actions_AddMemberPendingAdminApprovalAction struct { func (x *GroupChange_Actions_AddMemberPendingAdminApprovalAction) Reset() { *x = GroupChange_Actions_AddMemberPendingAdminApprovalAction{} - mi := &file_signalpb_Groups_proto_msgTypes[26] + mi := &file_Groups_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2070,7 +2038,7 @@ func (x *GroupChange_Actions_AddMemberPendingAdminApprovalAction) String() strin func (*GroupChange_Actions_AddMemberPendingAdminApprovalAction) ProtoMessage() {} func (x *GroupChange_Actions_AddMemberPendingAdminApprovalAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[26] + mi := &file_Groups_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2083,7 +2051,7 @@ func (x *GroupChange_Actions_AddMemberPendingAdminApprovalAction) ProtoReflect() // Deprecated: Use GroupChange_Actions_AddMemberPendingAdminApprovalAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_AddMemberPendingAdminApprovalAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 9} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 9} } func (x *GroupChange_Actions_AddMemberPendingAdminApprovalAction) GetAdded() *MemberPendingAdminApproval { @@ -2102,7 +2070,7 @@ type GroupChange_Actions_DeleteMemberPendingAdminApprovalAction struct { func (x *GroupChange_Actions_DeleteMemberPendingAdminApprovalAction) Reset() { *x = GroupChange_Actions_DeleteMemberPendingAdminApprovalAction{} - mi := &file_signalpb_Groups_proto_msgTypes[27] + mi := &file_Groups_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2114,7 +2082,7 @@ func (x *GroupChange_Actions_DeleteMemberPendingAdminApprovalAction) String() st func (*GroupChange_Actions_DeleteMemberPendingAdminApprovalAction) ProtoMessage() {} func (x *GroupChange_Actions_DeleteMemberPendingAdminApprovalAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[27] + mi := &file_Groups_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2127,7 +2095,7 @@ func (x *GroupChange_Actions_DeleteMemberPendingAdminApprovalAction) ProtoReflec // Deprecated: Use GroupChange_Actions_DeleteMemberPendingAdminApprovalAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_DeleteMemberPendingAdminApprovalAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 10} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 10} } func (x *GroupChange_Actions_DeleteMemberPendingAdminApprovalAction) GetDeletedUserId() []byte { @@ -2147,7 +2115,7 @@ type GroupChange_Actions_PromoteMemberPendingAdminApprovalAction struct { func (x *GroupChange_Actions_PromoteMemberPendingAdminApprovalAction) Reset() { *x = GroupChange_Actions_PromoteMemberPendingAdminApprovalAction{} - mi := &file_signalpb_Groups_proto_msgTypes[28] + mi := &file_Groups_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2159,7 +2127,7 @@ func (x *GroupChange_Actions_PromoteMemberPendingAdminApprovalAction) String() s func (*GroupChange_Actions_PromoteMemberPendingAdminApprovalAction) ProtoMessage() {} func (x *GroupChange_Actions_PromoteMemberPendingAdminApprovalAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[28] + mi := &file_Groups_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2172,7 +2140,7 @@ func (x *GroupChange_Actions_PromoteMemberPendingAdminApprovalAction) ProtoRefle // Deprecated: Use GroupChange_Actions_PromoteMemberPendingAdminApprovalAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_PromoteMemberPendingAdminApprovalAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 11} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 11} } func (x *GroupChange_Actions_PromoteMemberPendingAdminApprovalAction) GetUserId() []byte { @@ -2198,7 +2166,7 @@ type GroupChange_Actions_AddMemberBannedAction struct { func (x *GroupChange_Actions_AddMemberBannedAction) Reset() { *x = GroupChange_Actions_AddMemberBannedAction{} - mi := &file_signalpb_Groups_proto_msgTypes[29] + mi := &file_Groups_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2210,7 +2178,7 @@ func (x *GroupChange_Actions_AddMemberBannedAction) String() string { func (*GroupChange_Actions_AddMemberBannedAction) ProtoMessage() {} func (x *GroupChange_Actions_AddMemberBannedAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[29] + mi := &file_Groups_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2223,7 +2191,7 @@ func (x *GroupChange_Actions_AddMemberBannedAction) ProtoReflect() protoreflect. // Deprecated: Use GroupChange_Actions_AddMemberBannedAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_AddMemberBannedAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 12} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 12} } func (x *GroupChange_Actions_AddMemberBannedAction) GetAdded() *MemberBanned { @@ -2242,7 +2210,7 @@ type GroupChange_Actions_DeleteMemberBannedAction struct { func (x *GroupChange_Actions_DeleteMemberBannedAction) Reset() { *x = GroupChange_Actions_DeleteMemberBannedAction{} - mi := &file_signalpb_Groups_proto_msgTypes[30] + mi := &file_Groups_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2254,7 +2222,7 @@ func (x *GroupChange_Actions_DeleteMemberBannedAction) String() string { func (*GroupChange_Actions_DeleteMemberBannedAction) ProtoMessage() {} func (x *GroupChange_Actions_DeleteMemberBannedAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[30] + mi := &file_Groups_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2267,7 +2235,7 @@ func (x *GroupChange_Actions_DeleteMemberBannedAction) ProtoReflect() protorefle // Deprecated: Use GroupChange_Actions_DeleteMemberBannedAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_DeleteMemberBannedAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 13} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 13} } func (x *GroupChange_Actions_DeleteMemberBannedAction) GetDeletedUserId() []byte { @@ -2286,7 +2254,7 @@ type GroupChange_Actions_ModifyTitleAction struct { func (x *GroupChange_Actions_ModifyTitleAction) Reset() { *x = GroupChange_Actions_ModifyTitleAction{} - mi := &file_signalpb_Groups_proto_msgTypes[31] + mi := &file_Groups_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2298,7 +2266,7 @@ func (x *GroupChange_Actions_ModifyTitleAction) String() string { func (*GroupChange_Actions_ModifyTitleAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyTitleAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[31] + mi := &file_Groups_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2311,7 +2279,7 @@ func (x *GroupChange_Actions_ModifyTitleAction) ProtoReflect() protoreflect.Mess // Deprecated: Use GroupChange_Actions_ModifyTitleAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyTitleAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 14} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 14} } func (x *GroupChange_Actions_ModifyTitleAction) GetTitle() []byte { @@ -2330,7 +2298,7 @@ type GroupChange_Actions_ModifyDescriptionAction struct { func (x *GroupChange_Actions_ModifyDescriptionAction) Reset() { *x = GroupChange_Actions_ModifyDescriptionAction{} - mi := &file_signalpb_Groups_proto_msgTypes[32] + mi := &file_Groups_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2342,7 +2310,7 @@ func (x *GroupChange_Actions_ModifyDescriptionAction) String() string { func (*GroupChange_Actions_ModifyDescriptionAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyDescriptionAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[32] + mi := &file_Groups_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2355,7 +2323,7 @@ func (x *GroupChange_Actions_ModifyDescriptionAction) ProtoReflect() protoreflec // Deprecated: Use GroupChange_Actions_ModifyDescriptionAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyDescriptionAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 15} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 15} } func (x *GroupChange_Actions_ModifyDescriptionAction) GetDescription() []byte { @@ -2374,7 +2342,7 @@ type GroupChange_Actions_ModifyAvatarAction struct { func (x *GroupChange_Actions_ModifyAvatarAction) Reset() { *x = GroupChange_Actions_ModifyAvatarAction{} - mi := &file_signalpb_Groups_proto_msgTypes[33] + mi := &file_Groups_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2386,7 +2354,7 @@ func (x *GroupChange_Actions_ModifyAvatarAction) String() string { func (*GroupChange_Actions_ModifyAvatarAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyAvatarAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[33] + mi := &file_Groups_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2399,7 +2367,7 @@ func (x *GroupChange_Actions_ModifyAvatarAction) ProtoReflect() protoreflect.Mes // Deprecated: Use GroupChange_Actions_ModifyAvatarAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyAvatarAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 16} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 16} } func (x *GroupChange_Actions_ModifyAvatarAction) GetAvatar() string { @@ -2418,7 +2386,7 @@ type GroupChange_Actions_ModifyDisappearingMessageTimerAction struct { func (x *GroupChange_Actions_ModifyDisappearingMessageTimerAction) Reset() { *x = GroupChange_Actions_ModifyDisappearingMessageTimerAction{} - mi := &file_signalpb_Groups_proto_msgTypes[34] + mi := &file_Groups_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2430,7 +2398,7 @@ func (x *GroupChange_Actions_ModifyDisappearingMessageTimerAction) String() stri func (*GroupChange_Actions_ModifyDisappearingMessageTimerAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyDisappearingMessageTimerAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[34] + mi := &file_Groups_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2443,7 +2411,7 @@ func (x *GroupChange_Actions_ModifyDisappearingMessageTimerAction) ProtoReflect( // Deprecated: Use GroupChange_Actions_ModifyDisappearingMessageTimerAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyDisappearingMessageTimerAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 17} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 17} } func (x *GroupChange_Actions_ModifyDisappearingMessageTimerAction) GetTimer() []byte { @@ -2462,7 +2430,7 @@ type GroupChange_Actions_ModifyAttributesAccessControlAction struct { func (x *GroupChange_Actions_ModifyAttributesAccessControlAction) Reset() { *x = GroupChange_Actions_ModifyAttributesAccessControlAction{} - mi := &file_signalpb_Groups_proto_msgTypes[35] + mi := &file_Groups_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2474,7 +2442,7 @@ func (x *GroupChange_Actions_ModifyAttributesAccessControlAction) String() strin func (*GroupChange_Actions_ModifyAttributesAccessControlAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyAttributesAccessControlAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[35] + mi := &file_Groups_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2487,7 +2455,7 @@ func (x *GroupChange_Actions_ModifyAttributesAccessControlAction) ProtoReflect() // Deprecated: Use GroupChange_Actions_ModifyAttributesAccessControlAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyAttributesAccessControlAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 18} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 18} } func (x *GroupChange_Actions_ModifyAttributesAccessControlAction) GetAttributesAccess() AccessControl_AccessRequired { @@ -2506,7 +2474,7 @@ type GroupChange_Actions_ModifyMembersAccessControlAction struct { func (x *GroupChange_Actions_ModifyMembersAccessControlAction) Reset() { *x = GroupChange_Actions_ModifyMembersAccessControlAction{} - mi := &file_signalpb_Groups_proto_msgTypes[36] + mi := &file_Groups_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2518,7 +2486,7 @@ func (x *GroupChange_Actions_ModifyMembersAccessControlAction) String() string { func (*GroupChange_Actions_ModifyMembersAccessControlAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyMembersAccessControlAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[36] + mi := &file_Groups_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2531,7 +2499,7 @@ func (x *GroupChange_Actions_ModifyMembersAccessControlAction) ProtoReflect() pr // Deprecated: Use GroupChange_Actions_ModifyMembersAccessControlAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyMembersAccessControlAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 19} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 19} } func (x *GroupChange_Actions_ModifyMembersAccessControlAction) GetMembersAccess() AccessControl_AccessRequired { @@ -2550,7 +2518,7 @@ type GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction struct { func (x *GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction) Reset() { *x = GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction{} - mi := &file_signalpb_Groups_proto_msgTypes[37] + mi := &file_Groups_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2562,7 +2530,7 @@ func (x *GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction) String( func (*GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[37] + mi := &file_Groups_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2575,7 +2543,7 @@ func (x *GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction) ProtoRe // Deprecated: Use GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 20} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 20} } func (x *GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction) GetAddFromInviteLinkAccess() AccessControl_AccessRequired { @@ -2585,50 +2553,6 @@ func (x *GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction) GetAddF return AccessControl_UNKNOWN } -type GroupChange_Actions_ModifyMemberLabelAccessControlAction struct { - state protoimpl.MessageState `protogen:"open.v1"` - MemberLabelAccess AccessControl_AccessRequired `protobuf:"varint,1,opt,name=memberLabelAccess,proto3,enum=signal.AccessControl_AccessRequired" json:"memberLabelAccess,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GroupChange_Actions_ModifyMemberLabelAccessControlAction) Reset() { - *x = GroupChange_Actions_ModifyMemberLabelAccessControlAction{} - mi := &file_signalpb_Groups_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GroupChange_Actions_ModifyMemberLabelAccessControlAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupChange_Actions_ModifyMemberLabelAccessControlAction) ProtoMessage() {} - -func (x *GroupChange_Actions_ModifyMemberLabelAccessControlAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[38] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GroupChange_Actions_ModifyMemberLabelAccessControlAction.ProtoReflect.Descriptor instead. -func (*GroupChange_Actions_ModifyMemberLabelAccessControlAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 21} -} - -func (x *GroupChange_Actions_ModifyMemberLabelAccessControlAction) GetMemberLabelAccess() AccessControl_AccessRequired { - if x != nil { - return x.MemberLabelAccess - } - return AccessControl_UNKNOWN -} - type GroupChange_Actions_ModifyInviteLinkPasswordAction struct { state protoimpl.MessageState `protogen:"open.v1"` InviteLinkPassword []byte `protobuf:"bytes,1,opt,name=inviteLinkPassword,proto3" json:"inviteLinkPassword,omitempty"` @@ -2638,7 +2562,7 @@ type GroupChange_Actions_ModifyInviteLinkPasswordAction struct { func (x *GroupChange_Actions_ModifyInviteLinkPasswordAction) Reset() { *x = GroupChange_Actions_ModifyInviteLinkPasswordAction{} - mi := &file_signalpb_Groups_proto_msgTypes[39] + mi := &file_Groups_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2650,7 +2574,7 @@ func (x *GroupChange_Actions_ModifyInviteLinkPasswordAction) String() string { func (*GroupChange_Actions_ModifyInviteLinkPasswordAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyInviteLinkPasswordAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[39] + mi := &file_Groups_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2663,7 +2587,7 @@ func (x *GroupChange_Actions_ModifyInviteLinkPasswordAction) ProtoReflect() prot // Deprecated: Use GroupChange_Actions_ModifyInviteLinkPasswordAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyInviteLinkPasswordAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 22} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 21} } func (x *GroupChange_Actions_ModifyInviteLinkPasswordAction) GetInviteLinkPassword() []byte { @@ -2682,7 +2606,7 @@ type GroupChange_Actions_ModifyAnnouncementsOnlyAction struct { func (x *GroupChange_Actions_ModifyAnnouncementsOnlyAction) Reset() { *x = GroupChange_Actions_ModifyAnnouncementsOnlyAction{} - mi := &file_signalpb_Groups_proto_msgTypes[40] + mi := &file_Groups_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2694,7 +2618,7 @@ func (x *GroupChange_Actions_ModifyAnnouncementsOnlyAction) String() string { func (*GroupChange_Actions_ModifyAnnouncementsOnlyAction) ProtoMessage() {} func (x *GroupChange_Actions_ModifyAnnouncementsOnlyAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[40] + mi := &file_Groups_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2707,7 +2631,7 @@ func (x *GroupChange_Actions_ModifyAnnouncementsOnlyAction) ProtoReflect() proto // Deprecated: Use GroupChange_Actions_ModifyAnnouncementsOnlyAction.ProtoReflect.Descriptor instead. func (*GroupChange_Actions_ModifyAnnouncementsOnlyAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 23} + return file_Groups_proto_rawDescGZIP(), []int{10, 0, 22} } func (x *GroupChange_Actions_ModifyAnnouncementsOnlyAction) GetAnnouncementsOnly() bool { @@ -2717,42 +2641,6 @@ func (x *GroupChange_Actions_ModifyAnnouncementsOnlyAction) GetAnnouncementsOnly return false } -type GroupChange_Actions_TerminateGroupAction struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GroupChange_Actions_TerminateGroupAction) Reset() { - *x = GroupChange_Actions_TerminateGroupAction{} - mi := &file_signalpb_Groups_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GroupChange_Actions_TerminateGroupAction) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupChange_Actions_TerminateGroupAction) ProtoMessage() {} - -func (x *GroupChange_Actions_TerminateGroupAction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[41] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GroupChange_Actions_TerminateGroupAction.ProtoReflect.Descriptor instead. -func (*GroupChange_Actions_TerminateGroupAction) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{10, 0, 24} -} - type GroupChanges_GroupChangeState struct { state protoimpl.MessageState `protogen:"open.v1"` GroupChange *GroupChange `protobuf:"bytes,1,opt,name=groupChange,proto3" json:"groupChange,omitempty"` @@ -2763,7 +2651,7 @@ type GroupChanges_GroupChangeState struct { func (x *GroupChanges_GroupChangeState) Reset() { *x = GroupChanges_GroupChangeState{} - mi := &file_signalpb_Groups_proto_msgTypes[42] + mi := &file_Groups_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2775,7 +2663,7 @@ func (x *GroupChanges_GroupChangeState) String() string { func (*GroupChanges_GroupChangeState) ProtoMessage() {} func (x *GroupChanges_GroupChangeState) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Groups_proto_msgTypes[42] + mi := &file_Groups_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2788,7 +2676,7 @@ func (x *GroupChanges_GroupChangeState) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupChanges_GroupChangeState.ProtoReflect.Descriptor instead. func (*GroupChanges_GroupChangeState) Descriptor() ([]byte, []int) { - return file_signalpb_Groups_proto_rawDescGZIP(), []int{13, 0} + return file_Groups_proto_rawDescGZIP(), []int{13, 0} } func (x *GroupChanges_GroupChangeState) GetGroupChange() *GroupChange { @@ -2805,11 +2693,11 @@ func (x *GroupChanges_GroupChangeState) GetGroupState() *Group { return nil } -var File_signalpb_Groups_proto protoreflect.FileDescriptor +var File_Groups_proto protoreflect.FileDescriptor -const file_signalpb_Groups_proto_rawDesc = "" + +const file_Groups_proto_rawDesc = "" + "\n" + - "\x15signalpb/Groups.proto\x12\x06signal\"\xc4\x01\n" + + "\fGroups.proto\x12\x06signal\"\xc4\x01\n" + "\x16AvatarUploadAttributes\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x1e\n" + "\n" + @@ -2849,21 +2737,20 @@ const file_signalpb_Groups_proto_rawDesc = "" + "\ttimestamp\x18\x04 \x01(\x04R\ttimestamp\"D\n" + "\fMemberBanned\x12\x16\n" + "\x06userId\x18\x01 \x01(\fR\x06userId\x12\x1c\n" + - "\ttimestamp\x18\x02 \x01(\x04R\ttimestamp\"\x8b\x03\n" + + "\ttimestamp\x18\x02 \x01(\x04R\ttimestamp\"\xc3\x02\n" + "\rAccessControl\x12D\n" + "\n" + "attributes\x18\x01 \x01(\x0e2$.signal.AccessControl.AccessRequiredR\n" + "attributes\x12>\n" + "\amembers\x18\x02 \x01(\x0e2$.signal.AccessControl.AccessRequiredR\amembers\x12R\n" + - "\x11addFromInviteLink\x18\x03 \x01(\x0e2$.signal.AccessControl.AccessRequiredR\x11addFromInviteLink\x12F\n" + - "\vmemberLabel\x18\x04 \x01(\x0e2$.signal.AccessControl.AccessRequiredR\vmemberLabel\"X\n" + + "\x11addFromInviteLink\x18\x03 \x01(\x0e2$.signal.AccessControl.AccessRequiredR\x11addFromInviteLink\"X\n" + "\x0eAccessRequired\x12\v\n" + "\aUNKNOWN\x10\x00\x12\a\n" + "\x03ANY\x10\x01\x12\n" + "\n" + "\x06MEMBER\x10\x02\x12\x11\n" + "\rADMINISTRATOR\x10\x03\x12\x11\n" + - "\rUNSATISFIABLE\x10\x04\"\xb9\x05\n" + + "\rUNSATISFIABLE\x10\x04\"\x99\x05\n" + "\x05Group\x12\x1c\n" + "\tpublicKey\x18\x01 \x01(\fR\tpublicKey\x12\x14\n" + "\x05title\x18\x02 \x01(\fR\x05title\x12 \n" + @@ -2878,10 +2765,7 @@ const file_signalpb_Groups_proto_rawDesc = "" + "\x12inviteLinkPassword\x18\n" + " \x01(\fR\x12inviteLinkPassword\x12-\n" + "\x12announcements_only\x18\f \x01(\bR\x11announcementsOnly\x12;\n" + - "\x0emembers_banned\x18\r \x03(\v2\x14.signal.MemberBannedR\rmembersBanned\x12\x1e\n" + - "\n" + - "terminated\x18\x0e \x01(\bR\n" + - "terminated\"\xc3\x01\n" + + "\x0emembers_banned\x18\r \x03(\v2\x14.signal.MemberBannedR\rmembersBanned\"\xc3\x01\n" + "\x12GroupAttributeBlob\x12\x16\n" + "\x05title\x18\x01 \x01(\tH\x00R\x05title\x12\x18\n" + "\x06avatar\x18\x02 \x01(\fH\x00R\x06avatar\x12D\n" + @@ -2905,11 +2789,11 @@ const file_signalpb_Groups_proto_rawDesc = "" + "\vmemberCount\x18\x04 \x01(\rR\vmemberCount\x12R\n" + "\x11addFromInviteLink\x18\x05 \x01(\x0e2$.signal.AccessControl.AccessRequiredR\x11addFromInviteLink\x12\x18\n" + "\aversion\x18\x06 \x01(\rR\aversion\x122\n" + - "\x14pendingAdminApproval\x18\a \x01(\bR\x14pendingAdminApproval\"\xa6*\n" + + "\x14pendingAdminApproval\x18\a \x01(\bR\x14pendingAdminApproval\"\xbb'\n" + "\vGroupChange\x12\x18\n" + "\aactions\x18\x01 \x01(\fR\aactions\x12(\n" + "\x0fserverSignature\x18\x02 \x01(\fR\x0fserverSignature\x12 \n" + - "\vchangeEpoch\x18\x03 \x01(\rR\vchangeEpoch\x1a\xb0)\n" + + "\vchangeEpoch\x18\x03 \x01(\rR\vchangeEpoch\x1a\xc5&\n" + "\aActions\x12\"\n" + "\fsourceUserId\x18\x01 \x01(\fR\fsourceUserId\x12\x19\n" + "\bgroup_id\x18\x19 \x01(\fR\agroupId\x12\x18\n" + @@ -2939,9 +2823,7 @@ const file_signalpb_Groups_proto_rawDesc = "" + "\x12add_members_banned\x18\x16 \x03(\v21.signal.GroupChange.Actions.AddMemberBannedActionR\x10addMembersBanned\x12h\n" + "\x15delete_members_banned\x18\x17 \x03(\v24.signal.GroupChange.Actions.DeleteMemberBannedActionR\x13deleteMembersBanned\x12\xa2\x01\n" + "+promote_members_pending_pni_aci_profile_key\x18\x18 \x03(\v2F.signal.GroupChange.Actions.PromoteMemberPendingPniAciProfileKeyActionR%promoteMembersPendingPniAciProfileKey\x12c\n" + - "\x12modifyMemberLabels\x18\x1a \x03(\v23.signal.GroupChange.Actions.ModifyMemberLabelActionR\x12modifyMemberLabels\x12z\n" + - "\x17modifyMemberLabelAccess\x18\x1b \x01(\v2@.signal.GroupChange.Actions.ModifyMemberLabelAccessControlActionR\x17modifyMemberLabelAccess\x12Y\n" + - "\x0fterminate_group\x18\x1c \x01(\v20.signal.GroupChange.Actions.TerminateGroupActionR\x0eterminateGroup\x1ag\n" + + "\x12modifyMemberLabels\x18\x1a \x03(\v23.signal.GroupChange.Actions.ModifyMemberLabelActionR\x12modifyMemberLabels\x1ag\n" + "\x0fAddMemberAction\x12$\n" + "\x05added\x18\x01 \x01(\v2\x0e.signal.MemberR\x05added\x12.\n" + "\x12joinFromInviteLink\x18\x02 \x01(\bR\x12joinFromInviteLink\x1a:\n" + @@ -3000,14 +2882,11 @@ const file_signalpb_Groups_proto_rawDesc = "" + " ModifyMembersAccessControlAction\x12J\n" + "\rmembersAccess\x18\x01 \x01(\x0e2$.signal.AccessControl.AccessRequiredR\rmembersAccess\x1a\x8c\x01\n" + "*ModifyAddFromInviteLinkAccessControlAction\x12^\n" + - "\x17addFromInviteLinkAccess\x18\x01 \x01(\x0e2$.signal.AccessControl.AccessRequiredR\x17addFromInviteLinkAccess\x1az\n" + - "$ModifyMemberLabelAccessControlAction\x12R\n" + - "\x11memberLabelAccess\x18\x01 \x01(\x0e2$.signal.AccessControl.AccessRequiredR\x11memberLabelAccess\x1aP\n" + + "\x17addFromInviteLinkAccess\x18\x01 \x01(\x0e2$.signal.AccessControl.AccessRequiredR\x17addFromInviteLinkAccess\x1aP\n" + "\x1eModifyInviteLinkPasswordAction\x12.\n" + "\x12inviteLinkPassword\x18\x01 \x01(\fR\x12inviteLinkPassword\x1aN\n" + "\x1dModifyAnnouncementsOnlyAction\x12-\n" + - "\x12announcements_only\x18\x01 \x01(\bR\x11announcementsOnly\x1a\x16\n" + - "\x14TerminateGroupAction\"/\n" + + "\x12announcements_only\x18\x01 \x01(\bR\x11announcementsOnly\"/\n" + "\x17ExternalGroupCredential\x12\x14\n" + "\x05token\x18\x01 \x01(\tR\x05token\"}\n" + "\rGroupResponse\x12#\n" + @@ -3027,20 +2906,20 @@ const file_signalpb_Groups_proto_rawDesc = "" + "/org.signal.storageservice.storage.protos.groupsB\vGroupProtosP\x01b\x06proto3" var ( - file_signalpb_Groups_proto_rawDescOnce sync.Once - file_signalpb_Groups_proto_rawDescData []byte + file_Groups_proto_rawDescOnce sync.Once + file_Groups_proto_rawDescData []byte ) -func file_signalpb_Groups_proto_rawDescGZIP() []byte { - file_signalpb_Groups_proto_rawDescOnce.Do(func() { - file_signalpb_Groups_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_signalpb_Groups_proto_rawDesc), len(file_signalpb_Groups_proto_rawDesc))) +func file_Groups_proto_rawDescGZIP() []byte { + file_Groups_proto_rawDescOnce.Do(func() { + file_Groups_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Groups_proto_rawDesc), len(file_Groups_proto_rawDesc))) }) - return file_signalpb_Groups_proto_rawDescData + return file_Groups_proto_rawDescData } -var file_signalpb_Groups_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_signalpb_Groups_proto_msgTypes = make([]protoimpl.MessageInfo, 43) -var file_signalpb_Groups_proto_goTypes = []any{ +var file_Groups_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_Groups_proto_msgTypes = make([]protoimpl.MessageInfo, 41) +var file_Groups_proto_goTypes = []any{ (Member_Role)(0), // 0: signal.Member.Role (AccessControl_AccessRequired)(0), // 1: signal.AccessControl.AccessRequired (*AvatarUploadAttributes)(nil), // 2: signal.AvatarUploadAttributes @@ -3081,103 +2960,97 @@ var file_signalpb_Groups_proto_goTypes = []any{ (*GroupChange_Actions_ModifyAttributesAccessControlAction)(nil), // 37: signal.GroupChange.Actions.ModifyAttributesAccessControlAction (*GroupChange_Actions_ModifyMembersAccessControlAction)(nil), // 38: signal.GroupChange.Actions.ModifyMembersAccessControlAction (*GroupChange_Actions_ModifyAddFromInviteLinkAccessControlAction)(nil), // 39: signal.GroupChange.Actions.ModifyAddFromInviteLinkAccessControlAction - (*GroupChange_Actions_ModifyMemberLabelAccessControlAction)(nil), // 40: signal.GroupChange.Actions.ModifyMemberLabelAccessControlAction - (*GroupChange_Actions_ModifyInviteLinkPasswordAction)(nil), // 41: signal.GroupChange.Actions.ModifyInviteLinkPasswordAction - (*GroupChange_Actions_ModifyAnnouncementsOnlyAction)(nil), // 42: signal.GroupChange.Actions.ModifyAnnouncementsOnlyAction - (*GroupChange_Actions_TerminateGroupAction)(nil), // 43: signal.GroupChange.Actions.TerminateGroupAction - (*GroupChanges_GroupChangeState)(nil), // 44: signal.GroupChanges.GroupChangeState + (*GroupChange_Actions_ModifyInviteLinkPasswordAction)(nil), // 40: signal.GroupChange.Actions.ModifyInviteLinkPasswordAction + (*GroupChange_Actions_ModifyAnnouncementsOnlyAction)(nil), // 41: signal.GroupChange.Actions.ModifyAnnouncementsOnlyAction + (*GroupChanges_GroupChangeState)(nil), // 42: signal.GroupChanges.GroupChangeState } -var file_signalpb_Groups_proto_depIdxs = []int32{ +var file_Groups_proto_depIdxs = []int32{ 0, // 0: signal.Member.role:type_name -> signal.Member.Role 3, // 1: signal.MemberPendingProfileKey.member:type_name -> signal.Member 1, // 2: signal.AccessControl.attributes:type_name -> signal.AccessControl.AccessRequired 1, // 3: signal.AccessControl.members:type_name -> signal.AccessControl.AccessRequired 1, // 4: signal.AccessControl.addFromInviteLink:type_name -> signal.AccessControl.AccessRequired - 1, // 5: signal.AccessControl.memberLabel:type_name -> signal.AccessControl.AccessRequired - 7, // 6: signal.Group.accessControl:type_name -> signal.AccessControl - 3, // 7: signal.Group.members:type_name -> signal.Member - 4, // 8: signal.Group.membersPendingProfileKey:type_name -> signal.MemberPendingProfileKey - 5, // 9: signal.Group.membersPendingAdminApproval:type_name -> signal.MemberPendingAdminApproval - 6, // 10: signal.Group.members_banned:type_name -> signal.MemberBanned - 17, // 11: signal.GroupInviteLink.contentsV1:type_name -> signal.GroupInviteLink.GroupInviteLinkContentsV1 - 1, // 12: signal.GroupJoinInfo.addFromInviteLink:type_name -> signal.AccessControl.AccessRequired - 8, // 13: signal.GroupResponse.group:type_name -> signal.Group - 44, // 14: signal.GroupChanges.groupChanges:type_name -> signal.GroupChanges.GroupChangeState - 12, // 15: signal.GroupChangeResponse.group_change:type_name -> signal.GroupChange - 19, // 16: signal.GroupChange.Actions.addMembers:type_name -> signal.GroupChange.Actions.AddMemberAction - 20, // 17: signal.GroupChange.Actions.deleteMembers:type_name -> signal.GroupChange.Actions.DeleteMemberAction - 21, // 18: signal.GroupChange.Actions.modifyMemberRoles:type_name -> signal.GroupChange.Actions.ModifyMemberRoleAction - 23, // 19: signal.GroupChange.Actions.modifyMemberProfileKeys:type_name -> signal.GroupChange.Actions.ModifyMemberProfileKeyAction - 24, // 20: signal.GroupChange.Actions.addMembersPendingProfileKey:type_name -> signal.GroupChange.Actions.AddMemberPendingProfileKeyAction - 25, // 21: signal.GroupChange.Actions.deleteMembersPendingProfileKey:type_name -> signal.GroupChange.Actions.DeleteMemberPendingProfileKeyAction - 26, // 22: signal.GroupChange.Actions.promoteMembersPendingProfileKey:type_name -> signal.GroupChange.Actions.PromoteMemberPendingProfileKeyAction - 33, // 23: signal.GroupChange.Actions.modifyTitle:type_name -> signal.GroupChange.Actions.ModifyTitleAction - 35, // 24: signal.GroupChange.Actions.modifyAvatar:type_name -> signal.GroupChange.Actions.ModifyAvatarAction - 36, // 25: signal.GroupChange.Actions.modifyDisappearingMessageTimer:type_name -> signal.GroupChange.Actions.ModifyDisappearingMessageTimerAction - 37, // 26: signal.GroupChange.Actions.modifyAttributesAccess:type_name -> signal.GroupChange.Actions.ModifyAttributesAccessControlAction - 38, // 27: signal.GroupChange.Actions.modifyMemberAccess:type_name -> signal.GroupChange.Actions.ModifyMembersAccessControlAction - 39, // 28: signal.GroupChange.Actions.modifyAddFromInviteLinkAccess:type_name -> signal.GroupChange.Actions.ModifyAddFromInviteLinkAccessControlAction - 28, // 29: signal.GroupChange.Actions.addMembersPendingAdminApproval:type_name -> signal.GroupChange.Actions.AddMemberPendingAdminApprovalAction - 29, // 30: signal.GroupChange.Actions.deleteMembersPendingAdminApproval:type_name -> signal.GroupChange.Actions.DeleteMemberPendingAdminApprovalAction - 30, // 31: signal.GroupChange.Actions.promoteMembersPendingAdminApproval:type_name -> signal.GroupChange.Actions.PromoteMemberPendingAdminApprovalAction - 41, // 32: signal.GroupChange.Actions.modifyInviteLinkPassword:type_name -> signal.GroupChange.Actions.ModifyInviteLinkPasswordAction - 34, // 33: signal.GroupChange.Actions.modifyDescription:type_name -> signal.GroupChange.Actions.ModifyDescriptionAction - 42, // 34: signal.GroupChange.Actions.modify_announcements_only:type_name -> signal.GroupChange.Actions.ModifyAnnouncementsOnlyAction - 31, // 35: signal.GroupChange.Actions.add_members_banned:type_name -> signal.GroupChange.Actions.AddMemberBannedAction - 32, // 36: signal.GroupChange.Actions.delete_members_banned:type_name -> signal.GroupChange.Actions.DeleteMemberBannedAction - 27, // 37: signal.GroupChange.Actions.promote_members_pending_pni_aci_profile_key:type_name -> signal.GroupChange.Actions.PromoteMemberPendingPniAciProfileKeyAction - 22, // 38: signal.GroupChange.Actions.modifyMemberLabels:type_name -> signal.GroupChange.Actions.ModifyMemberLabelAction - 40, // 39: signal.GroupChange.Actions.modifyMemberLabelAccess:type_name -> signal.GroupChange.Actions.ModifyMemberLabelAccessControlAction - 43, // 40: signal.GroupChange.Actions.terminate_group:type_name -> signal.GroupChange.Actions.TerminateGroupAction - 3, // 41: signal.GroupChange.Actions.AddMemberAction.added:type_name -> signal.Member - 0, // 42: signal.GroupChange.Actions.ModifyMemberRoleAction.role:type_name -> signal.Member.Role - 4, // 43: signal.GroupChange.Actions.AddMemberPendingProfileKeyAction.added:type_name -> signal.MemberPendingProfileKey - 5, // 44: signal.GroupChange.Actions.AddMemberPendingAdminApprovalAction.added:type_name -> signal.MemberPendingAdminApproval - 0, // 45: signal.GroupChange.Actions.PromoteMemberPendingAdminApprovalAction.role:type_name -> signal.Member.Role - 6, // 46: signal.GroupChange.Actions.AddMemberBannedAction.added:type_name -> signal.MemberBanned - 1, // 47: signal.GroupChange.Actions.ModifyAttributesAccessControlAction.attributesAccess:type_name -> signal.AccessControl.AccessRequired - 1, // 48: signal.GroupChange.Actions.ModifyMembersAccessControlAction.membersAccess:type_name -> signal.AccessControl.AccessRequired - 1, // 49: signal.GroupChange.Actions.ModifyAddFromInviteLinkAccessControlAction.addFromInviteLinkAccess:type_name -> signal.AccessControl.AccessRequired - 1, // 50: signal.GroupChange.Actions.ModifyMemberLabelAccessControlAction.memberLabelAccess:type_name -> signal.AccessControl.AccessRequired - 12, // 51: signal.GroupChanges.GroupChangeState.groupChange:type_name -> signal.GroupChange - 8, // 52: signal.GroupChanges.GroupChangeState.groupState:type_name -> signal.Group - 53, // [53:53] is the sub-list for method output_type - 53, // [53:53] is the sub-list for method input_type - 53, // [53:53] is the sub-list for extension type_name - 53, // [53:53] is the sub-list for extension extendee - 0, // [0:53] is the sub-list for field type_name + 7, // 5: signal.Group.accessControl:type_name -> signal.AccessControl + 3, // 6: signal.Group.members:type_name -> signal.Member + 4, // 7: signal.Group.membersPendingProfileKey:type_name -> signal.MemberPendingProfileKey + 5, // 8: signal.Group.membersPendingAdminApproval:type_name -> signal.MemberPendingAdminApproval + 6, // 9: signal.Group.members_banned:type_name -> signal.MemberBanned + 17, // 10: signal.GroupInviteLink.contentsV1:type_name -> signal.GroupInviteLink.GroupInviteLinkContentsV1 + 1, // 11: signal.GroupJoinInfo.addFromInviteLink:type_name -> signal.AccessControl.AccessRequired + 8, // 12: signal.GroupResponse.group:type_name -> signal.Group + 42, // 13: signal.GroupChanges.groupChanges:type_name -> signal.GroupChanges.GroupChangeState + 12, // 14: signal.GroupChangeResponse.group_change:type_name -> signal.GroupChange + 19, // 15: signal.GroupChange.Actions.addMembers:type_name -> signal.GroupChange.Actions.AddMemberAction + 20, // 16: signal.GroupChange.Actions.deleteMembers:type_name -> signal.GroupChange.Actions.DeleteMemberAction + 21, // 17: signal.GroupChange.Actions.modifyMemberRoles:type_name -> signal.GroupChange.Actions.ModifyMemberRoleAction + 23, // 18: signal.GroupChange.Actions.modifyMemberProfileKeys:type_name -> signal.GroupChange.Actions.ModifyMemberProfileKeyAction + 24, // 19: signal.GroupChange.Actions.addMembersPendingProfileKey:type_name -> signal.GroupChange.Actions.AddMemberPendingProfileKeyAction + 25, // 20: signal.GroupChange.Actions.deleteMembersPendingProfileKey:type_name -> signal.GroupChange.Actions.DeleteMemberPendingProfileKeyAction + 26, // 21: signal.GroupChange.Actions.promoteMembersPendingProfileKey:type_name -> signal.GroupChange.Actions.PromoteMemberPendingProfileKeyAction + 33, // 22: signal.GroupChange.Actions.modifyTitle:type_name -> signal.GroupChange.Actions.ModifyTitleAction + 35, // 23: signal.GroupChange.Actions.modifyAvatar:type_name -> signal.GroupChange.Actions.ModifyAvatarAction + 36, // 24: signal.GroupChange.Actions.modifyDisappearingMessageTimer:type_name -> signal.GroupChange.Actions.ModifyDisappearingMessageTimerAction + 37, // 25: signal.GroupChange.Actions.modifyAttributesAccess:type_name -> signal.GroupChange.Actions.ModifyAttributesAccessControlAction + 38, // 26: signal.GroupChange.Actions.modifyMemberAccess:type_name -> signal.GroupChange.Actions.ModifyMembersAccessControlAction + 39, // 27: signal.GroupChange.Actions.modifyAddFromInviteLinkAccess:type_name -> signal.GroupChange.Actions.ModifyAddFromInviteLinkAccessControlAction + 28, // 28: signal.GroupChange.Actions.addMembersPendingAdminApproval:type_name -> signal.GroupChange.Actions.AddMemberPendingAdminApprovalAction + 29, // 29: signal.GroupChange.Actions.deleteMembersPendingAdminApproval:type_name -> signal.GroupChange.Actions.DeleteMemberPendingAdminApprovalAction + 30, // 30: signal.GroupChange.Actions.promoteMembersPendingAdminApproval:type_name -> signal.GroupChange.Actions.PromoteMemberPendingAdminApprovalAction + 40, // 31: signal.GroupChange.Actions.modifyInviteLinkPassword:type_name -> signal.GroupChange.Actions.ModifyInviteLinkPasswordAction + 34, // 32: signal.GroupChange.Actions.modifyDescription:type_name -> signal.GroupChange.Actions.ModifyDescriptionAction + 41, // 33: signal.GroupChange.Actions.modify_announcements_only:type_name -> signal.GroupChange.Actions.ModifyAnnouncementsOnlyAction + 31, // 34: signal.GroupChange.Actions.add_members_banned:type_name -> signal.GroupChange.Actions.AddMemberBannedAction + 32, // 35: signal.GroupChange.Actions.delete_members_banned:type_name -> signal.GroupChange.Actions.DeleteMemberBannedAction + 27, // 36: signal.GroupChange.Actions.promote_members_pending_pni_aci_profile_key:type_name -> signal.GroupChange.Actions.PromoteMemberPendingPniAciProfileKeyAction + 22, // 37: signal.GroupChange.Actions.modifyMemberLabels:type_name -> signal.GroupChange.Actions.ModifyMemberLabelAction + 3, // 38: signal.GroupChange.Actions.AddMemberAction.added:type_name -> signal.Member + 0, // 39: signal.GroupChange.Actions.ModifyMemberRoleAction.role:type_name -> signal.Member.Role + 4, // 40: signal.GroupChange.Actions.AddMemberPendingProfileKeyAction.added:type_name -> signal.MemberPendingProfileKey + 5, // 41: signal.GroupChange.Actions.AddMemberPendingAdminApprovalAction.added:type_name -> signal.MemberPendingAdminApproval + 0, // 42: signal.GroupChange.Actions.PromoteMemberPendingAdminApprovalAction.role:type_name -> signal.Member.Role + 6, // 43: signal.GroupChange.Actions.AddMemberBannedAction.added:type_name -> signal.MemberBanned + 1, // 44: signal.GroupChange.Actions.ModifyAttributesAccessControlAction.attributesAccess:type_name -> signal.AccessControl.AccessRequired + 1, // 45: signal.GroupChange.Actions.ModifyMembersAccessControlAction.membersAccess:type_name -> signal.AccessControl.AccessRequired + 1, // 46: signal.GroupChange.Actions.ModifyAddFromInviteLinkAccessControlAction.addFromInviteLinkAccess:type_name -> signal.AccessControl.AccessRequired + 12, // 47: signal.GroupChanges.GroupChangeState.groupChange:type_name -> signal.GroupChange + 8, // 48: signal.GroupChanges.GroupChangeState.groupState:type_name -> signal.Group + 49, // [49:49] is the sub-list for method output_type + 49, // [49:49] is the sub-list for method input_type + 49, // [49:49] is the sub-list for extension type_name + 49, // [49:49] is the sub-list for extension extendee + 0, // [0:49] is the sub-list for field type_name } -func init() { file_signalpb_Groups_proto_init() } -func file_signalpb_Groups_proto_init() { - if File_signalpb_Groups_proto != nil { +func init() { file_Groups_proto_init() } +func file_Groups_proto_init() { + if File_Groups_proto != nil { return } - file_signalpb_Groups_proto_msgTypes[7].OneofWrappers = []any{ + file_Groups_proto_msgTypes[7].OneofWrappers = []any{ (*GroupAttributeBlob_Title)(nil), (*GroupAttributeBlob_Avatar)(nil), (*GroupAttributeBlob_DisappearingMessagesDuration)(nil), (*GroupAttributeBlob_DescriptionText)(nil), } - file_signalpb_Groups_proto_msgTypes[8].OneofWrappers = []any{ + file_Groups_proto_msgTypes[8].OneofWrappers = []any{ (*GroupInviteLink_ContentsV1)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalpb_Groups_proto_rawDesc), len(file_signalpb_Groups_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Groups_proto_rawDesc), len(file_Groups_proto_rawDesc)), NumEnums: 2, - NumMessages: 43, + NumMessages: 41, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_signalpb_Groups_proto_goTypes, - DependencyIndexes: file_signalpb_Groups_proto_depIdxs, - EnumInfos: file_signalpb_Groups_proto_enumTypes, - MessageInfos: file_signalpb_Groups_proto_msgTypes, + GoTypes: file_Groups_proto_goTypes, + DependencyIndexes: file_Groups_proto_depIdxs, + EnumInfos: file_Groups_proto_enumTypes, + MessageInfos: file_Groups_proto_msgTypes, }.Build() - File_signalpb_Groups_proto = out.File - file_signalpb_Groups_proto_goTypes = nil - file_signalpb_Groups_proto_depIdxs = nil + File_Groups_proto = out.File + file_Groups_proto_goTypes = nil + file_Groups_proto_depIdxs = nil } diff --git a/pkg/signalmeow/protobuf/signalpb/Groups.proto b/pkg/signalmeow/protobuf/Groups.proto similarity index 95% rename from pkg/signalmeow/protobuf/signalpb/Groups.proto rename to pkg/signalmeow/protobuf/Groups.proto index 9843d1c..448846a 100644 --- a/pkg/signalmeow/protobuf/signalpb/Groups.proto +++ b/pkg/signalmeow/protobuf/Groups.proto @@ -69,7 +69,6 @@ message AccessControl { AccessRequired attributes = 1; AccessRequired members = 2; AccessRequired addFromInviteLink = 3; - AccessRequired memberLabel = 4; } message Group { @@ -88,8 +87,7 @@ message Group { bytes inviteLinkPassword = 10; bool announcements_only = 12; repeated MemberBanned members_banned = 13; - bool terminated = 14; - // next: 15 + // next: 14 } message GroupAttributeBlob { @@ -227,10 +225,6 @@ message GroupChange { AccessControl.AccessRequired addFromInviteLinkAccess = 1; } - message ModifyMemberLabelAccessControlAction { - AccessControl.AccessRequired memberLabelAccess = 1; - } - message ModifyInviteLinkPasswordAction { bytes inviteLinkPassword = 1; } @@ -239,8 +233,6 @@ message GroupChange { bool announcements_only = 1; } - message TerminateGroupAction {} - bytes sourceUserId = 1; // clients should not provide this value; the server will provide it in the response buffer to ensure the signature is binding to a particular group // if clients set it during a request the server will respond with 400. @@ -270,9 +262,7 @@ message GroupChange { repeated DeleteMemberBannedAction delete_members_banned = 23; // change epoch = 4 repeated PromoteMemberPendingPniAciProfileKeyAction promote_members_pending_pni_aci_profile_key = 24; // change epoch = 5 repeated ModifyMemberLabelAction modifyMemberLabels = 26; // change epoch = 6; - ModifyMemberLabelAccessControlAction modifyMemberLabelAccess = 27; // change epoch = 6 - TerminateGroupAction terminate_group = 28; // change epoch = 7 - // next: 29 + // next: 27 } bytes actions = 1; diff --git a/pkg/signalmeow/protobuf/signalpb/Provisioning.pb.go b/pkg/signalmeow/protobuf/Provisioning.pb.go similarity index 81% rename from pkg/signalmeow/protobuf/signalpb/Provisioning.pb.go rename to pkg/signalmeow/protobuf/Provisioning.pb.go index 2d8ee38..0231512 100644 --- a/pkg/signalmeow/protobuf/signalpb/Provisioning.pb.go +++ b/pkg/signalmeow/protobuf/Provisioning.pb.go @@ -5,8 +5,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: signalpb/Provisioning.proto +// protoc v6.33.5 +// source: Provisioning.proto package signalpb @@ -58,11 +58,11 @@ func (x ProvisioningVersion) String() string { } func (ProvisioningVersion) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_Provisioning_proto_enumTypes[0].Descriptor() + return file_Provisioning_proto_enumTypes[0].Descriptor() } func (ProvisioningVersion) Type() protoreflect.EnumType { - return &file_signalpb_Provisioning_proto_enumTypes[0] + return &file_Provisioning_proto_enumTypes[0] } func (x ProvisioningVersion) Number() protoreflect.EnumNumber { @@ -81,7 +81,7 @@ func (x *ProvisioningVersion) UnmarshalJSON(b []byte) error { // Deprecated: Use ProvisioningVersion.Descriptor instead. func (ProvisioningVersion) EnumDescriptor() ([]byte, []int) { - return file_signalpb_Provisioning_proto_rawDescGZIP(), []int{0} + return file_Provisioning_proto_rawDescGZIP(), []int{0} } // An opaque address sent by the server when clients first open a provisioning @@ -98,7 +98,7 @@ type ProvisioningAddress struct { func (x *ProvisioningAddress) Reset() { *x = ProvisioningAddress{} - mi := &file_signalpb_Provisioning_proto_msgTypes[0] + mi := &file_Provisioning_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -110,7 +110,7 @@ func (x *ProvisioningAddress) String() string { func (*ProvisioningAddress) ProtoMessage() {} func (x *ProvisioningAddress) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Provisioning_proto_msgTypes[0] + mi := &file_Provisioning_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -123,7 +123,7 @@ func (x *ProvisioningAddress) ProtoReflect() protoreflect.Message { // Deprecated: Use ProvisioningAddress.ProtoReflect.Descriptor instead. func (*ProvisioningAddress) Descriptor() ([]byte, []int) { - return file_signalpb_Provisioning_proto_rawDescGZIP(), []int{0} + return file_Provisioning_proto_rawDescGZIP(), []int{0} } func (x *ProvisioningAddress) GetAddress() string { @@ -143,7 +143,7 @@ type ProvisionEnvelope struct { func (x *ProvisionEnvelope) Reset() { *x = ProvisionEnvelope{} - mi := &file_signalpb_Provisioning_proto_msgTypes[1] + mi := &file_Provisioning_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -155,7 +155,7 @@ func (x *ProvisionEnvelope) String() string { func (*ProvisionEnvelope) ProtoMessage() {} func (x *ProvisionEnvelope) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Provisioning_proto_msgTypes[1] + mi := &file_Provisioning_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -168,7 +168,7 @@ func (x *ProvisionEnvelope) ProtoReflect() protoreflect.Message { // Deprecated: Use ProvisionEnvelope.ProtoReflect.Descriptor instead. func (*ProvisionEnvelope) Descriptor() ([]byte, []int) { - return file_signalpb_Provisioning_proto_rawDescGZIP(), []int{1} + return file_Provisioning_proto_rawDescGZIP(), []int{1} } func (x *ProvisionEnvelope) GetPublicKey() []byte { @@ -199,19 +199,19 @@ type ProvisionMessage struct { ProfileKey []byte `protobuf:"bytes,6,opt,name=profileKey" json:"profileKey,omitempty"` ReadReceipts *bool `protobuf:"varint,7,opt,name=readReceipts" json:"readReceipts,omitempty"` ProvisioningVersion *uint32 `protobuf:"varint,9,opt,name=provisioningVersion" json:"provisioningVersion,omitempty"` + MasterKey []byte `protobuf:"bytes,13,opt,name=masterKey" json:"masterKey,omitempty"` // Deprecated, but required by linked devices EphemeralBackupKey []byte `protobuf:"bytes,14,opt,name=ephemeralBackupKey" json:"ephemeralBackupKey,omitempty"` // 32 bytes AccountEntropyPool *string `protobuf:"bytes,15,opt,name=accountEntropyPool" json:"accountEntropyPool,omitempty"` MediaRootBackupKey []byte `protobuf:"bytes,16,opt,name=mediaRootBackupKey" json:"mediaRootBackupKey,omitempty"` // 32-bytes AciBinary []byte `protobuf:"bytes,17,opt,name=aciBinary" json:"aciBinary,omitempty"` // 16-byte UUID PniBinary []byte `protobuf:"bytes,18,opt,name=pniBinary" json:"pniBinary,omitempty"` // 16-byte UUID - AuthCredentialSalt []byte `protobuf:"bytes,19,opt,name=authCredentialSalt" json:"authCredentialSalt,omitempty"` // 16-bytes unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ProvisionMessage) Reset() { *x = ProvisionMessage{} - mi := &file_signalpb_Provisioning_proto_msgTypes[2] + mi := &file_Provisioning_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -223,7 +223,7 @@ func (x *ProvisionMessage) String() string { func (*ProvisionMessage) ProtoMessage() {} func (x *ProvisionMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_Provisioning_proto_msgTypes[2] + mi := &file_Provisioning_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -236,7 +236,7 @@ func (x *ProvisionMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ProvisionMessage.ProtoReflect.Descriptor instead. func (*ProvisionMessage) Descriptor() ([]byte, []int) { - return file_signalpb_Provisioning_proto_rawDescGZIP(), []int{2} + return file_Provisioning_proto_rawDescGZIP(), []int{2} } func (x *ProvisionMessage) GetAciIdentityKeyPublic() []byte { @@ -323,6 +323,13 @@ func (x *ProvisionMessage) GetProvisioningVersion() uint32 { return 0 } +func (x *ProvisionMessage) GetMasterKey() []byte { + if x != nil { + return x.MasterKey + } + return nil +} + func (x *ProvisionMessage) GetEphemeralBackupKey() []byte { if x != nil { return x.EphemeralBackupKey @@ -358,23 +365,16 @@ func (x *ProvisionMessage) GetPniBinary() []byte { return nil } -func (x *ProvisionMessage) GetAuthCredentialSalt() []byte { - if x != nil { - return x.AuthCredentialSalt - } - return nil -} +var File_Provisioning_proto protoreflect.FileDescriptor -var File_signalpb_Provisioning_proto protoreflect.FileDescriptor - -const file_signalpb_Provisioning_proto_rawDesc = "" + +const file_Provisioning_proto_rawDesc = "" + "\n" + - "\x1bsignalpb/Provisioning.proto\x12\rsignalservice\"/\n" + + "\x12Provisioning.proto\x12\rsignalservice\"/\n" + "\x13ProvisioningAddress\x12\x18\n" + "\aaddress\x18\x01 \x01(\tR\aaddress\"E\n" + "\x11ProvisionEnvelope\x12\x1c\n" + "\tpublicKey\x18\x01 \x01(\fR\tpublicKey\x12\x12\n" + - "\x04body\x18\x02 \x01(\fR\x04body\"\xe4\x05\n" + + "\x04body\x18\x02 \x01(\fR\x04body\"\xcc\x05\n" + "\x10ProvisionMessage\x122\n" + "\x14aciIdentityKeyPublic\x18\x01 \x01(\fR\x14aciIdentityKeyPublic\x124\n" + "\x15aciIdentityKeyPrivate\x18\x02 \x01(\fR\x15aciIdentityKeyPrivate\x122\n" + @@ -390,13 +390,13 @@ const file_signalpb_Provisioning_proto_rawDesc = "" + "profileKey\x18\x06 \x01(\fR\n" + "profileKey\x12\"\n" + "\freadReceipts\x18\a \x01(\bR\freadReceipts\x120\n" + - "\x13provisioningVersion\x18\t \x01(\rR\x13provisioningVersion\x12.\n" + + "\x13provisioningVersion\x18\t \x01(\rR\x13provisioningVersion\x12\x1c\n" + + "\tmasterKey\x18\r \x01(\fR\tmasterKey\x12.\n" + "\x12ephemeralBackupKey\x18\x0e \x01(\fR\x12ephemeralBackupKey\x12.\n" + "\x12accountEntropyPool\x18\x0f \x01(\tR\x12accountEntropyPool\x12.\n" + "\x12mediaRootBackupKey\x18\x10 \x01(\fR\x12mediaRootBackupKey\x12\x1c\n" + "\taciBinary\x18\x11 \x01(\fR\taciBinary\x12\x1c\n" + - "\tpniBinary\x18\x12 \x01(\fR\tpniBinary\x12.\n" + - "\x12authCredentialSalt\x18\x13 \x01(\fR\x12authCredentialSaltJ\x04\b\r\x10\x0e*G\n" + + "\tpniBinary\x18\x12 \x01(\fR\tpniBinary*G\n" + "\x13ProvisioningVersion\x12\v\n" + "\aINITIAL\x10\x00\x12\x12\n" + "\x0eTABLET_SUPPORT\x10\x01\x12\v\n" + @@ -404,26 +404,26 @@ const file_signalpb_Provisioning_proto_rawDesc = "" + ".org.whispersystems.signalservice.internal.pushB\x12ProvisioningProtos" var ( - file_signalpb_Provisioning_proto_rawDescOnce sync.Once - file_signalpb_Provisioning_proto_rawDescData []byte + file_Provisioning_proto_rawDescOnce sync.Once + file_Provisioning_proto_rawDescData []byte ) -func file_signalpb_Provisioning_proto_rawDescGZIP() []byte { - file_signalpb_Provisioning_proto_rawDescOnce.Do(func() { - file_signalpb_Provisioning_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_signalpb_Provisioning_proto_rawDesc), len(file_signalpb_Provisioning_proto_rawDesc))) +func file_Provisioning_proto_rawDescGZIP() []byte { + file_Provisioning_proto_rawDescOnce.Do(func() { + file_Provisioning_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Provisioning_proto_rawDesc), len(file_Provisioning_proto_rawDesc))) }) - return file_signalpb_Provisioning_proto_rawDescData + return file_Provisioning_proto_rawDescData } -var file_signalpb_Provisioning_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_signalpb_Provisioning_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_signalpb_Provisioning_proto_goTypes = []any{ +var file_Provisioning_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_Provisioning_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_Provisioning_proto_goTypes = []any{ (ProvisioningVersion)(0), // 0: signalservice.ProvisioningVersion (*ProvisioningAddress)(nil), // 1: signalservice.ProvisioningAddress (*ProvisionEnvelope)(nil), // 2: signalservice.ProvisionEnvelope (*ProvisionMessage)(nil), // 3: signalservice.ProvisionMessage } -var file_signalpb_Provisioning_proto_depIdxs = []int32{ +var file_Provisioning_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -431,27 +431,27 @@ var file_signalpb_Provisioning_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_signalpb_Provisioning_proto_init() } -func file_signalpb_Provisioning_proto_init() { - if File_signalpb_Provisioning_proto != nil { +func init() { file_Provisioning_proto_init() } +func file_Provisioning_proto_init() { + if File_Provisioning_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalpb_Provisioning_proto_rawDesc), len(file_signalpb_Provisioning_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Provisioning_proto_rawDesc), len(file_Provisioning_proto_rawDesc)), NumEnums: 1, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_signalpb_Provisioning_proto_goTypes, - DependencyIndexes: file_signalpb_Provisioning_proto_depIdxs, - EnumInfos: file_signalpb_Provisioning_proto_enumTypes, - MessageInfos: file_signalpb_Provisioning_proto_msgTypes, + GoTypes: file_Provisioning_proto_goTypes, + DependencyIndexes: file_Provisioning_proto_depIdxs, + EnumInfos: file_Provisioning_proto_enumTypes, + MessageInfos: file_Provisioning_proto_msgTypes, }.Build() - File_signalpb_Provisioning_proto = out.File - file_signalpb_Provisioning_proto_goTypes = nil - file_signalpb_Provisioning_proto_depIdxs = nil + File_Provisioning_proto = out.File + file_Provisioning_proto_goTypes = nil + file_Provisioning_proto_depIdxs = nil } diff --git a/pkg/signalmeow/protobuf/signalpb/Provisioning.proto b/pkg/signalmeow/protobuf/Provisioning.proto similarity index 91% rename from pkg/signalmeow/protobuf/signalpb/Provisioning.proto rename to pkg/signalmeow/protobuf/Provisioning.proto index cd8daa0..2fde938 100644 --- a/pkg/signalmeow/protobuf/signalpb/Provisioning.proto +++ b/pkg/signalmeow/protobuf/Provisioning.proto @@ -38,14 +38,13 @@ message ProvisionMessage { optional bytes profileKey = 6; optional bool readReceipts = 7; optional uint32 provisioningVersion = 9; - reserved /*masterKey*/ 13; // Deprecated in favor of accountEntropyPool + optional bytes masterKey = 13; // Deprecated, but required by linked devices optional bytes ephemeralBackupKey = 14; // 32 bytes optional string accountEntropyPool = 15; optional bytes mediaRootBackupKey = 16; // 32-bytes optional bytes aciBinary = 17; // 16-byte UUID optional bytes pniBinary = 18; // 16-byte UUID - optional bytes authCredentialSalt = 19; // 16-bytes - // NEXT ID: 20 + // NEXT ID: 19 } enum ProvisioningVersion { diff --git a/pkg/signalmeow/protobuf/signalpb/SignalService.pb.go b/pkg/signalmeow/protobuf/SignalService.pb.go similarity index 81% rename from pkg/signalmeow/protobuf/signalpb/SignalService.pb.go rename to pkg/signalmeow/protobuf/SignalService.pb.go index b8ee02f..5866dbb 100644 --- a/pkg/signalmeow/protobuf/signalpb/SignalService.pb.go +++ b/pkg/signalmeow/protobuf/SignalService.pb.go @@ -5,8 +5,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: signalpb/SignalService.proto +// protoc v6.33.5 +// source: SignalService.proto package signalpb @@ -28,71 +28,33 @@ const ( type Envelope_Type int32 const ( - Envelope_UNKNOWN Envelope_Type = 0 - // * - // A double-ratchet message represents a "normal," "unsealed-sender" message - // encrypted using the Double Ratchet within an established Signal session. - // Double-ratchet messages include sender information in the plaintext - // portion of the `Envelope`. - Envelope_DOUBLE_RATCHET Envelope_Type = 1 // content => (version byte | SignalMessage{Content}) - // * - // A prekey message begins a new Signal session. The `content` of a prekey - // message is a superset of a double-ratchet message's `content` and - // contains the sender's identity public key and information identifying the - // pre-keys used in the message's ciphertext. Like double-ratchet messages, - // prekey messages contain sender information in the plaintext portion of - // the `Envelope`. - Envelope_PREKEY_MESSAGE Envelope_Type = 3 // content => (version byte | PreKeySignalMessage{Content}) - // * - // Server delivery receipts are generated by the server when - // "unsealed-sender" messages are delivered to and acknowledged by the - // destination device. Server delivery receipts identify the sender in the - // plaintext portion of the `Envelope` and have no `content`. Note that - // receipts for sealed-sender messages are generated by clients as - // `UNIDENTIFIED_SENDER` messages. - // - // Note that, with server delivery receipts, the "client timestamp" on - // the envelope refers to the timestamp of the original message (i.e. the - // message the server just delivered) and not to the time of delivery. The - // "server timestamp" refers to the time of delivery. - Envelope_SERVER_DELIVERY_RECEIPT Envelope_Type = 5 // content => [] - // * - // An unidentified sender message represents a message with no sender - // information in the plaintext portion of the `Envelope`. Unidentified - // sender messages always contain an additional `subtype` in their - // `content`. They may or may not be part of an existing Signal session - // (i.e. an unidentified sender message may have a "prekey message" - // subtype or may indicate an encryption error). - Envelope_UNIDENTIFIED_SENDER Envelope_Type = 6 // content => ((version byte | UnidentifiedSenderMessage) OR (version byte | Multi-Recipient Sealed Sender Format)) - // * - // A plaintext message is used solely to convey encryption error receipts - // and never contains encrypted message content. Encryption error receipts - // must be delivered in plaintext because, encryption/decryption of a prior - // message failed and there is no reason to believe that - // encryption/decryption of subsequent messages with the same key material - // would succeed. - // - // Critically, plaintext messages never have "real" message content - // generated by users. Plaintext messages include sender information. - Envelope_PLAINTEXT_CONTENT Envelope_Type = 8 // content => (marker byte | Content) + Envelope_UNKNOWN Envelope_Type = 0 + Envelope_CIPHERTEXT Envelope_Type = 1 // content => (version byte | SignalMessage{Content}) + Envelope_PREKEY_BUNDLE Envelope_Type = 3 // content => (version byte | PreKeySignalMessage{Content}) + Envelope_SERVER_DELIVERY_RECEIPT Envelope_Type = 5 // legacyMessage => [] AND content => [] + Envelope_UNIDENTIFIED_SENDER Envelope_Type = 6 // legacyMessage => [] AND content => ((version byte | UnidentifiedSenderMessage) OR (version byte | Multi-Recipient Sealed Sender Format)) + Envelope_SENDERKEY_MESSAGE Envelope_Type = 7 // legacyMessage => [] AND content => (version byte | SenderKeyMessage) + Envelope_PLAINTEXT_CONTENT Envelope_Type = 8 // legacyMessage => [] AND content => (marker byte | Content) ) // Enum value maps for Envelope_Type. var ( Envelope_Type_name = map[int32]string{ 0: "UNKNOWN", - 1: "DOUBLE_RATCHET", - 3: "PREKEY_MESSAGE", + 1: "CIPHERTEXT", + 3: "PREKEY_BUNDLE", 5: "SERVER_DELIVERY_RECEIPT", 6: "UNIDENTIFIED_SENDER", + 7: "SENDERKEY_MESSAGE", 8: "PLAINTEXT_CONTENT", } Envelope_Type_value = map[string]int32{ "UNKNOWN": 0, - "DOUBLE_RATCHET": 1, - "PREKEY_MESSAGE": 3, + "CIPHERTEXT": 1, + "PREKEY_BUNDLE": 3, "SERVER_DELIVERY_RECEIPT": 5, "UNIDENTIFIED_SENDER": 6, + "SENDERKEY_MESSAGE": 7, "PLAINTEXT_CONTENT": 8, } ) @@ -108,11 +70,11 @@ func (x Envelope_Type) String() string { } func (Envelope_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[0].Descriptor() + return file_SignalService_proto_enumTypes[0].Descriptor() } func (Envelope_Type) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[0] + return &file_SignalService_proto_enumTypes[0] } func (x Envelope_Type) Number() protoreflect.EnumNumber { @@ -131,7 +93,7 @@ func (x *Envelope_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use Envelope_Type.Descriptor instead. func (Envelope_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{0, 0} + return file_SignalService_proto_rawDescGZIP(), []int{0, 0} } type CallMessage_Offer_Type int32 @@ -164,11 +126,11 @@ func (x CallMessage_Offer_Type) String() string { } func (CallMessage_Offer_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[1].Descriptor() + return file_SignalService_proto_enumTypes[1].Descriptor() } func (CallMessage_Offer_Type) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[1] + return &file_SignalService_proto_enumTypes[1] } func (x CallMessage_Offer_Type) Number() protoreflect.EnumNumber { @@ -187,7 +149,7 @@ func (x *CallMessage_Offer_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use CallMessage_Offer_Type.Descriptor instead. func (CallMessage_Offer_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 0, 0} + return file_SignalService_proto_rawDescGZIP(), []int{2, 0, 0} } type CallMessage_Hangup_Type int32 @@ -229,11 +191,11 @@ func (x CallMessage_Hangup_Type) String() string { } func (CallMessage_Hangup_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[2].Descriptor() + return file_SignalService_proto_enumTypes[2].Descriptor() } func (CallMessage_Hangup_Type) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[2] + return &file_SignalService_proto_enumTypes[2] } func (x CallMessage_Hangup_Type) Number() protoreflect.EnumNumber { @@ -252,7 +214,7 @@ func (x *CallMessage_Hangup_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use CallMessage_Hangup_Type.Descriptor instead. func (CallMessage_Hangup_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 4, 0} + return file_SignalService_proto_rawDescGZIP(), []int{2, 4, 0} } type CallMessage_Opaque_Urgency int32 @@ -285,11 +247,11 @@ func (x CallMessage_Opaque_Urgency) String() string { } func (CallMessage_Opaque_Urgency) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[3].Descriptor() + return file_SignalService_proto_enumTypes[3].Descriptor() } func (CallMessage_Opaque_Urgency) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[3] + return &file_SignalService_proto_enumTypes[3] } func (x CallMessage_Opaque_Urgency) Number() protoreflect.EnumNumber { @@ -308,12 +270,13 @@ func (x *CallMessage_Opaque_Urgency) UnmarshalJSON(b []byte) error { // Deprecated: Use CallMessage_Opaque_Urgency.Descriptor instead. func (CallMessage_Opaque_Urgency) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 5, 0} + return file_SignalService_proto_rawDescGZIP(), []int{2, 5, 0} } type DataMessage_Flags int32 const ( + DataMessage_END_SESSION DataMessage_Flags = 1 DataMessage_EXPIRATION_TIMER_UPDATE DataMessage_Flags = 2 DataMessage_PROFILE_KEY_UPDATE DataMessage_Flags = 4 DataMessage_FORWARD DataMessage_Flags = 8 @@ -322,11 +285,13 @@ const ( // Enum value maps for DataMessage_Flags. var ( DataMessage_Flags_name = map[int32]string{ + 1: "END_SESSION", 2: "EXPIRATION_TIMER_UPDATE", 4: "PROFILE_KEY_UPDATE", 8: "FORWARD", } DataMessage_Flags_value = map[string]int32{ + "END_SESSION": 1, "EXPIRATION_TIMER_UPDATE": 2, "PROFILE_KEY_UPDATE": 4, "FORWARD": 8, @@ -344,11 +309,11 @@ func (x DataMessage_Flags) String() string { } func (DataMessage_Flags) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[4].Descriptor() + return file_SignalService_proto_enumTypes[4].Descriptor() } func (DataMessage_Flags) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[4] + return &file_SignalService_proto_enumTypes[4] } func (x DataMessage_Flags) Number() protoreflect.EnumNumber { @@ -367,7 +332,7 @@ func (x *DataMessage_Flags) UnmarshalJSON(b []byte) error { // Deprecated: Use DataMessage_Flags.Descriptor instead. func (DataMessage_Flags) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 0} + return file_SignalService_proto_rawDescGZIP(), []int{3, 0} } type DataMessage_ProtocolVersion int32 @@ -424,11 +389,11 @@ func (x DataMessage_ProtocolVersion) String() string { } func (DataMessage_ProtocolVersion) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[5].Descriptor() + return file_SignalService_proto_enumTypes[5].Descriptor() } func (DataMessage_ProtocolVersion) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[5] + return &file_SignalService_proto_enumTypes[5] } func (x DataMessage_ProtocolVersion) Number() protoreflect.EnumNumber { @@ -447,7 +412,7 @@ func (x *DataMessage_ProtocolVersion) UnmarshalJSON(b []byte) error { // Deprecated: Use DataMessage_ProtocolVersion.Descriptor instead. func (DataMessage_ProtocolVersion) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 1} + return file_SignalService_proto_rawDescGZIP(), []int{3, 1} } type DataMessage_Payment_Activation_Type int32 @@ -480,11 +445,11 @@ func (x DataMessage_Payment_Activation_Type) String() string { } func (DataMessage_Payment_Activation_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[6].Descriptor() + return file_SignalService_proto_enumTypes[6].Descriptor() } func (DataMessage_Payment_Activation_Type) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[6] + return &file_SignalService_proto_enumTypes[6] } func (x DataMessage_Payment_Activation_Type) Number() protoreflect.EnumNumber { @@ -503,7 +468,7 @@ func (x *DataMessage_Payment_Activation_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use DataMessage_Payment_Activation_Type.Descriptor instead. func (DataMessage_Payment_Activation_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 0, 2, 0} + return file_SignalService_proto_rawDescGZIP(), []int{3, 0, 2, 0} } type DataMessage_Quote_Type int32 @@ -539,11 +504,11 @@ func (x DataMessage_Quote_Type) String() string { } func (DataMessage_Quote_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[7].Descriptor() + return file_SignalService_proto_enumTypes[7].Descriptor() } func (DataMessage_Quote_Type) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[7] + return &file_SignalService_proto_enumTypes[7] } func (x DataMessage_Quote_Type) Number() protoreflect.EnumNumber { @@ -562,7 +527,7 @@ func (x *DataMessage_Quote_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use DataMessage_Quote_Type.Descriptor instead. func (DataMessage_Quote_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 1, 0} + return file_SignalService_proto_rawDescGZIP(), []int{3, 1, 0} } type DataMessage_Contact_Phone_Type int32 @@ -601,11 +566,11 @@ func (x DataMessage_Contact_Phone_Type) String() string { } func (DataMessage_Contact_Phone_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[8].Descriptor() + return file_SignalService_proto_enumTypes[8].Descriptor() } func (DataMessage_Contact_Phone_Type) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[8] + return &file_SignalService_proto_enumTypes[8] } func (x DataMessage_Contact_Phone_Type) Number() protoreflect.EnumNumber { @@ -624,7 +589,7 @@ func (x *DataMessage_Contact_Phone_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use DataMessage_Contact_Phone_Type.Descriptor instead. func (DataMessage_Contact_Phone_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 1, 0} + return file_SignalService_proto_rawDescGZIP(), []int{3, 2, 1, 0} } type DataMessage_Contact_Email_Type int32 @@ -663,11 +628,11 @@ func (x DataMessage_Contact_Email_Type) String() string { } func (DataMessage_Contact_Email_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[9].Descriptor() + return file_SignalService_proto_enumTypes[9].Descriptor() } func (DataMessage_Contact_Email_Type) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[9] + return &file_SignalService_proto_enumTypes[9] } func (x DataMessage_Contact_Email_Type) Number() protoreflect.EnumNumber { @@ -686,7 +651,7 @@ func (x *DataMessage_Contact_Email_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use DataMessage_Contact_Email_Type.Descriptor instead. func (DataMessage_Contact_Email_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 2, 0} + return file_SignalService_proto_rawDescGZIP(), []int{3, 2, 2, 0} } type DataMessage_Contact_PostalAddress_Type int32 @@ -722,11 +687,11 @@ func (x DataMessage_Contact_PostalAddress_Type) String() string { } func (DataMessage_Contact_PostalAddress_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[10].Descriptor() + return file_SignalService_proto_enumTypes[10].Descriptor() } func (DataMessage_Contact_PostalAddress_Type) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[10] + return &file_SignalService_proto_enumTypes[10] } func (x DataMessage_Contact_PostalAddress_Type) Number() protoreflect.EnumNumber { @@ -745,7 +710,7 @@ func (x *DataMessage_Contact_PostalAddress_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use DataMessage_Contact_PostalAddress_Type.Descriptor instead. func (DataMessage_Contact_PostalAddress_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 3, 0} + return file_SignalService_proto_rawDescGZIP(), []int{3, 2, 3, 0} } type ReceiptMessage_Type int32 @@ -781,11 +746,11 @@ func (x ReceiptMessage_Type) String() string { } func (ReceiptMessage_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[11].Descriptor() + return file_SignalService_proto_enumTypes[11].Descriptor() } func (ReceiptMessage_Type) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[11] + return &file_SignalService_proto_enumTypes[11] } func (x ReceiptMessage_Type) Number() protoreflect.EnumNumber { @@ -804,7 +769,7 @@ func (x *ReceiptMessage_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use ReceiptMessage_Type.Descriptor instead. func (ReceiptMessage_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{5, 0} + return file_SignalService_proto_rawDescGZIP(), []int{5, 0} } type TypingMessage_Action int32 @@ -837,11 +802,11 @@ func (x TypingMessage_Action) String() string { } func (TypingMessage_Action) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[12].Descriptor() + return file_SignalService_proto_enumTypes[12].Descriptor() } func (TypingMessage_Action) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[12] + return &file_SignalService_proto_enumTypes[12] } func (x TypingMessage_Action) Number() protoreflect.EnumNumber { @@ -860,7 +825,7 @@ func (x *TypingMessage_Action) UnmarshalJSON(b []byte) error { // Deprecated: Use TypingMessage_Action.Descriptor instead. func (TypingMessage_Action) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{6, 0} + return file_SignalService_proto_rawDescGZIP(), []int{6, 0} } type TextAttachment_Style int32 @@ -905,11 +870,11 @@ func (x TextAttachment_Style) String() string { } func (TextAttachment_Style) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[13].Descriptor() + return file_SignalService_proto_enumTypes[13].Descriptor() } func (TextAttachment_Style) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[13] + return &file_SignalService_proto_enumTypes[13] } func (x TextAttachment_Style) Number() protoreflect.EnumNumber { @@ -928,7 +893,7 @@ func (x *TextAttachment_Style) UnmarshalJSON(b []byte) error { // Deprecated: Use TextAttachment_Style.Descriptor instead. func (TextAttachment_Style) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{9, 0} + return file_SignalService_proto_rawDescGZIP(), []int{9, 0} } type Verified_State int32 @@ -964,11 +929,11 @@ func (x Verified_State) String() string { } func (Verified_State) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[14].Descriptor() + return file_SignalService_proto_enumTypes[14].Descriptor() } func (Verified_State) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[14] + return &file_SignalService_proto_enumTypes[14] } func (x Verified_State) Number() protoreflect.EnumNumber { @@ -987,7 +952,7 @@ func (x *Verified_State) UnmarshalJSON(b []byte) error { // Deprecated: Use Verified_State.Descriptor instead. func (Verified_State) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{10, 0} + return file_SignalService_proto_rawDescGZIP(), []int{10, 0} } type SyncMessage_Request_Type int32 @@ -1029,11 +994,11 @@ func (x SyncMessage_Request_Type) String() string { } func (SyncMessage_Request_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[15].Descriptor() + return file_SignalService_proto_enumTypes[15].Descriptor() } func (SyncMessage_Request_Type) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[15] + return &file_SignalService_proto_enumTypes[15] } func (x SyncMessage_Request_Type) Number() protoreflect.EnumNumber { @@ -1052,7 +1017,7 @@ func (x *SyncMessage_Request_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncMessage_Request_Type.Descriptor instead. func (SyncMessage_Request_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 3, 0} + return file_SignalService_proto_rawDescGZIP(), []int{11, 3, 0} } type SyncMessage_StickerPackOperation_Type int32 @@ -1085,11 +1050,11 @@ func (x SyncMessage_StickerPackOperation_Type) String() string { } func (SyncMessage_StickerPackOperation_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[16].Descriptor() + return file_SignalService_proto_enumTypes[16].Descriptor() } func (SyncMessage_StickerPackOperation_Type) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[16] + return &file_SignalService_proto_enumTypes[16] } func (x SyncMessage_StickerPackOperation_Type) Number() protoreflect.EnumNumber { @@ -1108,7 +1073,7 @@ func (x *SyncMessage_StickerPackOperation_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncMessage_StickerPackOperation_Type.Descriptor instead. func (SyncMessage_StickerPackOperation_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 7, 0} + return file_SignalService_proto_rawDescGZIP(), []int{11, 7, 0} } type SyncMessage_FetchLatest_Type int32 @@ -1147,11 +1112,11 @@ func (x SyncMessage_FetchLatest_Type) String() string { } func (SyncMessage_FetchLatest_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[17].Descriptor() + return file_SignalService_proto_enumTypes[17].Descriptor() } func (SyncMessage_FetchLatest_Type) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[17] + return &file_SignalService_proto_enumTypes[17] } func (x SyncMessage_FetchLatest_Type) Number() protoreflect.EnumNumber { @@ -1170,7 +1135,7 @@ func (x *SyncMessage_FetchLatest_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncMessage_FetchLatest_Type.Descriptor instead. func (SyncMessage_FetchLatest_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 9, 0} + return file_SignalService_proto_rawDescGZIP(), []int{11, 9, 0} } type SyncMessage_MessageRequestResponse_Type int32 @@ -1218,11 +1183,11 @@ func (x SyncMessage_MessageRequestResponse_Type) String() string { } func (SyncMessage_MessageRequestResponse_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[18].Descriptor() + return file_SignalService_proto_enumTypes[18].Descriptor() } func (SyncMessage_MessageRequestResponse_Type) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[18] + return &file_SignalService_proto_enumTypes[18] } func (x SyncMessage_MessageRequestResponse_Type) Number() protoreflect.EnumNumber { @@ -1241,7 +1206,7 @@ func (x *SyncMessage_MessageRequestResponse_Type) UnmarshalJSON(b []byte) error // Deprecated: Use SyncMessage_MessageRequestResponse_Type.Descriptor instead. func (SyncMessage_MessageRequestResponse_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 12, 0} + return file_SignalService_proto_rawDescGZIP(), []int{11, 12, 0} } type SyncMessage_CallEvent_Type int32 @@ -1283,11 +1248,11 @@ func (x SyncMessage_CallEvent_Type) String() string { } func (SyncMessage_CallEvent_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[19].Descriptor() + return file_SignalService_proto_enumTypes[19].Descriptor() } func (SyncMessage_CallEvent_Type) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[19] + return &file_SignalService_proto_enumTypes[19] } func (x SyncMessage_CallEvent_Type) Number() protoreflect.EnumNumber { @@ -1306,7 +1271,7 @@ func (x *SyncMessage_CallEvent_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncMessage_CallEvent_Type.Descriptor instead. func (SyncMessage_CallEvent_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 15, 0} + return file_SignalService_proto_rawDescGZIP(), []int{11, 15, 0} } type SyncMessage_CallEvent_Direction int32 @@ -1342,11 +1307,11 @@ func (x SyncMessage_CallEvent_Direction) String() string { } func (SyncMessage_CallEvent_Direction) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[20].Descriptor() + return file_SignalService_proto_enumTypes[20].Descriptor() } func (SyncMessage_CallEvent_Direction) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[20] + return &file_SignalService_proto_enumTypes[20] } func (x SyncMessage_CallEvent_Direction) Number() protoreflect.EnumNumber { @@ -1365,7 +1330,7 @@ func (x *SyncMessage_CallEvent_Direction) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncMessage_CallEvent_Direction.Descriptor instead. func (SyncMessage_CallEvent_Direction) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 15, 1} + return file_SignalService_proto_rawDescGZIP(), []int{11, 15, 1} } type SyncMessage_CallEvent_Event int32 @@ -1407,11 +1372,11 @@ func (x SyncMessage_CallEvent_Event) String() string { } func (SyncMessage_CallEvent_Event) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[21].Descriptor() + return file_SignalService_proto_enumTypes[21].Descriptor() } func (SyncMessage_CallEvent_Event) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[21] + return &file_SignalService_proto_enumTypes[21] } func (x SyncMessage_CallEvent_Event) Number() protoreflect.EnumNumber { @@ -1430,7 +1395,7 @@ func (x *SyncMessage_CallEvent_Event) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncMessage_CallEvent_Event.Descriptor instead. func (SyncMessage_CallEvent_Event) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 15, 2} + return file_SignalService_proto_rawDescGZIP(), []int{11, 15, 2} } type SyncMessage_CallLinkUpdate_Type int32 @@ -1460,11 +1425,11 @@ func (x SyncMessage_CallLinkUpdate_Type) String() string { } func (SyncMessage_CallLinkUpdate_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[22].Descriptor() + return file_SignalService_proto_enumTypes[22].Descriptor() } func (SyncMessage_CallLinkUpdate_Type) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[22] + return &file_SignalService_proto_enumTypes[22] } func (x SyncMessage_CallLinkUpdate_Type) Number() protoreflect.EnumNumber { @@ -1483,7 +1448,7 @@ func (x *SyncMessage_CallLinkUpdate_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncMessage_CallLinkUpdate_Type.Descriptor instead. func (SyncMessage_CallLinkUpdate_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 16, 0} + return file_SignalService_proto_rawDescGZIP(), []int{11, 16, 0} } type SyncMessage_CallLogEvent_Type int32 @@ -1522,11 +1487,11 @@ func (x SyncMessage_CallLogEvent_Type) String() string { } func (SyncMessage_CallLogEvent_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[23].Descriptor() + return file_SignalService_proto_enumTypes[23].Descriptor() } func (SyncMessage_CallLogEvent_Type) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[23] + return &file_SignalService_proto_enumTypes[23] } func (x SyncMessage_CallLogEvent_Type) Number() protoreflect.EnumNumber { @@ -1545,7 +1510,7 @@ func (x *SyncMessage_CallLogEvent_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use SyncMessage_CallLogEvent_Type.Descriptor instead. func (SyncMessage_CallLogEvent_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 17, 0} + return file_SignalService_proto_rawDescGZIP(), []int{11, 17, 0} } type SyncMessage_AttachmentBackfillResponse_Error int32 @@ -1575,11 +1540,11 @@ func (x SyncMessage_AttachmentBackfillResponse_Error) String() string { } func (SyncMessage_AttachmentBackfillResponse_Error) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[24].Descriptor() + return file_SignalService_proto_enumTypes[24].Descriptor() } func (SyncMessage_AttachmentBackfillResponse_Error) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[24] + return &file_SignalService_proto_enumTypes[24] } func (x SyncMessage_AttachmentBackfillResponse_Error) Number() protoreflect.EnumNumber { @@ -1598,7 +1563,7 @@ func (x *SyncMessage_AttachmentBackfillResponse_Error) UnmarshalJSON(b []byte) e // Deprecated: Use SyncMessage_AttachmentBackfillResponse_Error.Descriptor instead. func (SyncMessage_AttachmentBackfillResponse_Error) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 21, 0} + return file_SignalService_proto_rawDescGZIP(), []int{11, 21, 0} } type SyncMessage_AttachmentBackfillResponse_AttachmentData_Status int32 @@ -1631,11 +1596,11 @@ func (x SyncMessage_AttachmentBackfillResponse_AttachmentData_Status) String() s } func (SyncMessage_AttachmentBackfillResponse_AttachmentData_Status) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[25].Descriptor() + return file_SignalService_proto_enumTypes[25].Descriptor() } func (SyncMessage_AttachmentBackfillResponse_AttachmentData_Status) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[25] + return &file_SignalService_proto_enumTypes[25] } func (x SyncMessage_AttachmentBackfillResponse_AttachmentData_Status) Number() protoreflect.EnumNumber { @@ -1654,7 +1619,7 @@ func (x *SyncMessage_AttachmentBackfillResponse_AttachmentData_Status) Unmarshal // Deprecated: Use SyncMessage_AttachmentBackfillResponse_AttachmentData_Status.Descriptor instead. func (SyncMessage_AttachmentBackfillResponse_AttachmentData_Status) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 21, 0, 0} + return file_SignalService_proto_rawDescGZIP(), []int{11, 21, 0, 0} } type AttachmentPointer_Flags int32 @@ -1690,11 +1655,11 @@ func (x AttachmentPointer_Flags) String() string { } func (AttachmentPointer_Flags) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[26].Descriptor() + return file_SignalService_proto_enumTypes[26].Descriptor() } func (AttachmentPointer_Flags) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[26] + return &file_SignalService_proto_enumTypes[26] } func (x AttachmentPointer_Flags) Number() protoreflect.EnumNumber { @@ -1713,7 +1678,7 @@ func (x *AttachmentPointer_Flags) UnmarshalJSON(b []byte) error { // Deprecated: Use AttachmentPointer_Flags.Descriptor instead. func (AttachmentPointer_Flags) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{12, 0} + return file_SignalService_proto_rawDescGZIP(), []int{12, 0} } type BodyRange_Style int32 @@ -1758,11 +1723,11 @@ func (x BodyRange_Style) String() string { } func (BodyRange_Style) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_SignalService_proto_enumTypes[27].Descriptor() + return file_SignalService_proto_enumTypes[27].Descriptor() } func (BodyRange_Style) Type() protoreflect.EnumType { - return &file_signalpb_SignalService_proto_enumTypes[27] + return &file_SignalService_proto_enumTypes[27] } func (x BodyRange_Style) Number() protoreflect.EnumNumber { @@ -1781,16 +1746,16 @@ func (x *BodyRange_Style) UnmarshalJSON(b []byte) error { // Deprecated: Use BodyRange_Style.Descriptor instead. func (BodyRange_Style) EnumDescriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{19, 0} + return file_SignalService_proto_rawDescGZIP(), []int{19, 0} } type Envelope struct { state protoimpl.MessageState `protogen:"open.v1"` Type *Envelope_Type `protobuf:"varint,1,opt,name=type,enum=signalservice.Envelope_Type" json:"type,omitempty"` SourceServiceId *string `protobuf:"bytes,11,opt,name=sourceServiceId" json:"sourceServiceId,omitempty"` - SourceDeviceId *uint32 `protobuf:"varint,7,opt,name=sourceDeviceId" json:"sourceDeviceId,omitempty"` + SourceDevice *uint32 `protobuf:"varint,7,opt,name=sourceDevice" json:"sourceDevice,omitempty"` DestinationServiceId *string `protobuf:"bytes,13,opt,name=destinationServiceId" json:"destinationServiceId,omitempty"` - ClientTimestamp *uint64 `protobuf:"varint,5,opt,name=clientTimestamp" json:"clientTimestamp,omitempty"` + Timestamp *uint64 `protobuf:"varint,5,opt,name=timestamp" json:"timestamp,omitempty"` Content []byte `protobuf:"bytes,8,opt,name=content" json:"content,omitempty"` // Contains an encrypted Content ServerGuid *string `protobuf:"bytes,9,opt,name=serverGuid" json:"serverGuid,omitempty"` ServerTimestamp *uint64 `protobuf:"varint,10,opt,name=serverTimestamp" json:"serverTimestamp,omitempty"` @@ -1814,7 +1779,7 @@ const ( func (x *Envelope) Reset() { *x = Envelope{} - mi := &file_signalpb_SignalService_proto_msgTypes[0] + mi := &file_SignalService_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1826,7 +1791,7 @@ func (x *Envelope) String() string { func (*Envelope) ProtoMessage() {} func (x *Envelope) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[0] + mi := &file_SignalService_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1839,7 +1804,7 @@ func (x *Envelope) ProtoReflect() protoreflect.Message { // Deprecated: Use Envelope.ProtoReflect.Descriptor instead. func (*Envelope) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{0} + return file_SignalService_proto_rawDescGZIP(), []int{0} } func (x *Envelope) GetType() Envelope_Type { @@ -1856,9 +1821,9 @@ func (x *Envelope) GetSourceServiceId() string { return "" } -func (x *Envelope) GetSourceDeviceId() uint32 { - if x != nil && x.SourceDeviceId != nil { - return *x.SourceDeviceId +func (x *Envelope) GetSourceDevice() uint32 { + if x != nil && x.SourceDevice != nil { + return *x.SourceDevice } return 0 } @@ -1870,9 +1835,9 @@ func (x *Envelope) GetDestinationServiceId() string { return "" } -func (x *Envelope) GetClientTimestamp() uint64 { - if x != nil && x.ClientTimestamp != nil { - return *x.ClientTimestamp +func (x *Envelope) GetTimestamp() uint64 { + if x != nil && x.Timestamp != nil { + return *x.Timestamp } return 0 } @@ -1962,28 +1927,25 @@ func (x *Envelope) GetUpdatedPniBinary() []byte { } type Content struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Content: - // - // *Content_DataMessage - // *Content_SyncMessage - // *Content_CallMessage - // *Content_NullMessage - // *Content_ReceiptMessage - // *Content_TypingMessage - // *Content_DecryptionErrorMessage - // *Content_StoryMessage - // *Content_EditMessage - Content isContent_Content `protobuf_oneof:"content"` - SenderKeyDistributionMessage []byte `protobuf:"bytes,7,opt,name=senderKeyDistributionMessage" json:"senderKeyDistributionMessage,omitempty"` - PniSignatureMessage *PniSignatureMessage `protobuf:"bytes,10,opt,name=pniSignatureMessage" json:"pniSignatureMessage,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + DataMessage *DataMessage `protobuf:"bytes,1,opt,name=dataMessage" json:"dataMessage,omitempty"` + SyncMessage *SyncMessage `protobuf:"bytes,2,opt,name=syncMessage" json:"syncMessage,omitempty"` + CallMessage *CallMessage `protobuf:"bytes,3,opt,name=callMessage" json:"callMessage,omitempty"` + NullMessage *NullMessage `protobuf:"bytes,4,opt,name=nullMessage" json:"nullMessage,omitempty"` + ReceiptMessage *ReceiptMessage `protobuf:"bytes,5,opt,name=receiptMessage" json:"receiptMessage,omitempty"` + TypingMessage *TypingMessage `protobuf:"bytes,6,opt,name=typingMessage" json:"typingMessage,omitempty"` + SenderKeyDistributionMessage []byte `protobuf:"bytes,7,opt,name=senderKeyDistributionMessage" json:"senderKeyDistributionMessage,omitempty"` + DecryptionErrorMessage []byte `protobuf:"bytes,8,opt,name=decryptionErrorMessage" json:"decryptionErrorMessage,omitempty"` + StoryMessage *StoryMessage `protobuf:"bytes,9,opt,name=storyMessage" json:"storyMessage,omitempty"` + PniSignatureMessage *PniSignatureMessage `protobuf:"bytes,10,opt,name=pniSignatureMessage" json:"pniSignatureMessage,omitempty"` + EditMessage *EditMessage `protobuf:"bytes,11,opt,name=editMessage" json:"editMessage,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Content) Reset() { *x = Content{} - mi := &file_signalpb_SignalService_proto_msgTypes[1] + mi := &file_SignalService_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1995,7 +1957,7 @@ func (x *Content) String() string { func (*Content) ProtoMessage() {} func (x *Content) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[1] + mi := &file_SignalService_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2008,93 +1970,47 @@ func (x *Content) ProtoReflect() protoreflect.Message { // Deprecated: Use Content.ProtoReflect.Descriptor instead. func (*Content) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{1} -} - -func (x *Content) GetContent() isContent_Content { - if x != nil { - return x.Content - } - return nil + return file_SignalService_proto_rawDescGZIP(), []int{1} } func (x *Content) GetDataMessage() *DataMessage { if x != nil { - if x, ok := x.Content.(*Content_DataMessage); ok { - return x.DataMessage - } + return x.DataMessage } return nil } func (x *Content) GetSyncMessage() *SyncMessage { if x != nil { - if x, ok := x.Content.(*Content_SyncMessage); ok { - return x.SyncMessage - } + return x.SyncMessage } return nil } func (x *Content) GetCallMessage() *CallMessage { if x != nil { - if x, ok := x.Content.(*Content_CallMessage); ok { - return x.CallMessage - } + return x.CallMessage } return nil } func (x *Content) GetNullMessage() *NullMessage { if x != nil { - if x, ok := x.Content.(*Content_NullMessage); ok { - return x.NullMessage - } + return x.NullMessage } return nil } func (x *Content) GetReceiptMessage() *ReceiptMessage { if x != nil { - if x, ok := x.Content.(*Content_ReceiptMessage); ok { - return x.ReceiptMessage - } + return x.ReceiptMessage } return nil } func (x *Content) GetTypingMessage() *TypingMessage { if x != nil { - if x, ok := x.Content.(*Content_TypingMessage); ok { - return x.TypingMessage - } - } - return nil -} - -func (x *Content) GetDecryptionErrorMessage() []byte { - if x != nil { - if x, ok := x.Content.(*Content_DecryptionErrorMessage); ok { - return x.DecryptionErrorMessage - } - } - return nil -} - -func (x *Content) GetStoryMessage() *StoryMessage { - if x != nil { - if x, ok := x.Content.(*Content_StoryMessage); ok { - return x.StoryMessage - } - } - return nil -} - -func (x *Content) GetEditMessage() *EditMessage { - if x != nil { - if x, ok := x.Content.(*Content_EditMessage); ok { - return x.EditMessage - } + return x.TypingMessage } return nil } @@ -2106,6 +2022,20 @@ func (x *Content) GetSenderKeyDistributionMessage() []byte { return nil } +func (x *Content) GetDecryptionErrorMessage() []byte { + if x != nil { + return x.DecryptionErrorMessage + } + return nil +} + +func (x *Content) GetStoryMessage() *StoryMessage { + if x != nil { + return x.StoryMessage + } + return nil +} + func (x *Content) GetPniSignatureMessage() *PniSignatureMessage { if x != nil { return x.PniSignatureMessage @@ -2113,64 +2043,13 @@ func (x *Content) GetPniSignatureMessage() *PniSignatureMessage { return nil } -type isContent_Content interface { - isContent_Content() +func (x *Content) GetEditMessage() *EditMessage { + if x != nil { + return x.EditMessage + } + return nil } -type Content_DataMessage struct { - DataMessage *DataMessage `protobuf:"bytes,1,opt,name=dataMessage,oneof"` -} - -type Content_SyncMessage struct { - SyncMessage *SyncMessage `protobuf:"bytes,2,opt,name=syncMessage,oneof"` -} - -type Content_CallMessage struct { - CallMessage *CallMessage `protobuf:"bytes,3,opt,name=callMessage,oneof"` -} - -type Content_NullMessage struct { - NullMessage *NullMessage `protobuf:"bytes,4,opt,name=nullMessage,oneof"` -} - -type Content_ReceiptMessage struct { - ReceiptMessage *ReceiptMessage `protobuf:"bytes,5,opt,name=receiptMessage,oneof"` -} - -type Content_TypingMessage struct { - TypingMessage *TypingMessage `protobuf:"bytes,6,opt,name=typingMessage,oneof"` -} - -type Content_DecryptionErrorMessage struct { - DecryptionErrorMessage []byte `protobuf:"bytes,8,opt,name=decryptionErrorMessage,oneof"` -} - -type Content_StoryMessage struct { - StoryMessage *StoryMessage `protobuf:"bytes,9,opt,name=storyMessage,oneof"` -} - -type Content_EditMessage struct { - EditMessage *EditMessage `protobuf:"bytes,11,opt,name=editMessage,oneof"` -} - -func (*Content_DataMessage) isContent_Content() {} - -func (*Content_SyncMessage) isContent_Content() {} - -func (*Content_CallMessage) isContent_Content() {} - -func (*Content_NullMessage) isContent_Content() {} - -func (*Content_ReceiptMessage) isContent_Content() {} - -func (*Content_TypingMessage) isContent_Content() {} - -func (*Content_DecryptionErrorMessage) isContent_Content() {} - -func (*Content_StoryMessage) isContent_Content() {} - -func (*Content_EditMessage) isContent_Content() {} - type CallMessage struct { state protoimpl.MessageState `protogen:"open.v1"` Offer *CallMessage_Offer `protobuf:"bytes,1,opt,name=offer" json:"offer,omitempty"` @@ -2186,7 +2065,7 @@ type CallMessage struct { func (x *CallMessage) Reset() { *x = CallMessage{} - mi := &file_signalpb_SignalService_proto_msgTypes[2] + mi := &file_SignalService_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2198,7 +2077,7 @@ func (x *CallMessage) String() string { func (*CallMessage) ProtoMessage() {} func (x *CallMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[2] + mi := &file_SignalService_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2211,7 +2090,7 @@ func (x *CallMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use CallMessage.ProtoReflect.Descriptor instead. func (*CallMessage) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2} + return file_SignalService_proto_rawDescGZIP(), []int{2} } func (x *CallMessage) GetOffer() *CallMessage_Offer { @@ -2290,15 +2169,14 @@ type DataMessage struct { PollTerminate *DataMessage_PollTerminate `protobuf:"bytes,25,opt,name=pollTerminate" json:"pollTerminate,omitempty"` PollVote *DataMessage_PollVote `protobuf:"bytes,26,opt,name=pollVote" json:"pollVote,omitempty"` PinMessage *DataMessage_PinMessage `protobuf:"bytes,27,opt,name=pinMessage" json:"pinMessage,omitempty"` - UnpinMessage *DataMessage_UnpinMessage `protobuf:"bytes,28,opt,name=unpinMessage" json:"unpinMessage,omitempty"` - AdminDelete *DataMessage_AdminDelete `protobuf:"bytes,29,opt,name=adminDelete" json:"adminDelete,omitempty"` // NEXT ID: 30 + UnpinMessage *DataMessage_UnpinMessage `protobuf:"bytes,28,opt,name=unpinMessage" json:"unpinMessage,omitempty"` // NEXT ID: 29 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *DataMessage) Reset() { *x = DataMessage{} - mi := &file_signalpb_SignalService_proto_msgTypes[3] + mi := &file_SignalService_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2310,7 +2188,7 @@ func (x *DataMessage) String() string { func (*DataMessage) ProtoMessage() {} func (x *DataMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[3] + mi := &file_SignalService_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2323,7 +2201,7 @@ func (x *DataMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage.ProtoReflect.Descriptor instead. func (*DataMessage) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3} + return file_SignalService_proto_rawDescGZIP(), []int{3} } func (x *DataMessage) GetBody() string { @@ -2508,13 +2386,6 @@ func (x *DataMessage) GetUnpinMessage() *DataMessage_UnpinMessage { return nil } -func (x *DataMessage) GetAdminDelete() *DataMessage_AdminDelete { - if x != nil { - return x.AdminDelete - } - return nil -} - type NullMessage struct { state protoimpl.MessageState `protogen:"open.v1"` Padding []byte `protobuf:"bytes,1,opt,name=padding" json:"padding,omitempty"` @@ -2524,7 +2395,7 @@ type NullMessage struct { func (x *NullMessage) Reset() { *x = NullMessage{} - mi := &file_signalpb_SignalService_proto_msgTypes[4] + mi := &file_SignalService_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2536,7 +2407,7 @@ func (x *NullMessage) String() string { func (*NullMessage) ProtoMessage() {} func (x *NullMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[4] + mi := &file_SignalService_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2549,7 +2420,7 @@ func (x *NullMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use NullMessage.ProtoReflect.Descriptor instead. func (*NullMessage) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{4} + return file_SignalService_proto_rawDescGZIP(), []int{4} } func (x *NullMessage) GetPadding() []byte { @@ -2569,7 +2440,7 @@ type ReceiptMessage struct { func (x *ReceiptMessage) Reset() { *x = ReceiptMessage{} - mi := &file_signalpb_SignalService_proto_msgTypes[5] + mi := &file_SignalService_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2581,7 +2452,7 @@ func (x *ReceiptMessage) String() string { func (*ReceiptMessage) ProtoMessage() {} func (x *ReceiptMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[5] + mi := &file_SignalService_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2594,7 +2465,7 @@ func (x *ReceiptMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ReceiptMessage.ProtoReflect.Descriptor instead. func (*ReceiptMessage) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{5} + return file_SignalService_proto_rawDescGZIP(), []int{5} } func (x *ReceiptMessage) GetType() ReceiptMessage_Type { @@ -2622,7 +2493,7 @@ type TypingMessage struct { func (x *TypingMessage) Reset() { *x = TypingMessage{} - mi := &file_signalpb_SignalService_proto_msgTypes[6] + mi := &file_SignalService_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2634,7 +2505,7 @@ func (x *TypingMessage) String() string { func (*TypingMessage) ProtoMessage() {} func (x *TypingMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[6] + mi := &file_SignalService_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2647,7 +2518,7 @@ func (x *TypingMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use TypingMessage.ProtoReflect.Descriptor instead. func (*TypingMessage) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{6} + return file_SignalService_proto_rawDescGZIP(), []int{6} } func (x *TypingMessage) GetTimestamp() uint64 { @@ -2688,7 +2559,7 @@ type StoryMessage struct { func (x *StoryMessage) Reset() { *x = StoryMessage{} - mi := &file_signalpb_SignalService_proto_msgTypes[7] + mi := &file_SignalService_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2700,7 +2571,7 @@ func (x *StoryMessage) String() string { func (*StoryMessage) ProtoMessage() {} func (x *StoryMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[7] + mi := &file_SignalService_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2713,7 +2584,7 @@ func (x *StoryMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use StoryMessage.ProtoReflect.Descriptor instead. func (*StoryMessage) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{7} + return file_SignalService_proto_rawDescGZIP(), []int{7} } func (x *StoryMessage) GetProfileKey() []byte { @@ -2798,7 +2669,7 @@ type Preview struct { func (x *Preview) Reset() { *x = Preview{} - mi := &file_signalpb_SignalService_proto_msgTypes[8] + mi := &file_SignalService_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2810,7 +2681,7 @@ func (x *Preview) String() string { func (*Preview) ProtoMessage() {} func (x *Preview) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[8] + mi := &file_SignalService_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2823,7 +2694,7 @@ func (x *Preview) ProtoReflect() protoreflect.Message { // Deprecated: Use Preview.ProtoReflect.Descriptor instead. func (*Preview) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{8} + return file_SignalService_proto_rawDescGZIP(), []int{8} } func (x *Preview) GetUrl() string { @@ -2879,7 +2750,7 @@ type TextAttachment struct { func (x *TextAttachment) Reset() { *x = TextAttachment{} - mi := &file_signalpb_SignalService_proto_msgTypes[9] + mi := &file_SignalService_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2891,7 +2762,7 @@ func (x *TextAttachment) String() string { func (*TextAttachment) ProtoMessage() {} func (x *TextAttachment) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[9] + mi := &file_SignalService_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2904,7 +2775,7 @@ func (x *TextAttachment) ProtoReflect() protoreflect.Message { // Deprecated: Use TextAttachment.ProtoReflect.Descriptor instead. func (*TextAttachment) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{9} + return file_SignalService_proto_rawDescGZIP(), []int{9} } func (x *TextAttachment) GetText() string { @@ -2996,7 +2867,7 @@ type Verified struct { func (x *Verified) Reset() { *x = Verified{} - mi := &file_signalpb_SignalService_proto_msgTypes[10] + mi := &file_SignalService_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3008,7 +2879,7 @@ func (x *Verified) String() string { func (*Verified) ProtoMessage() {} func (x *Verified) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[10] + mi := &file_SignalService_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3021,7 +2892,7 @@ func (x *Verified) ProtoReflect() protoreflect.Message { // Deprecated: Use Verified.ProtoReflect.Descriptor instead. func (*Verified) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{10} + return file_SignalService_proto_rawDescGZIP(), []int{10} } func (x *Verified) GetDestinationAci() string { @@ -3060,44 +2931,37 @@ func (x *Verified) GetDestinationAciBinary() []byte { } type SyncMessage struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Content: - // - // *SyncMessage_Sent_ - // *SyncMessage_Contacts_ - // *SyncMessage_Request_ - // *SyncMessage_Blocked_ - // *SyncMessage_Verified - // *SyncMessage_Configuration_ - // *SyncMessage_ViewOnceOpen_ - // *SyncMessage_FetchLatest_ - // *SyncMessage_Keys_ - // *SyncMessage_MessageRequestResponse_ - // *SyncMessage_OutgoingPayment_ - // *SyncMessage_PniChangeNumber_ - // *SyncMessage_CallEvent_ - // *SyncMessage_CallLinkUpdate_ - // *SyncMessage_CallLogEvent_ - // *SyncMessage_DeleteForMe_ - // *SyncMessage_DeviceNameChange_ - // *SyncMessage_AttachmentBackfillRequest_ - // *SyncMessage_AttachmentBackfillResponse_ - // *SyncMessage_UsernameChange_ - Content isSyncMessage_Content `protobuf_oneof:"content"` - // Protobufs don't allow `repeated` fields to be inside of `oneof` so while - // the fields below are mutually exclusive with the rest of the values above - // we have to place them outside of `oneof`. - Read []*SyncMessage_Read `protobuf:"bytes,5,rep,name=read" json:"read,omitempty"` - StickerPackOperation []*SyncMessage_StickerPackOperation `protobuf:"bytes,10,rep,name=stickerPackOperation" json:"stickerPackOperation,omitempty"` - Viewed []*SyncMessage_Viewed `protobuf:"bytes,16,rep,name=viewed" json:"viewed,omitempty"` - Padding []byte `protobuf:"bytes,8,opt,name=padding" json:"padding,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Sent *SyncMessage_Sent `protobuf:"bytes,1,opt,name=sent" json:"sent,omitempty"` + Contacts *SyncMessage_Contacts `protobuf:"bytes,2,opt,name=contacts" json:"contacts,omitempty"` + Request *SyncMessage_Request `protobuf:"bytes,4,opt,name=request" json:"request,omitempty"` + Read []*SyncMessage_Read `protobuf:"bytes,5,rep,name=read" json:"read,omitempty"` + Blocked *SyncMessage_Blocked `protobuf:"bytes,6,opt,name=blocked" json:"blocked,omitempty"` + Verified *Verified `protobuf:"bytes,7,opt,name=verified" json:"verified,omitempty"` + Configuration *SyncMessage_Configuration `protobuf:"bytes,9,opt,name=configuration" json:"configuration,omitempty"` + Padding []byte `protobuf:"bytes,8,opt,name=padding" json:"padding,omitempty"` + StickerPackOperation []*SyncMessage_StickerPackOperation `protobuf:"bytes,10,rep,name=stickerPackOperation" json:"stickerPackOperation,omitempty"` + ViewOnceOpen *SyncMessage_ViewOnceOpen `protobuf:"bytes,11,opt,name=viewOnceOpen" json:"viewOnceOpen,omitempty"` + FetchLatest *SyncMessage_FetchLatest `protobuf:"bytes,12,opt,name=fetchLatest" json:"fetchLatest,omitempty"` + Keys *SyncMessage_Keys `protobuf:"bytes,13,opt,name=keys" json:"keys,omitempty"` + MessageRequestResponse *SyncMessage_MessageRequestResponse `protobuf:"bytes,14,opt,name=messageRequestResponse" json:"messageRequestResponse,omitempty"` + OutgoingPayment *SyncMessage_OutgoingPayment `protobuf:"bytes,15,opt,name=outgoingPayment" json:"outgoingPayment,omitempty"` + Viewed []*SyncMessage_Viewed `protobuf:"bytes,16,rep,name=viewed" json:"viewed,omitempty"` + PniChangeNumber *SyncMessage_PniChangeNumber `protobuf:"bytes,18,opt,name=pniChangeNumber" json:"pniChangeNumber,omitempty"` + CallEvent *SyncMessage_CallEvent `protobuf:"bytes,19,opt,name=callEvent" json:"callEvent,omitempty"` + CallLinkUpdate *SyncMessage_CallLinkUpdate `protobuf:"bytes,20,opt,name=callLinkUpdate" json:"callLinkUpdate,omitempty"` + CallLogEvent *SyncMessage_CallLogEvent `protobuf:"bytes,21,opt,name=callLogEvent" json:"callLogEvent,omitempty"` + DeleteForMe *SyncMessage_DeleteForMe `protobuf:"bytes,22,opt,name=deleteForMe" json:"deleteForMe,omitempty"` + DeviceNameChange *SyncMessage_DeviceNameChange `protobuf:"bytes,23,opt,name=deviceNameChange" json:"deviceNameChange,omitempty"` + AttachmentBackfillRequest *SyncMessage_AttachmentBackfillRequest `protobuf:"bytes,24,opt,name=attachmentBackfillRequest" json:"attachmentBackfillRequest,omitempty"` + AttachmentBackfillResponse *SyncMessage_AttachmentBackfillResponse `protobuf:"bytes,25,opt,name=attachmentBackfillResponse" json:"attachmentBackfillResponse,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SyncMessage) Reset() { *x = SyncMessage{} - mi := &file_signalpb_SignalService_proto_msgTypes[11] + mi := &file_SignalService_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3109,7 +2973,7 @@ func (x *SyncMessage) String() string { func (*SyncMessage) ProtoMessage() {} func (x *SyncMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[11] + mi := &file_SignalService_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3122,192 +2986,26 @@ func (x *SyncMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage.ProtoReflect.Descriptor instead. func (*SyncMessage) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11} -} - -func (x *SyncMessage) GetContent() isSyncMessage_Content { - if x != nil { - return x.Content - } - return nil + return file_SignalService_proto_rawDescGZIP(), []int{11} } func (x *SyncMessage) GetSent() *SyncMessage_Sent { if x != nil { - if x, ok := x.Content.(*SyncMessage_Sent_); ok { - return x.Sent - } + return x.Sent } return nil } func (x *SyncMessage) GetContacts() *SyncMessage_Contacts { if x != nil { - if x, ok := x.Content.(*SyncMessage_Contacts_); ok { - return x.Contacts - } + return x.Contacts } return nil } func (x *SyncMessage) GetRequest() *SyncMessage_Request { if x != nil { - if x, ok := x.Content.(*SyncMessage_Request_); ok { - return x.Request - } - } - return nil -} - -func (x *SyncMessage) GetBlocked() *SyncMessage_Blocked { - if x != nil { - if x, ok := x.Content.(*SyncMessage_Blocked_); ok { - return x.Blocked - } - } - return nil -} - -func (x *SyncMessage) GetVerified() *Verified { - if x != nil { - if x, ok := x.Content.(*SyncMessage_Verified); ok { - return x.Verified - } - } - return nil -} - -func (x *SyncMessage) GetConfiguration() *SyncMessage_Configuration { - if x != nil { - if x, ok := x.Content.(*SyncMessage_Configuration_); ok { - return x.Configuration - } - } - return nil -} - -func (x *SyncMessage) GetViewOnceOpen() *SyncMessage_ViewOnceOpen { - if x != nil { - if x, ok := x.Content.(*SyncMessage_ViewOnceOpen_); ok { - return x.ViewOnceOpen - } - } - return nil -} - -func (x *SyncMessage) GetFetchLatest() *SyncMessage_FetchLatest { - if x != nil { - if x, ok := x.Content.(*SyncMessage_FetchLatest_); ok { - return x.FetchLatest - } - } - return nil -} - -func (x *SyncMessage) GetKeys() *SyncMessage_Keys { - if x != nil { - if x, ok := x.Content.(*SyncMessage_Keys_); ok { - return x.Keys - } - } - return nil -} - -func (x *SyncMessage) GetMessageRequestResponse() *SyncMessage_MessageRequestResponse { - if x != nil { - if x, ok := x.Content.(*SyncMessage_MessageRequestResponse_); ok { - return x.MessageRequestResponse - } - } - return nil -} - -func (x *SyncMessage) GetOutgoingPayment() *SyncMessage_OutgoingPayment { - if x != nil { - if x, ok := x.Content.(*SyncMessage_OutgoingPayment_); ok { - return x.OutgoingPayment - } - } - return nil -} - -func (x *SyncMessage) GetPniChangeNumber() *SyncMessage_PniChangeNumber { - if x != nil { - if x, ok := x.Content.(*SyncMessage_PniChangeNumber_); ok { - return x.PniChangeNumber - } - } - return nil -} - -func (x *SyncMessage) GetCallEvent() *SyncMessage_CallEvent { - if x != nil { - if x, ok := x.Content.(*SyncMessage_CallEvent_); ok { - return x.CallEvent - } - } - return nil -} - -func (x *SyncMessage) GetCallLinkUpdate() *SyncMessage_CallLinkUpdate { - if x != nil { - if x, ok := x.Content.(*SyncMessage_CallLinkUpdate_); ok { - return x.CallLinkUpdate - } - } - return nil -} - -func (x *SyncMessage) GetCallLogEvent() *SyncMessage_CallLogEvent { - if x != nil { - if x, ok := x.Content.(*SyncMessage_CallLogEvent_); ok { - return x.CallLogEvent - } - } - return nil -} - -func (x *SyncMessage) GetDeleteForMe() *SyncMessage_DeleteForMe { - if x != nil { - if x, ok := x.Content.(*SyncMessage_DeleteForMe_); ok { - return x.DeleteForMe - } - } - return nil -} - -func (x *SyncMessage) GetDeviceNameChange() *SyncMessage_DeviceNameChange { - if x != nil { - if x, ok := x.Content.(*SyncMessage_DeviceNameChange_); ok { - return x.DeviceNameChange - } - } - return nil -} - -func (x *SyncMessage) GetAttachmentBackfillRequest() *SyncMessage_AttachmentBackfillRequest { - if x != nil { - if x, ok := x.Content.(*SyncMessage_AttachmentBackfillRequest_); ok { - return x.AttachmentBackfillRequest - } - } - return nil -} - -func (x *SyncMessage) GetAttachmentBackfillResponse() *SyncMessage_AttachmentBackfillResponse { - if x != nil { - if x, ok := x.Content.(*SyncMessage_AttachmentBackfillResponse_); ok { - return x.AttachmentBackfillResponse - } - } - return nil -} - -func (x *SyncMessage) GetUsernameChange() *SyncMessage_UsernameChange { - if x != nil { - if x, ok := x.Content.(*SyncMessage_UsernameChange_); ok { - return x.UsernameChange - } + return x.Request } return nil } @@ -3319,16 +3017,23 @@ func (x *SyncMessage) GetRead() []*SyncMessage_Read { return nil } -func (x *SyncMessage) GetStickerPackOperation() []*SyncMessage_StickerPackOperation { +func (x *SyncMessage) GetBlocked() *SyncMessage_Blocked { if x != nil { - return x.StickerPackOperation + return x.Blocked } return nil } -func (x *SyncMessage) GetViewed() []*SyncMessage_Viewed { +func (x *SyncMessage) GetVerified() *Verified { if x != nil { - return x.Viewed + return x.Verified + } + return nil +} + +func (x *SyncMessage) GetConfiguration() *SyncMessage_Configuration { + if x != nil { + return x.Configuration } return nil } @@ -3340,130 +3045,111 @@ func (x *SyncMessage) GetPadding() []byte { return nil } -type isSyncMessage_Content interface { - isSyncMessage_Content() +func (x *SyncMessage) GetStickerPackOperation() []*SyncMessage_StickerPackOperation { + if x != nil { + return x.StickerPackOperation + } + return nil } -type SyncMessage_Sent_ struct { - Sent *SyncMessage_Sent `protobuf:"bytes,1,opt,name=sent,oneof"` +func (x *SyncMessage) GetViewOnceOpen() *SyncMessage_ViewOnceOpen { + if x != nil { + return x.ViewOnceOpen + } + return nil } -type SyncMessage_Contacts_ struct { - Contacts *SyncMessage_Contacts `protobuf:"bytes,2,opt,name=contacts,oneof"` +func (x *SyncMessage) GetFetchLatest() *SyncMessage_FetchLatest { + if x != nil { + return x.FetchLatest + } + return nil } -type SyncMessage_Request_ struct { - Request *SyncMessage_Request `protobuf:"bytes,4,opt,name=request,oneof"` +func (x *SyncMessage) GetKeys() *SyncMessage_Keys { + if x != nil { + return x.Keys + } + return nil } -type SyncMessage_Blocked_ struct { - Blocked *SyncMessage_Blocked `protobuf:"bytes,6,opt,name=blocked,oneof"` +func (x *SyncMessage) GetMessageRequestResponse() *SyncMessage_MessageRequestResponse { + if x != nil { + return x.MessageRequestResponse + } + return nil } -type SyncMessage_Verified struct { - Verified *Verified `protobuf:"bytes,7,opt,name=verified,oneof"` +func (x *SyncMessage) GetOutgoingPayment() *SyncMessage_OutgoingPayment { + if x != nil { + return x.OutgoingPayment + } + return nil } -type SyncMessage_Configuration_ struct { - Configuration *SyncMessage_Configuration `protobuf:"bytes,9,opt,name=configuration,oneof"` +func (x *SyncMessage) GetViewed() []*SyncMessage_Viewed { + if x != nil { + return x.Viewed + } + return nil } -type SyncMessage_ViewOnceOpen_ struct { - ViewOnceOpen *SyncMessage_ViewOnceOpen `protobuf:"bytes,11,opt,name=viewOnceOpen,oneof"` +func (x *SyncMessage) GetPniChangeNumber() *SyncMessage_PniChangeNumber { + if x != nil { + return x.PniChangeNumber + } + return nil } -type SyncMessage_FetchLatest_ struct { - FetchLatest *SyncMessage_FetchLatest `protobuf:"bytes,12,opt,name=fetchLatest,oneof"` +func (x *SyncMessage) GetCallEvent() *SyncMessage_CallEvent { + if x != nil { + return x.CallEvent + } + return nil } -type SyncMessage_Keys_ struct { - Keys *SyncMessage_Keys `protobuf:"bytes,13,opt,name=keys,oneof"` +func (x *SyncMessage) GetCallLinkUpdate() *SyncMessage_CallLinkUpdate { + if x != nil { + return x.CallLinkUpdate + } + return nil } -type SyncMessage_MessageRequestResponse_ struct { - MessageRequestResponse *SyncMessage_MessageRequestResponse `protobuf:"bytes,14,opt,name=messageRequestResponse,oneof"` +func (x *SyncMessage) GetCallLogEvent() *SyncMessage_CallLogEvent { + if x != nil { + return x.CallLogEvent + } + return nil } -type SyncMessage_OutgoingPayment_ struct { - OutgoingPayment *SyncMessage_OutgoingPayment `protobuf:"bytes,15,opt,name=outgoingPayment,oneof"` +func (x *SyncMessage) GetDeleteForMe() *SyncMessage_DeleteForMe { + if x != nil { + return x.DeleteForMe + } + return nil } -type SyncMessage_PniChangeNumber_ struct { - PniChangeNumber *SyncMessage_PniChangeNumber `protobuf:"bytes,18,opt,name=pniChangeNumber,oneof"` +func (x *SyncMessage) GetDeviceNameChange() *SyncMessage_DeviceNameChange { + if x != nil { + return x.DeviceNameChange + } + return nil } -type SyncMessage_CallEvent_ struct { - CallEvent *SyncMessage_CallEvent `protobuf:"bytes,19,opt,name=callEvent,oneof"` +func (x *SyncMessage) GetAttachmentBackfillRequest() *SyncMessage_AttachmentBackfillRequest { + if x != nil { + return x.AttachmentBackfillRequest + } + return nil } -type SyncMessage_CallLinkUpdate_ struct { - CallLinkUpdate *SyncMessage_CallLinkUpdate `protobuf:"bytes,20,opt,name=callLinkUpdate,oneof"` +func (x *SyncMessage) GetAttachmentBackfillResponse() *SyncMessage_AttachmentBackfillResponse { + if x != nil { + return x.AttachmentBackfillResponse + } + return nil } -type SyncMessage_CallLogEvent_ struct { - CallLogEvent *SyncMessage_CallLogEvent `protobuf:"bytes,21,opt,name=callLogEvent,oneof"` -} - -type SyncMessage_DeleteForMe_ struct { - DeleteForMe *SyncMessage_DeleteForMe `protobuf:"bytes,22,opt,name=deleteForMe,oneof"` -} - -type SyncMessage_DeviceNameChange_ struct { - DeviceNameChange *SyncMessage_DeviceNameChange `protobuf:"bytes,23,opt,name=deviceNameChange,oneof"` -} - -type SyncMessage_AttachmentBackfillRequest_ struct { - AttachmentBackfillRequest *SyncMessage_AttachmentBackfillRequest `protobuf:"bytes,24,opt,name=attachmentBackfillRequest,oneof"` -} - -type SyncMessage_AttachmentBackfillResponse_ struct { - AttachmentBackfillResponse *SyncMessage_AttachmentBackfillResponse `protobuf:"bytes,25,opt,name=attachmentBackfillResponse,oneof"` -} - -type SyncMessage_UsernameChange_ struct { - UsernameChange *SyncMessage_UsernameChange `protobuf:"bytes,26,opt,name=usernameChange,oneof"` -} - -func (*SyncMessage_Sent_) isSyncMessage_Content() {} - -func (*SyncMessage_Contacts_) isSyncMessage_Content() {} - -func (*SyncMessage_Request_) isSyncMessage_Content() {} - -func (*SyncMessage_Blocked_) isSyncMessage_Content() {} - -func (*SyncMessage_Verified) isSyncMessage_Content() {} - -func (*SyncMessage_Configuration_) isSyncMessage_Content() {} - -func (*SyncMessage_ViewOnceOpen_) isSyncMessage_Content() {} - -func (*SyncMessage_FetchLatest_) isSyncMessage_Content() {} - -func (*SyncMessage_Keys_) isSyncMessage_Content() {} - -func (*SyncMessage_MessageRequestResponse_) isSyncMessage_Content() {} - -func (*SyncMessage_OutgoingPayment_) isSyncMessage_Content() {} - -func (*SyncMessage_PniChangeNumber_) isSyncMessage_Content() {} - -func (*SyncMessage_CallEvent_) isSyncMessage_Content() {} - -func (*SyncMessage_CallLinkUpdate_) isSyncMessage_Content() {} - -func (*SyncMessage_CallLogEvent_) isSyncMessage_Content() {} - -func (*SyncMessage_DeleteForMe_) isSyncMessage_Content() {} - -func (*SyncMessage_DeviceNameChange_) isSyncMessage_Content() {} - -func (*SyncMessage_AttachmentBackfillRequest_) isSyncMessage_Content() {} - -func (*SyncMessage_AttachmentBackfillResponse_) isSyncMessage_Content() {} - -func (*SyncMessage_UsernameChange_) isSyncMessage_Content() {} - type AttachmentPointer struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to AttachmentIdentifier: @@ -3495,7 +3181,7 @@ type AttachmentPointer struct { func (x *AttachmentPointer) Reset() { *x = AttachmentPointer{} - mi := &file_signalpb_SignalService_proto_msgTypes[12] + mi := &file_SignalService_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3507,7 +3193,7 @@ func (x *AttachmentPointer) String() string { func (*AttachmentPointer) ProtoMessage() {} func (x *AttachmentPointer) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[12] + mi := &file_SignalService_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3520,7 +3206,7 @@ func (x *AttachmentPointer) ProtoReflect() protoreflect.Message { // Deprecated: Use AttachmentPointer.ProtoReflect.Descriptor instead. func (*AttachmentPointer) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{12} + return file_SignalService_proto_rawDescGZIP(), []int{12} } func (x *AttachmentPointer) GetAttachmentIdentifier() isAttachmentPointer_AttachmentIdentifier { @@ -3687,7 +3373,7 @@ type GroupContextV2 struct { func (x *GroupContextV2) Reset() { *x = GroupContextV2{} - mi := &file_signalpb_SignalService_proto_msgTypes[13] + mi := &file_SignalService_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3699,7 +3385,7 @@ func (x *GroupContextV2) String() string { func (*GroupContextV2) ProtoMessage() {} func (x *GroupContextV2) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[13] + mi := &file_SignalService_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3712,7 +3398,7 @@ func (x *GroupContextV2) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupContextV2.ProtoReflect.Descriptor instead. func (*GroupContextV2) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{13} + return file_SignalService_proto_rawDescGZIP(), []int{13} } func (x *GroupContextV2) GetMasterKey() []byte { @@ -3752,7 +3438,7 @@ type ContactDetails struct { func (x *ContactDetails) Reset() { *x = ContactDetails{} - mi := &file_signalpb_SignalService_proto_msgTypes[14] + mi := &file_SignalService_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3764,7 +3450,7 @@ func (x *ContactDetails) String() string { func (*ContactDetails) ProtoMessage() {} func (x *ContactDetails) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[14] + mi := &file_SignalService_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3777,7 +3463,7 @@ func (x *ContactDetails) ProtoReflect() protoreflect.Message { // Deprecated: Use ContactDetails.ProtoReflect.Descriptor instead. func (*ContactDetails) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{14} + return file_SignalService_proto_rawDescGZIP(), []int{14} } func (x *ContactDetails) GetNumber() string { @@ -3848,7 +3534,7 @@ type PaymentAddress struct { func (x *PaymentAddress) Reset() { *x = PaymentAddress{} - mi := &file_signalpb_SignalService_proto_msgTypes[15] + mi := &file_SignalService_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3860,7 +3546,7 @@ func (x *PaymentAddress) String() string { func (*PaymentAddress) ProtoMessage() {} func (x *PaymentAddress) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[15] + mi := &file_SignalService_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3873,7 +3559,7 @@ func (x *PaymentAddress) ProtoReflect() protoreflect.Message { // Deprecated: Use PaymentAddress.ProtoReflect.Descriptor instead. func (*PaymentAddress) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{15} + return file_SignalService_proto_rawDescGZIP(), []int{15} } func (x *PaymentAddress) GetAddress() isPaymentAddress_Address { @@ -3913,7 +3599,7 @@ type DecryptionErrorMessage struct { func (x *DecryptionErrorMessage) Reset() { *x = DecryptionErrorMessage{} - mi := &file_signalpb_SignalService_proto_msgTypes[16] + mi := &file_SignalService_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3925,7 +3611,7 @@ func (x *DecryptionErrorMessage) String() string { func (*DecryptionErrorMessage) ProtoMessage() {} func (x *DecryptionErrorMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[16] + mi := &file_SignalService_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3938,7 +3624,7 @@ func (x *DecryptionErrorMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use DecryptionErrorMessage.ProtoReflect.Descriptor instead. func (*DecryptionErrorMessage) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{16} + return file_SignalService_proto_rawDescGZIP(), []int{16} } func (x *DecryptionErrorMessage) GetRatchetKey() []byte { @@ -3973,7 +3659,7 @@ type PniSignatureMessage struct { func (x *PniSignatureMessage) Reset() { *x = PniSignatureMessage{} - mi := &file_signalpb_SignalService_proto_msgTypes[17] + mi := &file_SignalService_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3985,7 +3671,7 @@ func (x *PniSignatureMessage) String() string { func (*PniSignatureMessage) ProtoMessage() {} func (x *PniSignatureMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[17] + mi := &file_SignalService_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3998,7 +3684,7 @@ func (x *PniSignatureMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use PniSignatureMessage.ProtoReflect.Descriptor instead. func (*PniSignatureMessage) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{17} + return file_SignalService_proto_rawDescGZIP(), []int{17} } func (x *PniSignatureMessage) GetPni() []byte { @@ -4025,7 +3711,7 @@ type EditMessage struct { func (x *EditMessage) Reset() { *x = EditMessage{} - mi := &file_signalpb_SignalService_proto_msgTypes[18] + mi := &file_SignalService_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4037,7 +3723,7 @@ func (x *EditMessage) String() string { func (*EditMessage) ProtoMessage() {} func (x *EditMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[18] + mi := &file_SignalService_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4050,7 +3736,7 @@ func (x *EditMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use EditMessage.ProtoReflect.Descriptor instead. func (*EditMessage) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{18} + return file_SignalService_proto_rawDescGZIP(), []int{18} } func (x *EditMessage) GetTargetSentTimestamp() uint64 { @@ -4083,7 +3769,7 @@ type BodyRange struct { func (x *BodyRange) Reset() { *x = BodyRange{} - mi := &file_signalpb_SignalService_proto_msgTypes[19] + mi := &file_SignalService_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4095,7 +3781,7 @@ func (x *BodyRange) String() string { func (*BodyRange) ProtoMessage() {} func (x *BodyRange) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[19] + mi := &file_SignalService_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4108,7 +3794,7 @@ func (x *BodyRange) ProtoReflect() protoreflect.Message { // Deprecated: Use BodyRange.ProtoReflect.Descriptor instead. func (*BodyRange) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{19} + return file_SignalService_proto_rawDescGZIP(), []int{19} } func (x *BodyRange) GetStart() uint32 { @@ -4196,7 +3882,7 @@ type AddressableMessage struct { func (x *AddressableMessage) Reset() { *x = AddressableMessage{} - mi := &file_signalpb_SignalService_proto_msgTypes[20] + mi := &file_SignalService_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4208,7 +3894,7 @@ func (x *AddressableMessage) String() string { func (*AddressableMessage) ProtoMessage() {} func (x *AddressableMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[20] + mi := &file_SignalService_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4221,7 +3907,7 @@ func (x *AddressableMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use AddressableMessage.ProtoReflect.Descriptor instead. func (*AddressableMessage) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{20} + return file_SignalService_proto_rawDescGZIP(), []int{20} } func (x *AddressableMessage) GetAuthor() isAddressableMessage_Author { @@ -4302,7 +3988,7 @@ type ConversationIdentifier struct { func (x *ConversationIdentifier) Reset() { *x = ConversationIdentifier{} - mi := &file_signalpb_SignalService_proto_msgTypes[21] + mi := &file_SignalService_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4314,7 +4000,7 @@ func (x *ConversationIdentifier) String() string { func (*ConversationIdentifier) ProtoMessage() {} func (x *ConversationIdentifier) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[21] + mi := &file_SignalService_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4327,7 +4013,7 @@ func (x *ConversationIdentifier) ProtoReflect() protoreflect.Message { // Deprecated: Use ConversationIdentifier.ProtoReflect.Descriptor instead. func (*ConversationIdentifier) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{21} + return file_SignalService_proto_rawDescGZIP(), []int{21} } func (x *ConversationIdentifier) GetIdentifier() isConversationIdentifier_Identifier { @@ -4412,7 +4098,7 @@ type CallMessage_Offer struct { func (x *CallMessage_Offer) Reset() { *x = CallMessage_Offer{} - mi := &file_signalpb_SignalService_proto_msgTypes[22] + mi := &file_SignalService_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4424,7 +4110,7 @@ func (x *CallMessage_Offer) String() string { func (*CallMessage_Offer) ProtoMessage() {} func (x *CallMessage_Offer) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[22] + mi := &file_SignalService_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4437,7 +4123,7 @@ func (x *CallMessage_Offer) ProtoReflect() protoreflect.Message { // Deprecated: Use CallMessage_Offer.ProtoReflect.Descriptor instead. func (*CallMessage_Offer) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 0} + return file_SignalService_proto_rawDescGZIP(), []int{2, 0} } func (x *CallMessage_Offer) GetId() uint64 { @@ -4471,7 +4157,7 @@ type CallMessage_Answer struct { func (x *CallMessage_Answer) Reset() { *x = CallMessage_Answer{} - mi := &file_signalpb_SignalService_proto_msgTypes[23] + mi := &file_SignalService_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4483,7 +4169,7 @@ func (x *CallMessage_Answer) String() string { func (*CallMessage_Answer) ProtoMessage() {} func (x *CallMessage_Answer) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[23] + mi := &file_SignalService_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4496,7 +4182,7 @@ func (x *CallMessage_Answer) ProtoReflect() protoreflect.Message { // Deprecated: Use CallMessage_Answer.ProtoReflect.Descriptor instead. func (*CallMessage_Answer) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 1} + return file_SignalService_proto_rawDescGZIP(), []int{2, 1} } func (x *CallMessage_Answer) GetId() uint64 { @@ -4523,7 +4209,7 @@ type CallMessage_IceUpdate struct { func (x *CallMessage_IceUpdate) Reset() { *x = CallMessage_IceUpdate{} - mi := &file_signalpb_SignalService_proto_msgTypes[24] + mi := &file_SignalService_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4535,7 +4221,7 @@ func (x *CallMessage_IceUpdate) String() string { func (*CallMessage_IceUpdate) ProtoMessage() {} func (x *CallMessage_IceUpdate) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[24] + mi := &file_SignalService_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4548,7 +4234,7 @@ func (x *CallMessage_IceUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use CallMessage_IceUpdate.ProtoReflect.Descriptor instead. func (*CallMessage_IceUpdate) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 2} + return file_SignalService_proto_rawDescGZIP(), []int{2, 2} } func (x *CallMessage_IceUpdate) GetId() uint64 { @@ -4574,7 +4260,7 @@ type CallMessage_Busy struct { func (x *CallMessage_Busy) Reset() { *x = CallMessage_Busy{} - mi := &file_signalpb_SignalService_proto_msgTypes[25] + mi := &file_SignalService_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4586,7 +4272,7 @@ func (x *CallMessage_Busy) String() string { func (*CallMessage_Busy) ProtoMessage() {} func (x *CallMessage_Busy) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[25] + mi := &file_SignalService_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4599,7 +4285,7 @@ func (x *CallMessage_Busy) ProtoReflect() protoreflect.Message { // Deprecated: Use CallMessage_Busy.ProtoReflect.Descriptor instead. func (*CallMessage_Busy) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 3} + return file_SignalService_proto_rawDescGZIP(), []int{2, 3} } func (x *CallMessage_Busy) GetId() uint64 { @@ -4620,7 +4306,7 @@ type CallMessage_Hangup struct { func (x *CallMessage_Hangup) Reset() { *x = CallMessage_Hangup{} - mi := &file_signalpb_SignalService_proto_msgTypes[26] + mi := &file_SignalService_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4632,7 +4318,7 @@ func (x *CallMessage_Hangup) String() string { func (*CallMessage_Hangup) ProtoMessage() {} func (x *CallMessage_Hangup) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[26] + mi := &file_SignalService_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4645,7 +4331,7 @@ func (x *CallMessage_Hangup) ProtoReflect() protoreflect.Message { // Deprecated: Use CallMessage_Hangup.ProtoReflect.Descriptor instead. func (*CallMessage_Hangup) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 4} + return file_SignalService_proto_rawDescGZIP(), []int{2, 4} } func (x *CallMessage_Hangup) GetId() uint64 { @@ -4679,7 +4365,7 @@ type CallMessage_Opaque struct { func (x *CallMessage_Opaque) Reset() { *x = CallMessage_Opaque{} - mi := &file_signalpb_SignalService_proto_msgTypes[27] + mi := &file_SignalService_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4691,7 +4377,7 @@ func (x *CallMessage_Opaque) String() string { func (*CallMessage_Opaque) ProtoMessage() {} func (x *CallMessage_Opaque) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[27] + mi := &file_SignalService_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4704,7 +4390,7 @@ func (x *CallMessage_Opaque) ProtoReflect() protoreflect.Message { // Deprecated: Use CallMessage_Opaque.ProtoReflect.Descriptor instead. func (*CallMessage_Opaque) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{2, 5} + return file_SignalService_proto_rawDescGZIP(), []int{2, 5} } func (x *CallMessage_Opaque) GetData() []byte { @@ -4734,7 +4420,7 @@ type DataMessage_Payment struct { func (x *DataMessage_Payment) Reset() { *x = DataMessage_Payment{} - mi := &file_signalpb_SignalService_proto_msgTypes[28] + mi := &file_SignalService_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4746,7 +4432,7 @@ func (x *DataMessage_Payment) String() string { func (*DataMessage_Payment) ProtoMessage() {} func (x *DataMessage_Payment) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[28] + mi := &file_SignalService_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4759,7 +4445,7 @@ func (x *DataMessage_Payment) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Payment.ProtoReflect.Descriptor instead. func (*DataMessage_Payment) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 0} + return file_SignalService_proto_rawDescGZIP(), []int{3, 0} } func (x *DataMessage_Payment) GetItem() isDataMessage_Payment_Item { @@ -4818,7 +4504,7 @@ type DataMessage_Quote struct { func (x *DataMessage_Quote) Reset() { *x = DataMessage_Quote{} - mi := &file_signalpb_SignalService_proto_msgTypes[29] + mi := &file_SignalService_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4830,7 +4516,7 @@ func (x *DataMessage_Quote) String() string { func (*DataMessage_Quote) ProtoMessage() {} func (x *DataMessage_Quote) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[29] + mi := &file_SignalService_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4843,7 +4529,7 @@ func (x *DataMessage_Quote) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Quote.ProtoReflect.Descriptor instead. func (*DataMessage_Quote) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 1} + return file_SignalService_proto_rawDescGZIP(), []int{3, 1} } func (x *DataMessage_Quote) GetId() uint64 { @@ -4909,7 +4595,7 @@ type DataMessage_Contact struct { func (x *DataMessage_Contact) Reset() { *x = DataMessage_Contact{} - mi := &file_signalpb_SignalService_proto_msgTypes[30] + mi := &file_SignalService_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4921,7 +4607,7 @@ func (x *DataMessage_Contact) String() string { func (*DataMessage_Contact) ProtoMessage() {} func (x *DataMessage_Contact) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[30] + mi := &file_SignalService_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4934,7 +4620,7 @@ func (x *DataMessage_Contact) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Contact.ProtoReflect.Descriptor instead. func (*DataMessage_Contact) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2} + return file_SignalService_proto_rawDescGZIP(), []int{3, 2} } func (x *DataMessage_Contact) GetName() *DataMessage_Contact_Name { @@ -4992,7 +4678,7 @@ type DataMessage_Sticker struct { func (x *DataMessage_Sticker) Reset() { *x = DataMessage_Sticker{} - mi := &file_signalpb_SignalService_proto_msgTypes[31] + mi := &file_SignalService_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5004,7 +4690,7 @@ func (x *DataMessage_Sticker) String() string { func (*DataMessage_Sticker) ProtoMessage() {} func (x *DataMessage_Sticker) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[31] + mi := &file_SignalService_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5017,7 +4703,7 @@ func (x *DataMessage_Sticker) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Sticker.ProtoReflect.Descriptor instead. func (*DataMessage_Sticker) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 3} + return file_SignalService_proto_rawDescGZIP(), []int{3, 3} } func (x *DataMessage_Sticker) GetPackId() []byte { @@ -5068,7 +4754,7 @@ type DataMessage_Reaction struct { func (x *DataMessage_Reaction) Reset() { *x = DataMessage_Reaction{} - mi := &file_signalpb_SignalService_proto_msgTypes[32] + mi := &file_SignalService_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5080,7 +4766,7 @@ func (x *DataMessage_Reaction) String() string { func (*DataMessage_Reaction) ProtoMessage() {} func (x *DataMessage_Reaction) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[32] + mi := &file_SignalService_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5093,7 +4779,7 @@ func (x *DataMessage_Reaction) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Reaction.ProtoReflect.Descriptor instead. func (*DataMessage_Reaction) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 4} + return file_SignalService_proto_rawDescGZIP(), []int{3, 4} } func (x *DataMessage_Reaction) GetEmoji() string { @@ -5140,7 +4826,7 @@ type DataMessage_Delete struct { func (x *DataMessage_Delete) Reset() { *x = DataMessage_Delete{} - mi := &file_signalpb_SignalService_proto_msgTypes[33] + mi := &file_SignalService_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5152,7 +4838,7 @@ func (x *DataMessage_Delete) String() string { func (*DataMessage_Delete) ProtoMessage() {} func (x *DataMessage_Delete) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[33] + mi := &file_SignalService_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5165,7 +4851,7 @@ func (x *DataMessage_Delete) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Delete.ProtoReflect.Descriptor instead. func (*DataMessage_Delete) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 5} + return file_SignalService_proto_rawDescGZIP(), []int{3, 5} } func (x *DataMessage_Delete) GetTargetSentTimestamp() uint64 { @@ -5184,7 +4870,7 @@ type DataMessage_GroupCallUpdate struct { func (x *DataMessage_GroupCallUpdate) Reset() { *x = DataMessage_GroupCallUpdate{} - mi := &file_signalpb_SignalService_proto_msgTypes[34] + mi := &file_SignalService_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5196,7 +4882,7 @@ func (x *DataMessage_GroupCallUpdate) String() string { func (*DataMessage_GroupCallUpdate) ProtoMessage() {} func (x *DataMessage_GroupCallUpdate) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[34] + mi := &file_SignalService_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5209,7 +4895,7 @@ func (x *DataMessage_GroupCallUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_GroupCallUpdate.ProtoReflect.Descriptor instead. func (*DataMessage_GroupCallUpdate) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 6} + return file_SignalService_proto_rawDescGZIP(), []int{3, 6} } func (x *DataMessage_GroupCallUpdate) GetEraId() string { @@ -5230,7 +4916,7 @@ type DataMessage_StoryContext struct { func (x *DataMessage_StoryContext) Reset() { *x = DataMessage_StoryContext{} - mi := &file_signalpb_SignalService_proto_msgTypes[35] + mi := &file_SignalService_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5242,7 +4928,7 @@ func (x *DataMessage_StoryContext) String() string { func (*DataMessage_StoryContext) ProtoMessage() {} func (x *DataMessage_StoryContext) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[35] + mi := &file_SignalService_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5255,7 +4941,7 @@ func (x *DataMessage_StoryContext) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_StoryContext.ProtoReflect.Descriptor instead. func (*DataMessage_StoryContext) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 7} + return file_SignalService_proto_rawDescGZIP(), []int{3, 7} } func (x *DataMessage_StoryContext) GetAuthorAci() string { @@ -5288,7 +4974,7 @@ type DataMessage_GiftBadge struct { func (x *DataMessage_GiftBadge) Reset() { *x = DataMessage_GiftBadge{} - mi := &file_signalpb_SignalService_proto_msgTypes[36] + mi := &file_SignalService_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5300,7 +4986,7 @@ func (x *DataMessage_GiftBadge) String() string { func (*DataMessage_GiftBadge) ProtoMessage() {} func (x *DataMessage_GiftBadge) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[36] + mi := &file_SignalService_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5313,7 +4999,7 @@ func (x *DataMessage_GiftBadge) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_GiftBadge.ProtoReflect.Descriptor instead. func (*DataMessage_GiftBadge) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 8} + return file_SignalService_proto_rawDescGZIP(), []int{3, 8} } func (x *DataMessage_GiftBadge) GetReceiptCredentialPresentation() []byte { @@ -5334,7 +5020,7 @@ type DataMessage_PollCreate struct { func (x *DataMessage_PollCreate) Reset() { *x = DataMessage_PollCreate{} - mi := &file_signalpb_SignalService_proto_msgTypes[37] + mi := &file_SignalService_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5346,7 +5032,7 @@ func (x *DataMessage_PollCreate) String() string { func (*DataMessage_PollCreate) ProtoMessage() {} func (x *DataMessage_PollCreate) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[37] + mi := &file_SignalService_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5359,7 +5045,7 @@ func (x *DataMessage_PollCreate) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_PollCreate.ProtoReflect.Descriptor instead. func (*DataMessage_PollCreate) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 9} + return file_SignalService_proto_rawDescGZIP(), []int{3, 9} } func (x *DataMessage_PollCreate) GetQuestion() string { @@ -5392,7 +5078,7 @@ type DataMessage_PollTerminate struct { func (x *DataMessage_PollTerminate) Reset() { *x = DataMessage_PollTerminate{} - mi := &file_signalpb_SignalService_proto_msgTypes[38] + mi := &file_SignalService_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5404,7 +5090,7 @@ func (x *DataMessage_PollTerminate) String() string { func (*DataMessage_PollTerminate) ProtoMessage() {} func (x *DataMessage_PollTerminate) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[38] + mi := &file_SignalService_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5417,7 +5103,7 @@ func (x *DataMessage_PollTerminate) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_PollTerminate.ProtoReflect.Descriptor instead. func (*DataMessage_PollTerminate) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 10} + return file_SignalService_proto_rawDescGZIP(), []int{3, 10} } func (x *DataMessage_PollTerminate) GetTargetSentTimestamp() uint64 { @@ -5431,15 +5117,15 @@ type DataMessage_PollVote struct { state protoimpl.MessageState `protogen:"open.v1"` TargetAuthorAciBinary []byte `protobuf:"bytes,1,opt,name=targetAuthorAciBinary" json:"targetAuthorAciBinary,omitempty"` TargetSentTimestamp *uint64 `protobuf:"varint,2,opt,name=targetSentTimestamp" json:"targetSentTimestamp,omitempty"` - OptionIndexes []uint32 `protobuf:"varint,3,rep,name=optionIndexes" json:"optionIndexes,omitempty"` - VoteCount *uint32 `protobuf:"varint,4,opt,name=voteCount" json:"voteCount,omitempty"` + OptionIndexes []uint32 `protobuf:"varint,3,rep,name=optionIndexes" json:"optionIndexes,omitempty"` // must be in the range [0, options.length) from the PollCreate + VoteCount *uint32 `protobuf:"varint,4,opt,name=voteCount" json:"voteCount,omitempty"` // increment this by 1 each time you vote on a given poll unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *DataMessage_PollVote) Reset() { *x = DataMessage_PollVote{} - mi := &file_signalpb_SignalService_proto_msgTypes[39] + mi := &file_SignalService_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5451,7 +5137,7 @@ func (x *DataMessage_PollVote) String() string { func (*DataMessage_PollVote) ProtoMessage() {} func (x *DataMessage_PollVote) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[39] + mi := &file_SignalService_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5464,7 +5150,7 @@ func (x *DataMessage_PollVote) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_PollVote.ProtoReflect.Descriptor instead. func (*DataMessage_PollVote) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 11} + return file_SignalService_proto_rawDescGZIP(), []int{3, 11} } func (x *DataMessage_PollVote) GetTargetAuthorAciBinary() []byte { @@ -5510,7 +5196,7 @@ type DataMessage_PinMessage struct { func (x *DataMessage_PinMessage) Reset() { *x = DataMessage_PinMessage{} - mi := &file_signalpb_SignalService_proto_msgTypes[40] + mi := &file_SignalService_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5522,7 +5208,7 @@ func (x *DataMessage_PinMessage) String() string { func (*DataMessage_PinMessage) ProtoMessage() {} func (x *DataMessage_PinMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[40] + mi := &file_SignalService_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5535,7 +5221,7 @@ func (x *DataMessage_PinMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_PinMessage.ProtoReflect.Descriptor instead. func (*DataMessage_PinMessage) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 12} + return file_SignalService_proto_rawDescGZIP(), []int{3, 12} } func (x *DataMessage_PinMessage) GetTargetAuthorAciBinary() []byte { @@ -5603,7 +5289,7 @@ type DataMessage_UnpinMessage struct { func (x *DataMessage_UnpinMessage) Reset() { *x = DataMessage_UnpinMessage{} - mi := &file_signalpb_SignalService_proto_msgTypes[41] + mi := &file_SignalService_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5615,7 +5301,7 @@ func (x *DataMessage_UnpinMessage) String() string { func (*DataMessage_UnpinMessage) ProtoMessage() {} func (x *DataMessage_UnpinMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[41] + mi := &file_SignalService_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5628,7 +5314,7 @@ func (x *DataMessage_UnpinMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_UnpinMessage.ProtoReflect.Descriptor instead. func (*DataMessage_UnpinMessage) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 13} + return file_SignalService_proto_rawDescGZIP(), []int{3, 13} } func (x *DataMessage_UnpinMessage) GetTargetAuthorAciBinary() []byte { @@ -5645,58 +5331,6 @@ func (x *DataMessage_UnpinMessage) GetTargetSentTimestamp() uint64 { return 0 } -type DataMessage_AdminDelete struct { - state protoimpl.MessageState `protogen:"open.v1"` - TargetAuthorAciBinary []byte `protobuf:"bytes,1,opt,name=targetAuthorAciBinary" json:"targetAuthorAciBinary,omitempty"` // 16-byte UUID - TargetSentTimestamp *uint64 `protobuf:"varint,2,opt,name=targetSentTimestamp" json:"targetSentTimestamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DataMessage_AdminDelete) Reset() { - *x = DataMessage_AdminDelete{} - mi := &file_signalpb_SignalService_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DataMessage_AdminDelete) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DataMessage_AdminDelete) ProtoMessage() {} - -func (x *DataMessage_AdminDelete) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[42] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DataMessage_AdminDelete.ProtoReflect.Descriptor instead. -func (*DataMessage_AdminDelete) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 14} -} - -func (x *DataMessage_AdminDelete) GetTargetAuthorAciBinary() []byte { - if x != nil { - return x.TargetAuthorAciBinary - } - return nil -} - -func (x *DataMessage_AdminDelete) GetTargetSentTimestamp() uint64 { - if x != nil && x.TargetSentTimestamp != nil { - return *x.TargetSentTimestamp - } - return 0 -} - type DataMessage_Payment_Amount struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Amount: @@ -5709,7 +5343,7 @@ type DataMessage_Payment_Amount struct { func (x *DataMessage_Payment_Amount) Reset() { *x = DataMessage_Payment_Amount{} - mi := &file_signalpb_SignalService_proto_msgTypes[43] + mi := &file_SignalService_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5721,7 +5355,7 @@ func (x *DataMessage_Payment_Amount) String() string { func (*DataMessage_Payment_Amount) ProtoMessage() {} func (x *DataMessage_Payment_Amount) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[43] + mi := &file_SignalService_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5734,7 +5368,7 @@ func (x *DataMessage_Payment_Amount) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Payment_Amount.ProtoReflect.Descriptor instead. func (*DataMessage_Payment_Amount) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 0, 0} + return file_SignalService_proto_rawDescGZIP(), []int{3, 0, 0} } func (x *DataMessage_Payment_Amount) GetAmount() isDataMessage_Payment_Amount_Amount { @@ -5777,7 +5411,7 @@ type DataMessage_Payment_Notification struct { func (x *DataMessage_Payment_Notification) Reset() { *x = DataMessage_Payment_Notification{} - mi := &file_signalpb_SignalService_proto_msgTypes[44] + mi := &file_SignalService_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5789,7 +5423,7 @@ func (x *DataMessage_Payment_Notification) String() string { func (*DataMessage_Payment_Notification) ProtoMessage() {} func (x *DataMessage_Payment_Notification) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[44] + mi := &file_SignalService_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5802,7 +5436,7 @@ func (x *DataMessage_Payment_Notification) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Payment_Notification.ProtoReflect.Descriptor instead. func (*DataMessage_Payment_Notification) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 0, 1} + return file_SignalService_proto_rawDescGZIP(), []int{3, 0, 1} } func (x *DataMessage_Payment_Notification) GetTransaction() isDataMessage_Payment_Notification_Transaction { @@ -5848,7 +5482,7 @@ type DataMessage_Payment_Activation struct { func (x *DataMessage_Payment_Activation) Reset() { *x = DataMessage_Payment_Activation{} - mi := &file_signalpb_SignalService_proto_msgTypes[45] + mi := &file_SignalService_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5860,7 +5494,7 @@ func (x *DataMessage_Payment_Activation) String() string { func (*DataMessage_Payment_Activation) ProtoMessage() {} func (x *DataMessage_Payment_Activation) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[45] + mi := &file_SignalService_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5873,7 +5507,7 @@ func (x *DataMessage_Payment_Activation) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Payment_Activation.ProtoReflect.Descriptor instead. func (*DataMessage_Payment_Activation) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 0, 2} + return file_SignalService_proto_rawDescGZIP(), []int{3, 0, 2} } func (x *DataMessage_Payment_Activation) GetType() DataMessage_Payment_Activation_Type { @@ -5892,7 +5526,7 @@ type DataMessage_Payment_Amount_MobileCoin struct { func (x *DataMessage_Payment_Amount_MobileCoin) Reset() { *x = DataMessage_Payment_Amount_MobileCoin{} - mi := &file_signalpb_SignalService_proto_msgTypes[46] + mi := &file_SignalService_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5904,7 +5538,7 @@ func (x *DataMessage_Payment_Amount_MobileCoin) String() string { func (*DataMessage_Payment_Amount_MobileCoin) ProtoMessage() {} func (x *DataMessage_Payment_Amount_MobileCoin) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[46] + mi := &file_SignalService_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5917,7 +5551,7 @@ func (x *DataMessage_Payment_Amount_MobileCoin) ProtoReflect() protoreflect.Mess // Deprecated: Use DataMessage_Payment_Amount_MobileCoin.ProtoReflect.Descriptor instead. func (*DataMessage_Payment_Amount_MobileCoin) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 0, 0, 0} + return file_SignalService_proto_rawDescGZIP(), []int{3, 0, 0, 0} } func (x *DataMessage_Payment_Amount_MobileCoin) GetPicoMob() uint64 { @@ -5936,7 +5570,7 @@ type DataMessage_Payment_Notification_MobileCoin struct { func (x *DataMessage_Payment_Notification_MobileCoin) Reset() { *x = DataMessage_Payment_Notification_MobileCoin{} - mi := &file_signalpb_SignalService_proto_msgTypes[47] + mi := &file_SignalService_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5948,7 +5582,7 @@ func (x *DataMessage_Payment_Notification_MobileCoin) String() string { func (*DataMessage_Payment_Notification_MobileCoin) ProtoMessage() {} func (x *DataMessage_Payment_Notification_MobileCoin) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[47] + mi := &file_SignalService_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5961,7 +5595,7 @@ func (x *DataMessage_Payment_Notification_MobileCoin) ProtoReflect() protoreflec // Deprecated: Use DataMessage_Payment_Notification_MobileCoin.ProtoReflect.Descriptor instead. func (*DataMessage_Payment_Notification_MobileCoin) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 0, 1, 0} + return file_SignalService_proto_rawDescGZIP(), []int{3, 0, 1, 0} } func (x *DataMessage_Payment_Notification_MobileCoin) GetReceipt() []byte { @@ -5982,7 +5616,7 @@ type DataMessage_Quote_QuotedAttachment struct { func (x *DataMessage_Quote_QuotedAttachment) Reset() { *x = DataMessage_Quote_QuotedAttachment{} - mi := &file_signalpb_SignalService_proto_msgTypes[48] + mi := &file_SignalService_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5994,7 +5628,7 @@ func (x *DataMessage_Quote_QuotedAttachment) String() string { func (*DataMessage_Quote_QuotedAttachment) ProtoMessage() {} func (x *DataMessage_Quote_QuotedAttachment) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[48] + mi := &file_SignalService_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6007,7 +5641,7 @@ func (x *DataMessage_Quote_QuotedAttachment) ProtoReflect() protoreflect.Message // Deprecated: Use DataMessage_Quote_QuotedAttachment.ProtoReflect.Descriptor instead. func (*DataMessage_Quote_QuotedAttachment) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 1, 0} + return file_SignalService_proto_rawDescGZIP(), []int{3, 1, 0} } func (x *DataMessage_Quote_QuotedAttachment) GetContentType() string { @@ -6045,7 +5679,7 @@ type DataMessage_Contact_Name struct { func (x *DataMessage_Contact_Name) Reset() { *x = DataMessage_Contact_Name{} - mi := &file_signalpb_SignalService_proto_msgTypes[49] + mi := &file_SignalService_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6057,7 +5691,7 @@ func (x *DataMessage_Contact_Name) String() string { func (*DataMessage_Contact_Name) ProtoMessage() {} func (x *DataMessage_Contact_Name) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[49] + mi := &file_SignalService_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6070,7 +5704,7 @@ func (x *DataMessage_Contact_Name) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Contact_Name.ProtoReflect.Descriptor instead. func (*DataMessage_Contact_Name) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 0} + return file_SignalService_proto_rawDescGZIP(), []int{3, 2, 0} } func (x *DataMessage_Contact_Name) GetGivenName() string { @@ -6126,7 +5760,7 @@ type DataMessage_Contact_Phone struct { func (x *DataMessage_Contact_Phone) Reset() { *x = DataMessage_Contact_Phone{} - mi := &file_signalpb_SignalService_proto_msgTypes[50] + mi := &file_SignalService_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6138,7 +5772,7 @@ func (x *DataMessage_Contact_Phone) String() string { func (*DataMessage_Contact_Phone) ProtoMessage() {} func (x *DataMessage_Contact_Phone) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[50] + mi := &file_SignalService_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6151,7 +5785,7 @@ func (x *DataMessage_Contact_Phone) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Contact_Phone.ProtoReflect.Descriptor instead. func (*DataMessage_Contact_Phone) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 1} + return file_SignalService_proto_rawDescGZIP(), []int{3, 2, 1} } func (x *DataMessage_Contact_Phone) GetValue() string { @@ -6186,7 +5820,7 @@ type DataMessage_Contact_Email struct { func (x *DataMessage_Contact_Email) Reset() { *x = DataMessage_Contact_Email{} - mi := &file_signalpb_SignalService_proto_msgTypes[51] + mi := &file_SignalService_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6198,7 +5832,7 @@ func (x *DataMessage_Contact_Email) String() string { func (*DataMessage_Contact_Email) ProtoMessage() {} func (x *DataMessage_Contact_Email) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[51] + mi := &file_SignalService_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6211,7 +5845,7 @@ func (x *DataMessage_Contact_Email) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Contact_Email.ProtoReflect.Descriptor instead. func (*DataMessage_Contact_Email) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 2} + return file_SignalService_proto_rawDescGZIP(), []int{3, 2, 2} } func (x *DataMessage_Contact_Email) GetValue() string { @@ -6252,7 +5886,7 @@ type DataMessage_Contact_PostalAddress struct { func (x *DataMessage_Contact_PostalAddress) Reset() { *x = DataMessage_Contact_PostalAddress{} - mi := &file_signalpb_SignalService_proto_msgTypes[52] + mi := &file_SignalService_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6264,7 +5898,7 @@ func (x *DataMessage_Contact_PostalAddress) String() string { func (*DataMessage_Contact_PostalAddress) ProtoMessage() {} func (x *DataMessage_Contact_PostalAddress) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[52] + mi := &file_SignalService_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6277,7 +5911,7 @@ func (x *DataMessage_Contact_PostalAddress) ProtoReflect() protoreflect.Message // Deprecated: Use DataMessage_Contact_PostalAddress.ProtoReflect.Descriptor instead. func (*DataMessage_Contact_PostalAddress) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 3} + return file_SignalService_proto_rawDescGZIP(), []int{3, 2, 3} } func (x *DataMessage_Contact_PostalAddress) GetType() DataMessage_Contact_PostalAddress_Type { @@ -6353,7 +5987,7 @@ type DataMessage_Contact_Avatar struct { func (x *DataMessage_Contact_Avatar) Reset() { *x = DataMessage_Contact_Avatar{} - mi := &file_signalpb_SignalService_proto_msgTypes[53] + mi := &file_SignalService_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6365,7 +5999,7 @@ func (x *DataMessage_Contact_Avatar) String() string { func (*DataMessage_Contact_Avatar) ProtoMessage() {} func (x *DataMessage_Contact_Avatar) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[53] + mi := &file_SignalService_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6378,7 +6012,7 @@ func (x *DataMessage_Contact_Avatar) ProtoReflect() protoreflect.Message { // Deprecated: Use DataMessage_Contact_Avatar.ProtoReflect.Descriptor instead. func (*DataMessage_Contact_Avatar) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{3, 2, 4} + return file_SignalService_proto_rawDescGZIP(), []int{3, 2, 4} } func (x *DataMessage_Contact_Avatar) GetAvatar() *AttachmentPointer { @@ -6408,7 +6042,7 @@ type TextAttachment_Gradient struct { func (x *TextAttachment_Gradient) Reset() { *x = TextAttachment_Gradient{} - mi := &file_signalpb_SignalService_proto_msgTypes[54] + mi := &file_SignalService_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6420,7 +6054,7 @@ func (x *TextAttachment_Gradient) String() string { func (*TextAttachment_Gradient) ProtoMessage() {} func (x *TextAttachment_Gradient) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[54] + mi := &file_SignalService_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6433,7 +6067,7 @@ func (x *TextAttachment_Gradient) ProtoReflect() protoreflect.Message { // Deprecated: Use TextAttachment_Gradient.ProtoReflect.Descriptor instead. func (*TextAttachment_Gradient) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{9, 0} + return file_SignalService_proto_rawDescGZIP(), []int{9, 0} } func (x *TextAttachment_Gradient) GetStartColor() uint32 { @@ -6495,7 +6129,7 @@ const ( func (x *SyncMessage_Sent) Reset() { *x = SyncMessage_Sent{} - mi := &file_signalpb_SignalService_proto_msgTypes[55] + mi := &file_SignalService_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6507,7 +6141,7 @@ func (x *SyncMessage_Sent) String() string { func (*SyncMessage_Sent) ProtoMessage() {} func (x *SyncMessage_Sent) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[55] + mi := &file_SignalService_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6520,7 +6154,7 @@ func (x *SyncMessage_Sent) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_Sent.ProtoReflect.Descriptor instead. func (*SyncMessage_Sent) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 0} + return file_SignalService_proto_rawDescGZIP(), []int{11, 0} } func (x *SyncMessage_Sent) GetDestinationE164() string { @@ -6615,7 +6249,7 @@ const ( func (x *SyncMessage_Contacts) Reset() { *x = SyncMessage_Contacts{} - mi := &file_signalpb_SignalService_proto_msgTypes[56] + mi := &file_SignalService_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6627,7 +6261,7 @@ func (x *SyncMessage_Contacts) String() string { func (*SyncMessage_Contacts) ProtoMessage() {} func (x *SyncMessage_Contacts) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[56] + mi := &file_SignalService_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6640,7 +6274,7 @@ func (x *SyncMessage_Contacts) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_Contacts.ProtoReflect.Descriptor instead. func (*SyncMessage_Contacts) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 1} + return file_SignalService_proto_rawDescGZIP(), []int{11, 1} } func (x *SyncMessage_Contacts) GetBlob() *AttachmentPointer { @@ -6658,21 +6292,18 @@ func (x *SyncMessage_Contacts) GetComplete() bool { } type SyncMessage_Blocked struct { - state protoimpl.MessageState `protogen:"open.v1"` - Numbers []string `protobuf:"bytes,1,rep,name=numbers" json:"numbers,omitempty"` // deprecated: this field will be removed in a future release. - Acis []string `protobuf:"bytes,3,rep,name=acis" json:"acis,omitempty"` - GroupIds [][]byte `protobuf:"bytes,2,rep,name=groupIds" json:"groupIds,omitempty"` // deprecated: this field will be removed in a future release. - AcisBinary [][]byte `protobuf:"bytes,4,rep,name=acisBinary" json:"acisBinary,omitempty"` // deprecated: this field will be removed in a future release. - BlockedE164S []*SyncMessage_Blocked_BlockedE164 `protobuf:"bytes,5,rep,name=blockedE164s" json:"blockedE164s,omitempty"` - BlockedAcis []*SyncMessage_Blocked_BlockedAci `protobuf:"bytes,6,rep,name=blockedAcis" json:"blockedAcis,omitempty"` - BlockedGroups []*SyncMessage_Blocked_BlockedGroup `protobuf:"bytes,7,rep,name=blockedGroups" json:"blockedGroups,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Numbers []string `protobuf:"bytes,1,rep,name=numbers" json:"numbers,omitempty"` + Acis []string `protobuf:"bytes,3,rep,name=acis" json:"acis,omitempty"` + GroupIds [][]byte `protobuf:"bytes,2,rep,name=groupIds" json:"groupIds,omitempty"` + AcisBinary [][]byte `protobuf:"bytes,4,rep,name=acisBinary" json:"acisBinary,omitempty"` // 16-byte UUID unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *SyncMessage_Blocked) Reset() { *x = SyncMessage_Blocked{} - mi := &file_signalpb_SignalService_proto_msgTypes[57] + mi := &file_SignalService_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6684,7 +6315,7 @@ func (x *SyncMessage_Blocked) String() string { func (*SyncMessage_Blocked) ProtoMessage() {} func (x *SyncMessage_Blocked) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[57] + mi := &file_SignalService_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6697,7 +6328,7 @@ func (x *SyncMessage_Blocked) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_Blocked.ProtoReflect.Descriptor instead. func (*SyncMessage_Blocked) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 2} + return file_SignalService_proto_rawDescGZIP(), []int{11, 2} } func (x *SyncMessage_Blocked) GetNumbers() []string { @@ -6728,27 +6359,6 @@ func (x *SyncMessage_Blocked) GetAcisBinary() [][]byte { return nil } -func (x *SyncMessage_Blocked) GetBlockedE164S() []*SyncMessage_Blocked_BlockedE164 { - if x != nil { - return x.BlockedE164S - } - return nil -} - -func (x *SyncMessage_Blocked) GetBlockedAcis() []*SyncMessage_Blocked_BlockedAci { - if x != nil { - return x.BlockedAcis - } - return nil -} - -func (x *SyncMessage_Blocked) GetBlockedGroups() []*SyncMessage_Blocked_BlockedGroup { - if x != nil { - return x.BlockedGroups - } - return nil -} - type SyncMessage_Request struct { state protoimpl.MessageState `protogen:"open.v1"` Type *SyncMessage_Request_Type `protobuf:"varint,1,opt,name=type,enum=signalservice.SyncMessage_Request_Type" json:"type,omitempty"` @@ -6758,7 +6368,7 @@ type SyncMessage_Request struct { func (x *SyncMessage_Request) Reset() { *x = SyncMessage_Request{} - mi := &file_signalpb_SignalService_proto_msgTypes[58] + mi := &file_SignalService_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6770,7 +6380,7 @@ func (x *SyncMessage_Request) String() string { func (*SyncMessage_Request) ProtoMessage() {} func (x *SyncMessage_Request) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[58] + mi := &file_SignalService_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6783,7 +6393,7 @@ func (x *SyncMessage_Request) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_Request.ProtoReflect.Descriptor instead. func (*SyncMessage_Request) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 3} + return file_SignalService_proto_rawDescGZIP(), []int{11, 3} } func (x *SyncMessage_Request) GetType() SyncMessage_Request_Type { @@ -6804,7 +6414,7 @@ type SyncMessage_Read struct { func (x *SyncMessage_Read) Reset() { *x = SyncMessage_Read{} - mi := &file_signalpb_SignalService_proto_msgTypes[59] + mi := &file_SignalService_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6816,7 +6426,7 @@ func (x *SyncMessage_Read) String() string { func (*SyncMessage_Read) ProtoMessage() {} func (x *SyncMessage_Read) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[59] + mi := &file_SignalService_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6829,7 +6439,7 @@ func (x *SyncMessage_Read) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_Read.ProtoReflect.Descriptor instead. func (*SyncMessage_Read) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 4} + return file_SignalService_proto_rawDescGZIP(), []int{11, 4} } func (x *SyncMessage_Read) GetSenderAci() string { @@ -6864,7 +6474,7 @@ type SyncMessage_Viewed struct { func (x *SyncMessage_Viewed) Reset() { *x = SyncMessage_Viewed{} - mi := &file_signalpb_SignalService_proto_msgTypes[60] + mi := &file_SignalService_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6876,7 +6486,7 @@ func (x *SyncMessage_Viewed) String() string { func (*SyncMessage_Viewed) ProtoMessage() {} func (x *SyncMessage_Viewed) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[60] + mi := &file_SignalService_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6889,7 +6499,7 @@ func (x *SyncMessage_Viewed) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_Viewed.ProtoReflect.Descriptor instead. func (*SyncMessage_Viewed) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 5} + return file_SignalService_proto_rawDescGZIP(), []int{11, 5} } func (x *SyncMessage_Viewed) GetSenderAci() string { @@ -6918,6 +6528,7 @@ type SyncMessage_Configuration struct { ReadReceipts *bool `protobuf:"varint,1,opt,name=readReceipts" json:"readReceipts,omitempty"` UnidentifiedDeliveryIndicators *bool `protobuf:"varint,2,opt,name=unidentifiedDeliveryIndicators" json:"unidentifiedDeliveryIndicators,omitempty"` TypingIndicators *bool `protobuf:"varint,3,opt,name=typingIndicators" json:"typingIndicators,omitempty"` + ProvisioningVersion *uint32 `protobuf:"varint,5,opt,name=provisioningVersion" json:"provisioningVersion,omitempty"` LinkPreviews *bool `protobuf:"varint,6,opt,name=linkPreviews" json:"linkPreviews,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -6925,7 +6536,7 @@ type SyncMessage_Configuration struct { func (x *SyncMessage_Configuration) Reset() { *x = SyncMessage_Configuration{} - mi := &file_signalpb_SignalService_proto_msgTypes[61] + mi := &file_SignalService_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6937,7 +6548,7 @@ func (x *SyncMessage_Configuration) String() string { func (*SyncMessage_Configuration) ProtoMessage() {} func (x *SyncMessage_Configuration) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[61] + mi := &file_SignalService_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6950,7 +6561,7 @@ func (x *SyncMessage_Configuration) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_Configuration.ProtoReflect.Descriptor instead. func (*SyncMessage_Configuration) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 6} + return file_SignalService_proto_rawDescGZIP(), []int{11, 6} } func (x *SyncMessage_Configuration) GetReadReceipts() bool { @@ -6974,6 +6585,13 @@ func (x *SyncMessage_Configuration) GetTypingIndicators() bool { return false } +func (x *SyncMessage_Configuration) GetProvisioningVersion() uint32 { + if x != nil && x.ProvisioningVersion != nil { + return *x.ProvisioningVersion + } + return 0 +} + func (x *SyncMessage_Configuration) GetLinkPreviews() bool { if x != nil && x.LinkPreviews != nil { return *x.LinkPreviews @@ -6992,7 +6610,7 @@ type SyncMessage_StickerPackOperation struct { func (x *SyncMessage_StickerPackOperation) Reset() { *x = SyncMessage_StickerPackOperation{} - mi := &file_signalpb_SignalService_proto_msgTypes[62] + mi := &file_SignalService_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7004,7 +6622,7 @@ func (x *SyncMessage_StickerPackOperation) String() string { func (*SyncMessage_StickerPackOperation) ProtoMessage() {} func (x *SyncMessage_StickerPackOperation) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[62] + mi := &file_SignalService_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7017,7 +6635,7 @@ func (x *SyncMessage_StickerPackOperation) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_StickerPackOperation.ProtoReflect.Descriptor instead. func (*SyncMessage_StickerPackOperation) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 7} + return file_SignalService_proto_rawDescGZIP(), []int{11, 7} } func (x *SyncMessage_StickerPackOperation) GetPackId() []byte { @@ -7052,7 +6670,7 @@ type SyncMessage_ViewOnceOpen struct { func (x *SyncMessage_ViewOnceOpen) Reset() { *x = SyncMessage_ViewOnceOpen{} - mi := &file_signalpb_SignalService_proto_msgTypes[63] + mi := &file_SignalService_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7064,7 +6682,7 @@ func (x *SyncMessage_ViewOnceOpen) String() string { func (*SyncMessage_ViewOnceOpen) ProtoMessage() {} func (x *SyncMessage_ViewOnceOpen) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[63] + mi := &file_SignalService_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7077,7 +6695,7 @@ func (x *SyncMessage_ViewOnceOpen) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_ViewOnceOpen.ProtoReflect.Descriptor instead. func (*SyncMessage_ViewOnceOpen) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 8} + return file_SignalService_proto_rawDescGZIP(), []int{11, 8} } func (x *SyncMessage_ViewOnceOpen) GetSenderAci() string { @@ -7110,7 +6728,7 @@ type SyncMessage_FetchLatest struct { func (x *SyncMessage_FetchLatest) Reset() { *x = SyncMessage_FetchLatest{} - mi := &file_signalpb_SignalService_proto_msgTypes[64] + mi := &file_SignalService_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7122,7 +6740,7 @@ func (x *SyncMessage_FetchLatest) String() string { func (*SyncMessage_FetchLatest) ProtoMessage() {} func (x *SyncMessage_FetchLatest) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[64] + mi := &file_SignalService_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7135,7 +6753,7 @@ func (x *SyncMessage_FetchLatest) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_FetchLatest.ProtoReflect.Descriptor instead. func (*SyncMessage_FetchLatest) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 9} + return file_SignalService_proto_rawDescGZIP(), []int{11, 9} } func (x *SyncMessage_FetchLatest) GetType() SyncMessage_FetchLatest_Type { @@ -7147,6 +6765,7 @@ func (x *SyncMessage_FetchLatest) GetType() SyncMessage_FetchLatest_Type { type SyncMessage_Keys struct { state protoimpl.MessageState `protogen:"open.v1"` + Master []byte `protobuf:"bytes,2,opt,name=master" json:"master,omitempty"` // deprecated: this field will be removed in a future release. AccountEntropyPool *string `protobuf:"bytes,3,opt,name=accountEntropyPool" json:"accountEntropyPool,omitempty"` MediaRootBackupKey []byte `protobuf:"bytes,4,opt,name=mediaRootBackupKey" json:"mediaRootBackupKey,omitempty"` unknownFields protoimpl.UnknownFields @@ -7155,7 +6774,7 @@ type SyncMessage_Keys struct { func (x *SyncMessage_Keys) Reset() { *x = SyncMessage_Keys{} - mi := &file_signalpb_SignalService_proto_msgTypes[65] + mi := &file_SignalService_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7167,7 +6786,7 @@ func (x *SyncMessage_Keys) String() string { func (*SyncMessage_Keys) ProtoMessage() {} func (x *SyncMessage_Keys) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[65] + mi := &file_SignalService_proto_msgTypes[64] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7180,7 +6799,14 @@ func (x *SyncMessage_Keys) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_Keys.ProtoReflect.Descriptor instead. func (*SyncMessage_Keys) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 10} + return file_SignalService_proto_rawDescGZIP(), []int{11, 10} +} + +func (x *SyncMessage_Keys) GetMaster() []byte { + if x != nil { + return x.Master + } + return nil } func (x *SyncMessage_Keys) GetAccountEntropyPool() string { @@ -7207,7 +6833,7 @@ type SyncMessage_PniIdentity struct { func (x *SyncMessage_PniIdentity) Reset() { *x = SyncMessage_PniIdentity{} - mi := &file_signalpb_SignalService_proto_msgTypes[66] + mi := &file_SignalService_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7219,7 +6845,7 @@ func (x *SyncMessage_PniIdentity) String() string { func (*SyncMessage_PniIdentity) ProtoMessage() {} func (x *SyncMessage_PniIdentity) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[66] + mi := &file_SignalService_proto_msgTypes[65] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7232,7 +6858,7 @@ func (x *SyncMessage_PniIdentity) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_PniIdentity.ProtoReflect.Descriptor instead. func (*SyncMessage_PniIdentity) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 11} + return file_SignalService_proto_rawDescGZIP(), []int{11, 11} } func (x *SyncMessage_PniIdentity) GetPublicKey() []byte { @@ -7261,7 +6887,7 @@ type SyncMessage_MessageRequestResponse struct { func (x *SyncMessage_MessageRequestResponse) Reset() { *x = SyncMessage_MessageRequestResponse{} - mi := &file_signalpb_SignalService_proto_msgTypes[67] + mi := &file_SignalService_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7273,7 +6899,7 @@ func (x *SyncMessage_MessageRequestResponse) String() string { func (*SyncMessage_MessageRequestResponse) ProtoMessage() {} func (x *SyncMessage_MessageRequestResponse) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[67] + mi := &file_SignalService_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7286,7 +6912,7 @@ func (x *SyncMessage_MessageRequestResponse) ProtoReflect() protoreflect.Message // Deprecated: Use SyncMessage_MessageRequestResponse.ProtoReflect.Descriptor instead. func (*SyncMessage_MessageRequestResponse) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 12} + return file_SignalService_proto_rawDescGZIP(), []int{11, 12} } func (x *SyncMessage_MessageRequestResponse) GetThreadAci() string { @@ -7331,7 +6957,7 @@ type SyncMessage_OutgoingPayment struct { func (x *SyncMessage_OutgoingPayment) Reset() { *x = SyncMessage_OutgoingPayment{} - mi := &file_signalpb_SignalService_proto_msgTypes[68] + mi := &file_SignalService_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7343,7 +6969,7 @@ func (x *SyncMessage_OutgoingPayment) String() string { func (*SyncMessage_OutgoingPayment) ProtoMessage() {} func (x *SyncMessage_OutgoingPayment) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[68] + mi := &file_SignalService_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7356,7 +6982,7 @@ func (x *SyncMessage_OutgoingPayment) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_OutgoingPayment.ProtoReflect.Descriptor instead. func (*SyncMessage_OutgoingPayment) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 13} + return file_SignalService_proto_rawDescGZIP(), []int{11, 13} } func (x *SyncMessage_OutgoingPayment) GetRecipientServiceId() string { @@ -7413,7 +7039,7 @@ type SyncMessage_PniChangeNumber struct { func (x *SyncMessage_PniChangeNumber) Reset() { *x = SyncMessage_PniChangeNumber{} - mi := &file_signalpb_SignalService_proto_msgTypes[69] + mi := &file_SignalService_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7425,7 +7051,7 @@ func (x *SyncMessage_PniChangeNumber) String() string { func (*SyncMessage_PniChangeNumber) ProtoMessage() {} func (x *SyncMessage_PniChangeNumber) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[69] + mi := &file_SignalService_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7438,7 +7064,7 @@ func (x *SyncMessage_PniChangeNumber) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_PniChangeNumber.ProtoReflect.Descriptor instead. func (*SyncMessage_PniChangeNumber) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 14} + return file_SignalService_proto_rawDescGZIP(), []int{11, 14} } func (x *SyncMessage_PniChangeNumber) GetIdentityKeyPair() []byte { @@ -7495,7 +7121,7 @@ type SyncMessage_CallEvent struct { func (x *SyncMessage_CallEvent) Reset() { *x = SyncMessage_CallEvent{} - mi := &file_signalpb_SignalService_proto_msgTypes[70] + mi := &file_SignalService_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7507,7 +7133,7 @@ func (x *SyncMessage_CallEvent) String() string { func (*SyncMessage_CallEvent) ProtoMessage() {} func (x *SyncMessage_CallEvent) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[70] + mi := &file_SignalService_proto_msgTypes[69] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7520,7 +7146,7 @@ func (x *SyncMessage_CallEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_CallEvent.ProtoReflect.Descriptor instead. func (*SyncMessage_CallEvent) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 15} + return file_SignalService_proto_rawDescGZIP(), []int{11, 15} } func (x *SyncMessage_CallEvent) GetConversationId() []byte { @@ -7570,13 +7196,14 @@ type SyncMessage_CallLinkUpdate struct { RootKey []byte `protobuf:"bytes,1,opt,name=rootKey" json:"rootKey,omitempty"` AdminPasskey []byte `protobuf:"bytes,2,opt,name=adminPasskey" json:"adminPasskey,omitempty"` Type *SyncMessage_CallLinkUpdate_Type `protobuf:"varint,3,opt,name=type,enum=signalservice.SyncMessage_CallLinkUpdate_Type" json:"type,omitempty"` // defaults to UPDATE + Epoch []byte `protobuf:"bytes,4,opt,name=epoch" json:"epoch,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *SyncMessage_CallLinkUpdate) Reset() { *x = SyncMessage_CallLinkUpdate{} - mi := &file_signalpb_SignalService_proto_msgTypes[71] + mi := &file_SignalService_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7588,7 +7215,7 @@ func (x *SyncMessage_CallLinkUpdate) String() string { func (*SyncMessage_CallLinkUpdate) ProtoMessage() {} func (x *SyncMessage_CallLinkUpdate) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[71] + mi := &file_SignalService_proto_msgTypes[70] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7601,7 +7228,7 @@ func (x *SyncMessage_CallLinkUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_CallLinkUpdate.ProtoReflect.Descriptor instead. func (*SyncMessage_CallLinkUpdate) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 16} + return file_SignalService_proto_rawDescGZIP(), []int{11, 16} } func (x *SyncMessage_CallLinkUpdate) GetRootKey() []byte { @@ -7625,6 +7252,13 @@ func (x *SyncMessage_CallLinkUpdate) GetType() SyncMessage_CallLinkUpdate_Type { return SyncMessage_CallLinkUpdate_UPDATE } +func (x *SyncMessage_CallLinkUpdate) GetEpoch() []byte { + if x != nil { + return x.Epoch + } + return nil +} + type SyncMessage_CallLogEvent struct { state protoimpl.MessageState `protogen:"open.v1"` Type *SyncMessage_CallLogEvent_Type `protobuf:"varint,1,opt,name=type,enum=signalservice.SyncMessage_CallLogEvent_Type" json:"type,omitempty"` @@ -7642,7 +7276,7 @@ type SyncMessage_CallLogEvent struct { func (x *SyncMessage_CallLogEvent) Reset() { *x = SyncMessage_CallLogEvent{} - mi := &file_signalpb_SignalService_proto_msgTypes[72] + mi := &file_SignalService_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7654,7 +7288,7 @@ func (x *SyncMessage_CallLogEvent) String() string { func (*SyncMessage_CallLogEvent) ProtoMessage() {} func (x *SyncMessage_CallLogEvent) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[72] + mi := &file_SignalService_proto_msgTypes[71] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7667,7 +7301,7 @@ func (x *SyncMessage_CallLogEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_CallLogEvent.ProtoReflect.Descriptor instead. func (*SyncMessage_CallLogEvent) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 17} + return file_SignalService_proto_rawDescGZIP(), []int{11, 17} } func (x *SyncMessage_CallLogEvent) GetType() SyncMessage_CallLogEvent_Type { @@ -7710,7 +7344,7 @@ type SyncMessage_DeleteForMe struct { func (x *SyncMessage_DeleteForMe) Reset() { *x = SyncMessage_DeleteForMe{} - mi := &file_signalpb_SignalService_proto_msgTypes[73] + mi := &file_SignalService_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7722,7 +7356,7 @@ func (x *SyncMessage_DeleteForMe) String() string { func (*SyncMessage_DeleteForMe) ProtoMessage() {} func (x *SyncMessage_DeleteForMe) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[73] + mi := &file_SignalService_proto_msgTypes[72] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7735,7 +7369,7 @@ func (x *SyncMessage_DeleteForMe) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_DeleteForMe.ProtoReflect.Descriptor instead. func (*SyncMessage_DeleteForMe) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 18} + return file_SignalService_proto_rawDescGZIP(), []int{11, 18} } func (x *SyncMessage_DeleteForMe) GetMessageDeletes() []*SyncMessage_DeleteForMe_MessageDeletes { @@ -7775,7 +7409,7 @@ type SyncMessage_DeviceNameChange struct { func (x *SyncMessage_DeviceNameChange) Reset() { *x = SyncMessage_DeviceNameChange{} - mi := &file_signalpb_SignalService_proto_msgTypes[74] + mi := &file_SignalService_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7787,7 +7421,7 @@ func (x *SyncMessage_DeviceNameChange) String() string { func (*SyncMessage_DeviceNameChange) ProtoMessage() {} func (x *SyncMessage_DeviceNameChange) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[74] + mi := &file_SignalService_proto_msgTypes[73] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7800,7 +7434,7 @@ func (x *SyncMessage_DeviceNameChange) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncMessage_DeviceNameChange.ProtoReflect.Descriptor instead. func (*SyncMessage_DeviceNameChange) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 19} + return file_SignalService_proto_rawDescGZIP(), []int{11, 19} } func (x *SyncMessage_DeviceNameChange) GetDeviceId() uint32 { @@ -7820,7 +7454,7 @@ type SyncMessage_AttachmentBackfillRequest struct { func (x *SyncMessage_AttachmentBackfillRequest) Reset() { *x = SyncMessage_AttachmentBackfillRequest{} - mi := &file_signalpb_SignalService_proto_msgTypes[75] + mi := &file_SignalService_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7832,7 +7466,7 @@ func (x *SyncMessage_AttachmentBackfillRequest) String() string { func (*SyncMessage_AttachmentBackfillRequest) ProtoMessage() {} func (x *SyncMessage_AttachmentBackfillRequest) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[75] + mi := &file_SignalService_proto_msgTypes[74] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7845,7 +7479,7 @@ func (x *SyncMessage_AttachmentBackfillRequest) ProtoReflect() protoreflect.Mess // Deprecated: Use SyncMessage_AttachmentBackfillRequest.ProtoReflect.Descriptor instead. func (*SyncMessage_AttachmentBackfillRequest) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 20} + return file_SignalService_proto_rawDescGZIP(), []int{11, 20} } func (x *SyncMessage_AttachmentBackfillRequest) GetTargetMessage() *AddressableMessage { @@ -7877,7 +7511,7 @@ type SyncMessage_AttachmentBackfillResponse struct { func (x *SyncMessage_AttachmentBackfillResponse) Reset() { *x = SyncMessage_AttachmentBackfillResponse{} - mi := &file_signalpb_SignalService_proto_msgTypes[76] + mi := &file_SignalService_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7889,7 +7523,7 @@ func (x *SyncMessage_AttachmentBackfillResponse) String() string { func (*SyncMessage_AttachmentBackfillResponse) ProtoMessage() {} func (x *SyncMessage_AttachmentBackfillResponse) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[76] + mi := &file_SignalService_proto_msgTypes[75] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7902,7 +7536,7 @@ func (x *SyncMessage_AttachmentBackfillResponse) ProtoReflect() protoreflect.Mes // Deprecated: Use SyncMessage_AttachmentBackfillResponse.ProtoReflect.Descriptor instead. func (*SyncMessage_AttachmentBackfillResponse) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 21} + return file_SignalService_proto_rawDescGZIP(), []int{11, 21} } func (x *SyncMessage_AttachmentBackfillResponse) GetTargetMessage() *AddressableMessage { @@ -7962,42 +7596,6 @@ func (*SyncMessage_AttachmentBackfillResponse_Attachments) isSyncMessage_Attachm func (*SyncMessage_AttachmentBackfillResponse_Error_) isSyncMessage_AttachmentBackfillResponse_Data() { } -type SyncMessage_UsernameChange struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SyncMessage_UsernameChange) Reset() { - *x = SyncMessage_UsernameChange{} - mi := &file_signalpb_SignalService_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SyncMessage_UsernameChange) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SyncMessage_UsernameChange) ProtoMessage() {} - -func (x *SyncMessage_UsernameChange) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[77] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SyncMessage_UsernameChange.ProtoReflect.Descriptor instead. -func (*SyncMessage_UsernameChange) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 22} -} - type SyncMessage_Sent_UnidentifiedDeliveryStatus struct { state protoimpl.MessageState `protogen:"open.v1"` DestinationServiceId *string `protobuf:"bytes,3,opt,name=destinationServiceId" json:"destinationServiceId,omitempty"` @@ -8010,7 +7608,7 @@ type SyncMessage_Sent_UnidentifiedDeliveryStatus struct { func (x *SyncMessage_Sent_UnidentifiedDeliveryStatus) Reset() { *x = SyncMessage_Sent_UnidentifiedDeliveryStatus{} - mi := &file_signalpb_SignalService_proto_msgTypes[78] + mi := &file_SignalService_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8022,7 +7620,7 @@ func (x *SyncMessage_Sent_UnidentifiedDeliveryStatus) String() string { func (*SyncMessage_Sent_UnidentifiedDeliveryStatus) ProtoMessage() {} func (x *SyncMessage_Sent_UnidentifiedDeliveryStatus) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[78] + mi := &file_SignalService_proto_msgTypes[76] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8035,7 +7633,7 @@ func (x *SyncMessage_Sent_UnidentifiedDeliveryStatus) ProtoReflect() protoreflec // Deprecated: Use SyncMessage_Sent_UnidentifiedDeliveryStatus.ProtoReflect.Descriptor instead. func (*SyncMessage_Sent_UnidentifiedDeliveryStatus) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 0, 0} + return file_SignalService_proto_rawDescGZIP(), []int{11, 0, 0} } func (x *SyncMessage_Sent_UnidentifiedDeliveryStatus) GetDestinationServiceId() string { @@ -8078,7 +7676,7 @@ type SyncMessage_Sent_StoryMessageRecipient struct { func (x *SyncMessage_Sent_StoryMessageRecipient) Reset() { *x = SyncMessage_Sent_StoryMessageRecipient{} - mi := &file_signalpb_SignalService_proto_msgTypes[79] + mi := &file_SignalService_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8090,7 +7688,7 @@ func (x *SyncMessage_Sent_StoryMessageRecipient) String() string { func (*SyncMessage_Sent_StoryMessageRecipient) ProtoMessage() {} func (x *SyncMessage_Sent_StoryMessageRecipient) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[79] + mi := &file_SignalService_proto_msgTypes[77] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8103,7 +7701,7 @@ func (x *SyncMessage_Sent_StoryMessageRecipient) ProtoReflect() protoreflect.Mes // Deprecated: Use SyncMessage_Sent_StoryMessageRecipient.ProtoReflect.Descriptor instead. func (*SyncMessage_Sent_StoryMessageRecipient) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 0, 1} + return file_SignalService_proto_rawDescGZIP(), []int{11, 0, 1} } func (x *SyncMessage_Sent_StoryMessageRecipient) GetDestinationServiceId() string { @@ -8134,162 +7732,6 @@ func (x *SyncMessage_Sent_StoryMessageRecipient) GetDestinationServiceIdBinary() return nil } -type SyncMessage_Blocked_BlockedE164 struct { - state protoimpl.MessageState `protogen:"open.v1"` - E164 *string `protobuf:"bytes,1,opt,name=e164" json:"e164,omitempty"` - Timestamp *uint64 `protobuf:"varint,2,opt,name=timestamp" json:"timestamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SyncMessage_Blocked_BlockedE164) Reset() { - *x = SyncMessage_Blocked_BlockedE164{} - mi := &file_signalpb_SignalService_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SyncMessage_Blocked_BlockedE164) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SyncMessage_Blocked_BlockedE164) ProtoMessage() {} - -func (x *SyncMessage_Blocked_BlockedE164) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[80] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SyncMessage_Blocked_BlockedE164.ProtoReflect.Descriptor instead. -func (*SyncMessage_Blocked_BlockedE164) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 2, 0} -} - -func (x *SyncMessage_Blocked_BlockedE164) GetE164() string { - if x != nil && x.E164 != nil { - return *x.E164 - } - return "" -} - -func (x *SyncMessage_Blocked_BlockedE164) GetTimestamp() uint64 { - if x != nil && x.Timestamp != nil { - return *x.Timestamp - } - return 0 -} - -type SyncMessage_Blocked_BlockedAci struct { - state protoimpl.MessageState `protogen:"open.v1"` - AciBinary []byte `protobuf:"bytes,1,opt,name=aciBinary" json:"aciBinary,omitempty"` // 16-byte UUID - Timestamp *uint64 `protobuf:"varint,2,opt,name=timestamp" json:"timestamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SyncMessage_Blocked_BlockedAci) Reset() { - *x = SyncMessage_Blocked_BlockedAci{} - mi := &file_signalpb_SignalService_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SyncMessage_Blocked_BlockedAci) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SyncMessage_Blocked_BlockedAci) ProtoMessage() {} - -func (x *SyncMessage_Blocked_BlockedAci) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[81] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SyncMessage_Blocked_BlockedAci.ProtoReflect.Descriptor instead. -func (*SyncMessage_Blocked_BlockedAci) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 2, 1} -} - -func (x *SyncMessage_Blocked_BlockedAci) GetAciBinary() []byte { - if x != nil { - return x.AciBinary - } - return nil -} - -func (x *SyncMessage_Blocked_BlockedAci) GetTimestamp() uint64 { - if x != nil && x.Timestamp != nil { - return *x.Timestamp - } - return 0 -} - -type SyncMessage_Blocked_BlockedGroup struct { - state protoimpl.MessageState `protogen:"open.v1"` - GroupId []byte `protobuf:"bytes,1,opt,name=groupId" json:"groupId,omitempty"` - Timestamp *uint64 `protobuf:"varint,2,opt,name=timestamp" json:"timestamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SyncMessage_Blocked_BlockedGroup) Reset() { - *x = SyncMessage_Blocked_BlockedGroup{} - mi := &file_signalpb_SignalService_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SyncMessage_Blocked_BlockedGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SyncMessage_Blocked_BlockedGroup) ProtoMessage() {} - -func (x *SyncMessage_Blocked_BlockedGroup) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[82] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SyncMessage_Blocked_BlockedGroup.ProtoReflect.Descriptor instead. -func (*SyncMessage_Blocked_BlockedGroup) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 2, 2} -} - -func (x *SyncMessage_Blocked_BlockedGroup) GetGroupId() []byte { - if x != nil { - return x.GroupId - } - return nil -} - -func (x *SyncMessage_Blocked_BlockedGroup) GetTimestamp() uint64 { - if x != nil && x.Timestamp != nil { - return *x.Timestamp - } - return 0 -} - type SyncMessage_OutgoingPayment_MobileCoin struct { state protoimpl.MessageState `protogen:"open.v1"` RecipientAddress []byte `protobuf:"bytes,1,opt,name=recipientAddress" json:"recipientAddress,omitempty"` @@ -8306,7 +7748,7 @@ type SyncMessage_OutgoingPayment_MobileCoin struct { func (x *SyncMessage_OutgoingPayment_MobileCoin) Reset() { *x = SyncMessage_OutgoingPayment_MobileCoin{} - mi := &file_signalpb_SignalService_proto_msgTypes[83] + mi := &file_SignalService_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8318,7 +7760,7 @@ func (x *SyncMessage_OutgoingPayment_MobileCoin) String() string { func (*SyncMessage_OutgoingPayment_MobileCoin) ProtoMessage() {} func (x *SyncMessage_OutgoingPayment_MobileCoin) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[83] + mi := &file_SignalService_proto_msgTypes[78] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8331,7 +7773,7 @@ func (x *SyncMessage_OutgoingPayment_MobileCoin) ProtoReflect() protoreflect.Mes // Deprecated: Use SyncMessage_OutgoingPayment_MobileCoin.ProtoReflect.Descriptor instead. func (*SyncMessage_OutgoingPayment_MobileCoin) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 13, 0} + return file_SignalService_proto_rawDescGZIP(), []int{11, 13, 0} } func (x *SyncMessage_OutgoingPayment_MobileCoin) GetRecipientAddress() []byte { @@ -8400,7 +7842,7 @@ type SyncMessage_DeleteForMe_MessageDeletes struct { func (x *SyncMessage_DeleteForMe_MessageDeletes) Reset() { *x = SyncMessage_DeleteForMe_MessageDeletes{} - mi := &file_signalpb_SignalService_proto_msgTypes[84] + mi := &file_SignalService_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8412,7 +7854,7 @@ func (x *SyncMessage_DeleteForMe_MessageDeletes) String() string { func (*SyncMessage_DeleteForMe_MessageDeletes) ProtoMessage() {} func (x *SyncMessage_DeleteForMe_MessageDeletes) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[84] + mi := &file_SignalService_proto_msgTypes[79] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8425,7 +7867,7 @@ func (x *SyncMessage_DeleteForMe_MessageDeletes) ProtoReflect() protoreflect.Mes // Deprecated: Use SyncMessage_DeleteForMe_MessageDeletes.ProtoReflect.Descriptor instead. func (*SyncMessage_DeleteForMe_MessageDeletes) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 18, 0} + return file_SignalService_proto_rawDescGZIP(), []int{11, 18, 0} } func (x *SyncMessage_DeleteForMe_MessageDeletes) GetConversation() *ConversationIdentifier { @@ -8458,7 +7900,7 @@ type SyncMessage_DeleteForMe_AttachmentDelete struct { func (x *SyncMessage_DeleteForMe_AttachmentDelete) Reset() { *x = SyncMessage_DeleteForMe_AttachmentDelete{} - mi := &file_signalpb_SignalService_proto_msgTypes[85] + mi := &file_SignalService_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8470,7 +7912,7 @@ func (x *SyncMessage_DeleteForMe_AttachmentDelete) String() string { func (*SyncMessage_DeleteForMe_AttachmentDelete) ProtoMessage() {} func (x *SyncMessage_DeleteForMe_AttachmentDelete) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[85] + mi := &file_SignalService_proto_msgTypes[80] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8483,7 +7925,7 @@ func (x *SyncMessage_DeleteForMe_AttachmentDelete) ProtoReflect() protoreflect.M // Deprecated: Use SyncMessage_DeleteForMe_AttachmentDelete.ProtoReflect.Descriptor instead. func (*SyncMessage_DeleteForMe_AttachmentDelete) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 18, 1} + return file_SignalService_proto_rawDescGZIP(), []int{11, 18, 1} } func (x *SyncMessage_DeleteForMe_AttachmentDelete) GetConversation() *ConversationIdentifier { @@ -8533,7 +7975,7 @@ type SyncMessage_DeleteForMe_ConversationDelete struct { func (x *SyncMessage_DeleteForMe_ConversationDelete) Reset() { *x = SyncMessage_DeleteForMe_ConversationDelete{} - mi := &file_signalpb_SignalService_proto_msgTypes[86] + mi := &file_SignalService_proto_msgTypes[81] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8545,7 +7987,7 @@ func (x *SyncMessage_DeleteForMe_ConversationDelete) String() string { func (*SyncMessage_DeleteForMe_ConversationDelete) ProtoMessage() {} func (x *SyncMessage_DeleteForMe_ConversationDelete) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[86] + mi := &file_SignalService_proto_msgTypes[81] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8558,7 +8000,7 @@ func (x *SyncMessage_DeleteForMe_ConversationDelete) ProtoReflect() protoreflect // Deprecated: Use SyncMessage_DeleteForMe_ConversationDelete.ProtoReflect.Descriptor instead. func (*SyncMessage_DeleteForMe_ConversationDelete) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 18, 2} + return file_SignalService_proto_rawDescGZIP(), []int{11, 18, 2} } func (x *SyncMessage_DeleteForMe_ConversationDelete) GetConversation() *ConversationIdentifier { @@ -8598,7 +8040,7 @@ type SyncMessage_DeleteForMe_LocalOnlyConversationDelete struct { func (x *SyncMessage_DeleteForMe_LocalOnlyConversationDelete) Reset() { *x = SyncMessage_DeleteForMe_LocalOnlyConversationDelete{} - mi := &file_signalpb_SignalService_proto_msgTypes[87] + mi := &file_SignalService_proto_msgTypes[82] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8610,7 +8052,7 @@ func (x *SyncMessage_DeleteForMe_LocalOnlyConversationDelete) String() string { func (*SyncMessage_DeleteForMe_LocalOnlyConversationDelete) ProtoMessage() {} func (x *SyncMessage_DeleteForMe_LocalOnlyConversationDelete) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[87] + mi := &file_SignalService_proto_msgTypes[82] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8623,7 +8065,7 @@ func (x *SyncMessage_DeleteForMe_LocalOnlyConversationDelete) ProtoReflect() pro // Deprecated: Use SyncMessage_DeleteForMe_LocalOnlyConversationDelete.ProtoReflect.Descriptor instead. func (*SyncMessage_DeleteForMe_LocalOnlyConversationDelete) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 18, 3} + return file_SignalService_proto_rawDescGZIP(), []int{11, 18, 3} } func (x *SyncMessage_DeleteForMe_LocalOnlyConversationDelete) GetConversation() *ConversationIdentifier { @@ -8646,7 +8088,7 @@ type SyncMessage_AttachmentBackfillResponse_AttachmentData struct { func (x *SyncMessage_AttachmentBackfillResponse_AttachmentData) Reset() { *x = SyncMessage_AttachmentBackfillResponse_AttachmentData{} - mi := &file_signalpb_SignalService_proto_msgTypes[88] + mi := &file_SignalService_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8658,7 +8100,7 @@ func (x *SyncMessage_AttachmentBackfillResponse_AttachmentData) String() string func (*SyncMessage_AttachmentBackfillResponse_AttachmentData) ProtoMessage() {} func (x *SyncMessage_AttachmentBackfillResponse_AttachmentData) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[88] + mi := &file_SignalService_proto_msgTypes[83] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8671,7 +8113,7 @@ func (x *SyncMessage_AttachmentBackfillResponse_AttachmentData) ProtoReflect() p // Deprecated: Use SyncMessage_AttachmentBackfillResponse_AttachmentData.ProtoReflect.Descriptor instead. func (*SyncMessage_AttachmentBackfillResponse_AttachmentData) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 21, 0} + return file_SignalService_proto_rawDescGZIP(), []int{11, 21, 0} } func (x *SyncMessage_AttachmentBackfillResponse_AttachmentData) GetData() isSyncMessage_AttachmentBackfillResponse_AttachmentData_Data { @@ -8727,7 +8169,7 @@ type SyncMessage_AttachmentBackfillResponse_AttachmentDataList struct { func (x *SyncMessage_AttachmentBackfillResponse_AttachmentDataList) Reset() { *x = SyncMessage_AttachmentBackfillResponse_AttachmentDataList{} - mi := &file_signalpb_SignalService_proto_msgTypes[89] + mi := &file_SignalService_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8739,7 +8181,7 @@ func (x *SyncMessage_AttachmentBackfillResponse_AttachmentDataList) String() str func (*SyncMessage_AttachmentBackfillResponse_AttachmentDataList) ProtoMessage() {} func (x *SyncMessage_AttachmentBackfillResponse_AttachmentDataList) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[89] + mi := &file_SignalService_proto_msgTypes[84] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8752,7 +8194,7 @@ func (x *SyncMessage_AttachmentBackfillResponse_AttachmentDataList) ProtoReflect // Deprecated: Use SyncMessage_AttachmentBackfillResponse_AttachmentDataList.ProtoReflect.Descriptor instead. func (*SyncMessage_AttachmentBackfillResponse_AttachmentDataList) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{11, 21, 1} + return file_SignalService_proto_rawDescGZIP(), []int{11, 21, 1} } func (x *SyncMessage_AttachmentBackfillResponse_AttachmentDataList) GetAttachments() []*SyncMessage_AttachmentBackfillResponse_AttachmentData { @@ -8779,7 +8221,7 @@ type ContactDetails_Avatar struct { func (x *ContactDetails_Avatar) Reset() { *x = ContactDetails_Avatar{} - mi := &file_signalpb_SignalService_proto_msgTypes[90] + mi := &file_SignalService_proto_msgTypes[85] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8791,7 +8233,7 @@ func (x *ContactDetails_Avatar) String() string { func (*ContactDetails_Avatar) ProtoMessage() {} func (x *ContactDetails_Avatar) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[90] + mi := &file_SignalService_proto_msgTypes[85] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8804,7 +8246,7 @@ func (x *ContactDetails_Avatar) ProtoReflect() protoreflect.Message { // Deprecated: Use ContactDetails_Avatar.ProtoReflect.Descriptor instead. func (*ContactDetails_Avatar) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{14, 0} + return file_SignalService_proto_rawDescGZIP(), []int{14, 0} } func (x *ContactDetails_Avatar) GetContentType() string { @@ -8831,7 +8273,7 @@ type PaymentAddress_MobileCoin struct { func (x *PaymentAddress_MobileCoin) Reset() { *x = PaymentAddress_MobileCoin{} - mi := &file_signalpb_SignalService_proto_msgTypes[91] + mi := &file_SignalService_proto_msgTypes[86] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8843,7 +8285,7 @@ func (x *PaymentAddress_MobileCoin) String() string { func (*PaymentAddress_MobileCoin) ProtoMessage() {} func (x *PaymentAddress_MobileCoin) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_SignalService_proto_msgTypes[91] + mi := &file_SignalService_proto_msgTypes[86] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8856,7 +8298,7 @@ func (x *PaymentAddress_MobileCoin) ProtoReflect() protoreflect.Message { // Deprecated: Use PaymentAddress_MobileCoin.ProtoReflect.Descriptor instead. func (*PaymentAddress_MobileCoin) Descriptor() ([]byte, []int) { - return file_signalpb_SignalService_proto_rawDescGZIP(), []int{15, 0} + return file_SignalService_proto_rawDescGZIP(), []int{15, 0} } func (x *PaymentAddress_MobileCoin) GetPublicAddress() []byte { @@ -8873,17 +8315,17 @@ func (x *PaymentAddress_MobileCoin) GetSignature() []byte { return nil } -var File_signalpb_SignalService_proto protoreflect.FileDescriptor +var File_SignalService_proto protoreflect.FileDescriptor -const file_signalpb_SignalService_proto_rawDesc = "" + +const file_SignalService_proto_rawDesc = "" + "\n" + - "\x1csignalpb/SignalService.proto\x12\rsignalservice\"\x8c\a\n" + + "\x13SignalService.proto\x12\rsignalservice\"\xf5\x06\n" + "\bEnvelope\x120\n" + "\x04type\x18\x01 \x01(\x0e2\x1c.signalservice.Envelope.TypeR\x04type\x12(\n" + - "\x0fsourceServiceId\x18\v \x01(\tR\x0fsourceServiceId\x12&\n" + - "\x0esourceDeviceId\x18\a \x01(\rR\x0esourceDeviceId\x122\n" + - "\x14destinationServiceId\x18\r \x01(\tR\x14destinationServiceId\x12(\n" + - "\x0fclientTimestamp\x18\x05 \x01(\x04R\x0fclientTimestamp\x12\x18\n" + + "\x0fsourceServiceId\x18\v \x01(\tR\x0fsourceServiceId\x12\"\n" + + "\fsourceDevice\x18\a \x01(\rR\fsourceDevice\x122\n" + + "\x14destinationServiceId\x18\r \x01(\tR\x14destinationServiceId\x12\x1c\n" + + "\ttimestamp\x18\x05 \x01(\x04R\ttimestamp\x12\x18\n" + "\acontent\x18\b \x01(\fR\acontent\x12\x1e\n" + "\n" + "serverGuid\x18\t \x01(\tR\n" + @@ -8900,28 +8342,29 @@ const file_signalpb_SignalService_proto_rawDesc = "" + "\x15sourceServiceIdBinary\x18\x13 \x01(\fR\x15sourceServiceIdBinary\x12>\n" + "\x1adestinationServiceIdBinary\x18\x14 \x01(\fR\x1adestinationServiceIdBinary\x12*\n" + "\x10serverGuidBinary\x18\x15 \x01(\fR\x10serverGuidBinary\x12*\n" + - "\x10updatedPniBinary\x18\x16 \x01(\fR\x10updatedPniBinary\"\xb5\x01\n" + + "\x10updatedPniBinary\x18\x16 \x01(\fR\x10updatedPniBinary\"\xae\x01\n" + "\x04Type\x12\v\n" + - "\aUNKNOWN\x10\x00\x12\x12\n" + - "\x0eDOUBLE_RATCHET\x10\x01\x12\x12\n" + - "\x0ePREKEY_MESSAGE\x10\x03\x12\x1b\n" + + "\aUNKNOWN\x10\x00\x12\x0e\n" + + "\n" + + "CIPHERTEXT\x10\x01\x12\x11\n" + + "\rPREKEY_BUNDLE\x10\x03\x12\x1b\n" + "\x17SERVER_DELIVERY_RECEIPT\x10\x05\x12\x17\n" + "\x13UNIDENTIFIED_SENDER\x10\x06\x12\x15\n" + - "\x11PLAINTEXT_CONTENT\x10\b\"\x04\b\x02\x10\x02\"\x04\b\a\x10\a*\fKEY_EXCHANGE*\x11SENDERKEY_MESSAGEJ\x04\b\x02\x10\x03J\x04\b\x03\x10\x04J\x04\b\x06\x10\aJ\x04\b\x12\x10\x13\"\xfa\x05\n" + - "\aContent\x12>\n" + - "\vdataMessage\x18\x01 \x01(\v2\x1a.signalservice.DataMessageH\x00R\vdataMessage\x12>\n" + - "\vsyncMessage\x18\x02 \x01(\v2\x1a.signalservice.SyncMessageH\x00R\vsyncMessage\x12>\n" + - "\vcallMessage\x18\x03 \x01(\v2\x1a.signalservice.CallMessageH\x00R\vcallMessage\x12>\n" + - "\vnullMessage\x18\x04 \x01(\v2\x1a.signalservice.NullMessageH\x00R\vnullMessage\x12G\n" + - "\x0ereceiptMessage\x18\x05 \x01(\v2\x1d.signalservice.ReceiptMessageH\x00R\x0ereceiptMessage\x12D\n" + - "\rtypingMessage\x18\x06 \x01(\v2\x1c.signalservice.TypingMessageH\x00R\rtypingMessage\x128\n" + - "\x16decryptionErrorMessage\x18\b \x01(\fH\x00R\x16decryptionErrorMessage\x12A\n" + - "\fstoryMessage\x18\t \x01(\v2\x1b.signalservice.StoryMessageH\x00R\fstoryMessage\x12>\n" + - "\veditMessage\x18\v \x01(\v2\x1a.signalservice.EditMessageH\x00R\veditMessage\x12B\n" + - "\x1csenderKeyDistributionMessage\x18\a \x01(\fR\x1csenderKeyDistributionMessage\x12T\n" + + "\x11SENDERKEY_MESSAGE\x10\a\x12\x15\n" + + "\x11PLAINTEXT_CONTENT\x10\b\"\x04\b\x02\x10\x02*\fKEY_EXCHANGEJ\x04\b\x02\x10\x03J\x04\b\x03\x10\x04J\x04\b\x06\x10\aJ\x04\b\x12\x10\x13\"\xdd\x05\n" + + "\aContent\x12<\n" + + "\vdataMessage\x18\x01 \x01(\v2\x1a.signalservice.DataMessageR\vdataMessage\x12<\n" + + "\vsyncMessage\x18\x02 \x01(\v2\x1a.signalservice.SyncMessageR\vsyncMessage\x12<\n" + + "\vcallMessage\x18\x03 \x01(\v2\x1a.signalservice.CallMessageR\vcallMessage\x12<\n" + + "\vnullMessage\x18\x04 \x01(\v2\x1a.signalservice.NullMessageR\vnullMessage\x12E\n" + + "\x0ereceiptMessage\x18\x05 \x01(\v2\x1d.signalservice.ReceiptMessageR\x0ereceiptMessage\x12B\n" + + "\rtypingMessage\x18\x06 \x01(\v2\x1c.signalservice.TypingMessageR\rtypingMessage\x12B\n" + + "\x1csenderKeyDistributionMessage\x18\a \x01(\fR\x1csenderKeyDistributionMessage\x126\n" + + "\x16decryptionErrorMessage\x18\b \x01(\fR\x16decryptionErrorMessage\x12?\n" + + "\fstoryMessage\x18\t \x01(\v2\x1b.signalservice.StoryMessageR\fstoryMessage\x12T\n" + "\x13pniSignatureMessage\x18\n" + - " \x01(\v2\".signalservice.PniSignatureMessageR\x13pniSignatureMessageB\t\n" + - "\acontent\"\xf2\b\n" + + " \x01(\v2\".signalservice.PniSignatureMessageR\x13pniSignatureMessage\x12<\n" + + "\veditMessage\x18\v \x01(\v2\x1a.signalservice.EditMessageR\veditMessage\"\xf2\b\n" + "\vCallMessage\x126\n" + "\x05offer\x18\x01 \x01(\v2 .signalservice.CallMessage.OfferR\x05offer\x129\n" + "\x06answer\x18\x02 \x01(\v2!.signalservice.CallMessage.AnswerR\x06answer\x12B\n" + @@ -8961,7 +8404,7 @@ const file_signalpb_SignalService_proto_rawDesc = "" + "\aurgency\x18\x02 \x01(\x0e2).signalservice.CallMessage.Opaque.UrgencyR\aurgency\"0\n" + "\aUrgency\x12\r\n" + "\tDROPPABLE\x10\x00\x12\x16\n" + - "\x12HANDLE_IMMEDIATELY\x10\x01J\x04\b\x04\x10\x05J\x04\b\x06\x10\aJ\x04\b\b\x10\t\"\x80.\n" + + "\x12HANDLE_IMMEDIATELY\x10\x01J\x04\b\x04\x10\x05J\x04\b\x06\x10\aJ\x04\b\b\x10\t\"\xca,\n" + "\vDataMessage\x12\x12\n" + "\x04body\x18\x01 \x01(\tR\x04body\x12B\n" + "\vattachments\x18\x02 \x03(\v2 .signalservice.AttachmentPointerR\vattachments\x127\n" + @@ -8999,8 +8442,7 @@ const file_signalpb_SignalService_proto_rawDesc = "" + "\n" + "pinMessage\x18\x1b \x01(\v2%.signalservice.DataMessage.PinMessageR\n" + "pinMessage\x12K\n" + - "\funpinMessage\x18\x1c \x01(\v2'.signalservice.DataMessage.UnpinMessageR\funpinMessage\x12H\n" + - "\vadminDelete\x18\x1d \x01(\v2&.signalservice.DataMessage.AdminDeleteR\vadminDelete\x1a\x9a\x05\n" + + "\funpinMessage\x18\x1c \x01(\v2'.signalservice.DataMessage.UnpinMessageR\funpinMessage\x1a\x9a\x05\n" + "\aPayment\x12U\n" + "\fnotification\x18\x01 \x01(\v2/.signalservice.DataMessage.Payment.NotificationH\x00R\fnotification\x12O\n" + "\n" + @@ -9152,14 +8594,12 @@ const file_signalpb_SignalService_proto_rawDesc = "" + "\vpinDuration\x1av\n" + "\fUnpinMessage\x124\n" + "\x15targetAuthorAciBinary\x18\x01 \x01(\fR\x15targetAuthorAciBinary\x120\n" + - "\x13targetSentTimestamp\x18\x02 \x01(\x04R\x13targetSentTimestamp\x1au\n" + - "\vAdminDelete\x124\n" + - "\x15targetAuthorAciBinary\x18\x01 \x01(\fR\x15targetAuthorAciBinary\x120\n" + - "\x13targetSentTimestamp\x18\x02 \x01(\x04R\x13targetSentTimestamp\"O\n" + - "\x05Flags\x12\x1b\n" + + "\x13targetSentTimestamp\x18\x02 \x01(\x04R\x13targetSentTimestamp\"Z\n" + + "\x05Flags\x12\x0f\n" + + "\vEND_SESSION\x10\x01\x12\x1b\n" + "\x17EXPIRATION_TIMER_UPDATE\x10\x02\x12\x16\n" + "\x12PROFILE_KEY_UPDATE\x10\x04\x12\v\n" + - "\aFORWARD\x10\b\"\x04\b\x01\x10\x01\"\xbb\x01\n" + + "\aFORWARD\x10\b\"\xbb\x01\n" + "\x0fProtocolVersion\x12\v\n" + "\aINITIAL\x10\x00\x12\x12\n" + "\x0eMESSAGE_TIMERS\x10\x01\x12\r\n" + @@ -9243,33 +8683,32 @@ const file_signalpb_SignalService_proto_rawDesc = "" + "\aDEFAULT\x10\x00\x12\f\n" + "\bVERIFIED\x10\x01\x12\x0e\n" + "\n" + - "UNVERIFIED\x10\x02J\x04\b\x01\x10\x02\"\xa8K\n" + - "\vSyncMessage\x125\n" + - "\x04sent\x18\x01 \x01(\v2\x1f.signalservice.SyncMessage.SentH\x00R\x04sent\x12A\n" + - "\bcontacts\x18\x02 \x01(\v2#.signalservice.SyncMessage.ContactsH\x00R\bcontacts\x12>\n" + - "\arequest\x18\x04 \x01(\v2\".signalservice.SyncMessage.RequestH\x00R\arequest\x12>\n" + - "\ablocked\x18\x06 \x01(\v2\".signalservice.SyncMessage.BlockedH\x00R\ablocked\x125\n" + - "\bverified\x18\a \x01(\v2\x17.signalservice.VerifiedH\x00R\bverified\x12P\n" + - "\rconfiguration\x18\t \x01(\v2(.signalservice.SyncMessage.ConfigurationH\x00R\rconfiguration\x12M\n" + - "\fviewOnceOpen\x18\v \x01(\v2'.signalservice.SyncMessage.ViewOnceOpenH\x00R\fviewOnceOpen\x12J\n" + - "\vfetchLatest\x18\f \x01(\v2&.signalservice.SyncMessage.FetchLatestH\x00R\vfetchLatest\x125\n" + - "\x04keys\x18\r \x01(\v2\x1f.signalservice.SyncMessage.KeysH\x00R\x04keys\x12k\n" + - "\x16messageRequestResponse\x18\x0e \x01(\v21.signalservice.SyncMessage.MessageRequestResponseH\x00R\x16messageRequestResponse\x12V\n" + - "\x0foutgoingPayment\x18\x0f \x01(\v2*.signalservice.SyncMessage.OutgoingPaymentH\x00R\x0foutgoingPayment\x12V\n" + - "\x0fpniChangeNumber\x18\x12 \x01(\v2*.signalservice.SyncMessage.PniChangeNumberH\x00R\x0fpniChangeNumber\x12D\n" + - "\tcallEvent\x18\x13 \x01(\v2$.signalservice.SyncMessage.CallEventH\x00R\tcallEvent\x12S\n" + - "\x0ecallLinkUpdate\x18\x14 \x01(\v2).signalservice.SyncMessage.CallLinkUpdateH\x00R\x0ecallLinkUpdate\x12M\n" + - "\fcallLogEvent\x18\x15 \x01(\v2'.signalservice.SyncMessage.CallLogEventH\x00R\fcallLogEvent\x12J\n" + - "\vdeleteForMe\x18\x16 \x01(\v2&.signalservice.SyncMessage.DeleteForMeH\x00R\vdeleteForMe\x12Y\n" + - "\x10deviceNameChange\x18\x17 \x01(\v2+.signalservice.SyncMessage.DeviceNameChangeH\x00R\x10deviceNameChange\x12t\n" + - "\x19attachmentBackfillRequest\x18\x18 \x01(\v24.signalservice.SyncMessage.AttachmentBackfillRequestH\x00R\x19attachmentBackfillRequest\x12w\n" + - "\x1aattachmentBackfillResponse\x18\x19 \x01(\v25.signalservice.SyncMessage.AttachmentBackfillResponseH\x00R\x1aattachmentBackfillResponse\x12S\n" + - "\x0eusernameChange\x18\x1a \x01(\v2).signalservice.SyncMessage.UsernameChangeH\x00R\x0eusernameChange\x123\n" + - "\x04read\x18\x05 \x03(\v2\x1f.signalservice.SyncMessage.ReadR\x04read\x12c\n" + + "UNVERIFIED\x10\x02J\x04\b\x01\x10\x02\"\x8fG\n" + + "\vSyncMessage\x123\n" + + "\x04sent\x18\x01 \x01(\v2\x1f.signalservice.SyncMessage.SentR\x04sent\x12?\n" + + "\bcontacts\x18\x02 \x01(\v2#.signalservice.SyncMessage.ContactsR\bcontacts\x12<\n" + + "\arequest\x18\x04 \x01(\v2\".signalservice.SyncMessage.RequestR\arequest\x123\n" + + "\x04read\x18\x05 \x03(\v2\x1f.signalservice.SyncMessage.ReadR\x04read\x12<\n" + + "\ablocked\x18\x06 \x01(\v2\".signalservice.SyncMessage.BlockedR\ablocked\x123\n" + + "\bverified\x18\a \x01(\v2\x17.signalservice.VerifiedR\bverified\x12N\n" + + "\rconfiguration\x18\t \x01(\v2(.signalservice.SyncMessage.ConfigurationR\rconfiguration\x12\x18\n" + + "\apadding\x18\b \x01(\fR\apadding\x12c\n" + "\x14stickerPackOperation\x18\n" + - " \x03(\v2/.signalservice.SyncMessage.StickerPackOperationR\x14stickerPackOperation\x129\n" + - "\x06viewed\x18\x10 \x03(\v2!.signalservice.SyncMessage.ViewedR\x06viewed\x12\x18\n" + - "\apadding\x18\b \x01(\fR\apadding\x1a\xbc\t\n" + + " \x03(\v2/.signalservice.SyncMessage.StickerPackOperationR\x14stickerPackOperation\x12K\n" + + "\fviewOnceOpen\x18\v \x01(\v2'.signalservice.SyncMessage.ViewOnceOpenR\fviewOnceOpen\x12H\n" + + "\vfetchLatest\x18\f \x01(\v2&.signalservice.SyncMessage.FetchLatestR\vfetchLatest\x123\n" + + "\x04keys\x18\r \x01(\v2\x1f.signalservice.SyncMessage.KeysR\x04keys\x12i\n" + + "\x16messageRequestResponse\x18\x0e \x01(\v21.signalservice.SyncMessage.MessageRequestResponseR\x16messageRequestResponse\x12T\n" + + "\x0foutgoingPayment\x18\x0f \x01(\v2*.signalservice.SyncMessage.OutgoingPaymentR\x0foutgoingPayment\x129\n" + + "\x06viewed\x18\x10 \x03(\v2!.signalservice.SyncMessage.ViewedR\x06viewed\x12T\n" + + "\x0fpniChangeNumber\x18\x12 \x01(\v2*.signalservice.SyncMessage.PniChangeNumberR\x0fpniChangeNumber\x12B\n" + + "\tcallEvent\x18\x13 \x01(\v2$.signalservice.SyncMessage.CallEventR\tcallEvent\x12Q\n" + + "\x0ecallLinkUpdate\x18\x14 \x01(\v2).signalservice.SyncMessage.CallLinkUpdateR\x0ecallLinkUpdate\x12K\n" + + "\fcallLogEvent\x18\x15 \x01(\v2'.signalservice.SyncMessage.CallLogEventR\fcallLogEvent\x12H\n" + + "\vdeleteForMe\x18\x16 \x01(\v2&.signalservice.SyncMessage.DeleteForMeR\vdeleteForMe\x12W\n" + + "\x10deviceNameChange\x18\x17 \x01(\v2+.signalservice.SyncMessage.DeviceNameChangeR\x10deviceNameChange\x12r\n" + + "\x19attachmentBackfillRequest\x18\x18 \x01(\v24.signalservice.SyncMessage.AttachmentBackfillRequestR\x19attachmentBackfillRequest\x12u\n" + + "\x1aattachmentBackfillResponse\x18\x19 \x01(\v25.signalservice.SyncMessage.AttachmentBackfillResponseR\x1aattachmentBackfillResponse\x1a\xbc\t\n" + "\x04Sent\x12(\n" + "\x0fdestinationE164\x18\x01 \x01(\tR\x0fdestinationE164\x122\n" + "\x14destinationServiceId\x18\a \x01(\tR\x14destinationServiceId\x12\x1c\n" + @@ -9295,27 +8734,14 @@ const file_signalpb_SignalService_proto_rawDesc = "" + "\x1adestinationServiceIdBinary\x18\x05 \x01(\fR\x1adestinationServiceIdBinaryJ\x04\b\x04\x10\x05J\x04\b\v\x10\f\x1ac\n" + "\bContacts\x124\n" + "\x04blob\x18\x01 \x01(\v2 .signalservice.AttachmentPointerR\x04blob\x12!\n" + - "\bcomplete\x18\x02 \x01(\b:\x05falseR\bcomplete\x1a\xc2\x04\n" + + "\bcomplete\x18\x02 \x01(\b:\x05falseR\bcomplete\x1as\n" + "\aBlocked\x12\x18\n" + "\anumbers\x18\x01 \x03(\tR\anumbers\x12\x12\n" + "\x04acis\x18\x03 \x03(\tR\x04acis\x12\x1a\n" + "\bgroupIds\x18\x02 \x03(\fR\bgroupIds\x12\x1e\n" + "\n" + "acisBinary\x18\x04 \x03(\fR\n" + - "acisBinary\x12R\n" + - "\fblockedE164s\x18\x05 \x03(\v2..signalservice.SyncMessage.Blocked.BlockedE164R\fblockedE164s\x12O\n" + - "\vblockedAcis\x18\x06 \x03(\v2-.signalservice.SyncMessage.Blocked.BlockedAciR\vblockedAcis\x12U\n" + - "\rblockedGroups\x18\a \x03(\v2/.signalservice.SyncMessage.Blocked.BlockedGroupR\rblockedGroups\x1a?\n" + - "\vBlockedE164\x12\x12\n" + - "\x04e164\x18\x01 \x01(\tR\x04e164\x12\x1c\n" + - "\ttimestamp\x18\x02 \x01(\x04R\ttimestamp\x1aH\n" + - "\n" + - "BlockedAci\x12\x1c\n" + - "\taciBinary\x18\x01 \x01(\fR\taciBinary\x12\x1c\n" + - "\ttimestamp\x18\x02 \x01(\x04R\ttimestamp\x1aF\n" + - "\fBlockedGroup\x12\x18\n" + - "\agroupId\x18\x01 \x01(\fR\agroupId\x12\x1c\n" + - "\ttimestamp\x18\x02 \x01(\x04R\ttimestamp\x1a\x9f\x01\n" + + "acisBinary\x1a\x9f\x01\n" + "\aRequest\x12;\n" + "\x04type\x18\x01 \x01(\x0e2'.signalservice.SyncMessage.Request.TypeR\x04type\"W\n" + "\x04Type\x12\v\n" + @@ -9331,12 +8757,13 @@ const file_signalpb_SignalService_proto_rawDesc = "" + "\x06Viewed\x12\x1c\n" + "\tsenderAci\x18\x03 \x01(\tR\tsenderAci\x12\x1c\n" + "\ttimestamp\x18\x02 \x01(\x04R\ttimestamp\x12(\n" + - "\x0fsenderAciBinary\x18\x04 \x01(\fR\x0fsenderAciBinaryJ\x04\b\x01\x10\x02\x1a\xd7\x01\n" + + "\x0fsenderAciBinary\x18\x04 \x01(\fR\x0fsenderAciBinaryJ\x04\b\x01\x10\x02\x1a\x83\x02\n" + "\rConfiguration\x12\"\n" + "\freadReceipts\x18\x01 \x01(\bR\freadReceipts\x12F\n" + "\x1eunidentifiedDeliveryIndicators\x18\x02 \x01(\bR\x1eunidentifiedDeliveryIndicators\x12*\n" + - "\x10typingIndicators\x18\x03 \x01(\bR\x10typingIndicators\x12\"\n" + - "\flinkPreviews\x18\x06 \x01(\bR\flinkPreviewsJ\x04\b\x04\x10\x05J\x04\b\x05\x10\x06\x1a\xb3\x01\n" + + "\x10typingIndicators\x18\x03 \x01(\bR\x10typingIndicators\x120\n" + + "\x13provisioningVersion\x18\x05 \x01(\rR\x13provisioningVersion\x12\"\n" + + "\flinkPreviews\x18\x06 \x01(\bR\flinkPreviewsJ\x04\b\x04\x10\x05\x1a\xb3\x01\n" + "\x14StickerPackOperation\x12\x16\n" + "\x06packId\x18\x01 \x01(\fR\x06packId\x12\x18\n" + "\apackKey\x18\x02 \x01(\fR\apackKey\x12H\n" + @@ -9355,10 +8782,11 @@ const file_signalpb_SignalService_proto_rawDesc = "" + "\aUNKNOWN\x10\x00\x12\x11\n" + "\rLOCAL_PROFILE\x10\x01\x12\x14\n" + "\x10STORAGE_MANIFEST\x10\x02\x12\x17\n" + - "\x13SUBSCRIPTION_STATUS\x10\x03\x1ar\n" + - "\x04Keys\x12.\n" + + "\x13SUBSCRIPTION_STATUS\x10\x03\x1a\x84\x01\n" + + "\x04Keys\x12\x16\n" + + "\x06master\x18\x02 \x01(\fR\x06master\x12.\n" + "\x12accountEntropyPool\x18\x03 \x01(\tR\x12accountEntropyPool\x12.\n" + - "\x12mediaRootBackupKey\x18\x04 \x01(\fR\x12mediaRootBackupKeyJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03\x1aK\n" + + "\x12mediaRootBackupKey\x18\x04 \x01(\fR\x12mediaRootBackupKeyJ\x04\b\x01\x10\x02\x1aK\n" + "\vPniIdentity\x12\x1c\n" + "\tpublicKey\x18\x01 \x01(\fR\tpublicKey\x12\x1e\n" + "\n" + @@ -9430,14 +8858,15 @@ const file_signalpb_SignalService_proto_rawDesc = "" + "\fNOT_ACCEPTED\x10\x02\x12\n" + "\n" + "\x06DELETE\x10\x03\x12\f\n" + - "\bOBSERVED\x10\x04\x1a\xb2\x01\n" + + "\bOBSERVED\x10\x04\x1a\xc2\x01\n" + "\x0eCallLinkUpdate\x12\x18\n" + "\arootKey\x18\x01 \x01(\fR\arootKey\x12\"\n" + "\fadminPasskey\x18\x02 \x01(\fR\fadminPasskey\x12B\n" + - "\x04type\x18\x03 \x01(\x0e2..signalservice.SyncMessage.CallLinkUpdate.TypeR\x04type\"\x18\n" + + "\x04type\x18\x03 \x01(\x0e2..signalservice.SyncMessage.CallLinkUpdate.TypeR\x04type\x12\x14\n" + + "\x05epoch\x18\x04 \x01(\fR\x05epoch\"\x18\n" + "\x04Type\x12\n" + "\n" + - "\x06UPDATE\x10\x00\"\x04\b\x01\x10\x01J\x04\b\x04\x10\x05\x1a\x94\x02\n" + + "\x06UPDATE\x10\x00\"\x04\b\x01\x10\x01\x1a\x94\x02\n" + "\fCallLogEvent\x12@\n" + "\x04type\x18\x01 \x01(\x0e2,.signalservice.SyncMessage.CallLogEvent.TypeR\x04type\x12\x1c\n" + "\ttimestamp\x18\x02 \x01(\x04R\ttimestamp\x12&\n" + @@ -9496,9 +8925,7 @@ const file_signalpb_SignalService_proto_rawDesc = "" + "\blongText\x18\x02 \x01(\v2D.signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataR\blongText\"\x1e\n" + "\x05Error\x12\x15\n" + "\x11MESSAGE_NOT_FOUND\x10\x00B\x06\n" + - "\x04data\x1a\x10\n" + - "\x0eUsernameChangeB\t\n" + - "\acontentJ\x04\b\x03\x10\x04J\x04\b\x11\x10\x12\"\xe7\x04\n" + + "\x04dataJ\x04\b\x03\x10\x04J\x04\b\x11\x10\x12\"\xe7\x04\n" + "\x11AttachmentPointer\x12\x16\n" + "\x05cdnId\x18\x01 \x01(\x06H\x00R\x05cdnId\x12\x18\n" + "\x06cdnKey\x18\x0f \x01(\tH\x00R\x06cdnKey\x12\x1e\n" + @@ -9602,20 +9029,20 @@ const file_signalpb_SignalService_proto_rawDesc = "" + ".org.whispersystems.signalservice.internal.pushB\x13SignalServiceProtos" var ( - file_signalpb_SignalService_proto_rawDescOnce sync.Once - file_signalpb_SignalService_proto_rawDescData []byte + file_SignalService_proto_rawDescOnce sync.Once + file_SignalService_proto_rawDescData []byte ) -func file_signalpb_SignalService_proto_rawDescGZIP() []byte { - file_signalpb_SignalService_proto_rawDescOnce.Do(func() { - file_signalpb_SignalService_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_signalpb_SignalService_proto_rawDesc), len(file_signalpb_SignalService_proto_rawDesc))) +func file_SignalService_proto_rawDescGZIP() []byte { + file_SignalService_proto_rawDescOnce.Do(func() { + file_SignalService_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_SignalService_proto_rawDesc), len(file_SignalService_proto_rawDesc))) }) - return file_signalpb_SignalService_proto_rawDescData + return file_SignalService_proto_rawDescData } -var file_signalpb_SignalService_proto_enumTypes = make([]protoimpl.EnumInfo, 28) -var file_signalpb_SignalService_proto_msgTypes = make([]protoimpl.MessageInfo, 92) -var file_signalpb_SignalService_proto_goTypes = []any{ +var file_SignalService_proto_enumTypes = make([]protoimpl.EnumInfo, 28) +var file_SignalService_proto_msgTypes = make([]protoimpl.MessageInfo, 87) +var file_SignalService_proto_goTypes = []any{ (Envelope_Type)(0), // 0: signalservice.Envelope.Type (CallMessage_Offer_Type)(0), // 1: signalservice.CallMessage.Offer.Type (CallMessage_Hangup_Type)(0), // 2: signalservice.CallMessage.Hangup.Type @@ -9686,58 +9113,53 @@ var file_signalpb_SignalService_proto_goTypes = []any{ (*DataMessage_PollVote)(nil), // 67: signalservice.DataMessage.PollVote (*DataMessage_PinMessage)(nil), // 68: signalservice.DataMessage.PinMessage (*DataMessage_UnpinMessage)(nil), // 69: signalservice.DataMessage.UnpinMessage - (*DataMessage_AdminDelete)(nil), // 70: signalservice.DataMessage.AdminDelete - (*DataMessage_Payment_Amount)(nil), // 71: signalservice.DataMessage.Payment.Amount - (*DataMessage_Payment_Notification)(nil), // 72: signalservice.DataMessage.Payment.Notification - (*DataMessage_Payment_Activation)(nil), // 73: signalservice.DataMessage.Payment.Activation - (*DataMessage_Payment_Amount_MobileCoin)(nil), // 74: signalservice.DataMessage.Payment.Amount.MobileCoin - (*DataMessage_Payment_Notification_MobileCoin)(nil), // 75: signalservice.DataMessage.Payment.Notification.MobileCoin - (*DataMessage_Quote_QuotedAttachment)(nil), // 76: signalservice.DataMessage.Quote.QuotedAttachment - (*DataMessage_Contact_Name)(nil), // 77: signalservice.DataMessage.Contact.Name - (*DataMessage_Contact_Phone)(nil), // 78: signalservice.DataMessage.Contact.Phone - (*DataMessage_Contact_Email)(nil), // 79: signalservice.DataMessage.Contact.Email - (*DataMessage_Contact_PostalAddress)(nil), // 80: signalservice.DataMessage.Contact.PostalAddress - (*DataMessage_Contact_Avatar)(nil), // 81: signalservice.DataMessage.Contact.Avatar - (*TextAttachment_Gradient)(nil), // 82: signalservice.TextAttachment.Gradient - (*SyncMessage_Sent)(nil), // 83: signalservice.SyncMessage.Sent - (*SyncMessage_Contacts)(nil), // 84: signalservice.SyncMessage.Contacts - (*SyncMessage_Blocked)(nil), // 85: signalservice.SyncMessage.Blocked - (*SyncMessage_Request)(nil), // 86: signalservice.SyncMessage.Request - (*SyncMessage_Read)(nil), // 87: signalservice.SyncMessage.Read - (*SyncMessage_Viewed)(nil), // 88: signalservice.SyncMessage.Viewed - (*SyncMessage_Configuration)(nil), // 89: signalservice.SyncMessage.Configuration - (*SyncMessage_StickerPackOperation)(nil), // 90: signalservice.SyncMessage.StickerPackOperation - (*SyncMessage_ViewOnceOpen)(nil), // 91: signalservice.SyncMessage.ViewOnceOpen - (*SyncMessage_FetchLatest)(nil), // 92: signalservice.SyncMessage.FetchLatest - (*SyncMessage_Keys)(nil), // 93: signalservice.SyncMessage.Keys - (*SyncMessage_PniIdentity)(nil), // 94: signalservice.SyncMessage.PniIdentity - (*SyncMessage_MessageRequestResponse)(nil), // 95: signalservice.SyncMessage.MessageRequestResponse - (*SyncMessage_OutgoingPayment)(nil), // 96: signalservice.SyncMessage.OutgoingPayment - (*SyncMessage_PniChangeNumber)(nil), // 97: signalservice.SyncMessage.PniChangeNumber - (*SyncMessage_CallEvent)(nil), // 98: signalservice.SyncMessage.CallEvent - (*SyncMessage_CallLinkUpdate)(nil), // 99: signalservice.SyncMessage.CallLinkUpdate - (*SyncMessage_CallLogEvent)(nil), // 100: signalservice.SyncMessage.CallLogEvent - (*SyncMessage_DeleteForMe)(nil), // 101: signalservice.SyncMessage.DeleteForMe - (*SyncMessage_DeviceNameChange)(nil), // 102: signalservice.SyncMessage.DeviceNameChange - (*SyncMessage_AttachmentBackfillRequest)(nil), // 103: signalservice.SyncMessage.AttachmentBackfillRequest - (*SyncMessage_AttachmentBackfillResponse)(nil), // 104: signalservice.SyncMessage.AttachmentBackfillResponse - (*SyncMessage_UsernameChange)(nil), // 105: signalservice.SyncMessage.UsernameChange - (*SyncMessage_Sent_UnidentifiedDeliveryStatus)(nil), // 106: signalservice.SyncMessage.Sent.UnidentifiedDeliveryStatus - (*SyncMessage_Sent_StoryMessageRecipient)(nil), // 107: signalservice.SyncMessage.Sent.StoryMessageRecipient - (*SyncMessage_Blocked_BlockedE164)(nil), // 108: signalservice.SyncMessage.Blocked.BlockedE164 - (*SyncMessage_Blocked_BlockedAci)(nil), // 109: signalservice.SyncMessage.Blocked.BlockedAci - (*SyncMessage_Blocked_BlockedGroup)(nil), // 110: signalservice.SyncMessage.Blocked.BlockedGroup - (*SyncMessage_OutgoingPayment_MobileCoin)(nil), // 111: signalservice.SyncMessage.OutgoingPayment.MobileCoin - (*SyncMessage_DeleteForMe_MessageDeletes)(nil), // 112: signalservice.SyncMessage.DeleteForMe.MessageDeletes - (*SyncMessage_DeleteForMe_AttachmentDelete)(nil), // 113: signalservice.SyncMessage.DeleteForMe.AttachmentDelete - (*SyncMessage_DeleteForMe_ConversationDelete)(nil), // 114: signalservice.SyncMessage.DeleteForMe.ConversationDelete - (*SyncMessage_DeleteForMe_LocalOnlyConversationDelete)(nil), // 115: signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete - (*SyncMessage_AttachmentBackfillResponse_AttachmentData)(nil), // 116: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData - (*SyncMessage_AttachmentBackfillResponse_AttachmentDataList)(nil), // 117: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList - (*ContactDetails_Avatar)(nil), // 118: signalservice.ContactDetails.Avatar - (*PaymentAddress_MobileCoin)(nil), // 119: signalservice.PaymentAddress.MobileCoin + (*DataMessage_Payment_Amount)(nil), // 70: signalservice.DataMessage.Payment.Amount + (*DataMessage_Payment_Notification)(nil), // 71: signalservice.DataMessage.Payment.Notification + (*DataMessage_Payment_Activation)(nil), // 72: signalservice.DataMessage.Payment.Activation + (*DataMessage_Payment_Amount_MobileCoin)(nil), // 73: signalservice.DataMessage.Payment.Amount.MobileCoin + (*DataMessage_Payment_Notification_MobileCoin)(nil), // 74: signalservice.DataMessage.Payment.Notification.MobileCoin + (*DataMessage_Quote_QuotedAttachment)(nil), // 75: signalservice.DataMessage.Quote.QuotedAttachment + (*DataMessage_Contact_Name)(nil), // 76: signalservice.DataMessage.Contact.Name + (*DataMessage_Contact_Phone)(nil), // 77: signalservice.DataMessage.Contact.Phone + (*DataMessage_Contact_Email)(nil), // 78: signalservice.DataMessage.Contact.Email + (*DataMessage_Contact_PostalAddress)(nil), // 79: signalservice.DataMessage.Contact.PostalAddress + (*DataMessage_Contact_Avatar)(nil), // 80: signalservice.DataMessage.Contact.Avatar + (*TextAttachment_Gradient)(nil), // 81: signalservice.TextAttachment.Gradient + (*SyncMessage_Sent)(nil), // 82: signalservice.SyncMessage.Sent + (*SyncMessage_Contacts)(nil), // 83: signalservice.SyncMessage.Contacts + (*SyncMessage_Blocked)(nil), // 84: signalservice.SyncMessage.Blocked + (*SyncMessage_Request)(nil), // 85: signalservice.SyncMessage.Request + (*SyncMessage_Read)(nil), // 86: signalservice.SyncMessage.Read + (*SyncMessage_Viewed)(nil), // 87: signalservice.SyncMessage.Viewed + (*SyncMessage_Configuration)(nil), // 88: signalservice.SyncMessage.Configuration + (*SyncMessage_StickerPackOperation)(nil), // 89: signalservice.SyncMessage.StickerPackOperation + (*SyncMessage_ViewOnceOpen)(nil), // 90: signalservice.SyncMessage.ViewOnceOpen + (*SyncMessage_FetchLatest)(nil), // 91: signalservice.SyncMessage.FetchLatest + (*SyncMessage_Keys)(nil), // 92: signalservice.SyncMessage.Keys + (*SyncMessage_PniIdentity)(nil), // 93: signalservice.SyncMessage.PniIdentity + (*SyncMessage_MessageRequestResponse)(nil), // 94: signalservice.SyncMessage.MessageRequestResponse + (*SyncMessage_OutgoingPayment)(nil), // 95: signalservice.SyncMessage.OutgoingPayment + (*SyncMessage_PniChangeNumber)(nil), // 96: signalservice.SyncMessage.PniChangeNumber + (*SyncMessage_CallEvent)(nil), // 97: signalservice.SyncMessage.CallEvent + (*SyncMessage_CallLinkUpdate)(nil), // 98: signalservice.SyncMessage.CallLinkUpdate + (*SyncMessage_CallLogEvent)(nil), // 99: signalservice.SyncMessage.CallLogEvent + (*SyncMessage_DeleteForMe)(nil), // 100: signalservice.SyncMessage.DeleteForMe + (*SyncMessage_DeviceNameChange)(nil), // 101: signalservice.SyncMessage.DeviceNameChange + (*SyncMessage_AttachmentBackfillRequest)(nil), // 102: signalservice.SyncMessage.AttachmentBackfillRequest + (*SyncMessage_AttachmentBackfillResponse)(nil), // 103: signalservice.SyncMessage.AttachmentBackfillResponse + (*SyncMessage_Sent_UnidentifiedDeliveryStatus)(nil), // 104: signalservice.SyncMessage.Sent.UnidentifiedDeliveryStatus + (*SyncMessage_Sent_StoryMessageRecipient)(nil), // 105: signalservice.SyncMessage.Sent.StoryMessageRecipient + (*SyncMessage_OutgoingPayment_MobileCoin)(nil), // 106: signalservice.SyncMessage.OutgoingPayment.MobileCoin + (*SyncMessage_DeleteForMe_MessageDeletes)(nil), // 107: signalservice.SyncMessage.DeleteForMe.MessageDeletes + (*SyncMessage_DeleteForMe_AttachmentDelete)(nil), // 108: signalservice.SyncMessage.DeleteForMe.AttachmentDelete + (*SyncMessage_DeleteForMe_ConversationDelete)(nil), // 109: signalservice.SyncMessage.DeleteForMe.ConversationDelete + (*SyncMessage_DeleteForMe_LocalOnlyConversationDelete)(nil), // 110: signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete + (*SyncMessage_AttachmentBackfillResponse_AttachmentData)(nil), // 111: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData + (*SyncMessage_AttachmentBackfillResponse_AttachmentDataList)(nil), // 112: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList + (*ContactDetails_Avatar)(nil), // 113: signalservice.ContactDetails.Avatar + (*PaymentAddress_MobileCoin)(nil), // 114: signalservice.PaymentAddress.MobileCoin } -var file_signalpb_SignalService_proto_depIdxs = []int32{ +var file_SignalService_proto_depIdxs = []int32{ 0, // 0: signalservice.Envelope.type:type_name -> signalservice.Envelope.Type 31, // 1: signalservice.Content.dataMessage:type_name -> signalservice.DataMessage 39, // 2: signalservice.Content.syncMessage:type_name -> signalservice.SyncMessage @@ -9746,8 +9168,8 @@ var file_signalpb_SignalService_proto_depIdxs = []int32{ 33, // 5: signalservice.Content.receiptMessage:type_name -> signalservice.ReceiptMessage 34, // 6: signalservice.Content.typingMessage:type_name -> signalservice.TypingMessage 35, // 7: signalservice.Content.storyMessage:type_name -> signalservice.StoryMessage - 46, // 8: signalservice.Content.editMessage:type_name -> signalservice.EditMessage - 45, // 9: signalservice.Content.pniSignatureMessage:type_name -> signalservice.PniSignatureMessage + 45, // 8: signalservice.Content.pniSignatureMessage:type_name -> signalservice.PniSignatureMessage + 46, // 9: signalservice.Content.editMessage:type_name -> signalservice.EditMessage 50, // 10: signalservice.CallMessage.offer:type_name -> signalservice.CallMessage.Offer 51, // 11: signalservice.CallMessage.answer:type_name -> signalservice.CallMessage.Answer 52, // 12: signalservice.CallMessage.iceUpdate:type_name -> signalservice.CallMessage.IceUpdate @@ -9772,206 +9194,168 @@ var file_signalpb_SignalService_proto_depIdxs = []int32{ 67, // 31: signalservice.DataMessage.pollVote:type_name -> signalservice.DataMessage.PollVote 68, // 32: signalservice.DataMessage.pinMessage:type_name -> signalservice.DataMessage.PinMessage 69, // 33: signalservice.DataMessage.unpinMessage:type_name -> signalservice.DataMessage.UnpinMessage - 70, // 34: signalservice.DataMessage.adminDelete:type_name -> signalservice.DataMessage.AdminDelete - 11, // 35: signalservice.ReceiptMessage.type:type_name -> signalservice.ReceiptMessage.Type - 12, // 36: signalservice.TypingMessage.action:type_name -> signalservice.TypingMessage.Action - 41, // 37: signalservice.StoryMessage.group:type_name -> signalservice.GroupContextV2 - 40, // 38: signalservice.StoryMessage.fileAttachment:type_name -> signalservice.AttachmentPointer - 37, // 39: signalservice.StoryMessage.textAttachment:type_name -> signalservice.TextAttachment - 47, // 40: signalservice.StoryMessage.bodyRanges:type_name -> signalservice.BodyRange - 40, // 41: signalservice.Preview.image:type_name -> signalservice.AttachmentPointer - 13, // 42: signalservice.TextAttachment.textStyle:type_name -> signalservice.TextAttachment.Style - 36, // 43: signalservice.TextAttachment.preview:type_name -> signalservice.Preview - 82, // 44: signalservice.TextAttachment.gradient:type_name -> signalservice.TextAttachment.Gradient - 14, // 45: signalservice.Verified.state:type_name -> signalservice.Verified.State - 83, // 46: signalservice.SyncMessage.sent:type_name -> signalservice.SyncMessage.Sent - 84, // 47: signalservice.SyncMessage.contacts:type_name -> signalservice.SyncMessage.Contacts - 86, // 48: signalservice.SyncMessage.request:type_name -> signalservice.SyncMessage.Request - 85, // 49: signalservice.SyncMessage.blocked:type_name -> signalservice.SyncMessage.Blocked + 11, // 34: signalservice.ReceiptMessage.type:type_name -> signalservice.ReceiptMessage.Type + 12, // 35: signalservice.TypingMessage.action:type_name -> signalservice.TypingMessage.Action + 41, // 36: signalservice.StoryMessage.group:type_name -> signalservice.GroupContextV2 + 40, // 37: signalservice.StoryMessage.fileAttachment:type_name -> signalservice.AttachmentPointer + 37, // 38: signalservice.StoryMessage.textAttachment:type_name -> signalservice.TextAttachment + 47, // 39: signalservice.StoryMessage.bodyRanges:type_name -> signalservice.BodyRange + 40, // 40: signalservice.Preview.image:type_name -> signalservice.AttachmentPointer + 13, // 41: signalservice.TextAttachment.textStyle:type_name -> signalservice.TextAttachment.Style + 36, // 42: signalservice.TextAttachment.preview:type_name -> signalservice.Preview + 81, // 43: signalservice.TextAttachment.gradient:type_name -> signalservice.TextAttachment.Gradient + 14, // 44: signalservice.Verified.state:type_name -> signalservice.Verified.State + 82, // 45: signalservice.SyncMessage.sent:type_name -> signalservice.SyncMessage.Sent + 83, // 46: signalservice.SyncMessage.contacts:type_name -> signalservice.SyncMessage.Contacts + 85, // 47: signalservice.SyncMessage.request:type_name -> signalservice.SyncMessage.Request + 86, // 48: signalservice.SyncMessage.read:type_name -> signalservice.SyncMessage.Read + 84, // 49: signalservice.SyncMessage.blocked:type_name -> signalservice.SyncMessage.Blocked 38, // 50: signalservice.SyncMessage.verified:type_name -> signalservice.Verified - 89, // 51: signalservice.SyncMessage.configuration:type_name -> signalservice.SyncMessage.Configuration - 91, // 52: signalservice.SyncMessage.viewOnceOpen:type_name -> signalservice.SyncMessage.ViewOnceOpen - 92, // 53: signalservice.SyncMessage.fetchLatest:type_name -> signalservice.SyncMessage.FetchLatest - 93, // 54: signalservice.SyncMessage.keys:type_name -> signalservice.SyncMessage.Keys - 95, // 55: signalservice.SyncMessage.messageRequestResponse:type_name -> signalservice.SyncMessage.MessageRequestResponse - 96, // 56: signalservice.SyncMessage.outgoingPayment:type_name -> signalservice.SyncMessage.OutgoingPayment - 97, // 57: signalservice.SyncMessage.pniChangeNumber:type_name -> signalservice.SyncMessage.PniChangeNumber - 98, // 58: signalservice.SyncMessage.callEvent:type_name -> signalservice.SyncMessage.CallEvent - 99, // 59: signalservice.SyncMessage.callLinkUpdate:type_name -> signalservice.SyncMessage.CallLinkUpdate - 100, // 60: signalservice.SyncMessage.callLogEvent:type_name -> signalservice.SyncMessage.CallLogEvent - 101, // 61: signalservice.SyncMessage.deleteForMe:type_name -> signalservice.SyncMessage.DeleteForMe - 102, // 62: signalservice.SyncMessage.deviceNameChange:type_name -> signalservice.SyncMessage.DeviceNameChange - 103, // 63: signalservice.SyncMessage.attachmentBackfillRequest:type_name -> signalservice.SyncMessage.AttachmentBackfillRequest - 104, // 64: signalservice.SyncMessage.attachmentBackfillResponse:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse - 105, // 65: signalservice.SyncMessage.usernameChange:type_name -> signalservice.SyncMessage.UsernameChange - 87, // 66: signalservice.SyncMessage.read:type_name -> signalservice.SyncMessage.Read - 90, // 67: signalservice.SyncMessage.stickerPackOperation:type_name -> signalservice.SyncMessage.StickerPackOperation - 88, // 68: signalservice.SyncMessage.viewed:type_name -> signalservice.SyncMessage.Viewed - 118, // 69: signalservice.ContactDetails.avatar:type_name -> signalservice.ContactDetails.Avatar - 119, // 70: signalservice.PaymentAddress.mobileCoin:type_name -> signalservice.PaymentAddress.MobileCoin - 31, // 71: signalservice.EditMessage.dataMessage:type_name -> signalservice.DataMessage - 27, // 72: signalservice.BodyRange.style:type_name -> signalservice.BodyRange.Style - 1, // 73: signalservice.CallMessage.Offer.type:type_name -> signalservice.CallMessage.Offer.Type - 2, // 74: signalservice.CallMessage.Hangup.type:type_name -> signalservice.CallMessage.Hangup.Type - 3, // 75: signalservice.CallMessage.Opaque.urgency:type_name -> signalservice.CallMessage.Opaque.Urgency - 72, // 76: signalservice.DataMessage.Payment.notification:type_name -> signalservice.DataMessage.Payment.Notification - 73, // 77: signalservice.DataMessage.Payment.activation:type_name -> signalservice.DataMessage.Payment.Activation - 76, // 78: signalservice.DataMessage.Quote.attachments:type_name -> signalservice.DataMessage.Quote.QuotedAttachment - 47, // 79: signalservice.DataMessage.Quote.bodyRanges:type_name -> signalservice.BodyRange - 7, // 80: signalservice.DataMessage.Quote.type:type_name -> signalservice.DataMessage.Quote.Type - 77, // 81: signalservice.DataMessage.Contact.name:type_name -> signalservice.DataMessage.Contact.Name - 78, // 82: signalservice.DataMessage.Contact.number:type_name -> signalservice.DataMessage.Contact.Phone - 79, // 83: signalservice.DataMessage.Contact.email:type_name -> signalservice.DataMessage.Contact.Email - 80, // 84: signalservice.DataMessage.Contact.address:type_name -> signalservice.DataMessage.Contact.PostalAddress - 81, // 85: signalservice.DataMessage.Contact.avatar:type_name -> signalservice.DataMessage.Contact.Avatar - 40, // 86: signalservice.DataMessage.Sticker.data:type_name -> signalservice.AttachmentPointer - 74, // 87: signalservice.DataMessage.Payment.Amount.mobileCoin:type_name -> signalservice.DataMessage.Payment.Amount.MobileCoin - 75, // 88: signalservice.DataMessage.Payment.Notification.mobileCoin:type_name -> signalservice.DataMessage.Payment.Notification.MobileCoin - 6, // 89: signalservice.DataMessage.Payment.Activation.type:type_name -> signalservice.DataMessage.Payment.Activation.Type - 40, // 90: signalservice.DataMessage.Quote.QuotedAttachment.thumbnail:type_name -> signalservice.AttachmentPointer - 8, // 91: signalservice.DataMessage.Contact.Phone.type:type_name -> signalservice.DataMessage.Contact.Phone.Type - 9, // 92: signalservice.DataMessage.Contact.Email.type:type_name -> signalservice.DataMessage.Contact.Email.Type - 10, // 93: signalservice.DataMessage.Contact.PostalAddress.type:type_name -> signalservice.DataMessage.Contact.PostalAddress.Type - 40, // 94: signalservice.DataMessage.Contact.Avatar.avatar:type_name -> signalservice.AttachmentPointer - 31, // 95: signalservice.SyncMessage.Sent.message:type_name -> signalservice.DataMessage - 106, // 96: signalservice.SyncMessage.Sent.unidentifiedStatus:type_name -> signalservice.SyncMessage.Sent.UnidentifiedDeliveryStatus - 35, // 97: signalservice.SyncMessage.Sent.storyMessage:type_name -> signalservice.StoryMessage - 107, // 98: signalservice.SyncMessage.Sent.storyMessageRecipients:type_name -> signalservice.SyncMessage.Sent.StoryMessageRecipient - 46, // 99: signalservice.SyncMessage.Sent.editMessage:type_name -> signalservice.EditMessage - 40, // 100: signalservice.SyncMessage.Contacts.blob:type_name -> signalservice.AttachmentPointer - 108, // 101: signalservice.SyncMessage.Blocked.blockedE164s:type_name -> signalservice.SyncMessage.Blocked.BlockedE164 - 109, // 102: signalservice.SyncMessage.Blocked.blockedAcis:type_name -> signalservice.SyncMessage.Blocked.BlockedAci - 110, // 103: signalservice.SyncMessage.Blocked.blockedGroups:type_name -> signalservice.SyncMessage.Blocked.BlockedGroup - 15, // 104: signalservice.SyncMessage.Request.type:type_name -> signalservice.SyncMessage.Request.Type - 16, // 105: signalservice.SyncMessage.StickerPackOperation.type:type_name -> signalservice.SyncMessage.StickerPackOperation.Type - 17, // 106: signalservice.SyncMessage.FetchLatest.type:type_name -> signalservice.SyncMessage.FetchLatest.Type - 18, // 107: signalservice.SyncMessage.MessageRequestResponse.type:type_name -> signalservice.SyncMessage.MessageRequestResponse.Type - 111, // 108: signalservice.SyncMessage.OutgoingPayment.mobileCoin:type_name -> signalservice.SyncMessage.OutgoingPayment.MobileCoin - 19, // 109: signalservice.SyncMessage.CallEvent.type:type_name -> signalservice.SyncMessage.CallEvent.Type - 20, // 110: signalservice.SyncMessage.CallEvent.direction:type_name -> signalservice.SyncMessage.CallEvent.Direction - 21, // 111: signalservice.SyncMessage.CallEvent.event:type_name -> signalservice.SyncMessage.CallEvent.Event - 22, // 112: signalservice.SyncMessage.CallLinkUpdate.type:type_name -> signalservice.SyncMessage.CallLinkUpdate.Type - 23, // 113: signalservice.SyncMessage.CallLogEvent.type:type_name -> signalservice.SyncMessage.CallLogEvent.Type - 112, // 114: signalservice.SyncMessage.DeleteForMe.messageDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.MessageDeletes - 114, // 115: signalservice.SyncMessage.DeleteForMe.conversationDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.ConversationDelete - 115, // 116: signalservice.SyncMessage.DeleteForMe.localOnlyConversationDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete - 113, // 117: signalservice.SyncMessage.DeleteForMe.attachmentDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.AttachmentDelete - 48, // 118: signalservice.SyncMessage.AttachmentBackfillRequest.targetMessage:type_name -> signalservice.AddressableMessage - 49, // 119: signalservice.SyncMessage.AttachmentBackfillRequest.targetConversation:type_name -> signalservice.ConversationIdentifier - 48, // 120: signalservice.SyncMessage.AttachmentBackfillResponse.targetMessage:type_name -> signalservice.AddressableMessage - 49, // 121: signalservice.SyncMessage.AttachmentBackfillResponse.targetConversation:type_name -> signalservice.ConversationIdentifier - 117, // 122: signalservice.SyncMessage.AttachmentBackfillResponse.attachments:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList - 24, // 123: signalservice.SyncMessage.AttachmentBackfillResponse.error:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.Error - 49, // 124: signalservice.SyncMessage.DeleteForMe.MessageDeletes.conversation:type_name -> signalservice.ConversationIdentifier - 48, // 125: signalservice.SyncMessage.DeleteForMe.MessageDeletes.messages:type_name -> signalservice.AddressableMessage - 49, // 126: signalservice.SyncMessage.DeleteForMe.AttachmentDelete.conversation:type_name -> signalservice.ConversationIdentifier - 48, // 127: signalservice.SyncMessage.DeleteForMe.AttachmentDelete.targetMessage:type_name -> signalservice.AddressableMessage - 49, // 128: signalservice.SyncMessage.DeleteForMe.ConversationDelete.conversation:type_name -> signalservice.ConversationIdentifier - 48, // 129: signalservice.SyncMessage.DeleteForMe.ConversationDelete.mostRecentMessages:type_name -> signalservice.AddressableMessage - 48, // 130: signalservice.SyncMessage.DeleteForMe.ConversationDelete.mostRecentNonExpiringMessages:type_name -> signalservice.AddressableMessage - 49, // 131: signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete.conversation:type_name -> signalservice.ConversationIdentifier - 40, // 132: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.attachment:type_name -> signalservice.AttachmentPointer - 25, // 133: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.status:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.Status - 116, // 134: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList.attachments:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData - 116, // 135: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList.longText:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData - 136, // [136:136] is the sub-list for method output_type - 136, // [136:136] is the sub-list for method input_type - 136, // [136:136] is the sub-list for extension type_name - 136, // [136:136] is the sub-list for extension extendee - 0, // [0:136] is the sub-list for field type_name + 88, // 51: signalservice.SyncMessage.configuration:type_name -> signalservice.SyncMessage.Configuration + 89, // 52: signalservice.SyncMessage.stickerPackOperation:type_name -> signalservice.SyncMessage.StickerPackOperation + 90, // 53: signalservice.SyncMessage.viewOnceOpen:type_name -> signalservice.SyncMessage.ViewOnceOpen + 91, // 54: signalservice.SyncMessage.fetchLatest:type_name -> signalservice.SyncMessage.FetchLatest + 92, // 55: signalservice.SyncMessage.keys:type_name -> signalservice.SyncMessage.Keys + 94, // 56: signalservice.SyncMessage.messageRequestResponse:type_name -> signalservice.SyncMessage.MessageRequestResponse + 95, // 57: signalservice.SyncMessage.outgoingPayment:type_name -> signalservice.SyncMessage.OutgoingPayment + 87, // 58: signalservice.SyncMessage.viewed:type_name -> signalservice.SyncMessage.Viewed + 96, // 59: signalservice.SyncMessage.pniChangeNumber:type_name -> signalservice.SyncMessage.PniChangeNumber + 97, // 60: signalservice.SyncMessage.callEvent:type_name -> signalservice.SyncMessage.CallEvent + 98, // 61: signalservice.SyncMessage.callLinkUpdate:type_name -> signalservice.SyncMessage.CallLinkUpdate + 99, // 62: signalservice.SyncMessage.callLogEvent:type_name -> signalservice.SyncMessage.CallLogEvent + 100, // 63: signalservice.SyncMessage.deleteForMe:type_name -> signalservice.SyncMessage.DeleteForMe + 101, // 64: signalservice.SyncMessage.deviceNameChange:type_name -> signalservice.SyncMessage.DeviceNameChange + 102, // 65: signalservice.SyncMessage.attachmentBackfillRequest:type_name -> signalservice.SyncMessage.AttachmentBackfillRequest + 103, // 66: signalservice.SyncMessage.attachmentBackfillResponse:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse + 113, // 67: signalservice.ContactDetails.avatar:type_name -> signalservice.ContactDetails.Avatar + 114, // 68: signalservice.PaymentAddress.mobileCoin:type_name -> signalservice.PaymentAddress.MobileCoin + 31, // 69: signalservice.EditMessage.dataMessage:type_name -> signalservice.DataMessage + 27, // 70: signalservice.BodyRange.style:type_name -> signalservice.BodyRange.Style + 1, // 71: signalservice.CallMessage.Offer.type:type_name -> signalservice.CallMessage.Offer.Type + 2, // 72: signalservice.CallMessage.Hangup.type:type_name -> signalservice.CallMessage.Hangup.Type + 3, // 73: signalservice.CallMessage.Opaque.urgency:type_name -> signalservice.CallMessage.Opaque.Urgency + 71, // 74: signalservice.DataMessage.Payment.notification:type_name -> signalservice.DataMessage.Payment.Notification + 72, // 75: signalservice.DataMessage.Payment.activation:type_name -> signalservice.DataMessage.Payment.Activation + 75, // 76: signalservice.DataMessage.Quote.attachments:type_name -> signalservice.DataMessage.Quote.QuotedAttachment + 47, // 77: signalservice.DataMessage.Quote.bodyRanges:type_name -> signalservice.BodyRange + 7, // 78: signalservice.DataMessage.Quote.type:type_name -> signalservice.DataMessage.Quote.Type + 76, // 79: signalservice.DataMessage.Contact.name:type_name -> signalservice.DataMessage.Contact.Name + 77, // 80: signalservice.DataMessage.Contact.number:type_name -> signalservice.DataMessage.Contact.Phone + 78, // 81: signalservice.DataMessage.Contact.email:type_name -> signalservice.DataMessage.Contact.Email + 79, // 82: signalservice.DataMessage.Contact.address:type_name -> signalservice.DataMessage.Contact.PostalAddress + 80, // 83: signalservice.DataMessage.Contact.avatar:type_name -> signalservice.DataMessage.Contact.Avatar + 40, // 84: signalservice.DataMessage.Sticker.data:type_name -> signalservice.AttachmentPointer + 73, // 85: signalservice.DataMessage.Payment.Amount.mobileCoin:type_name -> signalservice.DataMessage.Payment.Amount.MobileCoin + 74, // 86: signalservice.DataMessage.Payment.Notification.mobileCoin:type_name -> signalservice.DataMessage.Payment.Notification.MobileCoin + 6, // 87: signalservice.DataMessage.Payment.Activation.type:type_name -> signalservice.DataMessage.Payment.Activation.Type + 40, // 88: signalservice.DataMessage.Quote.QuotedAttachment.thumbnail:type_name -> signalservice.AttachmentPointer + 8, // 89: signalservice.DataMessage.Contact.Phone.type:type_name -> signalservice.DataMessage.Contact.Phone.Type + 9, // 90: signalservice.DataMessage.Contact.Email.type:type_name -> signalservice.DataMessage.Contact.Email.Type + 10, // 91: signalservice.DataMessage.Contact.PostalAddress.type:type_name -> signalservice.DataMessage.Contact.PostalAddress.Type + 40, // 92: signalservice.DataMessage.Contact.Avatar.avatar:type_name -> signalservice.AttachmentPointer + 31, // 93: signalservice.SyncMessage.Sent.message:type_name -> signalservice.DataMessage + 104, // 94: signalservice.SyncMessage.Sent.unidentifiedStatus:type_name -> signalservice.SyncMessage.Sent.UnidentifiedDeliveryStatus + 35, // 95: signalservice.SyncMessage.Sent.storyMessage:type_name -> signalservice.StoryMessage + 105, // 96: signalservice.SyncMessage.Sent.storyMessageRecipients:type_name -> signalservice.SyncMessage.Sent.StoryMessageRecipient + 46, // 97: signalservice.SyncMessage.Sent.editMessage:type_name -> signalservice.EditMessage + 40, // 98: signalservice.SyncMessage.Contacts.blob:type_name -> signalservice.AttachmentPointer + 15, // 99: signalservice.SyncMessage.Request.type:type_name -> signalservice.SyncMessage.Request.Type + 16, // 100: signalservice.SyncMessage.StickerPackOperation.type:type_name -> signalservice.SyncMessage.StickerPackOperation.Type + 17, // 101: signalservice.SyncMessage.FetchLatest.type:type_name -> signalservice.SyncMessage.FetchLatest.Type + 18, // 102: signalservice.SyncMessage.MessageRequestResponse.type:type_name -> signalservice.SyncMessage.MessageRequestResponse.Type + 106, // 103: signalservice.SyncMessage.OutgoingPayment.mobileCoin:type_name -> signalservice.SyncMessage.OutgoingPayment.MobileCoin + 19, // 104: signalservice.SyncMessage.CallEvent.type:type_name -> signalservice.SyncMessage.CallEvent.Type + 20, // 105: signalservice.SyncMessage.CallEvent.direction:type_name -> signalservice.SyncMessage.CallEvent.Direction + 21, // 106: signalservice.SyncMessage.CallEvent.event:type_name -> signalservice.SyncMessage.CallEvent.Event + 22, // 107: signalservice.SyncMessage.CallLinkUpdate.type:type_name -> signalservice.SyncMessage.CallLinkUpdate.Type + 23, // 108: signalservice.SyncMessage.CallLogEvent.type:type_name -> signalservice.SyncMessage.CallLogEvent.Type + 107, // 109: signalservice.SyncMessage.DeleteForMe.messageDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.MessageDeletes + 109, // 110: signalservice.SyncMessage.DeleteForMe.conversationDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.ConversationDelete + 110, // 111: signalservice.SyncMessage.DeleteForMe.localOnlyConversationDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete + 108, // 112: signalservice.SyncMessage.DeleteForMe.attachmentDeletes:type_name -> signalservice.SyncMessage.DeleteForMe.AttachmentDelete + 48, // 113: signalservice.SyncMessage.AttachmentBackfillRequest.targetMessage:type_name -> signalservice.AddressableMessage + 49, // 114: signalservice.SyncMessage.AttachmentBackfillRequest.targetConversation:type_name -> signalservice.ConversationIdentifier + 48, // 115: signalservice.SyncMessage.AttachmentBackfillResponse.targetMessage:type_name -> signalservice.AddressableMessage + 49, // 116: signalservice.SyncMessage.AttachmentBackfillResponse.targetConversation:type_name -> signalservice.ConversationIdentifier + 112, // 117: signalservice.SyncMessage.AttachmentBackfillResponse.attachments:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList + 24, // 118: signalservice.SyncMessage.AttachmentBackfillResponse.error:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.Error + 49, // 119: signalservice.SyncMessage.DeleteForMe.MessageDeletes.conversation:type_name -> signalservice.ConversationIdentifier + 48, // 120: signalservice.SyncMessage.DeleteForMe.MessageDeletes.messages:type_name -> signalservice.AddressableMessage + 49, // 121: signalservice.SyncMessage.DeleteForMe.AttachmentDelete.conversation:type_name -> signalservice.ConversationIdentifier + 48, // 122: signalservice.SyncMessage.DeleteForMe.AttachmentDelete.targetMessage:type_name -> signalservice.AddressableMessage + 49, // 123: signalservice.SyncMessage.DeleteForMe.ConversationDelete.conversation:type_name -> signalservice.ConversationIdentifier + 48, // 124: signalservice.SyncMessage.DeleteForMe.ConversationDelete.mostRecentMessages:type_name -> signalservice.AddressableMessage + 48, // 125: signalservice.SyncMessage.DeleteForMe.ConversationDelete.mostRecentNonExpiringMessages:type_name -> signalservice.AddressableMessage + 49, // 126: signalservice.SyncMessage.DeleteForMe.LocalOnlyConversationDelete.conversation:type_name -> signalservice.ConversationIdentifier + 40, // 127: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.attachment:type_name -> signalservice.AttachmentPointer + 25, // 128: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.status:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData.Status + 111, // 129: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList.attachments:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData + 111, // 130: signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentDataList.longText:type_name -> signalservice.SyncMessage.AttachmentBackfillResponse.AttachmentData + 131, // [131:131] is the sub-list for method output_type + 131, // [131:131] is the sub-list for method input_type + 131, // [131:131] is the sub-list for extension type_name + 131, // [131:131] is the sub-list for extension extendee + 0, // [0:131] is the sub-list for field type_name } -func init() { file_signalpb_SignalService_proto_init() } -func file_signalpb_SignalService_proto_init() { - if File_signalpb_SignalService_proto != nil { +func init() { file_SignalService_proto_init() } +func file_SignalService_proto_init() { + if File_SignalService_proto != nil { return } - file_signalpb_SignalService_proto_msgTypes[1].OneofWrappers = []any{ - (*Content_DataMessage)(nil), - (*Content_SyncMessage)(nil), - (*Content_CallMessage)(nil), - (*Content_NullMessage)(nil), - (*Content_ReceiptMessage)(nil), - (*Content_TypingMessage)(nil), - (*Content_DecryptionErrorMessage)(nil), - (*Content_StoryMessage)(nil), - (*Content_EditMessage)(nil), - } - file_signalpb_SignalService_proto_msgTypes[7].OneofWrappers = []any{ + file_SignalService_proto_msgTypes[7].OneofWrappers = []any{ (*StoryMessage_FileAttachment)(nil), (*StoryMessage_TextAttachment)(nil), } - file_signalpb_SignalService_proto_msgTypes[9].OneofWrappers = []any{ + file_SignalService_proto_msgTypes[9].OneofWrappers = []any{ (*TextAttachment_Gradient_)(nil), (*TextAttachment_Color)(nil), } - file_signalpb_SignalService_proto_msgTypes[11].OneofWrappers = []any{ - (*SyncMessage_Sent_)(nil), - (*SyncMessage_Contacts_)(nil), - (*SyncMessage_Request_)(nil), - (*SyncMessage_Blocked_)(nil), - (*SyncMessage_Verified)(nil), - (*SyncMessage_Configuration_)(nil), - (*SyncMessage_ViewOnceOpen_)(nil), - (*SyncMessage_FetchLatest_)(nil), - (*SyncMessage_Keys_)(nil), - (*SyncMessage_MessageRequestResponse_)(nil), - (*SyncMessage_OutgoingPayment_)(nil), - (*SyncMessage_PniChangeNumber_)(nil), - (*SyncMessage_CallEvent_)(nil), - (*SyncMessage_CallLinkUpdate_)(nil), - (*SyncMessage_CallLogEvent_)(nil), - (*SyncMessage_DeleteForMe_)(nil), - (*SyncMessage_DeviceNameChange_)(nil), - (*SyncMessage_AttachmentBackfillRequest_)(nil), - (*SyncMessage_AttachmentBackfillResponse_)(nil), - (*SyncMessage_UsernameChange_)(nil), - } - file_signalpb_SignalService_proto_msgTypes[12].OneofWrappers = []any{ + file_SignalService_proto_msgTypes[12].OneofWrappers = []any{ (*AttachmentPointer_CdnId)(nil), (*AttachmentPointer_CdnKey)(nil), } - file_signalpb_SignalService_proto_msgTypes[15].OneofWrappers = []any{ + file_SignalService_proto_msgTypes[15].OneofWrappers = []any{ (*PaymentAddress_MobileCoin_)(nil), } - file_signalpb_SignalService_proto_msgTypes[19].OneofWrappers = []any{ + file_SignalService_proto_msgTypes[19].OneofWrappers = []any{ (*BodyRange_MentionAci)(nil), (*BodyRange_Style_)(nil), (*BodyRange_MentionAciBinary)(nil), } - file_signalpb_SignalService_proto_msgTypes[20].OneofWrappers = []any{ + file_SignalService_proto_msgTypes[20].OneofWrappers = []any{ (*AddressableMessage_AuthorServiceId)(nil), (*AddressableMessage_AuthorE164)(nil), (*AddressableMessage_AuthorServiceIdBinary)(nil), } - file_signalpb_SignalService_proto_msgTypes[21].OneofWrappers = []any{ + file_SignalService_proto_msgTypes[21].OneofWrappers = []any{ (*ConversationIdentifier_ThreadServiceId)(nil), (*ConversationIdentifier_ThreadGroupId)(nil), (*ConversationIdentifier_ThreadE164)(nil), (*ConversationIdentifier_ThreadServiceIdBinary)(nil), } - file_signalpb_SignalService_proto_msgTypes[28].OneofWrappers = []any{ + file_SignalService_proto_msgTypes[28].OneofWrappers = []any{ (*DataMessage_Payment_Notification_)(nil), (*DataMessage_Payment_Activation_)(nil), } - file_signalpb_SignalService_proto_msgTypes[40].OneofWrappers = []any{ + file_SignalService_proto_msgTypes[40].OneofWrappers = []any{ (*DataMessage_PinMessage_PinDurationSeconds)(nil), (*DataMessage_PinMessage_PinDurationForever)(nil), } - file_signalpb_SignalService_proto_msgTypes[43].OneofWrappers = []any{ + file_SignalService_proto_msgTypes[42].OneofWrappers = []any{ (*DataMessage_Payment_Amount_MobileCoin_)(nil), } - file_signalpb_SignalService_proto_msgTypes[44].OneofWrappers = []any{ + file_SignalService_proto_msgTypes[43].OneofWrappers = []any{ (*DataMessage_Payment_Notification_MobileCoin_)(nil), } - file_signalpb_SignalService_proto_msgTypes[68].OneofWrappers = []any{ + file_SignalService_proto_msgTypes[67].OneofWrappers = []any{ (*SyncMessage_OutgoingPayment_MobileCoin_)(nil), } - file_signalpb_SignalService_proto_msgTypes[76].OneofWrappers = []any{ + file_SignalService_proto_msgTypes[75].OneofWrappers = []any{ (*SyncMessage_AttachmentBackfillResponse_Attachments)(nil), (*SyncMessage_AttachmentBackfillResponse_Error_)(nil), } - file_signalpb_SignalService_proto_msgTypes[88].OneofWrappers = []any{ + file_SignalService_proto_msgTypes[83].OneofWrappers = []any{ (*SyncMessage_AttachmentBackfillResponse_AttachmentData_Attachment)(nil), (*SyncMessage_AttachmentBackfillResponse_AttachmentData_Status_)(nil), } @@ -9979,18 +9363,18 @@ func file_signalpb_SignalService_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalpb_SignalService_proto_rawDesc), len(file_signalpb_SignalService_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_SignalService_proto_rawDesc), len(file_SignalService_proto_rawDesc)), NumEnums: 28, - NumMessages: 92, + NumMessages: 87, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_signalpb_SignalService_proto_goTypes, - DependencyIndexes: file_signalpb_SignalService_proto_depIdxs, - EnumInfos: file_signalpb_SignalService_proto_enumTypes, - MessageInfos: file_signalpb_SignalService_proto_msgTypes, + GoTypes: file_SignalService_proto_goTypes, + DependencyIndexes: file_SignalService_proto_depIdxs, + EnumInfos: file_SignalService_proto_enumTypes, + MessageInfos: file_SignalService_proto_msgTypes, }.Build() - File_signalpb_SignalService_proto = out.File - file_signalpb_SignalService_proto_goTypes = nil - file_signalpb_SignalService_proto_depIdxs = nil + File_SignalService_proto = out.File + file_SignalService_proto_goTypes = nil + file_SignalService_proto_depIdxs = nil } diff --git a/pkg/signalmeow/protobuf/signalpb/SignalService.proto b/pkg/signalmeow/protobuf/SignalService.proto similarity index 80% rename from pkg/signalmeow/protobuf/signalpb/SignalService.proto rename to pkg/signalmeow/protobuf/SignalService.proto index 562f47f..da4d44f 100644 --- a/pkg/signalmeow/protobuf/signalpb/SignalService.proto +++ b/pkg/signalmeow/protobuf/SignalService.proto @@ -13,79 +13,23 @@ option java_outer_classname = "SignalServiceProtos"; message Envelope { enum Type { UNKNOWN = 0; - - /** - * A double-ratchet message represents a "normal," "unsealed-sender" message - * encrypted using the Double Ratchet within an established Signal session. - * Double-ratchet messages include sender information in the plaintext - * portion of the `Envelope`. - */ - DOUBLE_RATCHET = 1; // content => (version byte | SignalMessage{Content}) - + CIPHERTEXT = 1; // content => (version byte | SignalMessage{Content}) reserved 2; reserved "KEY_EXCHANGE"; - - /** - * A prekey message begins a new Signal session. The `content` of a prekey - * message is a superset of a double-ratchet message's `content` and - * contains the sender's identity public key and information identifying the - * pre-keys used in the message's ciphertext. Like double-ratchet messages, - * prekey messages contain sender information in the plaintext portion of - * the `Envelope`. - */ - PREKEY_MESSAGE = 3; // content => (version byte | PreKeySignalMessage{Content}) - - /** - * Server delivery receipts are generated by the server when - * "unsealed-sender" messages are delivered to and acknowledged by the - * destination device. Server delivery receipts identify the sender in the - * plaintext portion of the `Envelope` and have no `content`. Note that - * receipts for sealed-sender messages are generated by clients as - * `UNIDENTIFIED_SENDER` messages. - * - * Note that, with server delivery receipts, the "client timestamp" on - * the envelope refers to the timestamp of the original message (i.e. the - * message the server just delivered) and not to the time of delivery. The - * "server timestamp" refers to the time of delivery. - */ - SERVER_DELIVERY_RECEIPT = 5; // content => [] - - /** - * An unidentified sender message represents a message with no sender - * information in the plaintext portion of the `Envelope`. Unidentified - * sender messages always contain an additional `subtype` in their - * `content`. They may or may not be part of an existing Signal session - * (i.e. an unidentified sender message may have a "prekey message" - * subtype or may indicate an encryption error). - */ - UNIDENTIFIED_SENDER = 6; // content => ((version byte | UnidentifiedSenderMessage) OR (version byte | Multi-Recipient Sealed Sender Format)) - - reserved 7; - reserved "SENDERKEY_MESSAGE"; - - /** - * A plaintext message is used solely to convey encryption error receipts - * and never contains encrypted message content. Encryption error receipts - * must be delivered in plaintext because, encryption/decryption of a prior - * message failed and there is no reason to believe that - * encryption/decryption of subsequent messages with the same key material - * would succeed. - * - * Critically, plaintext messages never have "real" message content - * generated by users. Plaintext messages include sender information. - */ - PLAINTEXT_CONTENT = 8; // content => (marker byte | Content) - - // next: 9 + PREKEY_BUNDLE = 3; // content => (version byte | PreKeySignalMessage{Content}) + SERVER_DELIVERY_RECEIPT = 5; // legacyMessage => [] AND content => [] + UNIDENTIFIED_SENDER = 6; // legacyMessage => [] AND content => ((version byte | UnidentifiedSenderMessage) OR (version byte | Multi-Recipient Sealed Sender Format)) + SENDERKEY_MESSAGE = 7; // legacyMessage => [] AND content => (version byte | SenderKeyMessage) + PLAINTEXT_CONTENT = 8; // legacyMessage => [] AND content => (marker byte | Content) } optional Type type = 1; reserved 2; // formerly optional string sourceE164 = 2; optional string sourceServiceId = 11; - optional uint32 sourceDeviceId = 7; + optional uint32 sourceDevice = 7; optional string destinationServiceId = 13; reserved 3; // formerly optional string relay = 3; - optional uint64 clientTimestamp = 5; + optional uint64 timestamp = 5; reserved 6; // formerly optional bytes legacyMessage = 6; // Contains an encrypted DataMessage; this field could have been set historically for type 1 or 3 messages; no longer in use optional bytes content = 8; // Contains an encrypted Content optional string serverGuid = 9; @@ -104,20 +48,17 @@ message Envelope { } message Content { - oneof content { - DataMessage dataMessage = 1; - SyncMessage syncMessage = 2; - CallMessage callMessage = 3; - NullMessage nullMessage = 4; - ReceiptMessage receiptMessage = 5; - TypingMessage typingMessage = 6; - bytes /* DecryptionErrorMessage */ decryptionErrorMessage = 8; - StoryMessage storyMessage = 9; - EditMessage editMessage = 11; - } - + optional DataMessage dataMessage = 1; + optional SyncMessage syncMessage = 2; + optional CallMessage callMessage = 3; + optional NullMessage nullMessage = 4; + optional ReceiptMessage receiptMessage = 5; + optional TypingMessage typingMessage = 6; optional bytes /* SenderKeyDistributionMessage */ senderKeyDistributionMessage = 7; + optional bytes /* DecryptionErrorMessage */ decryptionErrorMessage = 8; + optional StoryMessage storyMessage = 9; optional PniSignatureMessage pniSignatureMessage = 10; + optional EditMessage editMessage = 11; } message CallMessage { @@ -187,7 +128,7 @@ message CallMessage { message DataMessage { enum Flags { - reserved /*END_SESSION*/ 1; + END_SESSION = 1; EXPIRATION_TIMER_UPDATE = 2; PROFILE_KEY_UPDATE = 4; FORWARD = 8; @@ -390,8 +331,8 @@ message DataMessage { message PollVote { optional bytes targetAuthorAciBinary = 1; optional uint64 targetSentTimestamp = 2; - repeated uint32 optionIndexes = 3; - optional uint32 voteCount = 4; + repeated uint32 optionIndexes = 3; // must be in the range [0, options.length) from the PollCreate + optional uint32 voteCount = 4; // increment this by 1 each time you vote on a given poll } message PinMessage { @@ -408,11 +349,6 @@ message DataMessage { optional uint64 targetSentTimestamp = 2; } - message AdminDelete { - optional bytes targetAuthorAciBinary = 1; // 16-byte UUID - optional uint64 targetSentTimestamp = 2; - } - optional string body = 1; repeated AttachmentPointer attachments = 2; reserved /*groupV1*/ 3; @@ -440,8 +376,7 @@ message DataMessage { optional PollVote pollVote = 26; optional PinMessage pinMessage = 27; optional UnpinMessage unpinMessage = 28; - optional AdminDelete adminDelete = 29; - // NEXT ID: 30 + // NEXT ID: 29 } message NullMessage { @@ -500,12 +435,6 @@ message TextAttachment { } message Gradient { - // Color ordering: - // 0 degrees: bottom-to-top - // 90 degrees: left-to-right - // 180 degrees: top-to-bottom - // 270 degrees: right-to-left - optional uint32 startColor = 1; // deprecated: this field will be removed in a future release. optional uint32 endColor = 2; // deprecated: this field will be removed in a future release. optional uint32 angle = 3; // degrees @@ -579,29 +508,10 @@ message SyncMessage { } message Blocked { - repeated string numbers = 1; // deprecated: this field will be removed in a future release. + repeated string numbers = 1; repeated string acis = 3; - repeated bytes groupIds = 2; // deprecated: this field will be removed in a future release. - repeated bytes acisBinary = 4; // deprecated: this field will be removed in a future release. - - message BlockedE164 { - optional string e164 = 1; - optional uint64 timestamp = 2; - } - - message BlockedAci { - optional bytes aciBinary = 1; // 16-byte UUID - optional uint64 timestamp = 2; - } - - message BlockedGroup { - optional bytes groupId = 1; - optional uint64 timestamp = 2; - } - - repeated BlockedE164 blockedE164s = 5; - repeated BlockedAci blockedAcis = 6; - repeated BlockedGroup blockedGroups = 7; + repeated bytes groupIds = 2; + repeated bytes acisBinary = 4; // 16-byte UUID } message Request { @@ -637,7 +547,7 @@ message SyncMessage { optional bool unidentifiedDeliveryIndicators = 2; optional bool typingIndicators = 3; reserved /* linkPreviews */ 4; - reserved /* provisioningVersion */ 5; + optional uint32 provisioningVersion = 5; optional bool linkPreviews = 6; } @@ -672,7 +582,7 @@ message SyncMessage { message Keys { reserved /* storageService */ 1; - reserved /* master */ 2; + optional bytes master = 2; // deprecated: this field will be removed in a future release. optional string accountEntropyPool = 3; optional bytes mediaRootBackupKey = 4; } @@ -772,7 +682,7 @@ message SyncMessage { optional bytes rootKey = 1; optional bytes adminPasskey = 2; optional Type type = 3; // defaults to UPDATE - reserved /*epoch*/ 4; + optional bytes epoch = 4; } message CallLogEvent { @@ -869,43 +779,31 @@ message SyncMessage { } } - message UsernameChange {} - - oneof content { - Sent sent = 1; - Contacts contacts = 2; - Request request = 4; - Blocked blocked = 6; - Verified verified = 7; - Configuration configuration = 9; - ViewOnceOpen viewOnceOpen = 11; - FetchLatest fetchLatest = 12; - Keys keys = 13; - MessageRequestResponse messageRequestResponse = 14; - OutgoingPayment outgoingPayment = 15; - PniChangeNumber pniChangeNumber = 18; - CallEvent callEvent = 19; - CallLinkUpdate callLinkUpdate = 20; - CallLogEvent callLogEvent = 21; - DeleteForMe deleteForMe = 22; - DeviceNameChange deviceNameChange = 23; - AttachmentBackfillRequest attachmentBackfillRequest = 24; - AttachmentBackfillResponse attachmentBackfillResponse = 25; - UsernameChange usernameChange = 26; - } - + optional Sent sent = 1; + optional Contacts contacts = 2; reserved /*groups*/ 3; - - // Protobufs don't allow `repeated` fields to be inside of `oneof` so while - // the fields below are mutually exclusive with the rest of the values above - // we have to place them outside of `oneof`. + optional Request request = 4; repeated Read read = 5; - repeated StickerPackOperation stickerPackOperation = 10; - repeated Viewed viewed = 16; - - reserved /*pniIdentity*/ 17; - + optional Blocked blocked = 6; + optional Verified verified = 7; + optional Configuration configuration = 9; optional bytes padding = 8; + repeated StickerPackOperation stickerPackOperation = 10; + optional ViewOnceOpen viewOnceOpen = 11; + optional FetchLatest fetchLatest = 12; + optional Keys keys = 13; + optional MessageRequestResponse messageRequestResponse = 14; + optional OutgoingPayment outgoingPayment = 15; + repeated Viewed viewed = 16; + reserved /*pniIdentity*/ 17; + optional PniChangeNumber pniChangeNumber = 18; + optional CallEvent callEvent = 19; + optional CallLinkUpdate callLinkUpdate = 20; + optional CallLogEvent callLogEvent = 21; + optional DeleteForMe deleteForMe = 22; + optional DeviceNameChange deviceNameChange = 23; + optional AttachmentBackfillRequest attachmentBackfillRequest = 24; + optional AttachmentBackfillResponse attachmentBackfillResponse = 25; } message AttachmentPointer { diff --git a/pkg/signalmeow/protobuf/signalpb/StickerResources.pb.go b/pkg/signalmeow/protobuf/StickerResources.pb.go similarity index 70% rename from pkg/signalmeow/protobuf/signalpb/StickerResources.pb.go rename to pkg/signalmeow/protobuf/StickerResources.pb.go index 2d32653..e83cda1 100644 --- a/pkg/signalmeow/protobuf/signalpb/StickerResources.pb.go +++ b/pkg/signalmeow/protobuf/StickerResources.pb.go @@ -6,8 +6,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: signalpb/StickerResources.proto +// protoc v6.33.5 +// source: StickerResources.proto package signalpb @@ -38,7 +38,7 @@ type Pack struct { func (x *Pack) Reset() { *x = Pack{} - mi := &file_signalpb_StickerResources_proto_msgTypes[0] + mi := &file_StickerResources_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -50,7 +50,7 @@ func (x *Pack) String() string { func (*Pack) ProtoMessage() {} func (x *Pack) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StickerResources_proto_msgTypes[0] + mi := &file_StickerResources_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63,7 +63,7 @@ func (x *Pack) ProtoReflect() protoreflect.Message { // Deprecated: Use Pack.ProtoReflect.Descriptor instead. func (*Pack) Descriptor() ([]byte, []int) { - return file_signalpb_StickerResources_proto_rawDescGZIP(), []int{0} + return file_StickerResources_proto_rawDescGZIP(), []int{0} } func (x *Pack) GetTitle() string { @@ -105,7 +105,7 @@ type Pack_Sticker struct { func (x *Pack_Sticker) Reset() { *x = Pack_Sticker{} - mi := &file_signalpb_StickerResources_proto_msgTypes[1] + mi := &file_StickerResources_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -117,7 +117,7 @@ func (x *Pack_Sticker) String() string { func (*Pack_Sticker) ProtoMessage() {} func (x *Pack_Sticker) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StickerResources_proto_msgTypes[1] + mi := &file_StickerResources_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -130,7 +130,7 @@ func (x *Pack_Sticker) ProtoReflect() protoreflect.Message { // Deprecated: Use Pack_Sticker.ProtoReflect.Descriptor instead. func (*Pack_Sticker) Descriptor() ([]byte, []int) { - return file_signalpb_StickerResources_proto_rawDescGZIP(), []int{0, 0} + return file_StickerResources_proto_rawDescGZIP(), []int{0, 0} } func (x *Pack_Sticker) GetId() uint32 { @@ -154,11 +154,11 @@ func (x *Pack_Sticker) GetContentType() string { return "" } -var File_signalpb_StickerResources_proto protoreflect.FileDescriptor +var File_StickerResources_proto protoreflect.FileDescriptor -const file_signalpb_StickerResources_proto_rawDesc = "" + +const file_StickerResources_proto_rawDesc = "" + "\n" + - "\x1fsignalpb/StickerResources.proto\x12\rsignalservice\"\xf3\x01\n" + + "\x16StickerResources.proto\x12\rsignalservice\"\xf3\x01\n" + "\x04Pack\x12\x14\n" + "\x05title\x18\x01 \x01(\tR\x05title\x12\x16\n" + "\x06author\x18\x02 \x01(\tR\x06author\x121\n" + @@ -171,23 +171,23 @@ const file_signalpb_StickerResources_proto_rawDesc = "" + "1org.whispersystems.signalservice.internal.stickerB\rStickerProtos" var ( - file_signalpb_StickerResources_proto_rawDescOnce sync.Once - file_signalpb_StickerResources_proto_rawDescData []byte + file_StickerResources_proto_rawDescOnce sync.Once + file_StickerResources_proto_rawDescData []byte ) -func file_signalpb_StickerResources_proto_rawDescGZIP() []byte { - file_signalpb_StickerResources_proto_rawDescOnce.Do(func() { - file_signalpb_StickerResources_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_signalpb_StickerResources_proto_rawDesc), len(file_signalpb_StickerResources_proto_rawDesc))) +func file_StickerResources_proto_rawDescGZIP() []byte { + file_StickerResources_proto_rawDescOnce.Do(func() { + file_StickerResources_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_StickerResources_proto_rawDesc), len(file_StickerResources_proto_rawDesc))) }) - return file_signalpb_StickerResources_proto_rawDescData + return file_StickerResources_proto_rawDescData } -var file_signalpb_StickerResources_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_signalpb_StickerResources_proto_goTypes = []any{ +var file_StickerResources_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_StickerResources_proto_goTypes = []any{ (*Pack)(nil), // 0: signalservice.Pack (*Pack_Sticker)(nil), // 1: signalservice.Pack.Sticker } -var file_signalpb_StickerResources_proto_depIdxs = []int32{ +var file_StickerResources_proto_depIdxs = []int32{ 1, // 0: signalservice.Pack.cover:type_name -> signalservice.Pack.Sticker 1, // 1: signalservice.Pack.stickers:type_name -> signalservice.Pack.Sticker 2, // [2:2] is the sub-list for method output_type @@ -197,26 +197,26 @@ var file_signalpb_StickerResources_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_signalpb_StickerResources_proto_init() } -func file_signalpb_StickerResources_proto_init() { - if File_signalpb_StickerResources_proto != nil { +func init() { file_StickerResources_proto_init() } +func file_StickerResources_proto_init() { + if File_StickerResources_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalpb_StickerResources_proto_rawDesc), len(file_signalpb_StickerResources_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_StickerResources_proto_rawDesc), len(file_StickerResources_proto_rawDesc)), NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_signalpb_StickerResources_proto_goTypes, - DependencyIndexes: file_signalpb_StickerResources_proto_depIdxs, - MessageInfos: file_signalpb_StickerResources_proto_msgTypes, + GoTypes: file_StickerResources_proto_goTypes, + DependencyIndexes: file_StickerResources_proto_depIdxs, + MessageInfos: file_StickerResources_proto_msgTypes, }.Build() - File_signalpb_StickerResources_proto = out.File - file_signalpb_StickerResources_proto_goTypes = nil - file_signalpb_StickerResources_proto_depIdxs = nil + File_StickerResources_proto = out.File + file_StickerResources_proto_goTypes = nil + file_StickerResources_proto_depIdxs = nil } diff --git a/pkg/signalmeow/protobuf/signalpb/StickerResources.proto b/pkg/signalmeow/protobuf/StickerResources.proto similarity index 100% rename from pkg/signalmeow/protobuf/signalpb/StickerResources.proto rename to pkg/signalmeow/protobuf/StickerResources.proto diff --git a/pkg/signalmeow/protobuf/signalpb/StorageService.pb.go b/pkg/signalmeow/protobuf/StorageService.pb.go similarity index 69% rename from pkg/signalmeow/protobuf/signalpb/StorageService.pb.go rename to pkg/signalmeow/protobuf/StorageService.pb.go index 6c8e24b..9a27146 100644 --- a/pkg/signalmeow/protobuf/signalpb/StorageService.pb.go +++ b/pkg/signalmeow/protobuf/StorageService.pb.go @@ -1,12 +1,13 @@ +//* +// Copyright (C) 2019 Open Whisper Systems // -// Copyright 2020-2021 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only +// Licensed according to the LICENSE file in this repository. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: signalpb/StorageService.proto +// protoc v6.33.5 +// source: StorageService.proto package signalpb @@ -58,11 +59,11 @@ func (x OptionalBool) String() string { } func (OptionalBool) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_StorageService_proto_enumTypes[0].Descriptor() + return file_StorageService_proto_enumTypes[0].Descriptor() } func (OptionalBool) Type() protoreflect.EnumType { - return &file_signalpb_StorageService_proto_enumTypes[0] + return &file_StorageService_proto_enumTypes[0] } func (x OptionalBool) Number() protoreflect.EnumNumber { @@ -71,7 +72,7 @@ func (x OptionalBool) Number() protoreflect.EnumNumber { // Deprecated: Use OptionalBool.Descriptor instead. func (OptionalBool) EnumDescriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{0} + return file_StorageService_proto_rawDescGZIP(), []int{0} } // If unset - computed as the value of the first byte of SHA-256(msg=CONTACT_ID) @@ -143,11 +144,11 @@ func (x AvatarColor) String() string { } func (AvatarColor) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_StorageService_proto_enumTypes[1].Descriptor() + return file_StorageService_proto_enumTypes[1].Descriptor() } func (AvatarColor) Type() protoreflect.EnumType { - return &file_signalpb_StorageService_proto_enumTypes[1] + return &file_StorageService_proto_enumTypes[1] } func (x AvatarColor) Number() protoreflect.EnumNumber { @@ -156,7 +157,7 @@ func (x AvatarColor) Number() protoreflect.EnumNumber { // Deprecated: Use AvatarColor.Descriptor instead. func (AvatarColor) EnumDescriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{1} + return file_StorageService_proto_rawDescGZIP(), []int{1} } type ManifestRecord_Identifier_Type int32 @@ -168,7 +169,6 @@ const ( ManifestRecord_Identifier_GROUPV2 ManifestRecord_Identifier_Type = 3 ManifestRecord_Identifier_ACCOUNT ManifestRecord_Identifier_Type = 4 ManifestRecord_Identifier_STORY_DISTRIBUTION_LIST ManifestRecord_Identifier_Type = 5 - ManifestRecord_Identifier_STICKER_PACK ManifestRecord_Identifier_Type = 6 ManifestRecord_Identifier_CALL_LINK ManifestRecord_Identifier_Type = 7 ManifestRecord_Identifier_CHAT_FOLDER ManifestRecord_Identifier_Type = 8 ManifestRecord_Identifier_NOTIFICATION_PROFILE ManifestRecord_Identifier_Type = 9 @@ -183,7 +183,6 @@ var ( 3: "GROUPV2", 4: "ACCOUNT", 5: "STORY_DISTRIBUTION_LIST", - 6: "STICKER_PACK", 7: "CALL_LINK", 8: "CHAT_FOLDER", 9: "NOTIFICATION_PROFILE", @@ -195,7 +194,6 @@ var ( "GROUPV2": 3, "ACCOUNT": 4, "STORY_DISTRIBUTION_LIST": 5, - "STICKER_PACK": 6, "CALL_LINK": 7, "CHAT_FOLDER": 8, "NOTIFICATION_PROFILE": 9, @@ -213,11 +211,11 @@ func (x ManifestRecord_Identifier_Type) String() string { } func (ManifestRecord_Identifier_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_StorageService_proto_enumTypes[2].Descriptor() + return file_StorageService_proto_enumTypes[2].Descriptor() } func (ManifestRecord_Identifier_Type) Type() protoreflect.EnumType { - return &file_signalpb_StorageService_proto_enumTypes[2] + return &file_StorageService_proto_enumTypes[2] } func (x ManifestRecord_Identifier_Type) Number() protoreflect.EnumNumber { @@ -226,7 +224,7 @@ func (x ManifestRecord_Identifier_Type) Number() protoreflect.EnumNumber { // Deprecated: Use ManifestRecord_Identifier_Type.Descriptor instead. func (ManifestRecord_Identifier_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{5, 0, 0} + return file_StorageService_proto_rawDescGZIP(), []int{5, 0, 0} } type ContactRecord_IdentityState int32 @@ -262,11 +260,11 @@ func (x ContactRecord_IdentityState) String() string { } func (ContactRecord_IdentityState) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_StorageService_proto_enumTypes[3].Descriptor() + return file_StorageService_proto_enumTypes[3].Descriptor() } func (ContactRecord_IdentityState) Type() protoreflect.EnumType { - return &file_signalpb_StorageService_proto_enumTypes[3] + return &file_StorageService_proto_enumTypes[3] } func (x ContactRecord_IdentityState) Number() protoreflect.EnumNumber { @@ -275,7 +273,7 @@ func (x ContactRecord_IdentityState) Number() protoreflect.EnumNumber { // Deprecated: Use ContactRecord_IdentityState.Descriptor instead. func (ContactRecord_IdentityState) EnumDescriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{7, 0} + return file_StorageService_proto_rawDescGZIP(), []int{7, 0} } type GroupV2Record_StorySendMode int32 @@ -311,11 +309,11 @@ func (x GroupV2Record_StorySendMode) String() string { } func (GroupV2Record_StorySendMode) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_StorageService_proto_enumTypes[4].Descriptor() + return file_StorageService_proto_enumTypes[4].Descriptor() } func (GroupV2Record_StorySendMode) Type() protoreflect.EnumType { - return &file_signalpb_StorageService_proto_enumTypes[4] + return &file_StorageService_proto_enumTypes[4] } func (x GroupV2Record_StorySendMode) Number() protoreflect.EnumNumber { @@ -324,56 +322,7 @@ func (x GroupV2Record_StorySendMode) Number() protoreflect.EnumNumber { // Deprecated: Use GroupV2Record_StorySendMode.Descriptor instead. func (GroupV2Record_StorySendMode) EnumDescriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{9, 0} -} - -type AccountRecord_UnreadBadgeType int32 - -const ( - AccountRecord_UNKNOWN_BADGE_TYPE AccountRecord_UnreadBadgeType = 0 // Interpret as "Unread messages" - AccountRecord_UNREAD_MESSAGES AccountRecord_UnreadBadgeType = 1 - AccountRecord_UNREAD_CHATS AccountRecord_UnreadBadgeType = 2 -) - -// Enum value maps for AccountRecord_UnreadBadgeType. -var ( - AccountRecord_UnreadBadgeType_name = map[int32]string{ - 0: "UNKNOWN_BADGE_TYPE", - 1: "UNREAD_MESSAGES", - 2: "UNREAD_CHATS", - } - AccountRecord_UnreadBadgeType_value = map[string]int32{ - "UNKNOWN_BADGE_TYPE": 0, - "UNREAD_MESSAGES": 1, - "UNREAD_CHATS": 2, - } -) - -func (x AccountRecord_UnreadBadgeType) Enum() *AccountRecord_UnreadBadgeType { - p := new(AccountRecord_UnreadBadgeType) - *p = x - return p -} - -func (x AccountRecord_UnreadBadgeType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AccountRecord_UnreadBadgeType) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_StorageService_proto_enumTypes[5].Descriptor() -} - -func (AccountRecord_UnreadBadgeType) Type() protoreflect.EnumType { - return &file_signalpb_StorageService_proto_enumTypes[5] -} - -func (x AccountRecord_UnreadBadgeType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AccountRecord_UnreadBadgeType.Descriptor instead. -func (AccountRecord_UnreadBadgeType) EnumDescriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 0} + return file_StorageService_proto_rawDescGZIP(), []int{9, 0} } type AccountRecord_PhoneNumberSharingMode int32 @@ -409,11 +358,11 @@ func (x AccountRecord_PhoneNumberSharingMode) String() string { } func (AccountRecord_PhoneNumberSharingMode) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_StorageService_proto_enumTypes[6].Descriptor() + return file_StorageService_proto_enumTypes[5].Descriptor() } func (AccountRecord_PhoneNumberSharingMode) Type() protoreflect.EnumType { - return &file_signalpb_StorageService_proto_enumTypes[6] + return &file_StorageService_proto_enumTypes[5] } func (x AccountRecord_PhoneNumberSharingMode) Number() protoreflect.EnumNumber { @@ -422,7 +371,7 @@ func (x AccountRecord_PhoneNumberSharingMode) Number() protoreflect.EnumNumber { // Deprecated: Use AccountRecord_PhoneNumberSharingMode.Descriptor instead. func (AccountRecord_PhoneNumberSharingMode) EnumDescriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 1} + return file_StorageService_proto_rawDescGZIP(), []int{11, 0} } type AccountRecord_UsernameLink_Color int32 @@ -476,11 +425,11 @@ func (x AccountRecord_UsernameLink_Color) String() string { } func (AccountRecord_UsernameLink_Color) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_StorageService_proto_enumTypes[7].Descriptor() + return file_StorageService_proto_enumTypes[6].Descriptor() } func (AccountRecord_UsernameLink_Color) Type() protoreflect.EnumType { - return &file_signalpb_StorageService_proto_enumTypes[7] + return &file_StorageService_proto_enumTypes[6] } func (x AccountRecord_UsernameLink_Color) Number() protoreflect.EnumNumber { @@ -489,7 +438,7 @@ func (x AccountRecord_UsernameLink_Color) Number() protoreflect.EnumNumber { // Deprecated: Use AccountRecord_UsernameLink_Color.Descriptor instead. func (AccountRecord_UsernameLink_Color) EnumDescriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 1, 0} + return file_StorageService_proto_rawDescGZIP(), []int{11, 1, 0} } // Represents the default "All chats" folder record vs all other custom folders @@ -526,11 +475,11 @@ func (x ChatFolderRecord_FolderType) String() string { } func (ChatFolderRecord_FolderType) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_StorageService_proto_enumTypes[8].Descriptor() + return file_StorageService_proto_enumTypes[7].Descriptor() } func (ChatFolderRecord_FolderType) Type() protoreflect.EnumType { - return &file_signalpb_StorageService_proto_enumTypes[8] + return &file_StorageService_proto_enumTypes[7] } func (x ChatFolderRecord_FolderType) Number() protoreflect.EnumNumber { @@ -539,7 +488,7 @@ func (x ChatFolderRecord_FolderType) Number() protoreflect.EnumNumber { // Deprecated: Use ChatFolderRecord_FolderType.Descriptor instead. func (ChatFolderRecord_FolderType) EnumDescriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{16, 0} + return file_StorageService_proto_rawDescGZIP(), []int{15, 0} } type NotificationProfile_DayOfWeek int32 @@ -590,11 +539,11 @@ func (x NotificationProfile_DayOfWeek) String() string { } func (NotificationProfile_DayOfWeek) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_StorageService_proto_enumTypes[9].Descriptor() + return file_StorageService_proto_enumTypes[8].Descriptor() } func (NotificationProfile_DayOfWeek) Type() protoreflect.EnumType { - return &file_signalpb_StorageService_proto_enumTypes[9] + return &file_StorageService_proto_enumTypes[8] } func (x NotificationProfile_DayOfWeek) Number() protoreflect.EnumNumber { @@ -603,7 +552,7 @@ func (x NotificationProfile_DayOfWeek) Number() protoreflect.EnumNumber { // Deprecated: Use NotificationProfile_DayOfWeek.Descriptor instead. func (NotificationProfile_DayOfWeek) EnumDescriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{17, 0} + return file_StorageService_proto_rawDescGZIP(), []int{16, 0} } type StorageManifest struct { @@ -616,7 +565,7 @@ type StorageManifest struct { func (x *StorageManifest) Reset() { *x = StorageManifest{} - mi := &file_signalpb_StorageService_proto_msgTypes[0] + mi := &file_StorageService_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -628,7 +577,7 @@ func (x *StorageManifest) String() string { func (*StorageManifest) ProtoMessage() {} func (x *StorageManifest) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[0] + mi := &file_StorageService_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -641,7 +590,7 @@ func (x *StorageManifest) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageManifest.ProtoReflect.Descriptor instead. func (*StorageManifest) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{0} + return file_StorageService_proto_rawDescGZIP(), []int{0} } func (x *StorageManifest) GetVersion() uint64 { @@ -668,7 +617,7 @@ type StorageItem struct { func (x *StorageItem) Reset() { *x = StorageItem{} - mi := &file_signalpb_StorageService_proto_msgTypes[1] + mi := &file_StorageService_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -680,7 +629,7 @@ func (x *StorageItem) String() string { func (*StorageItem) ProtoMessage() {} func (x *StorageItem) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[1] + mi := &file_StorageService_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -693,7 +642,7 @@ func (x *StorageItem) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageItem.ProtoReflect.Descriptor instead. func (*StorageItem) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{1} + return file_StorageService_proto_rawDescGZIP(), []int{1} } func (x *StorageItem) GetKey() []byte { @@ -719,7 +668,7 @@ type StorageItems struct { func (x *StorageItems) Reset() { *x = StorageItems{} - mi := &file_signalpb_StorageService_proto_msgTypes[2] + mi := &file_StorageService_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -731,7 +680,7 @@ func (x *StorageItems) String() string { func (*StorageItems) ProtoMessage() {} func (x *StorageItems) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[2] + mi := &file_StorageService_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -744,7 +693,7 @@ func (x *StorageItems) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageItems.ProtoReflect.Descriptor instead. func (*StorageItems) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{2} + return file_StorageService_proto_rawDescGZIP(), []int{2} } func (x *StorageItems) GetItems() []*StorageItem { @@ -763,7 +712,7 @@ type ReadOperation struct { func (x *ReadOperation) Reset() { *x = ReadOperation{} - mi := &file_signalpb_StorageService_proto_msgTypes[3] + mi := &file_StorageService_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -775,7 +724,7 @@ func (x *ReadOperation) String() string { func (*ReadOperation) ProtoMessage() {} func (x *ReadOperation) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[3] + mi := &file_StorageService_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -788,7 +737,7 @@ func (x *ReadOperation) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadOperation.ProtoReflect.Descriptor instead. func (*ReadOperation) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{3} + return file_StorageService_proto_rawDescGZIP(), []int{3} } func (x *ReadOperation) GetReadKey() [][]byte { @@ -810,7 +759,7 @@ type WriteOperation struct { func (x *WriteOperation) Reset() { *x = WriteOperation{} - mi := &file_signalpb_StorageService_proto_msgTypes[4] + mi := &file_StorageService_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -822,7 +771,7 @@ func (x *WriteOperation) String() string { func (*WriteOperation) ProtoMessage() {} func (x *WriteOperation) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[4] + mi := &file_StorageService_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -835,7 +784,7 @@ func (x *WriteOperation) ProtoReflect() protoreflect.Message { // Deprecated: Use WriteOperation.ProtoReflect.Descriptor instead. func (*WriteOperation) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{4} + return file_StorageService_proto_rawDescGZIP(), []int{4} } func (x *WriteOperation) GetManifest() *StorageManifest { @@ -878,7 +827,7 @@ type ManifestRecord struct { func (x *ManifestRecord) Reset() { *x = ManifestRecord{} - mi := &file_signalpb_StorageService_proto_msgTypes[5] + mi := &file_StorageService_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -890,7 +839,7 @@ func (x *ManifestRecord) String() string { func (*ManifestRecord) ProtoMessage() {} func (x *ManifestRecord) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[5] + mi := &file_StorageService_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -903,7 +852,7 @@ func (x *ManifestRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use ManifestRecord.ProtoReflect.Descriptor instead. func (*ManifestRecord) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{5} + return file_StorageService_proto_rawDescGZIP(), []int{5} } func (x *ManifestRecord) GetVersion() uint64 { @@ -943,7 +892,6 @@ type StorageRecord struct { // *StorageRecord_GroupV2 // *StorageRecord_Account // *StorageRecord_StoryDistributionList - // *StorageRecord_StickerPack // *StorageRecord_CallLink // *StorageRecord_ChatFolder // *StorageRecord_NotificationProfile @@ -954,7 +902,7 @@ type StorageRecord struct { func (x *StorageRecord) Reset() { *x = StorageRecord{} - mi := &file_signalpb_StorageService_proto_msgTypes[6] + mi := &file_StorageService_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -966,7 +914,7 @@ func (x *StorageRecord) String() string { func (*StorageRecord) ProtoMessage() {} func (x *StorageRecord) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[6] + mi := &file_StorageService_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -979,7 +927,7 @@ func (x *StorageRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use StorageRecord.ProtoReflect.Descriptor instead. func (*StorageRecord) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{6} + return file_StorageService_proto_rawDescGZIP(), []int{6} } func (x *StorageRecord) GetRecord() isStorageRecord_Record { @@ -1034,15 +982,6 @@ func (x *StorageRecord) GetStoryDistributionList() *StoryDistributionListRecord return nil } -func (x *StorageRecord) GetStickerPack() *StickerPackRecord { - if x != nil { - if x, ok := x.Record.(*StorageRecord_StickerPack); ok { - return x.StickerPack - } - } - return nil -} - func (x *StorageRecord) GetCallLink() *CallLinkRecord { if x != nil { if x, ok := x.Record.(*StorageRecord_CallLink); ok { @@ -1094,10 +1033,6 @@ type StorageRecord_StoryDistributionList struct { StoryDistributionList *StoryDistributionListRecord `protobuf:"bytes,5,opt,name=storyDistributionList,proto3,oneof"` } -type StorageRecord_StickerPack struct { - StickerPack *StickerPackRecord `protobuf:"bytes,6,opt,name=stickerPack,proto3,oneof"` -} - type StorageRecord_CallLink struct { CallLink *CallLinkRecord `protobuf:"bytes,7,opt,name=callLink,proto3,oneof"` } @@ -1120,8 +1055,6 @@ func (*StorageRecord_Account) isStorageRecord_Record() {} func (*StorageRecord_StoryDistributionList) isStorageRecord_Record() {} -func (*StorageRecord_StickerPack) isStorageRecord_Record() {} - func (*StorageRecord_CallLink) isStorageRecord_Record() {} func (*StorageRecord_ChatFolder) isStorageRecord_Record() {} @@ -1154,18 +1087,15 @@ type ContactRecord struct { Nickname *ContactRecord_Name `protobuf:"bytes,22,opt,name=nickname,proto3" json:"nickname,omitempty"` Note string `protobuf:"bytes,23,opt,name=note,proto3" json:"note,omitempty"` AvatarColor *AvatarColor `protobuf:"varint,24,opt,name=avatarColor,proto3,enum=signalservice.AvatarColor,oneof" json:"avatarColor,omitempty"` - AciBinary []byte `protobuf:"bytes,25,opt,name=aciBinary,proto3" json:"aciBinary,omitempty"` // 16-byte UUID - PniBinary []byte `protobuf:"bytes,26,opt,name=pniBinary,proto3" json:"pniBinary,omitempty"` // 16-byte UUID - BlockedAtTimestamp uint64 `protobuf:"varint,27,opt,name=blockedAtTimestamp,proto3" json:"blockedAtTimestamp,omitempty"` // 0 means the blocked time is unknown - NotifyForCallsIfMuted OptionalBool `protobuf:"varint,28,opt,name=notifyForCallsIfMuted,proto3,enum=signalservice.OptionalBool" json:"notifyForCallsIfMuted,omitempty"` // If unset, use the default settings - ShowUnreadReminders OptionalBool `protobuf:"varint,29,opt,name=showUnreadReminders,proto3,enum=signalservice.OptionalBool" json:"showUnreadReminders,omitempty"` // If unset, use the default settings + AciBinary []byte `protobuf:"bytes,25,opt,name=aciBinary,proto3" json:"aciBinary,omitempty"` // 16-byte UUID + PniBinary []byte `protobuf:"bytes,26,opt,name=pniBinary,proto3" json:"pniBinary,omitempty"` // 16-byte UUID unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ContactRecord) Reset() { *x = ContactRecord{} - mi := &file_signalpb_StorageService_proto_msgTypes[7] + mi := &file_StorageService_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1177,7 +1107,7 @@ func (x *ContactRecord) String() string { func (*ContactRecord) ProtoMessage() {} func (x *ContactRecord) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[7] + mi := &file_StorageService_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1190,7 +1120,7 @@ func (x *ContactRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use ContactRecord.ProtoReflect.Descriptor instead. func (*ContactRecord) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{7} + return file_StorageService_proto_rawDescGZIP(), []int{7} } func (x *ContactRecord) GetAci() string { @@ -1375,27 +1305,6 @@ func (x *ContactRecord) GetPniBinary() []byte { return nil } -func (x *ContactRecord) GetBlockedAtTimestamp() uint64 { - if x != nil { - return x.BlockedAtTimestamp - } - return 0 -} - -func (x *ContactRecord) GetNotifyForCallsIfMuted() OptionalBool { - if x != nil { - return x.NotifyForCallsIfMuted - } - return OptionalBool_UNSET -} - -func (x *ContactRecord) GetShowUnreadReminders() OptionalBool { - if x != nil { - return x.ShowUnreadReminders - } - return OptionalBool_UNSET -} - type GroupV1Record struct { state protoimpl.MessageState `protogen:"open.v1"` Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -1410,7 +1319,7 @@ type GroupV1Record struct { func (x *GroupV1Record) Reset() { *x = GroupV1Record{} - mi := &file_signalpb_StorageService_proto_msgTypes[8] + mi := &file_StorageService_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1422,7 +1331,7 @@ func (x *GroupV1Record) String() string { func (*GroupV1Record) ProtoMessage() {} func (x *GroupV1Record) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[8] + mi := &file_StorageService_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1435,7 +1344,7 @@ func (x *GroupV1Record) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupV1Record.ProtoReflect.Descriptor instead. func (*GroupV1Record) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{8} + return file_StorageService_proto_rawDescGZIP(), []int{8} } func (x *GroupV1Record) GetId() []byte { @@ -1488,23 +1397,17 @@ type GroupV2Record struct { Archived bool `protobuf:"varint,4,opt,name=archived,proto3" json:"archived,omitempty"` MarkedUnread bool `protobuf:"varint,5,opt,name=markedUnread,proto3" json:"markedUnread,omitempty"` MutedUntilTimestamp uint64 `protobuf:"varint,6,opt,name=mutedUntilTimestamp,proto3" json:"mutedUntilTimestamp,omitempty"` - DontNotifyForMentionsIfMuted bool `protobuf:"varint,7,opt,name=dontNotifyForMentionsIfMuted,proto3" json:"dontNotifyForMentionsIfMuted,omitempty"` // will be deprecated in favor of [notifyForMentionsIfMuted] + DontNotifyForMentionsIfMuted bool `protobuf:"varint,7,opt,name=dontNotifyForMentionsIfMuted,proto3" json:"dontNotifyForMentionsIfMuted,omitempty"` HideStory bool `protobuf:"varint,8,opt,name=hideStory,proto3" json:"hideStory,omitempty"` StorySendMode GroupV2Record_StorySendMode `protobuf:"varint,10,opt,name=storySendMode,proto3,enum=signalservice.GroupV2Record_StorySendMode" json:"storySendMode,omitempty"` AvatarColor *AvatarColor `protobuf:"varint,11,opt,name=avatarColor,proto3,enum=signalservice.AvatarColor,oneof" json:"avatarColor,omitempty"` - VerifiedNameHash []byte `protobuf:"bytes,12,opt,name=verifiedNameHash,proto3" json:"verifiedNameHash,omitempty"` // SHA-256 of UTF-8 encoded decrypted group title that was last verified - BlockedAtTimestamp uint64 `protobuf:"varint,13,opt,name=blockedAtTimestamp,proto3" json:"blockedAtTimestamp,omitempty"` // 0 means the blocked time is unknown - NotifyForCallsIfMuted OptionalBool `protobuf:"varint,14,opt,name=notifyForCallsIfMuted,proto3,enum=signalservice.OptionalBool" json:"notifyForCallsIfMuted,omitempty"` // If unset, use the default settings - NotifyForMentionsIfMuted OptionalBool `protobuf:"varint,15,opt,name=notifyForMentionsIfMuted,proto3,enum=signalservice.OptionalBool" json:"notifyForMentionsIfMuted,omitempty"` // If unset, use the default settings. If [dontNotifyForMentionsIfMuted] is true, this should be initialized to false. - NotifyForRepliesIfMuted OptionalBool `protobuf:"varint,16,opt,name=notifyForRepliesIfMuted,proto3,enum=signalservice.OptionalBool" json:"notifyForRepliesIfMuted,omitempty"` // If unset, use the default settings - ShowUnreadReminders OptionalBool `protobuf:"varint,17,opt,name=showUnreadReminders,proto3,enum=signalservice.OptionalBool" json:"showUnreadReminders,omitempty"` // If unset, use the default settings unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *GroupV2Record) Reset() { *x = GroupV2Record{} - mi := &file_signalpb_StorageService_proto_msgTypes[9] + mi := &file_StorageService_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1516,7 +1419,7 @@ func (x *GroupV2Record) String() string { func (*GroupV2Record) ProtoMessage() {} func (x *GroupV2Record) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[9] + mi := &file_StorageService_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1529,7 +1432,7 @@ func (x *GroupV2Record) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupV2Record.ProtoReflect.Descriptor instead. func (*GroupV2Record) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{9} + return file_StorageService_proto_rawDescGZIP(), []int{9} } func (x *GroupV2Record) GetMasterKey() []byte { @@ -1602,48 +1505,6 @@ func (x *GroupV2Record) GetAvatarColor() AvatarColor { return AvatarColor_A100 } -func (x *GroupV2Record) GetVerifiedNameHash() []byte { - if x != nil { - return x.VerifiedNameHash - } - return nil -} - -func (x *GroupV2Record) GetBlockedAtTimestamp() uint64 { - if x != nil { - return x.BlockedAtTimestamp - } - return 0 -} - -func (x *GroupV2Record) GetNotifyForCallsIfMuted() OptionalBool { - if x != nil { - return x.NotifyForCallsIfMuted - } - return OptionalBool_UNSET -} - -func (x *GroupV2Record) GetNotifyForMentionsIfMuted() OptionalBool { - if x != nil { - return x.NotifyForMentionsIfMuted - } - return OptionalBool_UNSET -} - -func (x *GroupV2Record) GetNotifyForRepliesIfMuted() OptionalBool { - if x != nil { - return x.NotifyForRepliesIfMuted - } - return OptionalBool_UNSET -} - -func (x *GroupV2Record) GetShowUnreadReminders() OptionalBool { - if x != nil { - return x.ShowUnreadReminders - } - return OptionalBool_UNSET -} - type Payments struct { state protoimpl.MessageState `protogen:"open.v1"` Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` @@ -1654,7 +1515,7 @@ type Payments struct { func (x *Payments) Reset() { *x = Payments{} - mi := &file_signalpb_StorageService_proto_msgTypes[10] + mi := &file_StorageService_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1666,7 +1527,7 @@ func (x *Payments) String() string { func (*Payments) ProtoMessage() {} func (x *Payments) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[10] + mi := &file_StorageService_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1679,7 +1540,7 @@ func (x *Payments) ProtoReflect() protoreflect.Message { // Deprecated: Use Payments.ProtoReflect.Descriptor instead. func (*Payments) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{10} + return file_StorageService_proto_rawDescGZIP(), []int{10} } func (x *Payments) GetEnabled() bool { @@ -1697,65 +1558,53 @@ func (x *Payments) GetEntropy() []byte { } type AccountRecord struct { - state protoimpl.MessageState `protogen:"open.v1"` - ProfileKey []byte `protobuf:"bytes,1,opt,name=profileKey,proto3" json:"profileKey,omitempty"` - GivenName string `protobuf:"bytes,2,opt,name=givenName,proto3" json:"givenName,omitempty"` - FamilyName string `protobuf:"bytes,3,opt,name=familyName,proto3" json:"familyName,omitempty"` - AvatarUrlPath string `protobuf:"bytes,4,opt,name=avatarUrlPath,proto3" json:"avatarUrlPath,omitempty"` - NoteToSelfArchived bool `protobuf:"varint,5,opt,name=noteToSelfArchived,proto3" json:"noteToSelfArchived,omitempty"` - ReadReceipts bool `protobuf:"varint,6,opt,name=readReceipts,proto3" json:"readReceipts,omitempty"` - SealedSenderIndicators bool `protobuf:"varint,7,opt,name=sealedSenderIndicators,proto3" json:"sealedSenderIndicators,omitempty"` - TypingIndicators bool `protobuf:"varint,8,opt,name=typingIndicators,proto3" json:"typingIndicators,omitempty"` - NoteToSelfMarkedUnread bool `protobuf:"varint,10,opt,name=noteToSelfMarkedUnread,proto3" json:"noteToSelfMarkedUnread,omitempty"` - LinkPreviews bool `protobuf:"varint,11,opt,name=linkPreviews,proto3" json:"linkPreviews,omitempty"` - PhoneNumberSharingMode AccountRecord_PhoneNumberSharingMode `protobuf:"varint,12,opt,name=phoneNumberSharingMode,proto3,enum=signalservice.AccountRecord_PhoneNumberSharingMode" json:"phoneNumberSharingMode,omitempty"` - UnlistedPhoneNumber bool `protobuf:"varint,13,opt,name=unlistedPhoneNumber,proto3" json:"unlistedPhoneNumber,omitempty"` - PinnedConversations []*AccountRecord_PinnedConversation `protobuf:"bytes,14,rep,name=pinnedConversations,proto3" json:"pinnedConversations,omitempty"` - PreferContactAvatars bool `protobuf:"varint,15,opt,name=preferContactAvatars,proto3" json:"preferContactAvatars,omitempty"` - Payments *Payments `protobuf:"bytes,16,opt,name=payments,proto3" json:"payments,omitempty"` - UniversalExpireTimer uint32 `protobuf:"varint,17,opt,name=universalExpireTimer,proto3" json:"universalExpireTimer,omitempty"` - PrimarySendsSms bool `protobuf:"varint,18,opt,name=primarySendsSms,proto3" json:"primarySendsSms,omitempty"` - PreferredReactionEmoji []string `protobuf:"bytes,20,rep,name=preferredReactionEmoji,proto3" json:"preferredReactionEmoji,omitempty"` - SubscriberId []byte `protobuf:"bytes,21,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` - SubscriberCurrencyCode string `protobuf:"bytes,22,opt,name=subscriberCurrencyCode,proto3" json:"subscriberCurrencyCode,omitempty"` - DisplayBadgesOnProfile bool `protobuf:"varint,23,opt,name=displayBadgesOnProfile,proto3" json:"displayBadgesOnProfile,omitempty"` - SubscriptionManuallyCancelled bool `protobuf:"varint,24,opt,name=subscriptionManuallyCancelled,proto3" json:"subscriptionManuallyCancelled,omitempty"` - KeepMutedChatsArchived bool `protobuf:"varint,25,opt,name=keepMutedChatsArchived,proto3" json:"keepMutedChatsArchived,omitempty"` - HasSetMyStoriesPrivacy bool `protobuf:"varint,26,opt,name=hasSetMyStoriesPrivacy,proto3" json:"hasSetMyStoriesPrivacy,omitempty"` - HasViewedOnboardingStory bool `protobuf:"varint,27,opt,name=hasViewedOnboardingStory,proto3" json:"hasViewedOnboardingStory,omitempty"` - StoriesDisabled bool `protobuf:"varint,29,opt,name=storiesDisabled,proto3" json:"storiesDisabled,omitempty"` - StoryViewReceiptsEnabled OptionalBool `protobuf:"varint,30,opt,name=storyViewReceiptsEnabled,proto3,enum=signalservice.OptionalBool" json:"storyViewReceiptsEnabled,omitempty"` - HasSeenGroupStoryEducationSheet bool `protobuf:"varint,32,opt,name=hasSeenGroupStoryEducationSheet,proto3" json:"hasSeenGroupStoryEducationSheet,omitempty"` - Username string `protobuf:"bytes,33,opt,name=username,proto3" json:"username,omitempty"` - HasCompletedUsernameOnboarding bool `protobuf:"varint,34,opt,name=hasCompletedUsernameOnboarding,proto3" json:"hasCompletedUsernameOnboarding,omitempty"` - UsernameLink *AccountRecord_UsernameLink `protobuf:"bytes,35,opt,name=usernameLink,proto3" json:"usernameLink,omitempty"` - BackupTier *uint64 `protobuf:"varint,40,opt,name=backupTier,proto3,oneof" json:"backupTier,omitempty"` // See zkgroup for integer particular values. Unset if backups are not enabled. - BackupSubscriberData *AccountRecord_IAPSubscriberData `protobuf:"bytes,41,opt,name=backupSubscriberData,proto3" json:"backupSubscriberData,omitempty"` - AvatarColor *AvatarColor `protobuf:"varint,42,opt,name=avatarColor,proto3,enum=signalservice.AvatarColor,oneof" json:"avatarColor,omitempty"` - NotificationProfileManualOverride *AccountRecord_NotificationProfileManualOverride `protobuf:"bytes,44,opt,name=notificationProfileManualOverride,proto3" json:"notificationProfileManualOverride,omitempty"` - NotificationProfileSyncDisabled bool `protobuf:"varint,45,opt,name=notificationProfileSyncDisabled,proto3" json:"notificationProfileSyncDisabled,omitempty"` - AutomaticKeyVerificationDisabled bool `protobuf:"varint,46,opt,name=automaticKeyVerificationDisabled,proto3" json:"automaticKeyVerificationDisabled,omitempty"` - HasSeenAdminDeleteEducationDialog bool `protobuf:"varint,47,opt,name=hasSeenAdminDeleteEducationDialog,proto3" json:"hasSeenAdminDeleteEducationDialog,omitempty"` - ReleaseNotesChatArchived *bool `protobuf:"varint,48,opt,name=releaseNotesChatArchived,proto3,oneof" json:"releaseNotesChatArchived,omitempty"` - ReleaseNotesChatMutedUntilTimestamp *uint64 `protobuf:"varint,49,opt,name=releaseNotesChatMutedUntilTimestamp,proto3,oneof" json:"releaseNotesChatMutedUntilTimestamp,omitempty"` - ReleaseNotesChatBlocked *bool `protobuf:"varint,50,opt,name=releaseNotesChatBlocked,proto3,oneof" json:"releaseNotesChatBlocked,omitempty"` - ReleaseNotesChatMarkedUnread *bool `protobuf:"varint,51,opt,name=releaseNotesChatMarkedUnread,proto3,oneof" json:"releaseNotesChatMarkedUnread,omitempty"` - ReleaseNotesChatBlockedAt *uint64 `protobuf:"varint,52,opt,name=releaseNotesChatBlockedAt,proto3,oneof" json:"releaseNotesChatBlockedAt,omitempty"` // only set if known (>0) - UnreadBadgeType AccountRecord_UnreadBadgeType `protobuf:"varint,53,opt,name=unreadBadgeType,proto3,enum=signalservice.AccountRecord_UnreadBadgeType" json:"unreadBadgeType,omitempty"` // Only used in desktop/ios - IncludeMutedChatsInBadge OptionalBool `protobuf:"varint,54,opt,name=includeMutedChatsInBadge,proto3,enum=signalservice.OptionalBool" json:"includeMutedChatsInBadge,omitempty"` // Only used in desktop/ios. If unset, consider this off. Only used in desktop/ios - ReactionNotifications OptionalBool `protobuf:"varint,55,opt,name=reactionNotifications,proto3,enum=signalservice.OptionalBool" json:"reactionNotifications,omitempty"` // If unset, consider this on - NotifyForCallsIfMuted OptionalBool `protobuf:"varint,56,opt,name=notifyForCallsIfMuted,proto3,enum=signalservice.OptionalBool" json:"notifyForCallsIfMuted,omitempty"` // If unset, consider this off - NotifyForMentionsIfMuted OptionalBool `protobuf:"varint,57,opt,name=notifyForMentionsIfMuted,proto3,enum=signalservice.OptionalBool" json:"notifyForMentionsIfMuted,omitempty"` // If unset, consider this on - NotifyForRepliesIfMuted OptionalBool `protobuf:"varint,58,opt,name=notifyForRepliesIfMuted,proto3,enum=signalservice.OptionalBool" json:"notifyForRepliesIfMuted,omitempty"` // If unset, consider this on - ShowUnreadReminders OptionalBool `protobuf:"varint,59,opt,name=showUnreadReminders,proto3,enum=signalservice.OptionalBool" json:"showUnreadReminders,omitempty"` // If unset, consider this on - NotifyWhenContactJoins OptionalBool `protobuf:"varint,60,opt,name=notifyWhenContactJoins,proto3,enum=signalservice.OptionalBool" json:"notifyWhenContactJoins,omitempty"` // If unset, consider this off - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ProfileKey []byte `protobuf:"bytes,1,opt,name=profileKey,proto3" json:"profileKey,omitempty"` + GivenName string `protobuf:"bytes,2,opt,name=givenName,proto3" json:"givenName,omitempty"` + FamilyName string `protobuf:"bytes,3,opt,name=familyName,proto3" json:"familyName,omitempty"` + AvatarUrlPath string `protobuf:"bytes,4,opt,name=avatarUrlPath,proto3" json:"avatarUrlPath,omitempty"` + NoteToSelfArchived bool `protobuf:"varint,5,opt,name=noteToSelfArchived,proto3" json:"noteToSelfArchived,omitempty"` + ReadReceipts bool `protobuf:"varint,6,opt,name=readReceipts,proto3" json:"readReceipts,omitempty"` + SealedSenderIndicators bool `protobuf:"varint,7,opt,name=sealedSenderIndicators,proto3" json:"sealedSenderIndicators,omitempty"` + TypingIndicators bool `protobuf:"varint,8,opt,name=typingIndicators,proto3" json:"typingIndicators,omitempty"` + NoteToSelfMarkedUnread bool `protobuf:"varint,10,opt,name=noteToSelfMarkedUnread,proto3" json:"noteToSelfMarkedUnread,omitempty"` + LinkPreviews bool `protobuf:"varint,11,opt,name=linkPreviews,proto3" json:"linkPreviews,omitempty"` + PhoneNumberSharingMode AccountRecord_PhoneNumberSharingMode `protobuf:"varint,12,opt,name=phoneNumberSharingMode,proto3,enum=signalservice.AccountRecord_PhoneNumberSharingMode" json:"phoneNumberSharingMode,omitempty"` + UnlistedPhoneNumber bool `protobuf:"varint,13,opt,name=unlistedPhoneNumber,proto3" json:"unlistedPhoneNumber,omitempty"` + PinnedConversations []*AccountRecord_PinnedConversation `protobuf:"bytes,14,rep,name=pinnedConversations,proto3" json:"pinnedConversations,omitempty"` + PreferContactAvatars bool `protobuf:"varint,15,opt,name=preferContactAvatars,proto3" json:"preferContactAvatars,omitempty"` + Payments *Payments `protobuf:"bytes,16,opt,name=payments,proto3" json:"payments,omitempty"` + UniversalExpireTimer uint32 `protobuf:"varint,17,opt,name=universalExpireTimer,proto3" json:"universalExpireTimer,omitempty"` + PrimarySendsSms bool `protobuf:"varint,18,opt,name=primarySendsSms,proto3" json:"primarySendsSms,omitempty"` + PreferredReactionEmoji []string `protobuf:"bytes,20,rep,name=preferredReactionEmoji,proto3" json:"preferredReactionEmoji,omitempty"` + SubscriberId []byte `protobuf:"bytes,21,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` + SubscriberCurrencyCode string `protobuf:"bytes,22,opt,name=subscriberCurrencyCode,proto3" json:"subscriberCurrencyCode,omitempty"` + DisplayBadgesOnProfile bool `protobuf:"varint,23,opt,name=displayBadgesOnProfile,proto3" json:"displayBadgesOnProfile,omitempty"` + SubscriptionManuallyCancelled bool `protobuf:"varint,24,opt,name=subscriptionManuallyCancelled,proto3" json:"subscriptionManuallyCancelled,omitempty"` + KeepMutedChatsArchived bool `protobuf:"varint,25,opt,name=keepMutedChatsArchived,proto3" json:"keepMutedChatsArchived,omitempty"` + HasSetMyStoriesPrivacy bool `protobuf:"varint,26,opt,name=hasSetMyStoriesPrivacy,proto3" json:"hasSetMyStoriesPrivacy,omitempty"` + HasViewedOnboardingStory bool `protobuf:"varint,27,opt,name=hasViewedOnboardingStory,proto3" json:"hasViewedOnboardingStory,omitempty"` + StoriesDisabled bool `protobuf:"varint,29,opt,name=storiesDisabled,proto3" json:"storiesDisabled,omitempty"` + StoryViewReceiptsEnabled OptionalBool `protobuf:"varint,30,opt,name=storyViewReceiptsEnabled,proto3,enum=signalservice.OptionalBool" json:"storyViewReceiptsEnabled,omitempty"` + HasSeenGroupStoryEducationSheet bool `protobuf:"varint,32,opt,name=hasSeenGroupStoryEducationSheet,proto3" json:"hasSeenGroupStoryEducationSheet,omitempty"` + Username string `protobuf:"bytes,33,opt,name=username,proto3" json:"username,omitempty"` + HasCompletedUsernameOnboarding bool `protobuf:"varint,34,opt,name=hasCompletedUsernameOnboarding,proto3" json:"hasCompletedUsernameOnboarding,omitempty"` + UsernameLink *AccountRecord_UsernameLink `protobuf:"bytes,35,opt,name=usernameLink,proto3" json:"usernameLink,omitempty"` + HasBackup *bool `protobuf:"varint,39,opt,name=hasBackup,proto3,oneof" json:"hasBackup,omitempty"` // Set to true after backups are enabled and one is uploaded. + BackupTier *uint64 `protobuf:"varint,40,opt,name=backupTier,proto3,oneof" json:"backupTier,omitempty"` // See zkgroup for integer particular values. Unset if backups are not enabled. + BackupSubscriberData *AccountRecord_IAPSubscriberData `protobuf:"bytes,41,opt,name=backupSubscriberData,proto3" json:"backupSubscriberData,omitempty"` + AvatarColor *AvatarColor `protobuf:"varint,42,opt,name=avatarColor,proto3,enum=signalservice.AvatarColor,oneof" json:"avatarColor,omitempty"` + BackupTierHistory *AccountRecord_BackupTierHistory `protobuf:"bytes,43,opt,name=backupTierHistory,proto3" json:"backupTierHistory,omitempty"` + NotificationProfileManualOverride *AccountRecord_NotificationProfileManualOverride `protobuf:"bytes,44,opt,name=notificationProfileManualOverride,proto3" json:"notificationProfileManualOverride,omitempty"` + NotificationProfileSyncDisabled bool `protobuf:"varint,45,opt,name=notificationProfileSyncDisabled,proto3" json:"notificationProfileSyncDisabled,omitempty"` + AutomaticKeyVerificationDisabled bool `protobuf:"varint,46,opt,name=automaticKeyVerificationDisabled,proto3" json:"automaticKeyVerificationDisabled,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AccountRecord) Reset() { *x = AccountRecord{} - mi := &file_signalpb_StorageService_proto_msgTypes[11] + mi := &file_StorageService_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1767,7 +1616,7 @@ func (x *AccountRecord) String() string { func (*AccountRecord) ProtoMessage() {} func (x *AccountRecord) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[11] + mi := &file_StorageService_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1780,7 +1629,7 @@ func (x *AccountRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountRecord.ProtoReflect.Descriptor instead. func (*AccountRecord) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11} + return file_StorageService_proto_rawDescGZIP(), []int{11} } func (x *AccountRecord) GetProfileKey() []byte { @@ -2000,6 +1849,13 @@ func (x *AccountRecord) GetUsernameLink() *AccountRecord_UsernameLink { return nil } +func (x *AccountRecord) GetHasBackup() bool { + if x != nil && x.HasBackup != nil { + return *x.HasBackup + } + return false +} + func (x *AccountRecord) GetBackupTier() uint64 { if x != nil && x.BackupTier != nil { return *x.BackupTier @@ -2021,6 +1877,13 @@ func (x *AccountRecord) GetAvatarColor() AvatarColor { return AvatarColor_A100 } +func (x *AccountRecord) GetBackupTierHistory() *AccountRecord_BackupTierHistory { + if x != nil { + return x.BackupTierHistory + } + return nil +} + func (x *AccountRecord) GetNotificationProfileManualOverride() *AccountRecord_NotificationProfileManualOverride { if x != nil { return x.NotificationProfileManualOverride @@ -2042,104 +1905,6 @@ func (x *AccountRecord) GetAutomaticKeyVerificationDisabled() bool { return false } -func (x *AccountRecord) GetHasSeenAdminDeleteEducationDialog() bool { - if x != nil { - return x.HasSeenAdminDeleteEducationDialog - } - return false -} - -func (x *AccountRecord) GetReleaseNotesChatArchived() bool { - if x != nil && x.ReleaseNotesChatArchived != nil { - return *x.ReleaseNotesChatArchived - } - return false -} - -func (x *AccountRecord) GetReleaseNotesChatMutedUntilTimestamp() uint64 { - if x != nil && x.ReleaseNotesChatMutedUntilTimestamp != nil { - return *x.ReleaseNotesChatMutedUntilTimestamp - } - return 0 -} - -func (x *AccountRecord) GetReleaseNotesChatBlocked() bool { - if x != nil && x.ReleaseNotesChatBlocked != nil { - return *x.ReleaseNotesChatBlocked - } - return false -} - -func (x *AccountRecord) GetReleaseNotesChatMarkedUnread() bool { - if x != nil && x.ReleaseNotesChatMarkedUnread != nil { - return *x.ReleaseNotesChatMarkedUnread - } - return false -} - -func (x *AccountRecord) GetReleaseNotesChatBlockedAt() uint64 { - if x != nil && x.ReleaseNotesChatBlockedAt != nil { - return *x.ReleaseNotesChatBlockedAt - } - return 0 -} - -func (x *AccountRecord) GetUnreadBadgeType() AccountRecord_UnreadBadgeType { - if x != nil { - return x.UnreadBadgeType - } - return AccountRecord_UNKNOWN_BADGE_TYPE -} - -func (x *AccountRecord) GetIncludeMutedChatsInBadge() OptionalBool { - if x != nil { - return x.IncludeMutedChatsInBadge - } - return OptionalBool_UNSET -} - -func (x *AccountRecord) GetReactionNotifications() OptionalBool { - if x != nil { - return x.ReactionNotifications - } - return OptionalBool_UNSET -} - -func (x *AccountRecord) GetNotifyForCallsIfMuted() OptionalBool { - if x != nil { - return x.NotifyForCallsIfMuted - } - return OptionalBool_UNSET -} - -func (x *AccountRecord) GetNotifyForMentionsIfMuted() OptionalBool { - if x != nil { - return x.NotifyForMentionsIfMuted - } - return OptionalBool_UNSET -} - -func (x *AccountRecord) GetNotifyForRepliesIfMuted() OptionalBool { - if x != nil { - return x.NotifyForRepliesIfMuted - } - return OptionalBool_UNSET -} - -func (x *AccountRecord) GetShowUnreadReminders() OptionalBool { - if x != nil { - return x.ShowUnreadReminders - } - return OptionalBool_UNSET -} - -func (x *AccountRecord) GetNotifyWhenContactJoins() OptionalBool { - if x != nil { - return x.NotifyWhenContactJoins - } - return OptionalBool_UNSET -} - type StoryDistributionListRecord struct { state protoimpl.MessageState `protogen:"open.v1"` Identifier []byte `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` @@ -2155,7 +1920,7 @@ type StoryDistributionListRecord struct { func (x *StoryDistributionListRecord) Reset() { *x = StoryDistributionListRecord{} - mi := &file_signalpb_StorageService_proto_msgTypes[12] + mi := &file_StorageService_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2167,7 +1932,7 @@ func (x *StoryDistributionListRecord) String() string { func (*StoryDistributionListRecord) ProtoMessage() {} func (x *StoryDistributionListRecord) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[12] + mi := &file_StorageService_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2180,7 +1945,7 @@ func (x *StoryDistributionListRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use StoryDistributionListRecord.ProtoReflect.Descriptor instead. func (*StoryDistributionListRecord) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{12} + return file_StorageService_proto_rawDescGZIP(), []int{12} } func (x *StoryDistributionListRecord) GetIdentifier() []byte { @@ -2232,100 +1997,19 @@ func (x *StoryDistributionListRecord) GetRecipientServiceIdsBinary() [][]byte { return nil } -type StickerPackRecord struct { - state protoimpl.MessageState `protogen:"open.v1"` - PackId []byte `protobuf:"bytes,1,opt,name=packId,proto3" json:"packId,omitempty"` // 16 bytes - PackKey []byte `protobuf:"bytes,2,opt,name=packKey,proto3" json:"packKey,omitempty"` // 32 bytes, used to derive the AES-256 key - // aesKey = HKDF( - // - // input = packKey, - // salt = 32 zero bytes, - // info = "Sticker Pack" - // - // ) - Position uint32 `protobuf:"varint,3,opt,name=position,proto3" json:"position,omitempty"` // When displayed sticker packs should be first sorted - // in ascending order by zero-based `position` and - // then by ascending `packId` (lexicographically, - // packId can be treated as a hex string). - // When installing a sticker pack the client should find - // the maximum `position` among currently known stickers - // and use `max_position + 1` as the value for the new - // `position`. - DeletedAtTimestamp uint64 `protobuf:"varint,4,opt,name=deletedAtTimestamp,proto3" json:"deletedAtTimestamp,omitempty"` // Timestamp in milliseconds. When present and - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StickerPackRecord) Reset() { - *x = StickerPackRecord{} - mi := &file_signalpb_StorageService_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StickerPackRecord) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StickerPackRecord) ProtoMessage() {} - -func (x *StickerPackRecord) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StickerPackRecord.ProtoReflect.Descriptor instead. -func (*StickerPackRecord) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{13} -} - -func (x *StickerPackRecord) GetPackId() []byte { - if x != nil { - return x.PackId - } - return nil -} - -func (x *StickerPackRecord) GetPackKey() []byte { - if x != nil { - return x.PackKey - } - return nil -} - -func (x *StickerPackRecord) GetPosition() uint32 { - if x != nil { - return x.Position - } - return 0 -} - -func (x *StickerPackRecord) GetDeletedAtTimestamp() uint64 { - if x != nil { - return x.DeletedAtTimestamp - } - return 0 -} - type CallLinkRecord struct { state protoimpl.MessageState `protogen:"open.v1"` RootKey []byte `protobuf:"bytes,1,opt,name=rootKey,proto3" json:"rootKey,omitempty"` AdminPasskey []byte `protobuf:"bytes,2,opt,name=adminPasskey,proto3" json:"adminPasskey,omitempty"` DeletedAtTimestampMs uint64 `protobuf:"varint,3,opt,name=deletedAtTimestampMs,proto3" json:"deletedAtTimestampMs,omitempty"` + Epoch []byte `protobuf:"bytes,4,opt,name=epoch,proto3,oneof" json:"epoch,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *CallLinkRecord) Reset() { *x = CallLinkRecord{} - mi := &file_signalpb_StorageService_proto_msgTypes[14] + mi := &file_StorageService_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2337,7 +2021,7 @@ func (x *CallLinkRecord) String() string { func (*CallLinkRecord) ProtoMessage() {} func (x *CallLinkRecord) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[14] + mi := &file_StorageService_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2350,7 +2034,7 @@ func (x *CallLinkRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use CallLinkRecord.ProtoReflect.Descriptor instead. func (*CallLinkRecord) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{14} + return file_StorageService_proto_rawDescGZIP(), []int{13} } func (x *CallLinkRecord) GetRootKey() []byte { @@ -2374,6 +2058,13 @@ func (x *CallLinkRecord) GetDeletedAtTimestampMs() uint64 { return 0 } +func (x *CallLinkRecord) GetEpoch() []byte { + if x != nil { + return x.Epoch + } + return nil +} + type Recipient struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Identifier: @@ -2388,7 +2079,7 @@ type Recipient struct { func (x *Recipient) Reset() { *x = Recipient{} - mi := &file_signalpb_StorageService_proto_msgTypes[15] + mi := &file_StorageService_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2400,7 +2091,7 @@ func (x *Recipient) String() string { func (*Recipient) ProtoMessage() {} func (x *Recipient) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[15] + mi := &file_StorageService_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2413,7 +2104,7 @@ func (x *Recipient) ProtoReflect() protoreflect.Message { // Deprecated: Use Recipient.ProtoReflect.Descriptor instead. func (*Recipient) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{15} + return file_StorageService_proto_rawDescGZIP(), []int{14} } func (x *Recipient) GetIdentifier() isRecipient_Identifier { @@ -2491,7 +2182,7 @@ type ChatFolderRecord struct { func (x *ChatFolderRecord) Reset() { *x = ChatFolderRecord{} - mi := &file_signalpb_StorageService_proto_msgTypes[16] + mi := &file_StorageService_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2503,7 +2194,7 @@ func (x *ChatFolderRecord) String() string { func (*ChatFolderRecord) ProtoMessage() {} func (x *ChatFolderRecord) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[16] + mi := &file_StorageService_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2516,7 +2207,7 @@ func (x *ChatFolderRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use ChatFolderRecord.ProtoReflect.Descriptor instead. func (*ChatFolderRecord) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{16} + return file_StorageService_proto_rawDescGZIP(), []int{15} } func (x *ChatFolderRecord) GetIdentifier() []byte { @@ -2617,7 +2308,7 @@ type NotificationProfile struct { func (x *NotificationProfile) Reset() { *x = NotificationProfile{} - mi := &file_signalpb_StorageService_proto_msgTypes[17] + mi := &file_StorageService_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2629,7 +2320,7 @@ func (x *NotificationProfile) String() string { func (*NotificationProfile) ProtoMessage() {} func (x *NotificationProfile) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[17] + mi := &file_StorageService_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2642,7 +2333,7 @@ func (x *NotificationProfile) ProtoReflect() protoreflect.Message { // Deprecated: Use NotificationProfile.ProtoReflect.Descriptor instead. func (*NotificationProfile) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{17} + return file_StorageService_proto_rawDescGZIP(), []int{16} } func (x *NotificationProfile) GetId() []byte { @@ -2746,7 +2437,7 @@ type ManifestRecord_Identifier struct { func (x *ManifestRecord_Identifier) Reset() { *x = ManifestRecord_Identifier{} - mi := &file_signalpb_StorageService_proto_msgTypes[18] + mi := &file_StorageService_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2758,7 +2449,7 @@ func (x *ManifestRecord_Identifier) String() string { func (*ManifestRecord_Identifier) ProtoMessage() {} func (x *ManifestRecord_Identifier) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[18] + mi := &file_StorageService_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2771,7 +2462,7 @@ func (x *ManifestRecord_Identifier) ProtoReflect() protoreflect.Message { // Deprecated: Use ManifestRecord_Identifier.ProtoReflect.Descriptor instead. func (*ManifestRecord_Identifier) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{5, 0} + return file_StorageService_proto_rawDescGZIP(), []int{5, 0} } func (x *ManifestRecord_Identifier) GetRaw() []byte { @@ -2798,7 +2489,7 @@ type ContactRecord_Name struct { func (x *ContactRecord_Name) Reset() { *x = ContactRecord_Name{} - mi := &file_signalpb_StorageService_proto_msgTypes[19] + mi := &file_StorageService_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2810,7 +2501,7 @@ func (x *ContactRecord_Name) String() string { func (*ContactRecord_Name) ProtoMessage() {} func (x *ContactRecord_Name) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[19] + mi := &file_StorageService_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2823,7 +2514,7 @@ func (x *ContactRecord_Name) ProtoReflect() protoreflect.Message { // Deprecated: Use ContactRecord_Name.ProtoReflect.Descriptor instead. func (*ContactRecord_Name) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{7, 0} + return file_StorageService_proto_rawDescGZIP(), []int{7, 0} } func (x *ContactRecord_Name) GetGiven() string { @@ -2847,7 +2538,6 @@ type AccountRecord_PinnedConversation struct { // *AccountRecord_PinnedConversation_Contact_ // *AccountRecord_PinnedConversation_LegacyGroupId // *AccountRecord_PinnedConversation_GroupMasterKey - // *AccountRecord_PinnedConversation_ReleaseNotes_ Identifier isAccountRecord_PinnedConversation_Identifier `protobuf_oneof:"identifier"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -2855,7 +2545,7 @@ type AccountRecord_PinnedConversation struct { func (x *AccountRecord_PinnedConversation) Reset() { *x = AccountRecord_PinnedConversation{} - mi := &file_signalpb_StorageService_proto_msgTypes[20] + mi := &file_StorageService_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2867,7 +2557,7 @@ func (x *AccountRecord_PinnedConversation) String() string { func (*AccountRecord_PinnedConversation) ProtoMessage() {} func (x *AccountRecord_PinnedConversation) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[20] + mi := &file_StorageService_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2880,7 +2570,7 @@ func (x *AccountRecord_PinnedConversation) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountRecord_PinnedConversation.ProtoReflect.Descriptor instead. func (*AccountRecord_PinnedConversation) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 0} + return file_StorageService_proto_rawDescGZIP(), []int{11, 0} } func (x *AccountRecord_PinnedConversation) GetIdentifier() isAccountRecord_PinnedConversation_Identifier { @@ -2917,15 +2607,6 @@ func (x *AccountRecord_PinnedConversation) GetGroupMasterKey() []byte { return nil } -func (x *AccountRecord_PinnedConversation) GetReleaseNotes() *AccountRecord_PinnedConversation_ReleaseNotes { - if x != nil { - if x, ok := x.Identifier.(*AccountRecord_PinnedConversation_ReleaseNotes_); ok { - return x.ReleaseNotes - } - } - return nil -} - type isAccountRecord_PinnedConversation_Identifier interface { isAccountRecord_PinnedConversation_Identifier() } @@ -2942,10 +2623,6 @@ type AccountRecord_PinnedConversation_GroupMasterKey struct { GroupMasterKey []byte `protobuf:"bytes,4,opt,name=groupMasterKey,proto3,oneof"` } -type AccountRecord_PinnedConversation_ReleaseNotes_ struct { - ReleaseNotes *AccountRecord_PinnedConversation_ReleaseNotes `protobuf:"bytes,5,opt,name=releaseNotes,proto3,oneof"` -} - func (*AccountRecord_PinnedConversation_Contact_) isAccountRecord_PinnedConversation_Identifier() {} func (*AccountRecord_PinnedConversation_LegacyGroupId) isAccountRecord_PinnedConversation_Identifier() { @@ -2954,9 +2631,6 @@ func (*AccountRecord_PinnedConversation_LegacyGroupId) isAccountRecord_PinnedCon func (*AccountRecord_PinnedConversation_GroupMasterKey) isAccountRecord_PinnedConversation_Identifier() { } -func (*AccountRecord_PinnedConversation_ReleaseNotes_) isAccountRecord_PinnedConversation_Identifier() { -} - type AccountRecord_UsernameLink struct { state protoimpl.MessageState `protogen:"open.v1"` Entropy []byte `protobuf:"bytes,1,opt,name=entropy,proto3" json:"entropy,omitempty"` // 32 bytes of entropy used for encryption @@ -2968,7 +2642,7 @@ type AccountRecord_UsernameLink struct { func (x *AccountRecord_UsernameLink) Reset() { *x = AccountRecord_UsernameLink{} - mi := &file_signalpb_StorageService_proto_msgTypes[21] + mi := &file_StorageService_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2980,7 +2654,7 @@ func (x *AccountRecord_UsernameLink) String() string { func (*AccountRecord_UsernameLink) ProtoMessage() {} func (x *AccountRecord_UsernameLink) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[21] + mi := &file_StorageService_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2993,7 +2667,7 @@ func (x *AccountRecord_UsernameLink) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountRecord_UsernameLink.ProtoReflect.Descriptor instead. func (*AccountRecord_UsernameLink) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 1} + return file_StorageService_proto_rawDescGZIP(), []int{11, 1} } func (x *AccountRecord_UsernameLink) GetEntropy() []byte { @@ -3031,7 +2705,7 @@ type AccountRecord_IAPSubscriberData struct { func (x *AccountRecord_IAPSubscriberData) Reset() { *x = AccountRecord_IAPSubscriberData{} - mi := &file_signalpb_StorageService_proto_msgTypes[22] + mi := &file_StorageService_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3043,7 +2717,7 @@ func (x *AccountRecord_IAPSubscriberData) String() string { func (*AccountRecord_IAPSubscriberData) ProtoMessage() {} func (x *AccountRecord_IAPSubscriberData) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[22] + mi := &file_StorageService_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3056,7 +2730,7 @@ func (x *AccountRecord_IAPSubscriberData) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountRecord_IAPSubscriberData.ProtoReflect.Descriptor instead. func (*AccountRecord_IAPSubscriberData) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 2} + return file_StorageService_proto_rawDescGZIP(), []int{11, 2} } func (x *AccountRecord_IAPSubscriberData) GetSubscriberId() []byte { @@ -3111,6 +2785,59 @@ func (*AccountRecord_IAPSubscriberData_PurchaseToken) isAccountRecord_IAPSubscri func (*AccountRecord_IAPSubscriberData_OriginalTransactionId) isAccountRecord_IAPSubscriberData_IapSubscriptionId() { } +type AccountRecord_BackupTierHistory struct { + state protoimpl.MessageState `protogen:"open.v1"` + // See zkgroup for integer particular values. Unset if backups are not enabled. + BackupTier *uint64 `protobuf:"varint,1,opt,name=backupTier,proto3,oneof" json:"backupTier,omitempty"` + EndedAtTimestamp *uint64 `protobuf:"varint,2,opt,name=endedAtTimestamp,proto3,oneof" json:"endedAtTimestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountRecord_BackupTierHistory) Reset() { + *x = AccountRecord_BackupTierHistory{} + mi := &file_StorageService_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountRecord_BackupTierHistory) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountRecord_BackupTierHistory) ProtoMessage() {} + +func (x *AccountRecord_BackupTierHistory) ProtoReflect() protoreflect.Message { + mi := &file_StorageService_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountRecord_BackupTierHistory.ProtoReflect.Descriptor instead. +func (*AccountRecord_BackupTierHistory) Descriptor() ([]byte, []int) { + return file_StorageService_proto_rawDescGZIP(), []int{11, 3} +} + +func (x *AccountRecord_BackupTierHistory) GetBackupTier() uint64 { + if x != nil && x.BackupTier != nil { + return *x.BackupTier + } + return 0 +} + +func (x *AccountRecord_BackupTierHistory) GetEndedAtTimestamp() uint64 { + if x != nil && x.EndedAtTimestamp != nil { + return *x.EndedAtTimestamp + } + return 0 +} + type AccountRecord_NotificationProfileManualOverride struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Override: @@ -3124,7 +2851,7 @@ type AccountRecord_NotificationProfileManualOverride struct { func (x *AccountRecord_NotificationProfileManualOverride) Reset() { *x = AccountRecord_NotificationProfileManualOverride{} - mi := &file_signalpb_StorageService_proto_msgTypes[23] + mi := &file_StorageService_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3136,7 +2863,7 @@ func (x *AccountRecord_NotificationProfileManualOverride) String() string { func (*AccountRecord_NotificationProfileManualOverride) ProtoMessage() {} func (x *AccountRecord_NotificationProfileManualOverride) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[23] + mi := &file_StorageService_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3149,7 +2876,7 @@ func (x *AccountRecord_NotificationProfileManualOverride) ProtoReflect() protore // Deprecated: Use AccountRecord_NotificationProfileManualOverride.ProtoReflect.Descriptor instead. func (*AccountRecord_NotificationProfileManualOverride) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 3} + return file_StorageService_proto_rawDescGZIP(), []int{11, 4} } func (x *AccountRecord_NotificationProfileManualOverride) GetOverride() isAccountRecord_NotificationProfileManualOverride_Override { @@ -3206,7 +2933,7 @@ type AccountRecord_PinnedConversation_Contact struct { func (x *AccountRecord_PinnedConversation_Contact) Reset() { *x = AccountRecord_PinnedConversation_Contact{} - mi := &file_signalpb_StorageService_proto_msgTypes[24] + mi := &file_StorageService_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3218,7 +2945,7 @@ func (x *AccountRecord_PinnedConversation_Contact) String() string { func (*AccountRecord_PinnedConversation_Contact) ProtoMessage() {} func (x *AccountRecord_PinnedConversation_Contact) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[24] + mi := &file_StorageService_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3231,7 +2958,7 @@ func (x *AccountRecord_PinnedConversation_Contact) ProtoReflect() protoreflect.M // Deprecated: Use AccountRecord_PinnedConversation_Contact.ProtoReflect.Descriptor instead. func (*AccountRecord_PinnedConversation_Contact) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 0, 0} + return file_StorageService_proto_rawDescGZIP(), []int{11, 0, 0} } func (x *AccountRecord_PinnedConversation_Contact) GetServiceId() string { @@ -3255,42 +2982,6 @@ func (x *AccountRecord_PinnedConversation_Contact) GetServiceIdBinary() []byte { return nil } -type AccountRecord_PinnedConversation_ReleaseNotes struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AccountRecord_PinnedConversation_ReleaseNotes) Reset() { - *x = AccountRecord_PinnedConversation_ReleaseNotes{} - mi := &file_signalpb_StorageService_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AccountRecord_PinnedConversation_ReleaseNotes) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccountRecord_PinnedConversation_ReleaseNotes) ProtoMessage() {} - -func (x *AccountRecord_PinnedConversation_ReleaseNotes) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[25] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccountRecord_PinnedConversation_ReleaseNotes.ProtoReflect.Descriptor instead. -func (*AccountRecord_PinnedConversation_ReleaseNotes) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 0, 1} -} - type AccountRecord_NotificationProfileManualOverride_ManuallyEnabled struct { state protoimpl.MessageState `protogen:"open.v1"` Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -3302,7 +2993,7 @@ type AccountRecord_NotificationProfileManualOverride_ManuallyEnabled struct { func (x *AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) Reset() { *x = AccountRecord_NotificationProfileManualOverride_ManuallyEnabled{} - mi := &file_signalpb_StorageService_proto_msgTypes[26] + mi := &file_StorageService_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3314,7 +3005,7 @@ func (x *AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) String func (*AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) ProtoMessage() {} func (x *AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[26] + mi := &file_StorageService_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3327,7 +3018,7 @@ func (x *AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) ProtoR // Deprecated: Use AccountRecord_NotificationProfileManualOverride_ManuallyEnabled.ProtoReflect.Descriptor instead. func (*AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{11, 3, 0} + return file_StorageService_proto_rawDescGZIP(), []int{11, 4, 0} } func (x *AccountRecord_NotificationProfileManualOverride_ManuallyEnabled) GetId() []byte { @@ -3355,7 +3046,7 @@ type Recipient_Contact struct { func (x *Recipient_Contact) Reset() { *x = Recipient_Contact{} - mi := &file_signalpb_StorageService_proto_msgTypes[27] + mi := &file_StorageService_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3367,7 +3058,7 @@ func (x *Recipient_Contact) String() string { func (*Recipient_Contact) ProtoMessage() {} func (x *Recipient_Contact) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_StorageService_proto_msgTypes[27] + mi := &file_StorageService_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3380,7 +3071,7 @@ func (x *Recipient_Contact) ProtoReflect() protoreflect.Message { // Deprecated: Use Recipient_Contact.ProtoReflect.Descriptor instead. func (*Recipient_Contact) Descriptor() ([]byte, []int) { - return file_signalpb_StorageService_proto_rawDescGZIP(), []int{15, 0} + return file_StorageService_proto_rawDescGZIP(), []int{14, 0} } func (x *Recipient_Contact) GetServiceId() string { @@ -3404,11 +3095,11 @@ func (x *Recipient_Contact) GetServiceIdBinary() []byte { return nil } -var File_signalpb_StorageService_proto protoreflect.FileDescriptor +var File_StorageService_proto protoreflect.FileDescriptor -const file_signalpb_StorageService_proto_rawDesc = "" + +const file_StorageService_proto_rawDesc = "" + "\n" + - "\x1dsignalpb/StorageService.proto\x12\rsignalservice\"A\n" + + "\x14StorageService.proto\x12\rsignalservice\"A\n" + "\x0fStorageManifest\x12\x18\n" + "\aversion\x18\x01 \x01(\x04R\aversion\x12\x14\n" + "\x05value\x18\x02 \x01(\fR\x05value\"5\n" + @@ -3425,41 +3116,38 @@ const file_signalpb_StorageService_proto_rawDesc = "" + "insertItem\x18\x02 \x03(\v2\x1a.signalservice.StorageItemR\n" + "insertItem\x12\x1c\n" + "\tdeleteKey\x18\x03 \x03(\fR\tdeleteKey\x12\x1a\n" + - "\bclearAll\x18\x04 \x01(\bR\bclearAll\"\xcf\x03\n" + + "\bclearAll\x18\x04 \x01(\bR\bclearAll\"\xbd\x03\n" + "\x0eManifestRecord\x12\x18\n" + "\aversion\x18\x01 \x01(\x04R\aversion\x12\"\n" + "\fsourceDevice\x18\x03 \x01(\rR\fsourceDevice\x12J\n" + "\videntifiers\x18\x02 \x03(\v2(.signalservice.ManifestRecord.IdentifierR\videntifiers\x12\x1c\n" + - "\trecordIkm\x18\x04 \x01(\fR\trecordIkm\x1a\x94\x02\n" + + "\trecordIkm\x18\x04 \x01(\fR\trecordIkm\x1a\x82\x02\n" + "\n" + "Identifier\x12\x10\n" + "\x03raw\x18\x01 \x01(\fR\x03raw\x12A\n" + - "\x04type\x18\x02 \x01(\x0e2-.signalservice.ManifestRecord.Identifier.TypeR\x04type\"\xb0\x01\n" + + "\x04type\x18\x02 \x01(\x0e2-.signalservice.ManifestRecord.Identifier.TypeR\x04type\"\x9e\x01\n" + "\x04Type\x12\v\n" + "\aUNKNOWN\x10\x00\x12\v\n" + "\aCONTACT\x10\x01\x12\v\n" + "\aGROUPV1\x10\x02\x12\v\n" + "\aGROUPV2\x10\x03\x12\v\n" + "\aACCOUNT\x10\x04\x12\x1b\n" + - "\x17STORY_DISTRIBUTION_LIST\x10\x05\x12\x10\n" + - "\fSTICKER_PACK\x10\x06\x12\r\n" + + "\x17STORY_DISTRIBUTION_LIST\x10\x05\x12\r\n" + "\tCALL_LINK\x10\a\x12\x0f\n" + "\vCHAT_FOLDER\x10\b\x12\x18\n" + - "\x14NOTIFICATION_PROFILE\x10\t\"\x83\x05\n" + + "\x14NOTIFICATION_PROFILE\x10\t\"\xbd\x04\n" + "\rStorageRecord\x128\n" + "\acontact\x18\x01 \x01(\v2\x1c.signalservice.ContactRecordH\x00R\acontact\x128\n" + "\agroupV1\x18\x02 \x01(\v2\x1c.signalservice.GroupV1RecordH\x00R\agroupV1\x128\n" + "\agroupV2\x18\x03 \x01(\v2\x1c.signalservice.GroupV2RecordH\x00R\agroupV2\x128\n" + "\aaccount\x18\x04 \x01(\v2\x1c.signalservice.AccountRecordH\x00R\aaccount\x12b\n" + - "\x15storyDistributionList\x18\x05 \x01(\v2*.signalservice.StoryDistributionListRecordH\x00R\x15storyDistributionList\x12D\n" + - "\vstickerPack\x18\x06 \x01(\v2 .signalservice.StickerPackRecordH\x00R\vstickerPack\x12;\n" + + "\x15storyDistributionList\x18\x05 \x01(\v2*.signalservice.StoryDistributionListRecordH\x00R\x15storyDistributionList\x12;\n" + "\bcallLink\x18\a \x01(\v2\x1d.signalservice.CallLinkRecordH\x00R\bcallLink\x12A\n" + "\n" + "chatFolder\x18\b \x01(\v2\x1f.signalservice.ChatFolderRecordH\x00R\n" + "chatFolder\x12V\n" + "\x13notificationProfile\x18\t \x01(\v2\".signalservice.NotificationProfileH\x00R\x13notificationProfileB\b\n" + - "\x06record\"\xab\n" + - "\n" + + "\x06record\"\xd9\b\n" + "\rContactRecord\x12\x10\n" + "\x03aci\x18\x01 \x01(\tR\x03aci\x12\x12\n" + "\x04e164\x18\x02 \x01(\tR\x04e164\x12\x10\n" + @@ -3491,10 +3179,7 @@ const file_signalpb_StorageService_proto_rawDesc = "" + "\x04note\x18\x17 \x01(\tR\x04note\x12A\n" + "\vavatarColor\x18\x18 \x01(\x0e2\x1a.signalservice.AvatarColorH\x00R\vavatarColor\x88\x01\x01\x12\x1c\n" + "\taciBinary\x18\x19 \x01(\fR\taciBinary\x12\x1c\n" + - "\tpniBinary\x18\x1a \x01(\fR\tpniBinary\x12.\n" + - "\x12blockedAtTimestamp\x18\x1b \x01(\x04R\x12blockedAtTimestamp\x12Q\n" + - "\x15notifyForCallsIfMuted\x18\x1c \x01(\x0e2\x1b.signalservice.OptionalBoolR\x15notifyForCallsIfMuted\x12M\n" + - "\x13showUnreadReminders\x18\x1d \x01(\x0e2\x1b.signalservice.OptionalBoolR\x13showUnreadReminders\x1a4\n" + + "\tpniBinary\x18\x1a \x01(\fR\tpniBinary\x1a4\n" + "\x04Name\x12\x14\n" + "\x05given\x18\x01 \x01(\tR\x05given\x12\x16\n" + "\x06family\x18\x02 \x01(\tR\x06family\":\n" + @@ -3510,7 +3195,7 @@ const file_signalpb_StorageService_proto_rawDesc = "" + "\vwhitelisted\x18\x03 \x01(\bR\vwhitelisted\x12\x1a\n" + "\barchived\x18\x04 \x01(\bR\barchived\x12\"\n" + "\fmarkedUnread\x18\x05 \x01(\bR\fmarkedUnread\x120\n" + - "\x13mutedUntilTimestamp\x18\x06 \x01(\x04R\x13mutedUntilTimestamp\"\xcf\a\n" + + "\x13mutedUntilTimestamp\x18\x06 \x01(\x04R\x13mutedUntilTimestamp\"\xa1\x04\n" + "\rGroupV2Record\x12\x1c\n" + "\tmasterKey\x18\x01 \x01(\fR\tmasterKey\x12\x18\n" + "\ablocked\x18\x02 \x01(\bR\ablocked\x12 \n" + @@ -3522,13 +3207,7 @@ const file_signalpb_StorageService_proto_rawDesc = "" + "\thideStory\x18\b \x01(\bR\thideStory\x12P\n" + "\rstorySendMode\x18\n" + " \x01(\x0e2*.signalservice.GroupV2Record.StorySendModeR\rstorySendMode\x12A\n" + - "\vavatarColor\x18\v \x01(\x0e2\x1a.signalservice.AvatarColorH\x00R\vavatarColor\x88\x01\x01\x12*\n" + - "\x10verifiedNameHash\x18\f \x01(\fR\x10verifiedNameHash\x12.\n" + - "\x12blockedAtTimestamp\x18\r \x01(\x04R\x12blockedAtTimestamp\x12Q\n" + - "\x15notifyForCallsIfMuted\x18\x0e \x01(\x0e2\x1b.signalservice.OptionalBoolR\x15notifyForCallsIfMuted\x12W\n" + - "\x18notifyForMentionsIfMuted\x18\x0f \x01(\x0e2\x1b.signalservice.OptionalBoolR\x18notifyForMentionsIfMuted\x12U\n" + - "\x17notifyForRepliesIfMuted\x18\x10 \x01(\x0e2\x1b.signalservice.OptionalBoolR\x17notifyForRepliesIfMuted\x12M\n" + - "\x13showUnreadReminders\x18\x11 \x01(\x0e2\x1b.signalservice.OptionalBoolR\x13showUnreadReminders\"7\n" + + "\vavatarColor\x18\v \x01(\x0e2\x1a.signalservice.AvatarColorH\x00R\vavatarColor\x88\x01\x01\"7\n" + "\rStorySendMode\x12\v\n" + "\aDEFAULT\x10\x00\x12\f\n" + "\bDISABLED\x10\x01\x12\v\n" + @@ -3537,7 +3216,7 @@ const file_signalpb_StorageService_proto_rawDesc = "" + "\">\n" + "\bPayments\x12\x18\n" + "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x18\n" + - "\aentropy\x18\x02 \x01(\fR\aentropy\"\xfa%\n" + + "\aentropy\x18\x02 \x01(\fR\aentropy\"\xcb\x1c\n" + "\rAccountRecord\x12\x1e\n" + "\n" + "profileKey\x18\x01 \x01(\fR\n" + @@ -3574,39 +3253,25 @@ const file_signalpb_StorageService_proto_rawDesc = "" + "\x1fhasSeenGroupStoryEducationSheet\x18 \x01(\bR\x1fhasSeenGroupStoryEducationSheet\x12\x1a\n" + "\busername\x18! \x01(\tR\busername\x12F\n" + "\x1ehasCompletedUsernameOnboarding\x18\" \x01(\bR\x1ehasCompletedUsernameOnboarding\x12M\n" + - "\fusernameLink\x18# \x01(\v2).signalservice.AccountRecord.UsernameLinkR\fusernameLink\x12#\n" + + "\fusernameLink\x18# \x01(\v2).signalservice.AccountRecord.UsernameLinkR\fusernameLink\x12!\n" + + "\thasBackup\x18' \x01(\bH\x00R\thasBackup\x88\x01\x01\x12#\n" + "\n" + - "backupTier\x18( \x01(\x04H\x00R\n" + + "backupTier\x18( \x01(\x04H\x01R\n" + "backupTier\x88\x01\x01\x12b\n" + "\x14backupSubscriberData\x18) \x01(\v2..signalservice.AccountRecord.IAPSubscriberDataR\x14backupSubscriberData\x12A\n" + - "\vavatarColor\x18* \x01(\x0e2\x1a.signalservice.AvatarColorH\x01R\vavatarColor\x88\x01\x01\x12\x8c\x01\n" + + "\vavatarColor\x18* \x01(\x0e2\x1a.signalservice.AvatarColorH\x02R\vavatarColor\x88\x01\x01\x12\\\n" + + "\x11backupTierHistory\x18+ \x01(\v2..signalservice.AccountRecord.BackupTierHistoryR\x11backupTierHistory\x12\x8c\x01\n" + "!notificationProfileManualOverride\x18, \x01(\v2>.signalservice.AccountRecord.NotificationProfileManualOverrideR!notificationProfileManualOverride\x12H\n" + "\x1fnotificationProfileSyncDisabled\x18- \x01(\bR\x1fnotificationProfileSyncDisabled\x12J\n" + - " automaticKeyVerificationDisabled\x18. \x01(\bR automaticKeyVerificationDisabled\x12L\n" + - "!hasSeenAdminDeleteEducationDialog\x18/ \x01(\bR!hasSeenAdminDeleteEducationDialog\x12?\n" + - "\x18releaseNotesChatArchived\x180 \x01(\bH\x02R\x18releaseNotesChatArchived\x88\x01\x01\x12U\n" + - "#releaseNotesChatMutedUntilTimestamp\x181 \x01(\x04H\x03R#releaseNotesChatMutedUntilTimestamp\x88\x01\x01\x12=\n" + - "\x17releaseNotesChatBlocked\x182 \x01(\bH\x04R\x17releaseNotesChatBlocked\x88\x01\x01\x12G\n" + - "\x1creleaseNotesChatMarkedUnread\x183 \x01(\bH\x05R\x1creleaseNotesChatMarkedUnread\x88\x01\x01\x12A\n" + - "\x19releaseNotesChatBlockedAt\x184 \x01(\x04H\x06R\x19releaseNotesChatBlockedAt\x88\x01\x01\x12V\n" + - "\x0funreadBadgeType\x185 \x01(\x0e2,.signalservice.AccountRecord.UnreadBadgeTypeR\x0funreadBadgeType\x12W\n" + - "\x18includeMutedChatsInBadge\x186 \x01(\x0e2\x1b.signalservice.OptionalBoolR\x18includeMutedChatsInBadge\x12Q\n" + - "\x15reactionNotifications\x187 \x01(\x0e2\x1b.signalservice.OptionalBoolR\x15reactionNotifications\x12Q\n" + - "\x15notifyForCallsIfMuted\x188 \x01(\x0e2\x1b.signalservice.OptionalBoolR\x15notifyForCallsIfMuted\x12W\n" + - "\x18notifyForMentionsIfMuted\x189 \x01(\x0e2\x1b.signalservice.OptionalBoolR\x18notifyForMentionsIfMuted\x12U\n" + - "\x17notifyForRepliesIfMuted\x18: \x01(\x0e2\x1b.signalservice.OptionalBoolR\x17notifyForRepliesIfMuted\x12M\n" + - "\x13showUnreadReminders\x18; \x01(\x0e2\x1b.signalservice.OptionalBoolR\x13showUnreadReminders\x12S\n" + - "\x16notifyWhenContactJoins\x18< \x01(\x0e2\x1b.signalservice.OptionalBoolR\x16notifyWhenContactJoins\x1a\xa4\x03\n" + + " automaticKeyVerificationDisabled\x18. \x01(\bR automaticKeyVerificationDisabled\x1a\xb0\x02\n" + "\x12PinnedConversation\x12S\n" + "\acontact\x18\x01 \x01(\v27.signalservice.AccountRecord.PinnedConversation.ContactH\x00R\acontact\x12&\n" + "\rlegacyGroupId\x18\x03 \x01(\fH\x00R\rlegacyGroupId\x12(\n" + - "\x0egroupMasterKey\x18\x04 \x01(\fH\x00R\x0egroupMasterKey\x12b\n" + - "\freleaseNotes\x18\x05 \x01(\v2<.signalservice.AccountRecord.PinnedConversation.ReleaseNotesH\x00R\freleaseNotes\x1ae\n" + + "\x0egroupMasterKey\x18\x04 \x01(\fH\x00R\x0egroupMasterKey\x1ae\n" + "\aContact\x12\x1c\n" + "\tserviceId\x18\x01 \x01(\tR\tserviceId\x12\x12\n" + "\x04e164\x18\x02 \x01(\tR\x04e164\x12(\n" + - "\x0fserviceIdBinary\x18\x03 \x01(\fR\x0fserviceIdBinary\x1a\x0e\n" + - "\fReleaseNotesB\f\n" + + "\x0fserviceIdBinary\x18\x03 \x01(\fR\x0fserviceIdBinaryB\f\n" + "\n" + "identifier\x1a\xf8\x01\n" + "\fUsernameLink\x12\x18\n" + @@ -3629,7 +3294,14 @@ const file_signalpb_StorageService_proto_rawDesc = "" + "\fsubscriberId\x18\x01 \x01(\fR\fsubscriberId\x12&\n" + "\rpurchaseToken\x18\x02 \x01(\tH\x00R\rpurchaseToken\x126\n" + "\x15originalTransactionId\x18\x03 \x01(\x04H\x00R\x15originalTransactionIdB\x13\n" + - "\x11iapSubscriptionId\x1a\xa2\x02\n" + + "\x11iapSubscriptionId\x1a\x8d\x01\n" + + "\x11BackupTierHistory\x12#\n" + + "\n" + + "backupTier\x18\x01 \x01(\x04H\x00R\n" + + "backupTier\x88\x01\x01\x12/\n" + + "\x10endedAtTimestamp\x18\x02 \x01(\x04H\x01R\x10endedAtTimestamp\x88\x01\x01B\r\n" + + "\v_backupTierB\x13\n" + + "\x11_endedAtTimestamp\x1a\xa2\x02\n" + "!NotificationProfileManualOverride\x126\n" + "\x15disabledAtTimestampMs\x18\x01 \x01(\x04H\x00R\x15disabledAtTimestampMs\x12j\n" + "\aenabled\x18\x02 \x01(\v2N.signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabledH\x00R\aenabled\x1aM\n" + @@ -3637,24 +3309,17 @@ const file_signalpb_StorageService_proto_rawDesc = "" + "\x02id\x18\x01 \x01(\fR\x02id\x12*\n" + "\x10endAtTimestampMs\x18\x03 \x01(\x04R\x10endAtTimestampMsB\n" + "\n" + - "\boverride\"P\n" + - "\x0fUnreadBadgeType\x12\x16\n" + - "\x12UNKNOWN_BADGE_TYPE\x10\x00\x12\x13\n" + - "\x0fUNREAD_MESSAGES\x10\x01\x12\x10\n" + - "\fUNREAD_CHATS\x10\x02\"@\n" + + "\boverride\"@\n" + "\x16PhoneNumberSharingMode\x12\v\n" + "\aUNKNOWN\x10\x00\x12\r\n" + "\tEVERYBODY\x10\x01\x12\n" + "\n" + - "\x06NOBODY\x10\x02B\r\n" + + "\x06NOBODY\x10\x02B\f\n" + + "\n" + + "_hasBackupB\r\n" + "\v_backupTierB\x0e\n" + - "\f_avatarColorB\x1b\n" + - "\x19_releaseNotesChatArchivedB&\n" + - "$_releaseNotesChatMutedUntilTimestampB\x1a\n" + - "\x18_releaseNotesChatBlockedB\x1f\n" + - "\x1d_releaseNotesChatMarkedUnreadB\x1c\n" + - "\x1a_releaseNotesChatBlockedAtJ\x04\b\t\x10\n" + - "J\x04\b\x13\x10\x14J\x04\b\x1c\x10\x1dJ\x04\b\x1f\x10 J\x04\b$\x10%J\x04\b%\x10&J\x04\b&\x10'J\x04\b'\x10(J\x04\b+\x10,\"\xb9\x02\n" + + "\f_avatarColorJ\x04\b\t\x10\n" + + "J\x04\b\x13\x10\x14J\x04\b\x1c\x10\x1dJ\x04\b\x1f\x10 J\x04\b$\x10%J\x04\b%\x10&J\x04\b&\x10'\"\xb9\x02\n" + "\x1bStoryDistributionListRecord\x12\x1e\n" + "\n" + "identifier\x18\x01 \x01(\fR\n" + @@ -3664,16 +3329,13 @@ const file_signalpb_StorageService_proto_rawDesc = "" + "\x12deletedAtTimestamp\x18\x04 \x01(\x04R\x12deletedAtTimestamp\x12$\n" + "\rallowsReplies\x18\x05 \x01(\bR\rallowsReplies\x12 \n" + "\visBlockList\x18\x06 \x01(\bR\visBlockList\x12<\n" + - "\x19recipientServiceIdsBinary\x18\a \x03(\fR\x19recipientServiceIdsBinary\"\x91\x01\n" + - "\x11StickerPackRecord\x12\x16\n" + - "\x06packId\x18\x01 \x01(\fR\x06packId\x12\x18\n" + - "\apackKey\x18\x02 \x01(\fR\apackKey\x12\x1a\n" + - "\bposition\x18\x03 \x01(\rR\bposition\x12.\n" + - "\x12deletedAtTimestamp\x18\x04 \x01(\x04R\x12deletedAtTimestamp\"\x88\x01\n" + + "\x19recipientServiceIdsBinary\x18\a \x03(\fR\x19recipientServiceIdsBinary\"\xa7\x01\n" + "\x0eCallLinkRecord\x12\x18\n" + "\arootKey\x18\x01 \x01(\fR\arootKey\x12\"\n" + "\fadminPasskey\x18\x02 \x01(\fR\fadminPasskey\x122\n" + - "\x14deletedAtTimestampMs\x18\x03 \x01(\x04R\x14deletedAtTimestampMsJ\x04\b\x04\x10\x05\"\x90\x02\n" + + "\x14deletedAtTimestampMs\x18\x03 \x01(\x04R\x14deletedAtTimestampMs\x12\x19\n" + + "\x05epoch\x18\x04 \x01(\fH\x00R\x05epoch\x88\x01\x01B\b\n" + + "\x06_epoch\"\x90\x02\n" + "\tRecipient\x12<\n" + "\acontact\x18\x01 \x01(\v2 .signalservice.Recipient.ContactH\x00R\acontact\x12&\n" + "\rlegacyGroupId\x18\x02 \x01(\fH\x00R\rlegacyGroupId\x12(\n" + @@ -3756,154 +3418,137 @@ const file_signalpb_StorageService_proto_rawDesc = "" + "8org.whispersystems.signalservice.internal.storage.protosP\x01b\x06proto3" var ( - file_signalpb_StorageService_proto_rawDescOnce sync.Once - file_signalpb_StorageService_proto_rawDescData []byte + file_StorageService_proto_rawDescOnce sync.Once + file_StorageService_proto_rawDescData []byte ) -func file_signalpb_StorageService_proto_rawDescGZIP() []byte { - file_signalpb_StorageService_proto_rawDescOnce.Do(func() { - file_signalpb_StorageService_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_signalpb_StorageService_proto_rawDesc), len(file_signalpb_StorageService_proto_rawDesc))) +func file_StorageService_proto_rawDescGZIP() []byte { + file_StorageService_proto_rawDescOnce.Do(func() { + file_StorageService_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_StorageService_proto_rawDesc), len(file_StorageService_proto_rawDesc))) }) - return file_signalpb_StorageService_proto_rawDescData + return file_StorageService_proto_rawDescData } -var file_signalpb_StorageService_proto_enumTypes = make([]protoimpl.EnumInfo, 10) -var file_signalpb_StorageService_proto_msgTypes = make([]protoimpl.MessageInfo, 28) -var file_signalpb_StorageService_proto_goTypes = []any{ +var file_StorageService_proto_enumTypes = make([]protoimpl.EnumInfo, 9) +var file_StorageService_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_StorageService_proto_goTypes = []any{ (OptionalBool)(0), // 0: signalservice.OptionalBool (AvatarColor)(0), // 1: signalservice.AvatarColor (ManifestRecord_Identifier_Type)(0), // 2: signalservice.ManifestRecord.Identifier.Type (ContactRecord_IdentityState)(0), // 3: signalservice.ContactRecord.IdentityState (GroupV2Record_StorySendMode)(0), // 4: signalservice.GroupV2Record.StorySendMode - (AccountRecord_UnreadBadgeType)(0), // 5: signalservice.AccountRecord.UnreadBadgeType - (AccountRecord_PhoneNumberSharingMode)(0), // 6: signalservice.AccountRecord.PhoneNumberSharingMode - (AccountRecord_UsernameLink_Color)(0), // 7: signalservice.AccountRecord.UsernameLink.Color - (ChatFolderRecord_FolderType)(0), // 8: signalservice.ChatFolderRecord.FolderType - (NotificationProfile_DayOfWeek)(0), // 9: signalservice.NotificationProfile.DayOfWeek - (*StorageManifest)(nil), // 10: signalservice.StorageManifest - (*StorageItem)(nil), // 11: signalservice.StorageItem - (*StorageItems)(nil), // 12: signalservice.StorageItems - (*ReadOperation)(nil), // 13: signalservice.ReadOperation - (*WriteOperation)(nil), // 14: signalservice.WriteOperation - (*ManifestRecord)(nil), // 15: signalservice.ManifestRecord - (*StorageRecord)(nil), // 16: signalservice.StorageRecord - (*ContactRecord)(nil), // 17: signalservice.ContactRecord - (*GroupV1Record)(nil), // 18: signalservice.GroupV1Record - (*GroupV2Record)(nil), // 19: signalservice.GroupV2Record - (*Payments)(nil), // 20: signalservice.Payments - (*AccountRecord)(nil), // 21: signalservice.AccountRecord - (*StoryDistributionListRecord)(nil), // 22: signalservice.StoryDistributionListRecord - (*StickerPackRecord)(nil), // 23: signalservice.StickerPackRecord - (*CallLinkRecord)(nil), // 24: signalservice.CallLinkRecord - (*Recipient)(nil), // 25: signalservice.Recipient - (*ChatFolderRecord)(nil), // 26: signalservice.ChatFolderRecord - (*NotificationProfile)(nil), // 27: signalservice.NotificationProfile - (*ManifestRecord_Identifier)(nil), // 28: signalservice.ManifestRecord.Identifier - (*ContactRecord_Name)(nil), // 29: signalservice.ContactRecord.Name - (*AccountRecord_PinnedConversation)(nil), // 30: signalservice.AccountRecord.PinnedConversation - (*AccountRecord_UsernameLink)(nil), // 31: signalservice.AccountRecord.UsernameLink - (*AccountRecord_IAPSubscriberData)(nil), // 32: signalservice.AccountRecord.IAPSubscriberData - (*AccountRecord_NotificationProfileManualOverride)(nil), // 33: signalservice.AccountRecord.NotificationProfileManualOverride - (*AccountRecord_PinnedConversation_Contact)(nil), // 34: signalservice.AccountRecord.PinnedConversation.Contact - (*AccountRecord_PinnedConversation_ReleaseNotes)(nil), // 35: signalservice.AccountRecord.PinnedConversation.ReleaseNotes - (*AccountRecord_NotificationProfileManualOverride_ManuallyEnabled)(nil), // 36: signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabled - (*Recipient_Contact)(nil), // 37: signalservice.Recipient.Contact + (AccountRecord_PhoneNumberSharingMode)(0), // 5: signalservice.AccountRecord.PhoneNumberSharingMode + (AccountRecord_UsernameLink_Color)(0), // 6: signalservice.AccountRecord.UsernameLink.Color + (ChatFolderRecord_FolderType)(0), // 7: signalservice.ChatFolderRecord.FolderType + (NotificationProfile_DayOfWeek)(0), // 8: signalservice.NotificationProfile.DayOfWeek + (*StorageManifest)(nil), // 9: signalservice.StorageManifest + (*StorageItem)(nil), // 10: signalservice.StorageItem + (*StorageItems)(nil), // 11: signalservice.StorageItems + (*ReadOperation)(nil), // 12: signalservice.ReadOperation + (*WriteOperation)(nil), // 13: signalservice.WriteOperation + (*ManifestRecord)(nil), // 14: signalservice.ManifestRecord + (*StorageRecord)(nil), // 15: signalservice.StorageRecord + (*ContactRecord)(nil), // 16: signalservice.ContactRecord + (*GroupV1Record)(nil), // 17: signalservice.GroupV1Record + (*GroupV2Record)(nil), // 18: signalservice.GroupV2Record + (*Payments)(nil), // 19: signalservice.Payments + (*AccountRecord)(nil), // 20: signalservice.AccountRecord + (*StoryDistributionListRecord)(nil), // 21: signalservice.StoryDistributionListRecord + (*CallLinkRecord)(nil), // 22: signalservice.CallLinkRecord + (*Recipient)(nil), // 23: signalservice.Recipient + (*ChatFolderRecord)(nil), // 24: signalservice.ChatFolderRecord + (*NotificationProfile)(nil), // 25: signalservice.NotificationProfile + (*ManifestRecord_Identifier)(nil), // 26: signalservice.ManifestRecord.Identifier + (*ContactRecord_Name)(nil), // 27: signalservice.ContactRecord.Name + (*AccountRecord_PinnedConversation)(nil), // 28: signalservice.AccountRecord.PinnedConversation + (*AccountRecord_UsernameLink)(nil), // 29: signalservice.AccountRecord.UsernameLink + (*AccountRecord_IAPSubscriberData)(nil), // 30: signalservice.AccountRecord.IAPSubscriberData + (*AccountRecord_BackupTierHistory)(nil), // 31: signalservice.AccountRecord.BackupTierHistory + (*AccountRecord_NotificationProfileManualOverride)(nil), // 32: signalservice.AccountRecord.NotificationProfileManualOverride + (*AccountRecord_PinnedConversation_Contact)(nil), // 33: signalservice.AccountRecord.PinnedConversation.Contact + (*AccountRecord_NotificationProfileManualOverride_ManuallyEnabled)(nil), // 34: signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabled + (*Recipient_Contact)(nil), // 35: signalservice.Recipient.Contact } -var file_signalpb_StorageService_proto_depIdxs = []int32{ - 11, // 0: signalservice.StorageItems.items:type_name -> signalservice.StorageItem - 10, // 1: signalservice.WriteOperation.manifest:type_name -> signalservice.StorageManifest - 11, // 2: signalservice.WriteOperation.insertItem:type_name -> signalservice.StorageItem - 28, // 3: signalservice.ManifestRecord.identifiers:type_name -> signalservice.ManifestRecord.Identifier - 17, // 4: signalservice.StorageRecord.contact:type_name -> signalservice.ContactRecord - 18, // 5: signalservice.StorageRecord.groupV1:type_name -> signalservice.GroupV1Record - 19, // 6: signalservice.StorageRecord.groupV2:type_name -> signalservice.GroupV2Record - 21, // 7: signalservice.StorageRecord.account:type_name -> signalservice.AccountRecord - 22, // 8: signalservice.StorageRecord.storyDistributionList:type_name -> signalservice.StoryDistributionListRecord - 23, // 9: signalservice.StorageRecord.stickerPack:type_name -> signalservice.StickerPackRecord - 24, // 10: signalservice.StorageRecord.callLink:type_name -> signalservice.CallLinkRecord - 26, // 11: signalservice.StorageRecord.chatFolder:type_name -> signalservice.ChatFolderRecord - 27, // 12: signalservice.StorageRecord.notificationProfile:type_name -> signalservice.NotificationProfile - 3, // 13: signalservice.ContactRecord.identityState:type_name -> signalservice.ContactRecord.IdentityState - 29, // 14: signalservice.ContactRecord.nickname:type_name -> signalservice.ContactRecord.Name - 1, // 15: signalservice.ContactRecord.avatarColor:type_name -> signalservice.AvatarColor - 0, // 16: signalservice.ContactRecord.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool - 0, // 17: signalservice.ContactRecord.showUnreadReminders:type_name -> signalservice.OptionalBool - 4, // 18: signalservice.GroupV2Record.storySendMode:type_name -> signalservice.GroupV2Record.StorySendMode - 1, // 19: signalservice.GroupV2Record.avatarColor:type_name -> signalservice.AvatarColor - 0, // 20: signalservice.GroupV2Record.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool - 0, // 21: signalservice.GroupV2Record.notifyForMentionsIfMuted:type_name -> signalservice.OptionalBool - 0, // 22: signalservice.GroupV2Record.notifyForRepliesIfMuted:type_name -> signalservice.OptionalBool - 0, // 23: signalservice.GroupV2Record.showUnreadReminders:type_name -> signalservice.OptionalBool - 6, // 24: signalservice.AccountRecord.phoneNumberSharingMode:type_name -> signalservice.AccountRecord.PhoneNumberSharingMode - 30, // 25: signalservice.AccountRecord.pinnedConversations:type_name -> signalservice.AccountRecord.PinnedConversation - 20, // 26: signalservice.AccountRecord.payments:type_name -> signalservice.Payments - 0, // 27: signalservice.AccountRecord.storyViewReceiptsEnabled:type_name -> signalservice.OptionalBool - 31, // 28: signalservice.AccountRecord.usernameLink:type_name -> signalservice.AccountRecord.UsernameLink - 32, // 29: signalservice.AccountRecord.backupSubscriberData:type_name -> signalservice.AccountRecord.IAPSubscriberData - 1, // 30: signalservice.AccountRecord.avatarColor:type_name -> signalservice.AvatarColor - 33, // 31: signalservice.AccountRecord.notificationProfileManualOverride:type_name -> signalservice.AccountRecord.NotificationProfileManualOverride - 5, // 32: signalservice.AccountRecord.unreadBadgeType:type_name -> signalservice.AccountRecord.UnreadBadgeType - 0, // 33: signalservice.AccountRecord.includeMutedChatsInBadge:type_name -> signalservice.OptionalBool - 0, // 34: signalservice.AccountRecord.reactionNotifications:type_name -> signalservice.OptionalBool - 0, // 35: signalservice.AccountRecord.notifyForCallsIfMuted:type_name -> signalservice.OptionalBool - 0, // 36: signalservice.AccountRecord.notifyForMentionsIfMuted:type_name -> signalservice.OptionalBool - 0, // 37: signalservice.AccountRecord.notifyForRepliesIfMuted:type_name -> signalservice.OptionalBool - 0, // 38: signalservice.AccountRecord.showUnreadReminders:type_name -> signalservice.OptionalBool - 0, // 39: signalservice.AccountRecord.notifyWhenContactJoins:type_name -> signalservice.OptionalBool - 37, // 40: signalservice.Recipient.contact:type_name -> signalservice.Recipient.Contact - 8, // 41: signalservice.ChatFolderRecord.folderType:type_name -> signalservice.ChatFolderRecord.FolderType - 25, // 42: signalservice.ChatFolderRecord.includedRecipients:type_name -> signalservice.Recipient - 25, // 43: signalservice.ChatFolderRecord.excludedRecipients:type_name -> signalservice.Recipient - 25, // 44: signalservice.NotificationProfile.allowedMembers:type_name -> signalservice.Recipient - 9, // 45: signalservice.NotificationProfile.scheduleDaysEnabled:type_name -> signalservice.NotificationProfile.DayOfWeek - 2, // 46: signalservice.ManifestRecord.Identifier.type:type_name -> signalservice.ManifestRecord.Identifier.Type - 34, // 47: signalservice.AccountRecord.PinnedConversation.contact:type_name -> signalservice.AccountRecord.PinnedConversation.Contact - 35, // 48: signalservice.AccountRecord.PinnedConversation.releaseNotes:type_name -> signalservice.AccountRecord.PinnedConversation.ReleaseNotes - 7, // 49: signalservice.AccountRecord.UsernameLink.color:type_name -> signalservice.AccountRecord.UsernameLink.Color - 36, // 50: signalservice.AccountRecord.NotificationProfileManualOverride.enabled:type_name -> signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabled - 51, // [51:51] is the sub-list for method output_type - 51, // [51:51] is the sub-list for method input_type - 51, // [51:51] is the sub-list for extension type_name - 51, // [51:51] is the sub-list for extension extendee - 0, // [0:51] is the sub-list for field type_name +var file_StorageService_proto_depIdxs = []int32{ + 10, // 0: signalservice.StorageItems.items:type_name -> signalservice.StorageItem + 9, // 1: signalservice.WriteOperation.manifest:type_name -> signalservice.StorageManifest + 10, // 2: signalservice.WriteOperation.insertItem:type_name -> signalservice.StorageItem + 26, // 3: signalservice.ManifestRecord.identifiers:type_name -> signalservice.ManifestRecord.Identifier + 16, // 4: signalservice.StorageRecord.contact:type_name -> signalservice.ContactRecord + 17, // 5: signalservice.StorageRecord.groupV1:type_name -> signalservice.GroupV1Record + 18, // 6: signalservice.StorageRecord.groupV2:type_name -> signalservice.GroupV2Record + 20, // 7: signalservice.StorageRecord.account:type_name -> signalservice.AccountRecord + 21, // 8: signalservice.StorageRecord.storyDistributionList:type_name -> signalservice.StoryDistributionListRecord + 22, // 9: signalservice.StorageRecord.callLink:type_name -> signalservice.CallLinkRecord + 24, // 10: signalservice.StorageRecord.chatFolder:type_name -> signalservice.ChatFolderRecord + 25, // 11: signalservice.StorageRecord.notificationProfile:type_name -> signalservice.NotificationProfile + 3, // 12: signalservice.ContactRecord.identityState:type_name -> signalservice.ContactRecord.IdentityState + 27, // 13: signalservice.ContactRecord.nickname:type_name -> signalservice.ContactRecord.Name + 1, // 14: signalservice.ContactRecord.avatarColor:type_name -> signalservice.AvatarColor + 4, // 15: signalservice.GroupV2Record.storySendMode:type_name -> signalservice.GroupV2Record.StorySendMode + 1, // 16: signalservice.GroupV2Record.avatarColor:type_name -> signalservice.AvatarColor + 5, // 17: signalservice.AccountRecord.phoneNumberSharingMode:type_name -> signalservice.AccountRecord.PhoneNumberSharingMode + 28, // 18: signalservice.AccountRecord.pinnedConversations:type_name -> signalservice.AccountRecord.PinnedConversation + 19, // 19: signalservice.AccountRecord.payments:type_name -> signalservice.Payments + 0, // 20: signalservice.AccountRecord.storyViewReceiptsEnabled:type_name -> signalservice.OptionalBool + 29, // 21: signalservice.AccountRecord.usernameLink:type_name -> signalservice.AccountRecord.UsernameLink + 30, // 22: signalservice.AccountRecord.backupSubscriberData:type_name -> signalservice.AccountRecord.IAPSubscriberData + 1, // 23: signalservice.AccountRecord.avatarColor:type_name -> signalservice.AvatarColor + 31, // 24: signalservice.AccountRecord.backupTierHistory:type_name -> signalservice.AccountRecord.BackupTierHistory + 32, // 25: signalservice.AccountRecord.notificationProfileManualOverride:type_name -> signalservice.AccountRecord.NotificationProfileManualOverride + 35, // 26: signalservice.Recipient.contact:type_name -> signalservice.Recipient.Contact + 7, // 27: signalservice.ChatFolderRecord.folderType:type_name -> signalservice.ChatFolderRecord.FolderType + 23, // 28: signalservice.ChatFolderRecord.includedRecipients:type_name -> signalservice.Recipient + 23, // 29: signalservice.ChatFolderRecord.excludedRecipients:type_name -> signalservice.Recipient + 23, // 30: signalservice.NotificationProfile.allowedMembers:type_name -> signalservice.Recipient + 8, // 31: signalservice.NotificationProfile.scheduleDaysEnabled:type_name -> signalservice.NotificationProfile.DayOfWeek + 2, // 32: signalservice.ManifestRecord.Identifier.type:type_name -> signalservice.ManifestRecord.Identifier.Type + 33, // 33: signalservice.AccountRecord.PinnedConversation.contact:type_name -> signalservice.AccountRecord.PinnedConversation.Contact + 6, // 34: signalservice.AccountRecord.UsernameLink.color:type_name -> signalservice.AccountRecord.UsernameLink.Color + 34, // 35: signalservice.AccountRecord.NotificationProfileManualOverride.enabled:type_name -> signalservice.AccountRecord.NotificationProfileManualOverride.ManuallyEnabled + 36, // [36:36] is the sub-list for method output_type + 36, // [36:36] is the sub-list for method input_type + 36, // [36:36] is the sub-list for extension type_name + 36, // [36:36] is the sub-list for extension extendee + 0, // [0:36] is the sub-list for field type_name } -func init() { file_signalpb_StorageService_proto_init() } -func file_signalpb_StorageService_proto_init() { - if File_signalpb_StorageService_proto != nil { +func init() { file_StorageService_proto_init() } +func file_StorageService_proto_init() { + if File_StorageService_proto != nil { return } - file_signalpb_StorageService_proto_msgTypes[6].OneofWrappers = []any{ + file_StorageService_proto_msgTypes[6].OneofWrappers = []any{ (*StorageRecord_Contact)(nil), (*StorageRecord_GroupV1)(nil), (*StorageRecord_GroupV2)(nil), (*StorageRecord_Account)(nil), (*StorageRecord_StoryDistributionList)(nil), - (*StorageRecord_StickerPack)(nil), (*StorageRecord_CallLink)(nil), (*StorageRecord_ChatFolder)(nil), (*StorageRecord_NotificationProfile)(nil), } - file_signalpb_StorageService_proto_msgTypes[7].OneofWrappers = []any{} - file_signalpb_StorageService_proto_msgTypes[9].OneofWrappers = []any{} - file_signalpb_StorageService_proto_msgTypes[11].OneofWrappers = []any{} - file_signalpb_StorageService_proto_msgTypes[15].OneofWrappers = []any{ + file_StorageService_proto_msgTypes[7].OneofWrappers = []any{} + file_StorageService_proto_msgTypes[9].OneofWrappers = []any{} + file_StorageService_proto_msgTypes[11].OneofWrappers = []any{} + file_StorageService_proto_msgTypes[13].OneofWrappers = []any{} + file_StorageService_proto_msgTypes[14].OneofWrappers = []any{ (*Recipient_Contact_)(nil), (*Recipient_LegacyGroupId)(nil), (*Recipient_GroupMasterKey)(nil), } - file_signalpb_StorageService_proto_msgTypes[17].OneofWrappers = []any{} - file_signalpb_StorageService_proto_msgTypes[20].OneofWrappers = []any{ + file_StorageService_proto_msgTypes[16].OneofWrappers = []any{} + file_StorageService_proto_msgTypes[19].OneofWrappers = []any{ (*AccountRecord_PinnedConversation_Contact_)(nil), (*AccountRecord_PinnedConversation_LegacyGroupId)(nil), (*AccountRecord_PinnedConversation_GroupMasterKey)(nil), - (*AccountRecord_PinnedConversation_ReleaseNotes_)(nil), } - file_signalpb_StorageService_proto_msgTypes[22].OneofWrappers = []any{ + file_StorageService_proto_msgTypes[21].OneofWrappers = []any{ (*AccountRecord_IAPSubscriberData_PurchaseToken)(nil), (*AccountRecord_IAPSubscriberData_OriginalTransactionId)(nil), } - file_signalpb_StorageService_proto_msgTypes[23].OneofWrappers = []any{ + file_StorageService_proto_msgTypes[22].OneofWrappers = []any{} + file_StorageService_proto_msgTypes[23].OneofWrappers = []any{ (*AccountRecord_NotificationProfileManualOverride_DisabledAtTimestampMs)(nil), (*AccountRecord_NotificationProfileManualOverride_Enabled)(nil), } @@ -3911,18 +3556,18 @@ func file_signalpb_StorageService_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalpb_StorageService_proto_rawDesc), len(file_signalpb_StorageService_proto_rawDesc)), - NumEnums: 10, - NumMessages: 28, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_StorageService_proto_rawDesc), len(file_StorageService_proto_rawDesc)), + NumEnums: 9, + NumMessages: 27, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_signalpb_StorageService_proto_goTypes, - DependencyIndexes: file_signalpb_StorageService_proto_depIdxs, - EnumInfos: file_signalpb_StorageService_proto_enumTypes, - MessageInfos: file_signalpb_StorageService_proto_msgTypes, + GoTypes: file_StorageService_proto_goTypes, + DependencyIndexes: file_StorageService_proto_depIdxs, + EnumInfos: file_StorageService_proto_enumTypes, + MessageInfos: file_StorageService_proto_msgTypes, }.Build() - File_signalpb_StorageService_proto = out.File - file_signalpb_StorageService_proto_goTypes = nil - file_signalpb_StorageService_proto_depIdxs = nil + File_StorageService_proto = out.File + file_StorageService_proto_goTypes = nil + file_StorageService_proto_depIdxs = nil } diff --git a/pkg/signalmeow/protobuf/signalpb/StorageService.proto b/pkg/signalmeow/protobuf/StorageService.proto similarity index 74% rename from pkg/signalmeow/protobuf/signalpb/StorageService.proto rename to pkg/signalmeow/protobuf/StorageService.proto index 4109826..95ec845 100644 --- a/pkg/signalmeow/protobuf/signalpb/StorageService.proto +++ b/pkg/signalmeow/protobuf/StorageService.proto @@ -1,6 +1,7 @@ -/* - * Copyright 2020-2021 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only +/** + * Copyright (C) 2019 Open Whisper Systems + * + * Licensed according to the LICENSE file in this repository. */ syntax = "proto3"; @@ -49,7 +50,6 @@ message ManifestRecord { GROUPV2 = 3; ACCOUNT = 4; STORY_DISTRIBUTION_LIST = 5; - STICKER_PACK = 6; CALL_LINK = 7; CHAT_FOLDER = 8; NOTIFICATION_PROFILE = 9; @@ -73,7 +73,6 @@ message StorageRecord { GroupV2Record groupV2 = 3; AccountRecord account = 4; StoryDistributionListRecord storyDistributionList = 5; - StickerPackRecord stickerPack = 6; CallLinkRecord callLink = 7; ChatFolderRecord chatFolder = 8; NotificationProfile notificationProfile = 9; @@ -143,10 +142,7 @@ message ContactRecord { optional AvatarColor avatarColor = 24; bytes aciBinary = 25; // 16-byte UUID bytes pniBinary = 26; // 16-byte UUID - uint64 blockedAtTimestamp = 27; // 0 means the blocked time is unknown - OptionalBool notifyForCallsIfMuted = 28; // If unset, use the default settings - OptionalBool showUnreadReminders = 29; // If unset, use the default settings - // Next ID: 30 + // Next ID: 27 } message GroupV1Record { @@ -171,17 +167,11 @@ message GroupV2Record { bool archived = 4; bool markedUnread = 5; uint64 mutedUntilTimestamp = 6; - bool dontNotifyForMentionsIfMuted = 7; // will be deprecated in favor of [notifyForMentionsIfMuted] + bool dontNotifyForMentionsIfMuted = 7; bool hideStory = 8; reserved /* storySendEnabled */ 9; StorySendMode storySendMode = 10; optional AvatarColor avatarColor = 11; - bytes verifiedNameHash = 12; // SHA-256 of UTF-8 encoded decrypted group title that was last verified - uint64 blockedAtTimestamp = 13; // 0 means the blocked time is unknown - OptionalBool notifyForCallsIfMuted = 14; // If unset, use the default settings - OptionalBool notifyForMentionsIfMuted = 15; // If unset, use the default settings. If [dontNotifyForMentionsIfMuted] is true, this should be initialized to false. - OptionalBool notifyForRepliesIfMuted = 16; // If unset, use the default settings - OptionalBool showUnreadReminders = 17; // If unset, use the default settings } message Payments { @@ -191,12 +181,6 @@ message Payments { message AccountRecord { - enum UnreadBadgeType { - UNKNOWN_BADGE_TYPE = 0; // Interpret as "Unread messages" - UNREAD_MESSAGES = 1; - UNREAD_CHATS = 2; - } - enum PhoneNumberSharingMode { UNKNOWN = 0; EVERYBODY = 1; @@ -210,13 +194,10 @@ message AccountRecord { bytes serviceIdBinary = 3; // service ID binary (i.e. 16 byte UUID for ACI, 1 byte prefix + 16 byte UUID for PNI) } - message ReleaseNotes {} - oneof identifier { - Contact contact = 1; - bytes legacyGroupId = 3; - bytes groupMasterKey = 4; - ReleaseNotes releaseNotes = 5; + Contact contact = 1; + bytes legacyGroupId = 3; + bytes groupMasterKey = 4; } } @@ -249,6 +230,12 @@ message AccountRecord { } } + message BackupTierHistory { + // See zkgroup for integer particular values. Unset if backups are not enabled. + optional uint64 backupTier = 1; + optional uint64 endedAtTimestamp = 2; + } + message NotificationProfileManualOverride { message ManuallyEnabled { bytes id = 1; @@ -301,28 +288,14 @@ message AccountRecord { reserved /* backupsSubscriberId */ 36; reserved /* backupsSubscriberCurrencyCode */ 37; reserved /* backupsSubscriptionManuallyCancelled */ 38; - reserved /* hasBackup */ 39; + optional bool hasBackup = 39; // Set to true after backups are enabled and one is uploaded. optional uint64 backupTier = 40; // See zkgroup for integer particular values. Unset if backups are not enabled. IAPSubscriberData backupSubscriberData = 41; optional AvatarColor avatarColor = 42; - reserved /* backupTierHistory */ 43; + BackupTierHistory backupTierHistory = 43; NotificationProfileManualOverride notificationProfileManualOverride = 44; bool notificationProfileSyncDisabled = 45; bool automaticKeyVerificationDisabled = 46; - bool hasSeenAdminDeleteEducationDialog = 47; - optional bool releaseNotesChatArchived = 48; - optional uint64 releaseNotesChatMutedUntilTimestamp = 49; - optional bool releaseNotesChatBlocked = 50; - optional bool releaseNotesChatMarkedUnread = 51; - optional uint64 releaseNotesChatBlockedAt = 52; // only set if known (>0) - UnreadBadgeType unreadBadgeType = 53; // Only used in desktop/ios - OptionalBool includeMutedChatsInBadge = 54; // Only used in desktop/ios. If unset, consider this off. Only used in desktop/ios - OptionalBool reactionNotifications = 55; // If unset, consider this on - OptionalBool notifyForCallsIfMuted = 56; // If unset, consider this off - OptionalBool notifyForMentionsIfMuted = 57; // If unset, consider this on - OptionalBool notifyForRepliesIfMuted = 58; // If unset, consider this on - OptionalBool showUnreadReminders = 59; // If unset, consider this on - OptionalBool notifyWhenContactJoins = 60; // If unset, consider this off } message StoryDistributionListRecord { @@ -335,32 +308,11 @@ message StoryDistributionListRecord { repeated bytes recipientServiceIdsBinary = 7; // service ID binary (i.e. 16 byte UUID for ACI, 1 byte prefix + 16 byte UUID for PNI) } -message StickerPackRecord { - bytes packId = 1; // 16 bytes - bytes packKey = 2; // 32 bytes, used to derive the AES-256 key - // aesKey = HKDF( - // input = packKey, - // salt = 32 zero bytes, - // info = "Sticker Pack" - // ) - uint32 position = 3; // When displayed sticker packs should be first sorted - // in ascending order by zero-based `position` and - // then by ascending `packId` (lexicographically, - // packId can be treated as a hex string). - // When installing a sticker pack the client should find - // the maximum `position` among currently known stickers - // and use `max_position + 1` as the value for the new - // `position`. - uint64 deletedAtTimestamp = 4; // Timestamp in milliseconds. When present and - // non-zero - `packKey` and `position` should - // be unset -} - message CallLinkRecord { bytes rootKey = 1; bytes adminPasskey = 2; uint64 deletedAtTimestampMs = 3; - reserved 4; // was epoch field, never used + optional bytes epoch = 4; } message Recipient { diff --git a/pkg/signalmeow/protobuf/UnidentifiedDelivery.pb.go b/pkg/signalmeow/protobuf/UnidentifiedDelivery.pb.go new file mode 100644 index 0000000..e30f6d6 --- /dev/null +++ b/pkg/signalmeow/protobuf/UnidentifiedDelivery.pb.go @@ -0,0 +1,635 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v6.33.5 +// source: UnidentifiedDelivery.proto + +// Copyright 2018 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +package signalpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type UnidentifiedSenderMessage_Message_Type int32 + +const ( + // Our parser does not handle reserved in enums: DESKTOP-1569 + // reserved 1; + UnidentifiedSenderMessage_Message_MESSAGE UnidentifiedSenderMessage_Message_Type = 2 + UnidentifiedSenderMessage_Message_PREKEY_MESSAGE UnidentifiedSenderMessage_Message_Type = 3 // Further cases should line up with Envelope.Type, even though old cases don't. + UnidentifiedSenderMessage_Message_SENDERKEY_MESSAGE UnidentifiedSenderMessage_Message_Type = 7 + UnidentifiedSenderMessage_Message_PLAINTEXT_CONTENT UnidentifiedSenderMessage_Message_Type = 8 +) + +// Enum value maps for UnidentifiedSenderMessage_Message_Type. +var ( + UnidentifiedSenderMessage_Message_Type_name = map[int32]string{ + 2: "MESSAGE", + 3: "PREKEY_MESSAGE", + 7: "SENDERKEY_MESSAGE", + 8: "PLAINTEXT_CONTENT", + } + UnidentifiedSenderMessage_Message_Type_value = map[string]int32{ + "MESSAGE": 2, + "PREKEY_MESSAGE": 3, + "SENDERKEY_MESSAGE": 7, + "PLAINTEXT_CONTENT": 8, + } +) + +func (x UnidentifiedSenderMessage_Message_Type) Enum() *UnidentifiedSenderMessage_Message_Type { + p := new(UnidentifiedSenderMessage_Message_Type) + *p = x + return p +} + +func (x UnidentifiedSenderMessage_Message_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (UnidentifiedSenderMessage_Message_Type) Descriptor() protoreflect.EnumDescriptor { + return file_UnidentifiedDelivery_proto_enumTypes[0].Descriptor() +} + +func (UnidentifiedSenderMessage_Message_Type) Type() protoreflect.EnumType { + return &file_UnidentifiedDelivery_proto_enumTypes[0] +} + +func (x UnidentifiedSenderMessage_Message_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *UnidentifiedSenderMessage_Message_Type) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = UnidentifiedSenderMessage_Message_Type(num) + return nil +} + +// Deprecated: Use UnidentifiedSenderMessage_Message_Type.Descriptor instead. +func (UnidentifiedSenderMessage_Message_Type) EnumDescriptor() ([]byte, []int) { + return file_UnidentifiedDelivery_proto_rawDescGZIP(), []int{2, 0, 0} +} + +type UnidentifiedSenderMessage_Message_ContentHint int32 + +const ( + // Show an error immediately; it was important but we can't retry. + UnidentifiedSenderMessage_Message_DEFAULT UnidentifiedSenderMessage_Message_ContentHint = 0 + // Sender will try to resend; delay any error UI if possible + UnidentifiedSenderMessage_Message_RESENDABLE UnidentifiedSenderMessage_Message_ContentHint = 1 + // Don't show any error UI at all; this is something sent implicitly like a typing message or a receipt + UnidentifiedSenderMessage_Message_IMPLICIT UnidentifiedSenderMessage_Message_ContentHint = 2 +) + +// Enum value maps for UnidentifiedSenderMessage_Message_ContentHint. +var ( + UnidentifiedSenderMessage_Message_ContentHint_name = map[int32]string{ + 0: "DEFAULT", + 1: "RESENDABLE", + 2: "IMPLICIT", + } + UnidentifiedSenderMessage_Message_ContentHint_value = map[string]int32{ + "DEFAULT": 0, + "RESENDABLE": 1, + "IMPLICIT": 2, + } +) + +func (x UnidentifiedSenderMessage_Message_ContentHint) Enum() *UnidentifiedSenderMessage_Message_ContentHint { + p := new(UnidentifiedSenderMessage_Message_ContentHint) + *p = x + return p +} + +func (x UnidentifiedSenderMessage_Message_ContentHint) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (UnidentifiedSenderMessage_Message_ContentHint) Descriptor() protoreflect.EnumDescriptor { + return file_UnidentifiedDelivery_proto_enumTypes[1].Descriptor() +} + +func (UnidentifiedSenderMessage_Message_ContentHint) Type() protoreflect.EnumType { + return &file_UnidentifiedDelivery_proto_enumTypes[1] +} + +func (x UnidentifiedSenderMessage_Message_ContentHint) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *UnidentifiedSenderMessage_Message_ContentHint) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = UnidentifiedSenderMessage_Message_ContentHint(num) + return nil +} + +// Deprecated: Use UnidentifiedSenderMessage_Message_ContentHint.Descriptor instead. +func (UnidentifiedSenderMessage_Message_ContentHint) EnumDescriptor() ([]byte, []int) { + return file_UnidentifiedDelivery_proto_rawDescGZIP(), []int{2, 0, 1} +} + +type ServerCertificate struct { + state protoimpl.MessageState `protogen:"open.v1"` + Certificate []byte `protobuf:"bytes,1,opt,name=certificate" json:"certificate,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ServerCertificate) Reset() { + *x = ServerCertificate{} + mi := &file_UnidentifiedDelivery_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ServerCertificate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerCertificate) ProtoMessage() {} + +func (x *ServerCertificate) ProtoReflect() protoreflect.Message { + mi := &file_UnidentifiedDelivery_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerCertificate.ProtoReflect.Descriptor instead. +func (*ServerCertificate) Descriptor() ([]byte, []int) { + return file_UnidentifiedDelivery_proto_rawDescGZIP(), []int{0} +} + +func (x *ServerCertificate) GetCertificate() []byte { + if x != nil { + return x.Certificate + } + return nil +} + +func (x *ServerCertificate) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +type SenderCertificate struct { + state protoimpl.MessageState `protogen:"open.v1"` + Certificate []byte `protobuf:"bytes,1,opt,name=certificate" json:"certificate,omitempty"` + Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SenderCertificate) Reset() { + *x = SenderCertificate{} + mi := &file_UnidentifiedDelivery_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SenderCertificate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SenderCertificate) ProtoMessage() {} + +func (x *SenderCertificate) ProtoReflect() protoreflect.Message { + mi := &file_UnidentifiedDelivery_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SenderCertificate.ProtoReflect.Descriptor instead. +func (*SenderCertificate) Descriptor() ([]byte, []int) { + return file_UnidentifiedDelivery_proto_rawDescGZIP(), []int{1} +} + +func (x *SenderCertificate) GetCertificate() []byte { + if x != nil { + return x.Certificate + } + return nil +} + +func (x *SenderCertificate) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +type UnidentifiedSenderMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + EphemeralPublic []byte `protobuf:"bytes,1,opt,name=ephemeralPublic" json:"ephemeralPublic,omitempty"` + EncryptedStatic []byte `protobuf:"bytes,2,opt,name=encryptedStatic" json:"encryptedStatic,omitempty"` + EncryptedMessage []byte `protobuf:"bytes,3,opt,name=encryptedMessage" json:"encryptedMessage,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnidentifiedSenderMessage) Reset() { + *x = UnidentifiedSenderMessage{} + mi := &file_UnidentifiedDelivery_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnidentifiedSenderMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnidentifiedSenderMessage) ProtoMessage() {} + +func (x *UnidentifiedSenderMessage) ProtoReflect() protoreflect.Message { + mi := &file_UnidentifiedDelivery_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnidentifiedSenderMessage.ProtoReflect.Descriptor instead. +func (*UnidentifiedSenderMessage) Descriptor() ([]byte, []int) { + return file_UnidentifiedDelivery_proto_rawDescGZIP(), []int{2} +} + +func (x *UnidentifiedSenderMessage) GetEphemeralPublic() []byte { + if x != nil { + return x.EphemeralPublic + } + return nil +} + +func (x *UnidentifiedSenderMessage) GetEncryptedStatic() []byte { + if x != nil { + return x.EncryptedStatic + } + return nil +} + +func (x *UnidentifiedSenderMessage) GetEncryptedMessage() []byte { + if x != nil { + return x.EncryptedMessage + } + return nil +} + +type ServerCertificate_Certificate struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id *uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` + Key []byte `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ServerCertificate_Certificate) Reset() { + *x = ServerCertificate_Certificate{} + mi := &file_UnidentifiedDelivery_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ServerCertificate_Certificate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerCertificate_Certificate) ProtoMessage() {} + +func (x *ServerCertificate_Certificate) ProtoReflect() protoreflect.Message { + mi := &file_UnidentifiedDelivery_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerCertificate_Certificate.ProtoReflect.Descriptor instead. +func (*ServerCertificate_Certificate) Descriptor() ([]byte, []int) { + return file_UnidentifiedDelivery_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ServerCertificate_Certificate) GetId() uint32 { + if x != nil && x.Id != nil { + return *x.Id + } + return 0 +} + +func (x *ServerCertificate_Certificate) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} + +type SenderCertificate_Certificate struct { + state protoimpl.MessageState `protogen:"open.v1"` + SenderE164 *string `protobuf:"bytes,1,opt,name=senderE164" json:"senderE164,omitempty"` + SenderUuid *string `protobuf:"bytes,6,opt,name=senderUuid" json:"senderUuid,omitempty"` + SenderDevice *uint32 `protobuf:"varint,2,opt,name=senderDevice" json:"senderDevice,omitempty"` + Expires *uint64 `protobuf:"fixed64,3,opt,name=expires" json:"expires,omitempty"` + IdentityKey []byte `protobuf:"bytes,4,opt,name=identityKey" json:"identityKey,omitempty"` + Signer *ServerCertificate `protobuf:"bytes,5,opt,name=signer" json:"signer,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SenderCertificate_Certificate) Reset() { + *x = SenderCertificate_Certificate{} + mi := &file_UnidentifiedDelivery_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SenderCertificate_Certificate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SenderCertificate_Certificate) ProtoMessage() {} + +func (x *SenderCertificate_Certificate) ProtoReflect() protoreflect.Message { + mi := &file_UnidentifiedDelivery_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SenderCertificate_Certificate.ProtoReflect.Descriptor instead. +func (*SenderCertificate_Certificate) Descriptor() ([]byte, []int) { + return file_UnidentifiedDelivery_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *SenderCertificate_Certificate) GetSenderE164() string { + if x != nil && x.SenderE164 != nil { + return *x.SenderE164 + } + return "" +} + +func (x *SenderCertificate_Certificate) GetSenderUuid() string { + if x != nil && x.SenderUuid != nil { + return *x.SenderUuid + } + return "" +} + +func (x *SenderCertificate_Certificate) GetSenderDevice() uint32 { + if x != nil && x.SenderDevice != nil { + return *x.SenderDevice + } + return 0 +} + +func (x *SenderCertificate_Certificate) GetExpires() uint64 { + if x != nil && x.Expires != nil { + return *x.Expires + } + return 0 +} + +func (x *SenderCertificate_Certificate) GetIdentityKey() []byte { + if x != nil { + return x.IdentityKey + } + return nil +} + +func (x *SenderCertificate_Certificate) GetSigner() *ServerCertificate { + if x != nil { + return x.Signer + } + return nil +} + +type UnidentifiedSenderMessage_Message struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type *UnidentifiedSenderMessage_Message_Type `protobuf:"varint,1,opt,name=type,enum=signalservice.UnidentifiedSenderMessage_Message_Type" json:"type,omitempty"` + SenderCertificate *SenderCertificate `protobuf:"bytes,2,opt,name=senderCertificate" json:"senderCertificate,omitempty"` + Content []byte `protobuf:"bytes,3,opt,name=content" json:"content,omitempty"` + ContentHint *UnidentifiedSenderMessage_Message_ContentHint `protobuf:"varint,4,opt,name=contentHint,enum=signalservice.UnidentifiedSenderMessage_Message_ContentHint" json:"contentHint,omitempty"` + GroupId []byte `protobuf:"bytes,5,opt,name=groupId" json:"groupId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnidentifiedSenderMessage_Message) Reset() { + *x = UnidentifiedSenderMessage_Message{} + mi := &file_UnidentifiedDelivery_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnidentifiedSenderMessage_Message) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnidentifiedSenderMessage_Message) ProtoMessage() {} + +func (x *UnidentifiedSenderMessage_Message) ProtoReflect() protoreflect.Message { + mi := &file_UnidentifiedDelivery_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnidentifiedSenderMessage_Message.ProtoReflect.Descriptor instead. +func (*UnidentifiedSenderMessage_Message) Descriptor() ([]byte, []int) { + return file_UnidentifiedDelivery_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *UnidentifiedSenderMessage_Message) GetType() UnidentifiedSenderMessage_Message_Type { + if x != nil && x.Type != nil { + return *x.Type + } + return UnidentifiedSenderMessage_Message_MESSAGE +} + +func (x *UnidentifiedSenderMessage_Message) GetSenderCertificate() *SenderCertificate { + if x != nil { + return x.SenderCertificate + } + return nil +} + +func (x *UnidentifiedSenderMessage_Message) GetContent() []byte { + if x != nil { + return x.Content + } + return nil +} + +func (x *UnidentifiedSenderMessage_Message) GetContentHint() UnidentifiedSenderMessage_Message_ContentHint { + if x != nil && x.ContentHint != nil { + return *x.ContentHint + } + return UnidentifiedSenderMessage_Message_DEFAULT +} + +func (x *UnidentifiedSenderMessage_Message) GetGroupId() []byte { + if x != nil { + return x.GroupId + } + return nil +} + +var File_UnidentifiedDelivery_proto protoreflect.FileDescriptor + +const file_UnidentifiedDelivery_proto_rawDesc = "" + + "\n" + + "\x1aUnidentifiedDelivery.proto\x12\rsignalservice\"\x84\x01\n" + + "\x11ServerCertificate\x12 \n" + + "\vcertificate\x18\x01 \x01(\fR\vcertificate\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\fR\tsignature\x1a/\n" + + "\vCertificate\x12\x0e\n" + + "\x02id\x18\x01 \x01(\rR\x02id\x12\x10\n" + + "\x03key\x18\x02 \x01(\fR\x03key\"\xbd\x02\n" + + "\x11SenderCertificate\x12 \n" + + "\vcertificate\x18\x01 \x01(\fR\vcertificate\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\fR\tsignature\x1a\xe7\x01\n" + + "\vCertificate\x12\x1e\n" + + "\n" + + "senderE164\x18\x01 \x01(\tR\n" + + "senderE164\x12\x1e\n" + + "\n" + + "senderUuid\x18\x06 \x01(\tR\n" + + "senderUuid\x12\"\n" + + "\fsenderDevice\x18\x02 \x01(\rR\fsenderDevice\x12\x18\n" + + "\aexpires\x18\x03 \x01(\x06R\aexpires\x12 \n" + + "\videntityKey\x18\x04 \x01(\fR\videntityKey\x128\n" + + "\x06signer\x18\x05 \x01(\v2 .signalservice.ServerCertificateR\x06signer\"\xe7\x04\n" + + "\x19UnidentifiedSenderMessage\x12(\n" + + "\x0fephemeralPublic\x18\x01 \x01(\fR\x0fephemeralPublic\x12(\n" + + "\x0fencryptedStatic\x18\x02 \x01(\fR\x0fencryptedStatic\x12*\n" + + "\x10encryptedMessage\x18\x03 \x01(\fR\x10encryptedMessage\x1a\xc9\x03\n" + + "\aMessage\x12I\n" + + "\x04type\x18\x01 \x01(\x0e25.signalservice.UnidentifiedSenderMessage.Message.TypeR\x04type\x12N\n" + + "\x11senderCertificate\x18\x02 \x01(\v2 .signalservice.SenderCertificateR\x11senderCertificate\x12\x18\n" + + "\acontent\x18\x03 \x01(\fR\acontent\x12^\n" + + "\vcontentHint\x18\x04 \x01(\x0e2<.signalservice.UnidentifiedSenderMessage.Message.ContentHintR\vcontentHint\x12\x18\n" + + "\agroupId\x18\x05 \x01(\fR\agroupId\"U\n" + + "\x04Type\x12\v\n" + + "\aMESSAGE\x10\x02\x12\x12\n" + + "\x0ePREKEY_MESSAGE\x10\x03\x12\x15\n" + + "\x11SENDERKEY_MESSAGE\x10\a\x12\x15\n" + + "\x11PLAINTEXT_CONTENT\x10\b\"8\n" + + "\vContentHint\x12\v\n" + + "\aDEFAULT\x10\x00\x12\x0e\n" + + "\n" + + "RESENDABLE\x10\x01\x12\f\n" + + "\bIMPLICIT\x10\x02B6\n" + + "%org.whispersystems.libsignal.protocolB\rWhisperProtos" + +var ( + file_UnidentifiedDelivery_proto_rawDescOnce sync.Once + file_UnidentifiedDelivery_proto_rawDescData []byte +) + +func file_UnidentifiedDelivery_proto_rawDescGZIP() []byte { + file_UnidentifiedDelivery_proto_rawDescOnce.Do(func() { + file_UnidentifiedDelivery_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_UnidentifiedDelivery_proto_rawDesc), len(file_UnidentifiedDelivery_proto_rawDesc))) + }) + return file_UnidentifiedDelivery_proto_rawDescData +} + +var file_UnidentifiedDelivery_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_UnidentifiedDelivery_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_UnidentifiedDelivery_proto_goTypes = []any{ + (UnidentifiedSenderMessage_Message_Type)(0), // 0: signalservice.UnidentifiedSenderMessage.Message.Type + (UnidentifiedSenderMessage_Message_ContentHint)(0), // 1: signalservice.UnidentifiedSenderMessage.Message.ContentHint + (*ServerCertificate)(nil), // 2: signalservice.ServerCertificate + (*SenderCertificate)(nil), // 3: signalservice.SenderCertificate + (*UnidentifiedSenderMessage)(nil), // 4: signalservice.UnidentifiedSenderMessage + (*ServerCertificate_Certificate)(nil), // 5: signalservice.ServerCertificate.Certificate + (*SenderCertificate_Certificate)(nil), // 6: signalservice.SenderCertificate.Certificate + (*UnidentifiedSenderMessage_Message)(nil), // 7: signalservice.UnidentifiedSenderMessage.Message +} +var file_UnidentifiedDelivery_proto_depIdxs = []int32{ + 2, // 0: signalservice.SenderCertificate.Certificate.signer:type_name -> signalservice.ServerCertificate + 0, // 1: signalservice.UnidentifiedSenderMessage.Message.type:type_name -> signalservice.UnidentifiedSenderMessage.Message.Type + 3, // 2: signalservice.UnidentifiedSenderMessage.Message.senderCertificate:type_name -> signalservice.SenderCertificate + 1, // 3: signalservice.UnidentifiedSenderMessage.Message.contentHint:type_name -> signalservice.UnidentifiedSenderMessage.Message.ContentHint + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_UnidentifiedDelivery_proto_init() } +func file_UnidentifiedDelivery_proto_init() { + if File_UnidentifiedDelivery_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_UnidentifiedDelivery_proto_rawDesc), len(file_UnidentifiedDelivery_proto_rawDesc)), + NumEnums: 2, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_UnidentifiedDelivery_proto_goTypes, + DependencyIndexes: file_UnidentifiedDelivery_proto_depIdxs, + EnumInfos: file_UnidentifiedDelivery_proto_enumTypes, + MessageInfos: file_UnidentifiedDelivery_proto_msgTypes, + }.Build() + File_UnidentifiedDelivery_proto = out.File + file_UnidentifiedDelivery_proto_goTypes = nil + file_UnidentifiedDelivery_proto_depIdxs = nil +} diff --git a/pkg/signalmeow/protobuf/UnidentifiedDelivery.proto b/pkg/signalmeow/protobuf/UnidentifiedDelivery.proto new file mode 100644 index 0000000..255ab6e --- /dev/null +++ b/pkg/signalmeow/protobuf/UnidentifiedDelivery.proto @@ -0,0 +1,70 @@ +// Copyright 2018 Signal Messenger, LLC +// SPDX-License-Identifier: AGPL-3.0-only + +package signalservice; + +option java_package = "org.whispersystems.libsignal.protocol"; +option java_outer_classname = "WhisperProtos"; + +message ServerCertificate { + message Certificate { + optional uint32 id = 1; + optional bytes key = 2; + } + + optional bytes certificate = 1; + optional bytes signature = 2; +} + +message SenderCertificate { + message Certificate { + optional string senderE164 = 1; + optional string senderUuid = 6; + optional uint32 senderDevice = 2; + optional fixed64 expires = 3; + optional bytes identityKey = 4; + optional ServerCertificate signer = 5; + } + + optional bytes certificate = 1; + optional bytes signature = 2; +} + +message UnidentifiedSenderMessage { + + message Message { + enum Type { + // Our parser does not handle reserved in enums: DESKTOP-1569 + // reserved 1; + MESSAGE = 2; + PREKEY_MESSAGE = 3; + // Further cases should line up with Envelope.Type, even though old cases don't. + + // reserved 3 to 6; + + SENDERKEY_MESSAGE = 7; + PLAINTEXT_CONTENT = 8; + } + + enum ContentHint { + // Show an error immediately; it was important but we can't retry. + DEFAULT = 0; + + // Sender will try to resend; delay any error UI if possible + RESENDABLE = 1; + + // Don't show any error UI at all; this is something sent implicitly like a typing message or a receipt + IMPLICIT = 2; + } + + optional Type type = 1; + optional SenderCertificate senderCertificate = 2; + optional bytes content = 3; + optional ContentHint contentHint = 4; + optional bytes groupId = 5; + } + + optional bytes ephemeralPublic = 1; + optional bytes encryptedStatic = 2; + optional bytes encryptedMessage = 3; +} diff --git a/pkg/signalmeow/protobuf/signalpb/WebSocketResources.pb.go b/pkg/signalmeow/protobuf/WebSocketResources.pb.go similarity index 77% rename from pkg/signalmeow/protobuf/signalpb/WebSocketResources.pb.go rename to pkg/signalmeow/protobuf/WebSocketResources.pb.go index 28efd72..f35110d 100644 --- a/pkg/signalmeow/protobuf/signalpb/WebSocketResources.pb.go +++ b/pkg/signalmeow/protobuf/WebSocketResources.pb.go @@ -6,8 +6,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: signalpb/WebSocketResources.proto +// protoc v6.33.5 +// source: WebSocketResources.proto package signalpb @@ -59,11 +59,11 @@ func (x WebSocketMessage_Type) String() string { } func (WebSocketMessage_Type) Descriptor() protoreflect.EnumDescriptor { - return file_signalpb_WebSocketResources_proto_enumTypes[0].Descriptor() + return file_WebSocketResources_proto_enumTypes[0].Descriptor() } func (WebSocketMessage_Type) Type() protoreflect.EnumType { - return &file_signalpb_WebSocketResources_proto_enumTypes[0] + return &file_WebSocketResources_proto_enumTypes[0] } func (x WebSocketMessage_Type) Number() protoreflect.EnumNumber { @@ -82,7 +82,7 @@ func (x *WebSocketMessage_Type) UnmarshalJSON(b []byte) error { // Deprecated: Use WebSocketMessage_Type.Descriptor instead. func (WebSocketMessage_Type) EnumDescriptor() ([]byte, []int) { - return file_signalpb_WebSocketResources_proto_rawDescGZIP(), []int{2, 0} + return file_WebSocketResources_proto_rawDescGZIP(), []int{2, 0} } type WebSocketRequestMessage struct { @@ -98,7 +98,7 @@ type WebSocketRequestMessage struct { func (x *WebSocketRequestMessage) Reset() { *x = WebSocketRequestMessage{} - mi := &file_signalpb_WebSocketResources_proto_msgTypes[0] + mi := &file_WebSocketResources_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -110,7 +110,7 @@ func (x *WebSocketRequestMessage) String() string { func (*WebSocketRequestMessage) ProtoMessage() {} func (x *WebSocketRequestMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_WebSocketResources_proto_msgTypes[0] + mi := &file_WebSocketResources_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -123,7 +123,7 @@ func (x *WebSocketRequestMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use WebSocketRequestMessage.ProtoReflect.Descriptor instead. func (*WebSocketRequestMessage) Descriptor() ([]byte, []int) { - return file_signalpb_WebSocketResources_proto_rawDescGZIP(), []int{0} + return file_WebSocketResources_proto_rawDescGZIP(), []int{0} } func (x *WebSocketRequestMessage) GetVerb() string { @@ -174,7 +174,7 @@ type WebSocketResponseMessage struct { func (x *WebSocketResponseMessage) Reset() { *x = WebSocketResponseMessage{} - mi := &file_signalpb_WebSocketResources_proto_msgTypes[1] + mi := &file_WebSocketResources_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -186,7 +186,7 @@ func (x *WebSocketResponseMessage) String() string { func (*WebSocketResponseMessage) ProtoMessage() {} func (x *WebSocketResponseMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_WebSocketResources_proto_msgTypes[1] + mi := &file_WebSocketResources_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -199,7 +199,7 @@ func (x *WebSocketResponseMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use WebSocketResponseMessage.ProtoReflect.Descriptor instead. func (*WebSocketResponseMessage) Descriptor() ([]byte, []int) { - return file_signalpb_WebSocketResources_proto_rawDescGZIP(), []int{1} + return file_WebSocketResources_proto_rawDescGZIP(), []int{1} } func (x *WebSocketResponseMessage) GetId() uint64 { @@ -248,7 +248,7 @@ type WebSocketMessage struct { func (x *WebSocketMessage) Reset() { *x = WebSocketMessage{} - mi := &file_signalpb_WebSocketResources_proto_msgTypes[2] + mi := &file_WebSocketResources_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -260,7 +260,7 @@ func (x *WebSocketMessage) String() string { func (*WebSocketMessage) ProtoMessage() {} func (x *WebSocketMessage) ProtoReflect() protoreflect.Message { - mi := &file_signalpb_WebSocketResources_proto_msgTypes[2] + mi := &file_WebSocketResources_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -273,7 +273,7 @@ func (x *WebSocketMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use WebSocketMessage.ProtoReflect.Descriptor instead. func (*WebSocketMessage) Descriptor() ([]byte, []int) { - return file_signalpb_WebSocketResources_proto_rawDescGZIP(), []int{2} + return file_WebSocketResources_proto_rawDescGZIP(), []int{2} } func (x *WebSocketMessage) GetType() WebSocketMessage_Type { @@ -297,11 +297,11 @@ func (x *WebSocketMessage) GetResponse() *WebSocketResponseMessage { return nil } -var File_signalpb_WebSocketResources_proto protoreflect.FileDescriptor +var File_WebSocketResources_proto protoreflect.FileDescriptor -const file_signalpb_WebSocketResources_proto_rawDesc = "" + +const file_WebSocketResources_proto_rawDesc = "" + "\n" + - "!signalpb/WebSocketResources.proto\x12\rsignalservice\"\x7f\n" + + "\x18WebSocketResources.proto\x12\rsignalservice\"\x7f\n" + "\x17WebSocketRequestMessage\x12\x12\n" + "\x04verb\x18\x01 \x01(\tR\x04verb\x12\x12\n" + "\x04path\x18\x02 \x01(\tR\x04path\x12\x12\n" + @@ -321,30 +321,30 @@ const file_signalpb_WebSocketResources_proto_rawDesc = "" + "\x04Type\x12\v\n" + "\aUNKNOWN\x10\x00\x12\v\n" + "\aREQUEST\x10\x01\x12\f\n" + - "\bRESPONSE\x10\x02B/\n" + - "\x1corg.signal.network.websocketB\x0fWebSocketProtos" + "\bRESPONSE\x10\x02BF\n" + + "3org.whispersystems.signalservice.internal.websocketB\x0fWebSocketProtos" var ( - file_signalpb_WebSocketResources_proto_rawDescOnce sync.Once - file_signalpb_WebSocketResources_proto_rawDescData []byte + file_WebSocketResources_proto_rawDescOnce sync.Once + file_WebSocketResources_proto_rawDescData []byte ) -func file_signalpb_WebSocketResources_proto_rawDescGZIP() []byte { - file_signalpb_WebSocketResources_proto_rawDescOnce.Do(func() { - file_signalpb_WebSocketResources_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_signalpb_WebSocketResources_proto_rawDesc), len(file_signalpb_WebSocketResources_proto_rawDesc))) +func file_WebSocketResources_proto_rawDescGZIP() []byte { + file_WebSocketResources_proto_rawDescOnce.Do(func() { + file_WebSocketResources_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_WebSocketResources_proto_rawDesc), len(file_WebSocketResources_proto_rawDesc))) }) - return file_signalpb_WebSocketResources_proto_rawDescData + return file_WebSocketResources_proto_rawDescData } -var file_signalpb_WebSocketResources_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_signalpb_WebSocketResources_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_signalpb_WebSocketResources_proto_goTypes = []any{ +var file_WebSocketResources_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_WebSocketResources_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_WebSocketResources_proto_goTypes = []any{ (WebSocketMessage_Type)(0), // 0: signalservice.WebSocketMessage.Type (*WebSocketRequestMessage)(nil), // 1: signalservice.WebSocketRequestMessage (*WebSocketResponseMessage)(nil), // 2: signalservice.WebSocketResponseMessage (*WebSocketMessage)(nil), // 3: signalservice.WebSocketMessage } -var file_signalpb_WebSocketResources_proto_depIdxs = []int32{ +var file_WebSocketResources_proto_depIdxs = []int32{ 0, // 0: signalservice.WebSocketMessage.type:type_name -> signalservice.WebSocketMessage.Type 1, // 1: signalservice.WebSocketMessage.request:type_name -> signalservice.WebSocketRequestMessage 2, // 2: signalservice.WebSocketMessage.response:type_name -> signalservice.WebSocketResponseMessage @@ -355,27 +355,27 @@ var file_signalpb_WebSocketResources_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_signalpb_WebSocketResources_proto_init() } -func file_signalpb_WebSocketResources_proto_init() { - if File_signalpb_WebSocketResources_proto != nil { +func init() { file_WebSocketResources_proto_init() } +func file_WebSocketResources_proto_init() { + if File_WebSocketResources_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_signalpb_WebSocketResources_proto_rawDesc), len(file_signalpb_WebSocketResources_proto_rawDesc)), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_WebSocketResources_proto_rawDesc), len(file_WebSocketResources_proto_rawDesc)), NumEnums: 1, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_signalpb_WebSocketResources_proto_goTypes, - DependencyIndexes: file_signalpb_WebSocketResources_proto_depIdxs, - EnumInfos: file_signalpb_WebSocketResources_proto_enumTypes, - MessageInfos: file_signalpb_WebSocketResources_proto_msgTypes, + GoTypes: file_WebSocketResources_proto_goTypes, + DependencyIndexes: file_WebSocketResources_proto_depIdxs, + EnumInfos: file_WebSocketResources_proto_enumTypes, + MessageInfos: file_WebSocketResources_proto_msgTypes, }.Build() - File_signalpb_WebSocketResources_proto = out.File - file_signalpb_WebSocketResources_proto_goTypes = nil - file_signalpb_WebSocketResources_proto_depIdxs = nil + File_WebSocketResources_proto = out.File + file_WebSocketResources_proto_goTypes = nil + file_WebSocketResources_proto_depIdxs = nil } diff --git a/pkg/signalmeow/protobuf/signalpb/WebSocketResources.proto b/pkg/signalmeow/protobuf/WebSocketResources.proto similarity index 91% rename from pkg/signalmeow/protobuf/signalpb/WebSocketResources.proto rename to pkg/signalmeow/protobuf/WebSocketResources.proto index e230ad7..376f8b2 100644 --- a/pkg/signalmeow/protobuf/signalpb/WebSocketResources.proto +++ b/pkg/signalmeow/protobuf/WebSocketResources.proto @@ -7,7 +7,7 @@ syntax = "proto2"; package signalservice; -option java_package = "org.signal.network.websocket"; +option java_package = "org.whispersystems.signalservice.internal.websocket"; option java_outer_classname = "WebSocketProtos"; message WebSocketRequestMessage { diff --git a/pkg/signalmeow/protobuf/backuppb/Backup.pb.go b/pkg/signalmeow/protobuf/backuppb/Backup.pb.go index bcff3bd..73930ae 100644 --- a/pkg/signalmeow/protobuf/backuppb/Backup.pb.go +++ b/pkg/signalmeow/protobuf/backuppb/Backup.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 -// protoc v7.34.1 +// protoc v6.33.5 // source: backuppb/Backup.proto package backuppb @@ -482,55 +482,6 @@ func (AccountData_AutoDownloadSettings_AutoDownloadOption) EnumDescriptor() ([]b return file_backuppb_Backup_proto_rawDescGZIP(), []int{2, 1, 0} } -type AccountData_AccountSettings_UnreadBadgeType int32 - -const ( - AccountData_AccountSettings_UNKNOWN_BADGE_TYPE AccountData_AccountSettings_UnreadBadgeType = 0 // Interpret as "Unread messages" - AccountData_AccountSettings_UNREAD_MESSAGES AccountData_AccountSettings_UnreadBadgeType = 1 - AccountData_AccountSettings_UNREAD_CHATS AccountData_AccountSettings_UnreadBadgeType = 2 -) - -// Enum value maps for AccountData_AccountSettings_UnreadBadgeType. -var ( - AccountData_AccountSettings_UnreadBadgeType_name = map[int32]string{ - 0: "UNKNOWN_BADGE_TYPE", - 1: "UNREAD_MESSAGES", - 2: "UNREAD_CHATS", - } - AccountData_AccountSettings_UnreadBadgeType_value = map[string]int32{ - "UNKNOWN_BADGE_TYPE": 0, - "UNREAD_MESSAGES": 1, - "UNREAD_CHATS": 2, - } -) - -func (x AccountData_AccountSettings_UnreadBadgeType) Enum() *AccountData_AccountSettings_UnreadBadgeType { - p := new(AccountData_AccountSettings_UnreadBadgeType) - *p = x - return p -} - -func (x AccountData_AccountSettings_UnreadBadgeType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AccountData_AccountSettings_UnreadBadgeType) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[8].Descriptor() -} - -func (AccountData_AccountSettings_UnreadBadgeType) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[8] -} - -func (x AccountData_AccountSettings_UnreadBadgeType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AccountData_AccountSettings_UnreadBadgeType.Descriptor instead. -func (AccountData_AccountSettings_UnreadBadgeType) EnumDescriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{2, 2, 0} -} - type AccountData_AndroidSpecificSettings_NavigationBarSize int32 const ( @@ -564,11 +515,11 @@ func (x AccountData_AndroidSpecificSettings_NavigationBarSize) String() string { } func (AccountData_AndroidSpecificSettings_NavigationBarSize) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[9].Descriptor() + return file_backuppb_Backup_proto_enumTypes[8].Descriptor() } func (AccountData_AndroidSpecificSettings_NavigationBarSize) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[9] + return &file_backuppb_Backup_proto_enumTypes[8] } func (x AccountData_AndroidSpecificSettings_NavigationBarSize) Number() protoreflect.EnumNumber { @@ -613,11 +564,11 @@ func (x Contact_IdentityState) String() string { } func (Contact_IdentityState) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[10].Descriptor() + return file_backuppb_Backup_proto_enumTypes[9].Descriptor() } func (Contact_IdentityState) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[10] + return &file_backuppb_Backup_proto_enumTypes[9] } func (x Contact_IdentityState) Number() protoreflect.EnumNumber { @@ -662,11 +613,11 @@ func (x Contact_Visibility) String() string { } func (Contact_Visibility) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[11].Descriptor() + return file_backuppb_Backup_proto_enumTypes[10].Descriptor() } func (Contact_Visibility) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[11] + return &file_backuppb_Backup_proto_enumTypes[10] } func (x Contact_Visibility) Number() protoreflect.EnumNumber { @@ -711,11 +662,11 @@ func (x Group_StorySendMode) String() string { } func (Group_StorySendMode) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[12].Descriptor() + return file_backuppb_Backup_proto_enumTypes[11].Descriptor() } func (Group_StorySendMode) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[12] + return &file_backuppb_Backup_proto_enumTypes[11] } func (x Group_StorySendMode) Number() protoreflect.EnumNumber { @@ -760,11 +711,11 @@ func (x Group_Member_Role) String() string { } func (Group_Member_Role) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[13].Descriptor() + return file_backuppb_Backup_proto_enumTypes[12].Descriptor() } func (Group_Member_Role) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[13] + return &file_backuppb_Backup_proto_enumTypes[12] } func (x Group_Member_Role) Number() protoreflect.EnumNumber { @@ -815,11 +766,11 @@ func (x Group_AccessControl_AccessRequired) String() string { } func (Group_AccessControl_AccessRequired) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[14].Descriptor() + return file_backuppb_Backup_proto_enumTypes[13].Descriptor() } func (Group_AccessControl_AccessRequired) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[14] + return &file_backuppb_Backup_proto_enumTypes[13] } func (x Group_AccessControl_AccessRequired) Number() protoreflect.EnumNumber { @@ -864,11 +815,11 @@ func (x CallLink_Restrictions) String() string { } func (CallLink_Restrictions) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[15].Descriptor() + return file_backuppb_Backup_proto_enumTypes[14].Descriptor() } func (CallLink_Restrictions) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[15] + return &file_backuppb_Backup_proto_enumTypes[14] } func (x CallLink_Restrictions) Number() protoreflect.EnumNumber { @@ -910,11 +861,11 @@ func (x AdHocCall_State) String() string { } func (AdHocCall_State) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[16].Descriptor() + return file_backuppb_Backup_proto_enumTypes[15].Descriptor() } func (AdHocCall_State) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[16] + return &file_backuppb_Backup_proto_enumTypes[15] } func (x AdHocCall_State) Number() protoreflect.EnumNumber { @@ -962,11 +913,11 @@ func (x DistributionList_PrivacyMode) String() string { } func (DistributionList_PrivacyMode) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[17].Descriptor() + return file_backuppb_Backup_proto_enumTypes[16].Descriptor() } func (DistributionList_PrivacyMode) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[17] + return &file_backuppb_Backup_proto_enumTypes[16] } func (x DistributionList_PrivacyMode) Number() protoreflect.EnumNumber { @@ -1011,11 +962,11 @@ func (x SendStatus_Failed_FailureReason) String() string { } func (SendStatus_Failed_FailureReason) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[18].Descriptor() + return file_backuppb_Backup_proto_enumTypes[17].Descriptor() } func (SendStatus_Failed_FailureReason) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[18] + return &file_backuppb_Backup_proto_enumTypes[17] } func (x SendStatus_Failed_FailureReason) Number() protoreflect.EnumNumber { @@ -1060,11 +1011,11 @@ func (x PaymentNotification_TransactionDetails_FailedTransaction_FailureReason) } func (PaymentNotification_TransactionDetails_FailedTransaction_FailureReason) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[19].Descriptor() + return file_backuppb_Backup_proto_enumTypes[18].Descriptor() } func (PaymentNotification_TransactionDetails_FailedTransaction_FailureReason) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[19] + return &file_backuppb_Backup_proto_enumTypes[18] } func (x PaymentNotification_TransactionDetails_FailedTransaction_FailureReason) Number() protoreflect.EnumNumber { @@ -1109,11 +1060,11 @@ func (x PaymentNotification_TransactionDetails_Transaction_Status) String() stri } func (PaymentNotification_TransactionDetails_Transaction_Status) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[20].Descriptor() + return file_backuppb_Backup_proto_enumTypes[19].Descriptor() } func (PaymentNotification_TransactionDetails_Transaction_Status) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[20] + return &file_backuppb_Backup_proto_enumTypes[19] } func (x PaymentNotification_TransactionDetails_Transaction_Status) Number() protoreflect.EnumNumber { @@ -1161,11 +1112,11 @@ func (x GiftBadge_State) String() string { } func (GiftBadge_State) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[21].Descriptor() + return file_backuppb_Backup_proto_enumTypes[20].Descriptor() } func (GiftBadge_State) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[21] + return &file_backuppb_Backup_proto_enumTypes[20] } func (x GiftBadge_State) Number() protoreflect.EnumNumber { @@ -1216,11 +1167,11 @@ func (x ContactAttachment_Phone_Type) String() string { } func (ContactAttachment_Phone_Type) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[22].Descriptor() + return file_backuppb_Backup_proto_enumTypes[21].Descriptor() } func (ContactAttachment_Phone_Type) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[22] + return &file_backuppb_Backup_proto_enumTypes[21] } func (x ContactAttachment_Phone_Type) Number() protoreflect.EnumNumber { @@ -1271,11 +1222,11 @@ func (x ContactAttachment_Email_Type) String() string { } func (ContactAttachment_Email_Type) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[23].Descriptor() + return file_backuppb_Backup_proto_enumTypes[22].Descriptor() } func (ContactAttachment_Email_Type) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[23] + return &file_backuppb_Backup_proto_enumTypes[22] } func (x ContactAttachment_Email_Type) Number() protoreflect.EnumNumber { @@ -1323,11 +1274,11 @@ func (x ContactAttachment_PostalAddress_Type) String() string { } func (ContactAttachment_PostalAddress_Type) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[24].Descriptor() + return file_backuppb_Backup_proto_enumTypes[23].Descriptor() } func (ContactAttachment_PostalAddress_Type) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[24] + return &file_backuppb_Backup_proto_enumTypes[23] } func (x ContactAttachment_PostalAddress_Type) Number() protoreflect.EnumNumber { @@ -1378,11 +1329,11 @@ func (x MessageAttachment_Flag) String() string { } func (MessageAttachment_Flag) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[25].Descriptor() + return file_backuppb_Backup_proto_enumTypes[24].Descriptor() } func (MessageAttachment_Flag) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[25] + return &file_backuppb_Backup_proto_enumTypes[24] } func (x MessageAttachment_Flag) Number() protoreflect.EnumNumber { @@ -1433,11 +1384,11 @@ func (x Quote_Type) String() string { } func (Quote_Type) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[26].Descriptor() + return file_backuppb_Backup_proto_enumTypes[25].Descriptor() } func (Quote_Type) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[26] + return &file_backuppb_Backup_proto_enumTypes[25] } func (x Quote_Type) Number() protoreflect.EnumNumber { @@ -1491,11 +1442,11 @@ func (x BodyRange_Style) String() string { } func (BodyRange_Style) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[27].Descriptor() + return file_backuppb_Backup_proto_enumTypes[26].Descriptor() } func (BodyRange_Style) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[27] + return &file_backuppb_Backup_proto_enumTypes[26] } func (x BodyRange_Style) Number() protoreflect.EnumNumber { @@ -1540,11 +1491,11 @@ func (x IndividualCall_Type) String() string { } func (IndividualCall_Type) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[28].Descriptor() + return file_backuppb_Backup_proto_enumTypes[27].Descriptor() } func (IndividualCall_Type) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[28] + return &file_backuppb_Backup_proto_enumTypes[27] } func (x IndividualCall_Type) Number() protoreflect.EnumNumber { @@ -1553,7 +1504,7 @@ func (x IndividualCall_Type) Number() protoreflect.EnumNumber { // Deprecated: Use IndividualCall_Type.Descriptor instead. func (IndividualCall_Type) EnumDescriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{35, 0} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{34, 0} } type IndividualCall_Direction int32 @@ -1589,11 +1540,11 @@ func (x IndividualCall_Direction) String() string { } func (IndividualCall_Direction) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[29].Descriptor() + return file_backuppb_Backup_proto_enumTypes[28].Descriptor() } func (IndividualCall_Direction) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[29] + return &file_backuppb_Backup_proto_enumTypes[28] } func (x IndividualCall_Direction) Number() protoreflect.EnumNumber { @@ -1602,7 +1553,7 @@ func (x IndividualCall_Direction) Number() protoreflect.EnumNumber { // Deprecated: Use IndividualCall_Direction.Descriptor instead. func (IndividualCall_Direction) EnumDescriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{35, 1} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{34, 1} } type IndividualCall_State int32 @@ -1648,11 +1599,11 @@ func (x IndividualCall_State) String() string { } func (IndividualCall_State) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[30].Descriptor() + return file_backuppb_Backup_proto_enumTypes[29].Descriptor() } func (IndividualCall_State) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[30] + return &file_backuppb_Backup_proto_enumTypes[29] } func (x IndividualCall_State) Number() protoreflect.EnumNumber { @@ -1661,7 +1612,7 @@ func (x IndividualCall_State) Number() protoreflect.EnumNumber { // Deprecated: Use IndividualCall_State.Descriptor instead. func (IndividualCall_State) EnumDescriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{35, 2} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{34, 2} } type GroupCall_State int32 @@ -1724,11 +1675,11 @@ func (x GroupCall_State) String() string { } func (GroupCall_State) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[31].Descriptor() + return file_backuppb_Backup_proto_enumTypes[30].Descriptor() } func (GroupCall_State) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[31] + return &file_backuppb_Backup_proto_enumTypes[30] } func (x GroupCall_State) Number() protoreflect.EnumNumber { @@ -1737,7 +1688,7 @@ func (x GroupCall_State) Number() protoreflect.EnumNumber { // Deprecated: Use GroupCall_State.Descriptor instead. func (GroupCall_State) EnumDescriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{36, 0} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{35, 0} } type SimpleChatUpdate_Type int32 @@ -1815,11 +1766,11 @@ func (x SimpleChatUpdate_Type) String() string { } func (SimpleChatUpdate_Type) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[32].Descriptor() + return file_backuppb_Backup_proto_enumTypes[31].Descriptor() } func (SimpleChatUpdate_Type) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[32] + return &file_backuppb_Backup_proto_enumTypes[31] } func (x SimpleChatUpdate_Type) Number() protoreflect.EnumNumber { @@ -1828,7 +1779,7 @@ func (x SimpleChatUpdate_Type) Number() protoreflect.EnumNumber { // Deprecated: Use SimpleChatUpdate_Type.Descriptor instead. func (SimpleChatUpdate_Type) EnumDescriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{37, 0} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{36, 0} } type ChatStyle_WallpaperPreset int32 @@ -1921,11 +1872,11 @@ func (x ChatStyle_WallpaperPreset) String() string { } func (ChatStyle_WallpaperPreset) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[33].Descriptor() + return file_backuppb_Backup_proto_enumTypes[32].Descriptor() } func (ChatStyle_WallpaperPreset) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[33] + return &file_backuppb_Backup_proto_enumTypes[32] } func (x ChatStyle_WallpaperPreset) Number() protoreflect.EnumNumber { @@ -1934,7 +1885,7 @@ func (x ChatStyle_WallpaperPreset) Number() protoreflect.EnumNumber { // Deprecated: Use ChatStyle_WallpaperPreset.Descriptor instead. func (ChatStyle_WallpaperPreset) EnumDescriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{83, 0} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{80, 0} } type ChatStyle_BubbleColorPreset int32 @@ -2030,11 +1981,11 @@ func (x ChatStyle_BubbleColorPreset) String() string { } func (ChatStyle_BubbleColorPreset) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[34].Descriptor() + return file_backuppb_Backup_proto_enumTypes[33].Descriptor() } func (ChatStyle_BubbleColorPreset) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[34] + return &file_backuppb_Backup_proto_enumTypes[33] } func (x ChatStyle_BubbleColorPreset) Number() protoreflect.EnumNumber { @@ -2043,7 +1994,7 @@ func (x ChatStyle_BubbleColorPreset) Number() protoreflect.EnumNumber { // Deprecated: Use ChatStyle_BubbleColorPreset.Descriptor instead. func (ChatStyle_BubbleColorPreset) EnumDescriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{83, 1} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{80, 1} } type NotificationProfile_DayOfWeek int32 @@ -2094,11 +2045,11 @@ func (x NotificationProfile_DayOfWeek) String() string { } func (NotificationProfile_DayOfWeek) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[35].Descriptor() + return file_backuppb_Backup_proto_enumTypes[34].Descriptor() } func (NotificationProfile_DayOfWeek) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[35] + return &file_backuppb_Backup_proto_enumTypes[34] } func (x NotificationProfile_DayOfWeek) Number() protoreflect.EnumNumber { @@ -2107,7 +2058,7 @@ func (x NotificationProfile_DayOfWeek) Number() protoreflect.EnumNumber { // Deprecated: Use NotificationProfile_DayOfWeek.Descriptor instead. func (NotificationProfile_DayOfWeek) EnumDescriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{84, 0} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{81, 0} } // Represents the default "All chats" folder record vs all other custom folders @@ -2144,11 +2095,11 @@ func (x ChatFolder_FolderType) String() string { } func (ChatFolder_FolderType) Descriptor() protoreflect.EnumDescriptor { - return file_backuppb_Backup_proto_enumTypes[36].Descriptor() + return file_backuppb_Backup_proto_enumTypes[35].Descriptor() } func (ChatFolder_FolderType) Type() protoreflect.EnumType { - return &file_backuppb_Backup_proto_enumTypes[36] + return &file_backuppb_Backup_proto_enumTypes[35] } func (x ChatFolder_FolderType) Number() protoreflect.EnumNumber { @@ -2157,7 +2108,7 @@ func (x ChatFolder_FolderType) Number() protoreflect.EnumNumber { // Deprecated: Use ChatFolder_FolderType.Descriptor instead. func (ChatFolder_FolderType) EnumDescriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{85, 0} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{82, 0} } type BackupInfo struct { @@ -2455,6 +2406,7 @@ type AccountData struct { AndroidSpecificSettings *AccountData_AndroidSpecificSettings `protobuf:"bytes,12,opt,name=androidSpecificSettings,proto3" json:"androidSpecificSettings,omitempty"` BioText string `protobuf:"bytes,13,opt,name=bioText,proto3" json:"bioText,omitempty"` BioEmoji string `protobuf:"bytes,14,opt,name=bioEmoji,proto3" json:"bioEmoji,omitempty"` + KeyTransparencyData []byte `protobuf:"bytes,15,opt,name=keyTransparencyData,proto3,oneof" json:"keyTransparencyData,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2580,6 +2532,13 @@ func (x *AccountData) GetBioEmoji() string { return "" } +func (x *AccountData) GetKeyTransparencyData() []byte { + if x != nil { + return x.KeyTransparencyData + } + return nil +} + type Recipient struct { state protoimpl.MessageState `protogen:"open.v1"` Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // generated id for reference only within this file @@ -2765,7 +2724,6 @@ type Contact struct { SystemNickname string `protobuf:"bytes,20,opt,name=systemNickname,proto3" json:"systemNickname,omitempty"` AvatarColor *AvatarColor `protobuf:"varint,21,opt,name=avatarColor,proto3,enum=signal.backup.AvatarColor,oneof" json:"avatarColor,omitempty"` KeyTransparencyData []byte `protobuf:"bytes,22,opt,name=keyTransparencyData,proto3,oneof" json:"keyTransparencyData,omitempty"` - BlockedAtTimestamp uint64 `protobuf:"varint,23,opt,name=blockedAtTimestamp,proto3" json:"blockedAtTimestamp,omitempty"` // if `blocked` is true, 0 means unknown block time unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2965,13 +2923,6 @@ func (x *Contact) GetKeyTransparencyData() []byte { return nil } -func (x *Contact) GetBlockedAtTimestamp() uint64 { - if x != nil { - return x.BlockedAtTimestamp - } - return 0 -} - type isContact_Registration interface { isContact_Registration() } @@ -2989,17 +2940,16 @@ func (*Contact_Registered_) isContact_Registration() {} func (*Contact_NotRegistered_) isContact_Registration() {} type Group struct { - state protoimpl.MessageState `protogen:"open.v1"` - MasterKey []byte `protobuf:"bytes,1,opt,name=masterKey,proto3" json:"masterKey,omitempty"` - Whitelisted bool `protobuf:"varint,2,opt,name=whitelisted,proto3" json:"whitelisted,omitempty"` - HideStory bool `protobuf:"varint,3,opt,name=hideStory,proto3" json:"hideStory,omitempty"` - StorySendMode Group_StorySendMode `protobuf:"varint,4,opt,name=storySendMode,proto3,enum=signal.backup.Group_StorySendMode" json:"storySendMode,omitempty"` - Snapshot *Group_GroupSnapshot `protobuf:"bytes,5,opt,name=snapshot,proto3" json:"snapshot,omitempty"` - Blocked bool `protobuf:"varint,6,opt,name=blocked,proto3" json:"blocked,omitempty"` - AvatarColor *AvatarColor `protobuf:"varint,7,opt,name=avatarColor,proto3,enum=signal.backup.AvatarColor,oneof" json:"avatarColor,omitempty"` - BlockedAtTimestamp uint64 `protobuf:"varint,8,opt,name=blockedAtTimestamp,proto3" json:"blockedAtTimestamp,omitempty"` // if `blocked` is true, 0 means unknown block time - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + MasterKey []byte `protobuf:"bytes,1,opt,name=masterKey,proto3" json:"masterKey,omitempty"` + Whitelisted bool `protobuf:"varint,2,opt,name=whitelisted,proto3" json:"whitelisted,omitempty"` + HideStory bool `protobuf:"varint,3,opt,name=hideStory,proto3" json:"hideStory,omitempty"` + StorySendMode Group_StorySendMode `protobuf:"varint,4,opt,name=storySendMode,proto3,enum=signal.backup.Group_StorySendMode" json:"storySendMode,omitempty"` + Snapshot *Group_GroupSnapshot `protobuf:"bytes,5,opt,name=snapshot,proto3" json:"snapshot,omitempty"` + Blocked bool `protobuf:"varint,6,opt,name=blocked,proto3" json:"blocked,omitempty"` + AvatarColor *AvatarColor `protobuf:"varint,7,opt,name=avatarColor,proto3,enum=signal.backup.AvatarColor,oneof" json:"avatarColor,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Group) Reset() { @@ -3081,13 +3031,6 @@ func (x *Group) GetAvatarColor() AvatarColor { return AvatarColor_A100 } -func (x *Group) GetBlockedAtTimestamp() uint64 { - if x != nil { - return x.BlockedAtTimestamp - } - return 0 -} - type Self struct { state protoimpl.MessageState `protogen:"open.v1"` AvatarColor *AvatarColor `protobuf:"varint,1,opt,name=avatarColor,proto3,enum=signal.backup.AvatarColor,oneof" json:"avatarColor,omitempty"` @@ -3177,13 +3120,9 @@ type Chat struct { ExpirationTimerMs *uint64 `protobuf:"varint,5,opt,name=expirationTimerMs,proto3,oneof" json:"expirationTimerMs,omitempty"` MuteUntilMs *uint64 `protobuf:"varint,6,opt,name=muteUntilMs,proto3,oneof" json:"muteUntilMs,omitempty"` // INT64_MAX (2^63 - 1) = "always muted". MarkedUnread bool `protobuf:"varint,7,opt,name=markedUnread,proto3" json:"markedUnread,omitempty"` - DontNotifyForMentionsIfMuted bool `protobuf:"varint,8,opt,name=dontNotifyForMentionsIfMuted,proto3" json:"dontNotifyForMentionsIfMuted,omitempty"` // will be deprecated in favor of [notifyForMentionsIfMuted] + DontNotifyForMentionsIfMuted bool `protobuf:"varint,8,opt,name=dontNotifyForMentionsIfMuted,proto3" json:"dontNotifyForMentionsIfMuted,omitempty"` Style *ChatStyle `protobuf:"bytes,9,opt,name=style,proto3" json:"style,omitempty"` ExpireTimerVersion uint32 `protobuf:"varint,10,opt,name=expireTimerVersion,proto3" json:"expireTimerVersion,omitempty"` - NotifyForCallsIfMuted *bool `protobuf:"varint,11,opt,name=notifyForCallsIfMuted,proto3,oneof" json:"notifyForCallsIfMuted,omitempty"` // If unset, use default global settings - NotifyForMentionsIfMuted *bool `protobuf:"varint,12,opt,name=notifyForMentionsIfMuted,proto3,oneof" json:"notifyForMentionsIfMuted,omitempty"` // If unset, use default global settings. Only for groups. If [dontNotifyForMentionsIfMuted] is true, this should be initialized to false. - NotifyForRepliesIfMuted *bool `protobuf:"varint,13,opt,name=notifyForRepliesIfMuted,proto3,oneof" json:"notifyForRepliesIfMuted,omitempty"` // If unset, use default global settings. Only for groups. - ShowUnreadReminders *bool `protobuf:"varint,14,opt,name=showUnreadReminders,proto3,oneof" json:"showUnreadReminders,omitempty"` // If unset, use default global settings unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -3288,34 +3227,6 @@ func (x *Chat) GetExpireTimerVersion() uint32 { return 0 } -func (x *Chat) GetNotifyForCallsIfMuted() bool { - if x != nil && x.NotifyForCallsIfMuted != nil { - return *x.NotifyForCallsIfMuted - } - return false -} - -func (x *Chat) GetNotifyForMentionsIfMuted() bool { - if x != nil && x.NotifyForMentionsIfMuted != nil { - return *x.NotifyForMentionsIfMuted - } - return false -} - -func (x *Chat) GetNotifyForRepliesIfMuted() bool { - if x != nil && x.NotifyForRepliesIfMuted != nil { - return *x.NotifyForRepliesIfMuted - } - return false -} - -func (x *Chat) GetShowUnreadReminders() bool { - if x != nil && x.ShowUnreadReminders != nil { - return *x.ShowUnreadReminders - } - return false -} - // * // Call Links have some associated data including a call, but unlike other recipients // are not tied to threads because they do not have messages associated with them. @@ -3330,6 +3241,7 @@ type CallLink struct { Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Restrictions CallLink_Restrictions `protobuf:"varint,4,opt,name=restrictions,proto3,enum=signal.backup.CallLink_Restrictions" json:"restrictions,omitempty"` ExpirationMs uint64 `protobuf:"varint,5,opt,name=expirationMs,proto3" json:"expirationMs,omitempty"` + Epoch []byte `protobuf:"bytes,6,opt,name=epoch,proto3,oneof" json:"epoch,omitempty"` // May be absent/empty for older links unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -3399,6 +3311,13 @@ func (x *CallLink) GetExpirationMs() uint64 { return 0 } +func (x *CallLink) GetEpoch() []byte { + if x != nil { + return x.Epoch + } + return nil +} + type AdHocCall struct { state protoimpl.MessageState `protogen:"open.v1"` CallId uint64 `protobuf:"varint,1,opt,name=callId,proto3" json:"callId,omitempty"` @@ -3661,7 +3580,6 @@ type ChatItem struct { // *ChatItem_ViewOnceMessage // *ChatItem_DirectStoryReplyMessage // *ChatItem_Poll - // *ChatItem_AdminDeletedMessage Item isChatItem_Item `protobuf_oneof:"item"` PinDetails *ChatItem_PinDetails `protobuf:"bytes,21,opt,name=pinDetails,proto3" json:"pinDetails,omitempty"` // only set if message is pinned unknownFields protoimpl.UnknownFields @@ -3878,15 +3796,6 @@ func (x *ChatItem) GetPoll() *Poll { return nil } -func (x *ChatItem) GetAdminDeletedMessage() *AdminDeletedMessage { - if x != nil { - if x, ok := x.Item.(*ChatItem_AdminDeletedMessage); ok { - return x.AdminDeletedMessage - } - } - return nil -} - func (x *ChatItem) GetPinDetails() *ChatItem_PinDetails { if x != nil { return x.PinDetails @@ -3960,10 +3869,6 @@ type ChatItem_Poll struct { Poll *Poll `protobuf:"bytes,20,opt,name=poll,proto3,oneof"` } -type ChatItem_AdminDeletedMessage struct { - AdminDeletedMessage *AdminDeletedMessage `protobuf:"bytes,22,opt,name=adminDeletedMessage,proto3,oneof"` -} - func (*ChatItem_StandardMessage) isChatItem_Item() {} func (*ChatItem_ContactMessage) isChatItem_Item() {} @@ -3984,8 +3889,6 @@ func (*ChatItem_DirectStoryReplyMessage) isChatItem_Item() {} func (*ChatItem_Poll) isChatItem_Item() {} -func (*ChatItem_AdminDeletedMessage) isChatItem_Item() {} - type SendStatus struct { state protoimpl.MessageState `protogen:"open.v1"` RecipientId uint64 `protobuf:"varint,1,opt,name=recipientId,proto3" json:"recipientId,omitempty"` @@ -5452,50 +5355,6 @@ func (x *Poll) GetReactions() []*Reaction { return nil } -type AdminDeletedMessage struct { - state protoimpl.MessageState `protogen:"open.v1"` - AdminId uint64 `protobuf:"varint,1,opt,name=adminId,proto3" json:"adminId,omitempty"` // id of the admin that deleted the message - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AdminDeletedMessage) Reset() { - *x = AdminDeletedMessage{} - mi := &file_backuppb_Backup_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AdminDeletedMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AdminDeletedMessage) ProtoMessage() {} - -func (x *AdminDeletedMessage) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[33] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AdminDeletedMessage.ProtoReflect.Descriptor instead. -func (*AdminDeletedMessage) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{33} -} - -func (x *AdminDeletedMessage) GetAdminId() uint64 { - if x != nil { - return x.AdminId - } - return 0 -} - type ChatUpdateMessage struct { state protoimpl.MessageState `protogen:"open.v1"` // If unset, importers should ignore the update message without throwing an error. @@ -5520,7 +5379,7 @@ type ChatUpdateMessage struct { func (x *ChatUpdateMessage) Reset() { *x = ChatUpdateMessage{} - mi := &file_backuppb_Backup_proto_msgTypes[34] + mi := &file_backuppb_Backup_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5532,7 +5391,7 @@ func (x *ChatUpdateMessage) String() string { func (*ChatUpdateMessage) ProtoMessage() {} func (x *ChatUpdateMessage) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[34] + mi := &file_backuppb_Backup_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5545,7 +5404,7 @@ func (x *ChatUpdateMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ChatUpdateMessage.ProtoReflect.Descriptor instead. func (*ChatUpdateMessage) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{34} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{33} } func (x *ChatUpdateMessage) GetUpdate() isChatUpdateMessage_Update { @@ -5738,7 +5597,7 @@ type IndividualCall struct { func (x *IndividualCall) Reset() { *x = IndividualCall{} - mi := &file_backuppb_Backup_proto_msgTypes[35] + mi := &file_backuppb_Backup_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5750,7 +5609,7 @@ func (x *IndividualCall) String() string { func (*IndividualCall) ProtoMessage() {} func (x *IndividualCall) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[35] + mi := &file_backuppb_Backup_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5763,7 +5622,7 @@ func (x *IndividualCall) ProtoReflect() protoreflect.Message { // Deprecated: Use IndividualCall.ProtoReflect.Descriptor instead. func (*IndividualCall) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{35} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{34} } func (x *IndividualCall) GetCallId() uint64 { @@ -5823,7 +5682,7 @@ type GroupCall struct { func (x *GroupCall) Reset() { *x = GroupCall{} - mi := &file_backuppb_Backup_proto_msgTypes[36] + mi := &file_backuppb_Backup_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5835,7 +5694,7 @@ func (x *GroupCall) String() string { func (*GroupCall) ProtoMessage() {} func (x *GroupCall) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[36] + mi := &file_backuppb_Backup_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5848,7 +5707,7 @@ func (x *GroupCall) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupCall.ProtoReflect.Descriptor instead. func (*GroupCall) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{36} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{35} } func (x *GroupCall) GetCallId() uint64 { @@ -5909,7 +5768,7 @@ type SimpleChatUpdate struct { func (x *SimpleChatUpdate) Reset() { *x = SimpleChatUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[37] + mi := &file_backuppb_Backup_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5921,7 +5780,7 @@ func (x *SimpleChatUpdate) String() string { func (*SimpleChatUpdate) ProtoMessage() {} func (x *SimpleChatUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[37] + mi := &file_backuppb_Backup_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5934,7 +5793,7 @@ func (x *SimpleChatUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use SimpleChatUpdate.ProtoReflect.Descriptor instead. func (*SimpleChatUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{37} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{36} } func (x *SimpleChatUpdate) GetType() SimpleChatUpdate_Type { @@ -5955,7 +5814,7 @@ type ExpirationTimerChatUpdate struct { func (x *ExpirationTimerChatUpdate) Reset() { *x = ExpirationTimerChatUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[38] + mi := &file_backuppb_Backup_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5967,7 +5826,7 @@ func (x *ExpirationTimerChatUpdate) String() string { func (*ExpirationTimerChatUpdate) ProtoMessage() {} func (x *ExpirationTimerChatUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[38] + mi := &file_backuppb_Backup_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5980,7 +5839,7 @@ func (x *ExpirationTimerChatUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use ExpirationTimerChatUpdate.ProtoReflect.Descriptor instead. func (*ExpirationTimerChatUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{38} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{37} } func (x *ExpirationTimerChatUpdate) GetExpiresInMs() uint64 { @@ -6000,7 +5859,7 @@ type ProfileChangeChatUpdate struct { func (x *ProfileChangeChatUpdate) Reset() { *x = ProfileChangeChatUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[39] + mi := &file_backuppb_Backup_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6012,7 +5871,7 @@ func (x *ProfileChangeChatUpdate) String() string { func (*ProfileChangeChatUpdate) ProtoMessage() {} func (x *ProfileChangeChatUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[39] + mi := &file_backuppb_Backup_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6025,7 +5884,7 @@ func (x *ProfileChangeChatUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use ProfileChangeChatUpdate.ProtoReflect.Descriptor instead. func (*ProfileChangeChatUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{39} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{38} } func (x *ProfileChangeChatUpdate) GetPreviousName() string { @@ -6057,7 +5916,7 @@ type LearnedProfileChatUpdate struct { func (x *LearnedProfileChatUpdate) Reset() { *x = LearnedProfileChatUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[40] + mi := &file_backuppb_Backup_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6069,7 +5928,7 @@ func (x *LearnedProfileChatUpdate) String() string { func (*LearnedProfileChatUpdate) ProtoMessage() {} func (x *LearnedProfileChatUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[40] + mi := &file_backuppb_Backup_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6082,7 +5941,7 @@ func (x *LearnedProfileChatUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use LearnedProfileChatUpdate.ProtoReflect.Descriptor instead. func (*LearnedProfileChatUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{40} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{39} } func (x *LearnedProfileChatUpdate) GetPreviousName() isLearnedProfileChatUpdate_PreviousName { @@ -6135,7 +5994,7 @@ type ThreadMergeChatUpdate struct { func (x *ThreadMergeChatUpdate) Reset() { *x = ThreadMergeChatUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[41] + mi := &file_backuppb_Backup_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6147,7 +6006,7 @@ func (x *ThreadMergeChatUpdate) String() string { func (*ThreadMergeChatUpdate) ProtoMessage() {} func (x *ThreadMergeChatUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[41] + mi := &file_backuppb_Backup_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6160,7 +6019,7 @@ func (x *ThreadMergeChatUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use ThreadMergeChatUpdate.ProtoReflect.Descriptor instead. func (*ThreadMergeChatUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{41} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{40} } func (x *ThreadMergeChatUpdate) GetPreviousE164() uint64 { @@ -6179,7 +6038,7 @@ type SessionSwitchoverChatUpdate struct { func (x *SessionSwitchoverChatUpdate) Reset() { *x = SessionSwitchoverChatUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[42] + mi := &file_backuppb_Backup_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6191,7 +6050,7 @@ func (x *SessionSwitchoverChatUpdate) String() string { func (*SessionSwitchoverChatUpdate) ProtoMessage() {} func (x *SessionSwitchoverChatUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[42] + mi := &file_backuppb_Backup_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6204,7 +6063,7 @@ func (x *SessionSwitchoverChatUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use SessionSwitchoverChatUpdate.ProtoReflect.Descriptor instead. func (*SessionSwitchoverChatUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{42} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{41} } func (x *SessionSwitchoverChatUpdate) GetE164() uint64 { @@ -6225,7 +6084,7 @@ type GroupChangeChatUpdate struct { func (x *GroupChangeChatUpdate) Reset() { *x = GroupChangeChatUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[43] + mi := &file_backuppb_Backup_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6237,7 +6096,7 @@ func (x *GroupChangeChatUpdate) String() string { func (*GroupChangeChatUpdate) ProtoMessage() {} func (x *GroupChangeChatUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[43] + mi := &file_backuppb_Backup_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6250,7 +6109,7 @@ func (x *GroupChangeChatUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupChangeChatUpdate.ProtoReflect.Descriptor instead. func (*GroupChangeChatUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{43} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{42} } func (x *GroupChangeChatUpdate) GetUpdates() []*GroupChangeChatUpdate_Update { @@ -6269,7 +6128,7 @@ type GenericGroupUpdate struct { func (x *GenericGroupUpdate) Reset() { *x = GenericGroupUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[44] + mi := &file_backuppb_Backup_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6281,7 +6140,7 @@ func (x *GenericGroupUpdate) String() string { func (*GenericGroupUpdate) ProtoMessage() {} func (x *GenericGroupUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[44] + mi := &file_backuppb_Backup_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6294,7 +6153,7 @@ func (x *GenericGroupUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GenericGroupUpdate.ProtoReflect.Descriptor instead. func (*GenericGroupUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{44} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{43} } func (x *GenericGroupUpdate) GetUpdaterAci() []byte { @@ -6313,7 +6172,7 @@ type GroupCreationUpdate struct { func (x *GroupCreationUpdate) Reset() { *x = GroupCreationUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[45] + mi := &file_backuppb_Backup_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6325,7 +6184,7 @@ func (x *GroupCreationUpdate) String() string { func (*GroupCreationUpdate) ProtoMessage() {} func (x *GroupCreationUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[45] + mi := &file_backuppb_Backup_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6338,7 +6197,7 @@ func (x *GroupCreationUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupCreationUpdate.ProtoReflect.Descriptor instead. func (*GroupCreationUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{45} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{44} } func (x *GroupCreationUpdate) GetUpdaterAci() []byte { @@ -6359,7 +6218,7 @@ type GroupNameUpdate struct { func (x *GroupNameUpdate) Reset() { *x = GroupNameUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[46] + mi := &file_backuppb_Backup_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6371,7 +6230,7 @@ func (x *GroupNameUpdate) String() string { func (*GroupNameUpdate) ProtoMessage() {} func (x *GroupNameUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[46] + mi := &file_backuppb_Backup_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6384,7 +6243,7 @@ func (x *GroupNameUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupNameUpdate.ProtoReflect.Descriptor instead. func (*GroupNameUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{46} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{45} } func (x *GroupNameUpdate) GetUpdaterAci() []byte { @@ -6411,7 +6270,7 @@ type GroupAvatarUpdate struct { func (x *GroupAvatarUpdate) Reset() { *x = GroupAvatarUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[47] + mi := &file_backuppb_Backup_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6423,7 +6282,7 @@ func (x *GroupAvatarUpdate) String() string { func (*GroupAvatarUpdate) ProtoMessage() {} func (x *GroupAvatarUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[47] + mi := &file_backuppb_Backup_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6436,7 +6295,7 @@ func (x *GroupAvatarUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupAvatarUpdate.ProtoReflect.Descriptor instead. func (*GroupAvatarUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{47} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{46} } func (x *GroupAvatarUpdate) GetUpdaterAci() []byte { @@ -6464,7 +6323,7 @@ type GroupDescriptionUpdate struct { func (x *GroupDescriptionUpdate) Reset() { *x = GroupDescriptionUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[48] + mi := &file_backuppb_Backup_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6476,7 +6335,7 @@ func (x *GroupDescriptionUpdate) String() string { func (*GroupDescriptionUpdate) ProtoMessage() {} func (x *GroupDescriptionUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[48] + mi := &file_backuppb_Backup_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6489,7 +6348,7 @@ func (x *GroupDescriptionUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupDescriptionUpdate.ProtoReflect.Descriptor instead. func (*GroupDescriptionUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{48} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{47} } func (x *GroupDescriptionUpdate) GetUpdaterAci() []byte { @@ -6516,7 +6375,7 @@ type GroupMembershipAccessLevelChangeUpdate struct { func (x *GroupMembershipAccessLevelChangeUpdate) Reset() { *x = GroupMembershipAccessLevelChangeUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[49] + mi := &file_backuppb_Backup_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6528,7 +6387,7 @@ func (x *GroupMembershipAccessLevelChangeUpdate) String() string { func (*GroupMembershipAccessLevelChangeUpdate) ProtoMessage() {} func (x *GroupMembershipAccessLevelChangeUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[49] + mi := &file_backuppb_Backup_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6541,7 +6400,7 @@ func (x *GroupMembershipAccessLevelChangeUpdate) ProtoReflect() protoreflect.Mes // Deprecated: Use GroupMembershipAccessLevelChangeUpdate.ProtoReflect.Descriptor instead. func (*GroupMembershipAccessLevelChangeUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{49} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{48} } func (x *GroupMembershipAccessLevelChangeUpdate) GetUpdaterAci() []byte { @@ -6568,7 +6427,7 @@ type GroupAttributesAccessLevelChangeUpdate struct { func (x *GroupAttributesAccessLevelChangeUpdate) Reset() { *x = GroupAttributesAccessLevelChangeUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[50] + mi := &file_backuppb_Backup_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6580,7 +6439,7 @@ func (x *GroupAttributesAccessLevelChangeUpdate) String() string { func (*GroupAttributesAccessLevelChangeUpdate) ProtoMessage() {} func (x *GroupAttributesAccessLevelChangeUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[50] + mi := &file_backuppb_Backup_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6593,7 +6452,7 @@ func (x *GroupAttributesAccessLevelChangeUpdate) ProtoReflect() protoreflect.Mes // Deprecated: Use GroupAttributesAccessLevelChangeUpdate.ProtoReflect.Descriptor instead. func (*GroupAttributesAccessLevelChangeUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{50} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{49} } func (x *GroupAttributesAccessLevelChangeUpdate) GetUpdaterAci() []byte { @@ -6610,102 +6469,6 @@ func (x *GroupAttributesAccessLevelChangeUpdate) GetAccessLevel() GroupV2AccessL return GroupV2AccessLevel_UNKNOWN } -type GroupMemberLabelAccessLevelChangeUpdate struct { - state protoimpl.MessageState `protogen:"open.v1"` - UpdaterAci []byte `protobuf:"bytes,1,opt,name=updaterAci,proto3,oneof" json:"updaterAci,omitempty"` - AccessLevel GroupV2AccessLevel `protobuf:"varint,2,opt,name=accessLevel,proto3,enum=signal.backup.GroupV2AccessLevel" json:"accessLevel,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GroupMemberLabelAccessLevelChangeUpdate) Reset() { - *x = GroupMemberLabelAccessLevelChangeUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GroupMemberLabelAccessLevelChangeUpdate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupMemberLabelAccessLevelChangeUpdate) ProtoMessage() {} - -func (x *GroupMemberLabelAccessLevelChangeUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[51] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GroupMemberLabelAccessLevelChangeUpdate.ProtoReflect.Descriptor instead. -func (*GroupMemberLabelAccessLevelChangeUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{51} -} - -func (x *GroupMemberLabelAccessLevelChangeUpdate) GetUpdaterAci() []byte { - if x != nil { - return x.UpdaterAci - } - return nil -} - -func (x *GroupMemberLabelAccessLevelChangeUpdate) GetAccessLevel() GroupV2AccessLevel { - if x != nil { - return x.AccessLevel - } - return GroupV2AccessLevel_UNKNOWN -} - -type GroupTerminateChangeUpdate struct { - state protoimpl.MessageState `protogen:"open.v1"` - UpdaterAci []byte `protobuf:"bytes,1,opt,name=updaterAci,proto3,oneof" json:"updaterAci,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GroupTerminateChangeUpdate) Reset() { - *x = GroupTerminateChangeUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GroupTerminateChangeUpdate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupTerminateChangeUpdate) ProtoMessage() {} - -func (x *GroupTerminateChangeUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[52] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GroupTerminateChangeUpdate.ProtoReflect.Descriptor instead. -func (*GroupTerminateChangeUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{52} -} - -func (x *GroupTerminateChangeUpdate) GetUpdaterAci() []byte { - if x != nil { - return x.UpdaterAci - } - return nil -} - type GroupAnnouncementOnlyChangeUpdate struct { state protoimpl.MessageState `protogen:"open.v1"` UpdaterAci []byte `protobuf:"bytes,1,opt,name=updaterAci,proto3,oneof" json:"updaterAci,omitempty"` @@ -6716,7 +6479,7 @@ type GroupAnnouncementOnlyChangeUpdate struct { func (x *GroupAnnouncementOnlyChangeUpdate) Reset() { *x = GroupAnnouncementOnlyChangeUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[53] + mi := &file_backuppb_Backup_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6728,7 +6491,7 @@ func (x *GroupAnnouncementOnlyChangeUpdate) String() string { func (*GroupAnnouncementOnlyChangeUpdate) ProtoMessage() {} func (x *GroupAnnouncementOnlyChangeUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[53] + mi := &file_backuppb_Backup_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6741,7 +6504,7 @@ func (x *GroupAnnouncementOnlyChangeUpdate) ProtoReflect() protoreflect.Message // Deprecated: Use GroupAnnouncementOnlyChangeUpdate.ProtoReflect.Descriptor instead. func (*GroupAnnouncementOnlyChangeUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{53} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{50} } func (x *GroupAnnouncementOnlyChangeUpdate) GetUpdaterAci() []byte { @@ -6770,7 +6533,7 @@ type GroupAdminStatusUpdate struct { func (x *GroupAdminStatusUpdate) Reset() { *x = GroupAdminStatusUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[54] + mi := &file_backuppb_Backup_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6782,7 +6545,7 @@ func (x *GroupAdminStatusUpdate) String() string { func (*GroupAdminStatusUpdate) ProtoMessage() {} func (x *GroupAdminStatusUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[54] + mi := &file_backuppb_Backup_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6795,7 +6558,7 @@ func (x *GroupAdminStatusUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupAdminStatusUpdate.ProtoReflect.Descriptor instead. func (*GroupAdminStatusUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{54} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{51} } func (x *GroupAdminStatusUpdate) GetUpdaterAci() []byte { @@ -6828,7 +6591,7 @@ type GroupMemberLeftUpdate struct { func (x *GroupMemberLeftUpdate) Reset() { *x = GroupMemberLeftUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[55] + mi := &file_backuppb_Backup_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6840,7 +6603,7 @@ func (x *GroupMemberLeftUpdate) String() string { func (*GroupMemberLeftUpdate) ProtoMessage() {} func (x *GroupMemberLeftUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[55] + mi := &file_backuppb_Backup_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6853,7 +6616,7 @@ func (x *GroupMemberLeftUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupMemberLeftUpdate.ProtoReflect.Descriptor instead. func (*GroupMemberLeftUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{55} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{52} } func (x *GroupMemberLeftUpdate) GetAci() []byte { @@ -6873,7 +6636,7 @@ type GroupMemberRemovedUpdate struct { func (x *GroupMemberRemovedUpdate) Reset() { *x = GroupMemberRemovedUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[56] + mi := &file_backuppb_Backup_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6885,7 +6648,7 @@ func (x *GroupMemberRemovedUpdate) String() string { func (*GroupMemberRemovedUpdate) ProtoMessage() {} func (x *GroupMemberRemovedUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[56] + mi := &file_backuppb_Backup_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6898,7 +6661,7 @@ func (x *GroupMemberRemovedUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupMemberRemovedUpdate.ProtoReflect.Descriptor instead. func (*GroupMemberRemovedUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{56} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{53} } func (x *GroupMemberRemovedUpdate) GetRemoverAci() []byte { @@ -6924,7 +6687,7 @@ type SelfInvitedToGroupUpdate struct { func (x *SelfInvitedToGroupUpdate) Reset() { *x = SelfInvitedToGroupUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[57] + mi := &file_backuppb_Backup_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6936,7 +6699,7 @@ func (x *SelfInvitedToGroupUpdate) String() string { func (*SelfInvitedToGroupUpdate) ProtoMessage() {} func (x *SelfInvitedToGroupUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[57] + mi := &file_backuppb_Backup_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6949,7 +6712,7 @@ func (x *SelfInvitedToGroupUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use SelfInvitedToGroupUpdate.ProtoReflect.Descriptor instead. func (*SelfInvitedToGroupUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{57} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{54} } func (x *SelfInvitedToGroupUpdate) GetInviterAci() []byte { @@ -6969,7 +6732,7 @@ type SelfInvitedOtherUserToGroupUpdate struct { func (x *SelfInvitedOtherUserToGroupUpdate) Reset() { *x = SelfInvitedOtherUserToGroupUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[58] + mi := &file_backuppb_Backup_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6981,7 +6744,7 @@ func (x *SelfInvitedOtherUserToGroupUpdate) String() string { func (*SelfInvitedOtherUserToGroupUpdate) ProtoMessage() {} func (x *SelfInvitedOtherUserToGroupUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[58] + mi := &file_backuppb_Backup_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6994,7 +6757,7 @@ func (x *SelfInvitedOtherUserToGroupUpdate) ProtoReflect() protoreflect.Message // Deprecated: Use SelfInvitedOtherUserToGroupUpdate.ProtoReflect.Descriptor instead. func (*SelfInvitedOtherUserToGroupUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{58} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{55} } func (x *SelfInvitedOtherUserToGroupUpdate) GetInviteeServiceId() []byte { @@ -7015,7 +6778,7 @@ type GroupUnknownInviteeUpdate struct { func (x *GroupUnknownInviteeUpdate) Reset() { *x = GroupUnknownInviteeUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[59] + mi := &file_backuppb_Backup_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7027,7 +6790,7 @@ func (x *GroupUnknownInviteeUpdate) String() string { func (*GroupUnknownInviteeUpdate) ProtoMessage() {} func (x *GroupUnknownInviteeUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[59] + mi := &file_backuppb_Backup_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7040,7 +6803,7 @@ func (x *GroupUnknownInviteeUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupUnknownInviteeUpdate.ProtoReflect.Descriptor instead. func (*GroupUnknownInviteeUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{59} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{56} } func (x *GroupUnknownInviteeUpdate) GetInviterAci() []byte { @@ -7067,7 +6830,7 @@ type GroupInvitationAcceptedUpdate struct { func (x *GroupInvitationAcceptedUpdate) Reset() { *x = GroupInvitationAcceptedUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[60] + mi := &file_backuppb_Backup_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7079,7 +6842,7 @@ func (x *GroupInvitationAcceptedUpdate) String() string { func (*GroupInvitationAcceptedUpdate) ProtoMessage() {} func (x *GroupInvitationAcceptedUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[60] + mi := &file_backuppb_Backup_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7092,7 +6855,7 @@ func (x *GroupInvitationAcceptedUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupInvitationAcceptedUpdate.ProtoReflect.Descriptor instead. func (*GroupInvitationAcceptedUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{60} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{57} } func (x *GroupInvitationAcceptedUpdate) GetInviterAci() []byte { @@ -7120,7 +6883,7 @@ type GroupInvitationDeclinedUpdate struct { func (x *GroupInvitationDeclinedUpdate) Reset() { *x = GroupInvitationDeclinedUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[61] + mi := &file_backuppb_Backup_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7132,7 +6895,7 @@ func (x *GroupInvitationDeclinedUpdate) String() string { func (*GroupInvitationDeclinedUpdate) ProtoMessage() {} func (x *GroupInvitationDeclinedUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[61] + mi := &file_backuppb_Backup_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7145,7 +6908,7 @@ func (x *GroupInvitationDeclinedUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupInvitationDeclinedUpdate.ProtoReflect.Descriptor instead. func (*GroupInvitationDeclinedUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{61} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{58} } func (x *GroupInvitationDeclinedUpdate) GetInviterAci() []byte { @@ -7171,7 +6934,7 @@ type GroupMemberJoinedUpdate struct { func (x *GroupMemberJoinedUpdate) Reset() { *x = GroupMemberJoinedUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[62] + mi := &file_backuppb_Backup_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7183,7 +6946,7 @@ func (x *GroupMemberJoinedUpdate) String() string { func (*GroupMemberJoinedUpdate) ProtoMessage() {} func (x *GroupMemberJoinedUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[62] + mi := &file_backuppb_Backup_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7196,7 +6959,7 @@ func (x *GroupMemberJoinedUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupMemberJoinedUpdate.ProtoReflect.Descriptor instead. func (*GroupMemberJoinedUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{62} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{59} } func (x *GroupMemberJoinedUpdate) GetNewMemberAci() []byte { @@ -7219,7 +6982,7 @@ type GroupMemberAddedUpdate struct { func (x *GroupMemberAddedUpdate) Reset() { *x = GroupMemberAddedUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[63] + mi := &file_backuppb_Backup_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7231,7 +6994,7 @@ func (x *GroupMemberAddedUpdate) String() string { func (*GroupMemberAddedUpdate) ProtoMessage() {} func (x *GroupMemberAddedUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[63] + mi := &file_backuppb_Backup_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7244,7 +7007,7 @@ func (x *GroupMemberAddedUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupMemberAddedUpdate.ProtoReflect.Descriptor instead. func (*GroupMemberAddedUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{63} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{60} } func (x *GroupMemberAddedUpdate) GetUpdaterAci() []byte { @@ -7285,7 +7048,7 @@ type GroupSelfInvitationRevokedUpdate struct { func (x *GroupSelfInvitationRevokedUpdate) Reset() { *x = GroupSelfInvitationRevokedUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[64] + mi := &file_backuppb_Backup_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7297,7 +7060,7 @@ func (x *GroupSelfInvitationRevokedUpdate) String() string { func (*GroupSelfInvitationRevokedUpdate) ProtoMessage() {} func (x *GroupSelfInvitationRevokedUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[64] + mi := &file_backuppb_Backup_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7310,7 +7073,7 @@ func (x *GroupSelfInvitationRevokedUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupSelfInvitationRevokedUpdate.ProtoReflect.Descriptor instead. func (*GroupSelfInvitationRevokedUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{64} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{61} } func (x *GroupSelfInvitationRevokedUpdate) GetRevokerAci() []byte { @@ -7336,7 +7099,7 @@ type GroupInvitationRevokedUpdate struct { func (x *GroupInvitationRevokedUpdate) Reset() { *x = GroupInvitationRevokedUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[65] + mi := &file_backuppb_Backup_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7348,7 +7111,7 @@ func (x *GroupInvitationRevokedUpdate) String() string { func (*GroupInvitationRevokedUpdate) ProtoMessage() {} func (x *GroupInvitationRevokedUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[65] + mi := &file_backuppb_Backup_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7361,7 +7124,7 @@ func (x *GroupInvitationRevokedUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupInvitationRevokedUpdate.ProtoReflect.Descriptor instead. func (*GroupInvitationRevokedUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{65} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{62} } func (x *GroupInvitationRevokedUpdate) GetUpdaterAci() []byte { @@ -7387,7 +7150,7 @@ type GroupJoinRequestUpdate struct { func (x *GroupJoinRequestUpdate) Reset() { *x = GroupJoinRequestUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[66] + mi := &file_backuppb_Backup_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7399,7 +7162,7 @@ func (x *GroupJoinRequestUpdate) String() string { func (*GroupJoinRequestUpdate) ProtoMessage() {} func (x *GroupJoinRequestUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[66] + mi := &file_backuppb_Backup_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7412,7 +7175,7 @@ func (x *GroupJoinRequestUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupJoinRequestUpdate.ProtoReflect.Descriptor instead. func (*GroupJoinRequestUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{66} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{63} } func (x *GroupJoinRequestUpdate) GetRequestorAci() []byte { @@ -7434,7 +7197,7 @@ type GroupJoinRequestApprovalUpdate struct { func (x *GroupJoinRequestApprovalUpdate) Reset() { *x = GroupJoinRequestApprovalUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[67] + mi := &file_backuppb_Backup_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7446,7 +7209,7 @@ func (x *GroupJoinRequestApprovalUpdate) String() string { func (*GroupJoinRequestApprovalUpdate) ProtoMessage() {} func (x *GroupJoinRequestApprovalUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[67] + mi := &file_backuppb_Backup_proto_msgTypes[64] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7459,7 +7222,7 @@ func (x *GroupJoinRequestApprovalUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupJoinRequestApprovalUpdate.ProtoReflect.Descriptor instead. func (*GroupJoinRequestApprovalUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{67} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{64} } func (x *GroupJoinRequestApprovalUpdate) GetRequestorAci() []byte { @@ -7492,7 +7255,7 @@ type GroupJoinRequestCanceledUpdate struct { func (x *GroupJoinRequestCanceledUpdate) Reset() { *x = GroupJoinRequestCanceledUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[68] + mi := &file_backuppb_Backup_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7504,7 +7267,7 @@ func (x *GroupJoinRequestCanceledUpdate) String() string { func (*GroupJoinRequestCanceledUpdate) ProtoMessage() {} func (x *GroupJoinRequestCanceledUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[68] + mi := &file_backuppb_Backup_proto_msgTypes[65] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7517,7 +7280,7 @@ func (x *GroupJoinRequestCanceledUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupJoinRequestCanceledUpdate.ProtoReflect.Descriptor instead. func (*GroupJoinRequestCanceledUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{68} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{65} } func (x *GroupJoinRequestCanceledUpdate) GetRequestorAci() []byte { @@ -7543,7 +7306,7 @@ type GroupSequenceOfRequestsAndCancelsUpdate struct { func (x *GroupSequenceOfRequestsAndCancelsUpdate) Reset() { *x = GroupSequenceOfRequestsAndCancelsUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[69] + mi := &file_backuppb_Backup_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7555,7 +7318,7 @@ func (x *GroupSequenceOfRequestsAndCancelsUpdate) String() string { func (*GroupSequenceOfRequestsAndCancelsUpdate) ProtoMessage() {} func (x *GroupSequenceOfRequestsAndCancelsUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[69] + mi := &file_backuppb_Backup_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7568,7 +7331,7 @@ func (x *GroupSequenceOfRequestsAndCancelsUpdate) ProtoReflect() protoreflect.Me // Deprecated: Use GroupSequenceOfRequestsAndCancelsUpdate.ProtoReflect.Descriptor instead. func (*GroupSequenceOfRequestsAndCancelsUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{69} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{66} } func (x *GroupSequenceOfRequestsAndCancelsUpdate) GetRequestorAci() []byte { @@ -7594,7 +7357,7 @@ type GroupInviteLinkResetUpdate struct { func (x *GroupInviteLinkResetUpdate) Reset() { *x = GroupInviteLinkResetUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[70] + mi := &file_backuppb_Backup_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7606,7 +7369,7 @@ func (x *GroupInviteLinkResetUpdate) String() string { func (*GroupInviteLinkResetUpdate) ProtoMessage() {} func (x *GroupInviteLinkResetUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[70] + mi := &file_backuppb_Backup_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7619,7 +7382,7 @@ func (x *GroupInviteLinkResetUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupInviteLinkResetUpdate.ProtoReflect.Descriptor instead. func (*GroupInviteLinkResetUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{70} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{67} } func (x *GroupInviteLinkResetUpdate) GetUpdaterAci() []byte { @@ -7639,7 +7402,7 @@ type GroupInviteLinkEnabledUpdate struct { func (x *GroupInviteLinkEnabledUpdate) Reset() { *x = GroupInviteLinkEnabledUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[71] + mi := &file_backuppb_Backup_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7651,7 +7414,7 @@ func (x *GroupInviteLinkEnabledUpdate) String() string { func (*GroupInviteLinkEnabledUpdate) ProtoMessage() {} func (x *GroupInviteLinkEnabledUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[71] + mi := &file_backuppb_Backup_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7664,7 +7427,7 @@ func (x *GroupInviteLinkEnabledUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupInviteLinkEnabledUpdate.ProtoReflect.Descriptor instead. func (*GroupInviteLinkEnabledUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{71} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{68} } func (x *GroupInviteLinkEnabledUpdate) GetUpdaterAci() []byte { @@ -7691,7 +7454,7 @@ type GroupInviteLinkAdminApprovalUpdate struct { func (x *GroupInviteLinkAdminApprovalUpdate) Reset() { *x = GroupInviteLinkAdminApprovalUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[72] + mi := &file_backuppb_Backup_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7703,7 +7466,7 @@ func (x *GroupInviteLinkAdminApprovalUpdate) String() string { func (*GroupInviteLinkAdminApprovalUpdate) ProtoMessage() {} func (x *GroupInviteLinkAdminApprovalUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[72] + mi := &file_backuppb_Backup_proto_msgTypes[69] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7716,7 +7479,7 @@ func (x *GroupInviteLinkAdminApprovalUpdate) ProtoReflect() protoreflect.Message // Deprecated: Use GroupInviteLinkAdminApprovalUpdate.ProtoReflect.Descriptor instead. func (*GroupInviteLinkAdminApprovalUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{72} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{69} } func (x *GroupInviteLinkAdminApprovalUpdate) GetUpdaterAci() []byte { @@ -7742,7 +7505,7 @@ type GroupInviteLinkDisabledUpdate struct { func (x *GroupInviteLinkDisabledUpdate) Reset() { *x = GroupInviteLinkDisabledUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[73] + mi := &file_backuppb_Backup_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7754,7 +7517,7 @@ func (x *GroupInviteLinkDisabledUpdate) String() string { func (*GroupInviteLinkDisabledUpdate) ProtoMessage() {} func (x *GroupInviteLinkDisabledUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[73] + mi := &file_backuppb_Backup_proto_msgTypes[70] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7767,7 +7530,7 @@ func (x *GroupInviteLinkDisabledUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupInviteLinkDisabledUpdate.ProtoReflect.Descriptor instead. func (*GroupInviteLinkDisabledUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{73} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{70} } func (x *GroupInviteLinkDisabledUpdate) GetUpdaterAci() []byte { @@ -7786,7 +7549,7 @@ type GroupMemberJoinedByLinkUpdate struct { func (x *GroupMemberJoinedByLinkUpdate) Reset() { *x = GroupMemberJoinedByLinkUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[74] + mi := &file_backuppb_Backup_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7798,7 +7561,7 @@ func (x *GroupMemberJoinedByLinkUpdate) String() string { func (*GroupMemberJoinedByLinkUpdate) ProtoMessage() {} func (x *GroupMemberJoinedByLinkUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[74] + mi := &file_backuppb_Backup_proto_msgTypes[71] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7811,7 +7574,7 @@ func (x *GroupMemberJoinedByLinkUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupMemberJoinedByLinkUpdate.ProtoReflect.Descriptor instead. func (*GroupMemberJoinedByLinkUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{74} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{71} } func (x *GroupMemberJoinedByLinkUpdate) GetNewMemberAci() []byte { @@ -7830,7 +7593,7 @@ type GroupV2MigrationUpdate struct { func (x *GroupV2MigrationUpdate) Reset() { *x = GroupV2MigrationUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[75] + mi := &file_backuppb_Backup_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7842,7 +7605,7 @@ func (x *GroupV2MigrationUpdate) String() string { func (*GroupV2MigrationUpdate) ProtoMessage() {} func (x *GroupV2MigrationUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[75] + mi := &file_backuppb_Backup_proto_msgTypes[72] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7855,7 +7618,7 @@ func (x *GroupV2MigrationUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupV2MigrationUpdate.ProtoReflect.Descriptor instead. func (*GroupV2MigrationUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{75} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{72} } // Another user migrated gv1->gv2 but was unable to add @@ -7868,7 +7631,7 @@ type GroupV2MigrationSelfInvitedUpdate struct { func (x *GroupV2MigrationSelfInvitedUpdate) Reset() { *x = GroupV2MigrationSelfInvitedUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[76] + mi := &file_backuppb_Backup_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7880,7 +7643,7 @@ func (x *GroupV2MigrationSelfInvitedUpdate) String() string { func (*GroupV2MigrationSelfInvitedUpdate) ProtoMessage() {} func (x *GroupV2MigrationSelfInvitedUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[76] + mi := &file_backuppb_Backup_proto_msgTypes[73] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7893,7 +7656,7 @@ func (x *GroupV2MigrationSelfInvitedUpdate) ProtoReflect() protoreflect.Message // Deprecated: Use GroupV2MigrationSelfInvitedUpdate.ProtoReflect.Descriptor instead. func (*GroupV2MigrationSelfInvitedUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{76} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{73} } // The local user migrated gv1->gv2 but was unable to @@ -7908,7 +7671,7 @@ type GroupV2MigrationInvitedMembersUpdate struct { func (x *GroupV2MigrationInvitedMembersUpdate) Reset() { *x = GroupV2MigrationInvitedMembersUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[77] + mi := &file_backuppb_Backup_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7920,7 +7683,7 @@ func (x *GroupV2MigrationInvitedMembersUpdate) String() string { func (*GroupV2MigrationInvitedMembersUpdate) ProtoMessage() {} func (x *GroupV2MigrationInvitedMembersUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[77] + mi := &file_backuppb_Backup_proto_msgTypes[74] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7933,7 +7696,7 @@ func (x *GroupV2MigrationInvitedMembersUpdate) ProtoReflect() protoreflect.Messa // Deprecated: Use GroupV2MigrationInvitedMembersUpdate.ProtoReflect.Descriptor instead. func (*GroupV2MigrationInvitedMembersUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{77} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{74} } func (x *GroupV2MigrationInvitedMembersUpdate) GetInvitedMembersCount() uint32 { @@ -7955,7 +7718,7 @@ type GroupV2MigrationDroppedMembersUpdate struct { func (x *GroupV2MigrationDroppedMembersUpdate) Reset() { *x = GroupV2MigrationDroppedMembersUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[78] + mi := &file_backuppb_Backup_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7967,7 +7730,7 @@ func (x *GroupV2MigrationDroppedMembersUpdate) String() string { func (*GroupV2MigrationDroppedMembersUpdate) ProtoMessage() {} func (x *GroupV2MigrationDroppedMembersUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[78] + mi := &file_backuppb_Backup_proto_msgTypes[75] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7980,7 +7743,7 @@ func (x *GroupV2MigrationDroppedMembersUpdate) ProtoReflect() protoreflect.Messa // Deprecated: Use GroupV2MigrationDroppedMembersUpdate.ProtoReflect.Descriptor instead. func (*GroupV2MigrationDroppedMembersUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{78} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{75} } func (x *GroupV2MigrationDroppedMembersUpdate) GetDroppedMembersCount() uint32 { @@ -8001,7 +7764,7 @@ type GroupExpirationTimerUpdate struct { func (x *GroupExpirationTimerUpdate) Reset() { *x = GroupExpirationTimerUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[79] + mi := &file_backuppb_Backup_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8013,7 +7776,7 @@ func (x *GroupExpirationTimerUpdate) String() string { func (*GroupExpirationTimerUpdate) ProtoMessage() {} func (x *GroupExpirationTimerUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[79] + mi := &file_backuppb_Backup_proto_msgTypes[76] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8026,7 +7789,7 @@ func (x *GroupExpirationTimerUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupExpirationTimerUpdate.ProtoReflect.Descriptor instead. func (*GroupExpirationTimerUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{79} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{76} } func (x *GroupExpirationTimerUpdate) GetExpiresInMs() uint64 { @@ -8053,7 +7816,7 @@ type PollTerminateUpdate struct { func (x *PollTerminateUpdate) Reset() { *x = PollTerminateUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[80] + mi := &file_backuppb_Backup_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8065,7 +7828,7 @@ func (x *PollTerminateUpdate) String() string { func (*PollTerminateUpdate) ProtoMessage() {} func (x *PollTerminateUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[80] + mi := &file_backuppb_Backup_proto_msgTypes[77] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8078,7 +7841,7 @@ func (x *PollTerminateUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use PollTerminateUpdate.ProtoReflect.Descriptor instead. func (*PollTerminateUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{80} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{77} } func (x *PollTerminateUpdate) GetTargetSentTimestamp() uint64 { @@ -8105,7 +7868,7 @@ type PinMessageUpdate struct { func (x *PinMessageUpdate) Reset() { *x = PinMessageUpdate{} - mi := &file_backuppb_Backup_proto_msgTypes[81] + mi := &file_backuppb_Backup_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8117,7 +7880,7 @@ func (x *PinMessageUpdate) String() string { func (*PinMessageUpdate) ProtoMessage() {} func (x *PinMessageUpdate) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[81] + mi := &file_backuppb_Backup_proto_msgTypes[78] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8130,7 +7893,7 @@ func (x *PinMessageUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use PinMessageUpdate.ProtoReflect.Descriptor instead. func (*PinMessageUpdate) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{81} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{78} } func (x *PinMessageUpdate) GetTargetSentTimestamp() uint64 { @@ -8157,7 +7920,7 @@ type StickerPack struct { func (x *StickerPack) Reset() { *x = StickerPack{} - mi := &file_backuppb_Backup_proto_msgTypes[82] + mi := &file_backuppb_Backup_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8169,7 +7932,7 @@ func (x *StickerPack) String() string { func (*StickerPack) ProtoMessage() {} func (x *StickerPack) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[82] + mi := &file_backuppb_Backup_proto_msgTypes[79] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8182,7 +7945,7 @@ func (x *StickerPack) ProtoReflect() protoreflect.Message { // Deprecated: Use StickerPack.ProtoReflect.Descriptor instead. func (*StickerPack) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{82} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{79} } func (x *StickerPack) GetPackId() []byte { @@ -8223,7 +7986,7 @@ type ChatStyle struct { func (x *ChatStyle) Reset() { *x = ChatStyle{} - mi := &file_backuppb_Backup_proto_msgTypes[83] + mi := &file_backuppb_Backup_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8235,7 +7998,7 @@ func (x *ChatStyle) String() string { func (*ChatStyle) ProtoMessage() {} func (x *ChatStyle) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[83] + mi := &file_backuppb_Backup_proto_msgTypes[80] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8248,7 +8011,7 @@ func (x *ChatStyle) ProtoReflect() protoreflect.Message { // Deprecated: Use ChatStyle.ProtoReflect.Descriptor instead. func (*ChatStyle) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{83} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{80} } func (x *ChatStyle) GetWallpaper() isChatStyle_Wallpaper { @@ -8380,7 +8143,7 @@ type NotificationProfile struct { func (x *NotificationProfile) Reset() { *x = NotificationProfile{} - mi := &file_backuppb_Backup_proto_msgTypes[84] + mi := &file_backuppb_Backup_proto_msgTypes[81] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8392,7 +8155,7 @@ func (x *NotificationProfile) String() string { func (*NotificationProfile) ProtoMessage() {} func (x *NotificationProfile) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[84] + mi := &file_backuppb_Backup_proto_msgTypes[81] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8405,7 +8168,7 @@ func (x *NotificationProfile) ProtoReflect() protoreflect.Message { // Deprecated: Use NotificationProfile.ProtoReflect.Descriptor instead. func (*NotificationProfile) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{84} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{81} } func (x *NotificationProfile) GetName() string { @@ -8511,7 +8274,7 @@ type ChatFolder struct { func (x *ChatFolder) Reset() { *x = ChatFolder{} - mi := &file_backuppb_Backup_proto_msgTypes[85] + mi := &file_backuppb_Backup_proto_msgTypes[82] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8523,7 +8286,7 @@ func (x *ChatFolder) String() string { func (*ChatFolder) ProtoMessage() {} func (x *ChatFolder) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[85] + mi := &file_backuppb_Backup_proto_msgTypes[82] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8536,7 +8299,7 @@ func (x *ChatFolder) ProtoReflect() protoreflect.Message { // Deprecated: Use ChatFolder.ProtoReflect.Descriptor instead. func (*ChatFolder) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{85} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{82} } func (x *ChatFolder) GetName() string { @@ -8613,7 +8376,7 @@ type AccountData_UsernameLink struct { func (x *AccountData_UsernameLink) Reset() { *x = AccountData_UsernameLink{} - mi := &file_backuppb_Backup_proto_msgTypes[86] + mi := &file_backuppb_Backup_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8625,7 +8388,7 @@ func (x *AccountData_UsernameLink) String() string { func (*AccountData_UsernameLink) ProtoMessage() {} func (x *AccountData_UsernameLink) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[86] + mi := &file_backuppb_Backup_proto_msgTypes[83] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8674,7 +8437,7 @@ type AccountData_AutoDownloadSettings struct { func (x *AccountData_AutoDownloadSettings) Reset() { *x = AccountData_AutoDownloadSettings{} - mi := &file_backuppb_Backup_proto_msgTypes[87] + mi := &file_backuppb_Backup_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8686,7 +8449,7 @@ func (x *AccountData_AutoDownloadSettings) String() string { func (*AccountData_AutoDownloadSettings) ProtoMessage() {} func (x *AccountData_AutoDownloadSettings) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[87] + mi := &file_backuppb_Backup_proto_msgTypes[84] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8753,31 +8516,22 @@ type AccountData_AccountSettings struct { CustomChatColors []*ChatStyle_CustomChatColor `protobuf:"bytes,19,rep,name=customChatColors,proto3" json:"customChatColors,omitempty"` OptimizeOnDeviceStorage bool `protobuf:"varint,20,opt,name=optimizeOnDeviceStorage,proto3" json:"optimizeOnDeviceStorage,omitempty"` // See zkgroup for integer particular values. Unset if backups are not enabled. - BackupTier *uint64 `protobuf:"varint,21,opt,name=backupTier,proto3,oneof" json:"backupTier,omitempty"` - DefaultSentMediaQuality AccountData_SentMediaQuality `protobuf:"varint,23,opt,name=defaultSentMediaQuality,proto3,enum=signal.backup.AccountData_SentMediaQuality" json:"defaultSentMediaQuality,omitempty"` - AutoDownloadSettings *AccountData_AutoDownloadSettings `protobuf:"bytes,24,opt,name=autoDownloadSettings,proto3" json:"autoDownloadSettings,omitempty"` - ScreenLockTimeoutMinutes *uint32 `protobuf:"varint,26,opt,name=screenLockTimeoutMinutes,proto3,oneof" json:"screenLockTimeoutMinutes,omitempty"` // If unset, consider screen lock to be disabled. - PinReminders *bool `protobuf:"varint,27,opt,name=pinReminders,proto3,oneof" json:"pinReminders,omitempty"` // If unset, consider pin reminders to be enabled. - AppTheme AccountData_AppTheme `protobuf:"varint,28,opt,name=appTheme,proto3,enum=signal.backup.AccountData_AppTheme" json:"appTheme,omitempty"` // If unset, treat the same as "Unknown" case - CallsUseLessDataSetting AccountData_CallsUseLessDataSetting `protobuf:"varint,29,opt,name=callsUseLessDataSetting,proto3,enum=signal.backup.AccountData_CallsUseLessDataSetting" json:"callsUseLessDataSetting,omitempty"` // If unset, treat the same as "Unknown" case - AllowSealedSenderFromAnyone bool `protobuf:"varint,30,opt,name=allowSealedSenderFromAnyone,proto3" json:"allowSealedSenderFromAnyone,omitempty"` - AllowAutomaticKeyVerification bool `protobuf:"varint,31,opt,name=allowAutomaticKeyVerification,proto3" json:"allowAutomaticKeyVerification,omitempty"` - HasSeenAdminDeleteEducationDialog bool `protobuf:"varint,32,opt,name=hasSeenAdminDeleteEducationDialog,proto3" json:"hasSeenAdminDeleteEducationDialog,omitempty"` - UnreadBadgeType AccountData_AccountSettings_UnreadBadgeType `protobuf:"varint,33,opt,name=unreadBadgeType,proto3,enum=signal.backup.AccountData_AccountSettings_UnreadBadgeType" json:"unreadBadgeType,omitempty"` // Only used in ios/desktop - IncludeMutedChatsInBadge *bool `protobuf:"varint,34,opt,name=includeMutedChatsInBadge,proto3,oneof" json:"includeMutedChatsInBadge,omitempty"` // Only used in ios/desktop. If unset, consider this disabled - ReactionNotifications *bool `protobuf:"varint,35,opt,name=reactionNotifications,proto3,oneof" json:"reactionNotifications,omitempty"` // If unset, consider this enabled - NotifyForCallsIfMuted *bool `protobuf:"varint,36,opt,name=notifyForCallsIfMuted,proto3,oneof" json:"notifyForCallsIfMuted,omitempty"` // If unset, consider this disabled - NotifyForMentionsIfMuted *bool `protobuf:"varint,37,opt,name=notifyForMentionsIfMuted,proto3,oneof" json:"notifyForMentionsIfMuted,omitempty"` // If unset, consider this enabled - NotifyForRepliesIfMuted *bool `protobuf:"varint,38,opt,name=notifyForRepliesIfMuted,proto3,oneof" json:"notifyForRepliesIfMuted,omitempty"` // If unset, consider this enabled - ShowUnreadReminders *bool `protobuf:"varint,39,opt,name=showUnreadReminders,proto3,oneof" json:"showUnreadReminders,omitempty"` // If unset, consider this enabled - NotifyWhenContactJoins *bool `protobuf:"varint,40,opt,name=notifyWhenContactJoins,proto3,oneof" json:"notifyWhenContactJoins,omitempty"` // If unset, consider this disabled - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + BackupTier *uint64 `protobuf:"varint,21,opt,name=backupTier,proto3,oneof" json:"backupTier,omitempty"` + DefaultSentMediaQuality AccountData_SentMediaQuality `protobuf:"varint,23,opt,name=defaultSentMediaQuality,proto3,enum=signal.backup.AccountData_SentMediaQuality" json:"defaultSentMediaQuality,omitempty"` + AutoDownloadSettings *AccountData_AutoDownloadSettings `protobuf:"bytes,24,opt,name=autoDownloadSettings,proto3" json:"autoDownloadSettings,omitempty"` + ScreenLockTimeoutMinutes *uint32 `protobuf:"varint,26,opt,name=screenLockTimeoutMinutes,proto3,oneof" json:"screenLockTimeoutMinutes,omitempty"` // If unset, consider screen lock to be disabled. + PinReminders *bool `protobuf:"varint,27,opt,name=pinReminders,proto3,oneof" json:"pinReminders,omitempty"` // If unset, consider pin reminders to be enabled. + AppTheme AccountData_AppTheme `protobuf:"varint,28,opt,name=appTheme,proto3,enum=signal.backup.AccountData_AppTheme" json:"appTheme,omitempty"` // If unset, treat the same as "Unknown" case + CallsUseLessDataSetting AccountData_CallsUseLessDataSetting `protobuf:"varint,29,opt,name=callsUseLessDataSetting,proto3,enum=signal.backup.AccountData_CallsUseLessDataSetting" json:"callsUseLessDataSetting,omitempty"` // If unset, treat the same as "Unknown" case + AllowSealedSenderFromAnyone bool `protobuf:"varint,30,opt,name=allowSealedSenderFromAnyone,proto3" json:"allowSealedSenderFromAnyone,omitempty"` + AllowAutomaticKeyVerification bool `protobuf:"varint,31,opt,name=allowAutomaticKeyVerification,proto3" json:"allowAutomaticKeyVerification,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *AccountData_AccountSettings) Reset() { *x = AccountData_AccountSettings{} - mi := &file_backuppb_Backup_proto_msgTypes[88] + mi := &file_backuppb_Backup_proto_msgTypes[85] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8789,7 +8543,7 @@ func (x *AccountData_AccountSettings) String() string { func (*AccountData_AccountSettings) ProtoMessage() {} func (x *AccountData_AccountSettings) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[88] + mi := &file_backuppb_Backup_proto_msgTypes[85] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9008,69 +8762,6 @@ func (x *AccountData_AccountSettings) GetAllowAutomaticKeyVerification() bool { return false } -func (x *AccountData_AccountSettings) GetHasSeenAdminDeleteEducationDialog() bool { - if x != nil { - return x.HasSeenAdminDeleteEducationDialog - } - return false -} - -func (x *AccountData_AccountSettings) GetUnreadBadgeType() AccountData_AccountSettings_UnreadBadgeType { - if x != nil { - return x.UnreadBadgeType - } - return AccountData_AccountSettings_UNKNOWN_BADGE_TYPE -} - -func (x *AccountData_AccountSettings) GetIncludeMutedChatsInBadge() bool { - if x != nil && x.IncludeMutedChatsInBadge != nil { - return *x.IncludeMutedChatsInBadge - } - return false -} - -func (x *AccountData_AccountSettings) GetReactionNotifications() bool { - if x != nil && x.ReactionNotifications != nil { - return *x.ReactionNotifications - } - return false -} - -func (x *AccountData_AccountSettings) GetNotifyForCallsIfMuted() bool { - if x != nil && x.NotifyForCallsIfMuted != nil { - return *x.NotifyForCallsIfMuted - } - return false -} - -func (x *AccountData_AccountSettings) GetNotifyForMentionsIfMuted() bool { - if x != nil && x.NotifyForMentionsIfMuted != nil { - return *x.NotifyForMentionsIfMuted - } - return false -} - -func (x *AccountData_AccountSettings) GetNotifyForRepliesIfMuted() bool { - if x != nil && x.NotifyForRepliesIfMuted != nil { - return *x.NotifyForRepliesIfMuted - } - return false -} - -func (x *AccountData_AccountSettings) GetShowUnreadReminders() bool { - if x != nil && x.ShowUnreadReminders != nil { - return *x.ShowUnreadReminders - } - return false -} - -func (x *AccountData_AccountSettings) GetNotifyWhenContactJoins() bool { - if x != nil && x.NotifyWhenContactJoins != nil { - return *x.NotifyWhenContactJoins - } - return false -} - type AccountData_SubscriberData struct { state protoimpl.MessageState `protogen:"open.v1"` SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` @@ -9082,7 +8773,7 @@ type AccountData_SubscriberData struct { func (x *AccountData_SubscriberData) Reset() { *x = AccountData_SubscriberData{} - mi := &file_backuppb_Backup_proto_msgTypes[89] + mi := &file_backuppb_Backup_proto_msgTypes[86] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9094,7 +8785,7 @@ func (x *AccountData_SubscriberData) String() string { func (*AccountData_SubscriberData) ProtoMessage() {} func (x *AccountData_SubscriberData) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[89] + mi := &file_backuppb_Backup_proto_msgTypes[86] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9147,7 +8838,7 @@ type AccountData_IAPSubscriberData struct { func (x *AccountData_IAPSubscriberData) Reset() { *x = AccountData_IAPSubscriberData{} - mi := &file_backuppb_Backup_proto_msgTypes[90] + mi := &file_backuppb_Backup_proto_msgTypes[87] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9159,7 +8850,7 @@ func (x *AccountData_IAPSubscriberData) String() string { func (*AccountData_IAPSubscriberData) ProtoMessage() {} func (x *AccountData_IAPSubscriberData) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[90] + mi := &file_backuppb_Backup_proto_msgTypes[87] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9238,7 +8929,7 @@ type AccountData_AndroidSpecificSettings struct { func (x *AccountData_AndroidSpecificSettings) Reset() { *x = AccountData_AndroidSpecificSettings{} - mi := &file_backuppb_Backup_proto_msgTypes[91] + mi := &file_backuppb_Backup_proto_msgTypes[88] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9250,7 +8941,7 @@ func (x *AccountData_AndroidSpecificSettings) String() string { func (*AccountData_AndroidSpecificSettings) ProtoMessage() {} func (x *AccountData_AndroidSpecificSettings) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[91] + mi := &file_backuppb_Backup_proto_msgTypes[88] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9295,7 +8986,7 @@ type Contact_Registered struct { func (x *Contact_Registered) Reset() { *x = Contact_Registered{} - mi := &file_backuppb_Backup_proto_msgTypes[92] + mi := &file_backuppb_Backup_proto_msgTypes[89] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9307,7 +8998,7 @@ func (x *Contact_Registered) String() string { func (*Contact_Registered) ProtoMessage() {} func (x *Contact_Registered) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[92] + mi := &file_backuppb_Backup_proto_msgTypes[89] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9332,7 +9023,7 @@ type Contact_NotRegistered struct { func (x *Contact_NotRegistered) Reset() { *x = Contact_NotRegistered{} - mi := &file_backuppb_Backup_proto_msgTypes[93] + mi := &file_backuppb_Backup_proto_msgTypes[90] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9344,7 +9035,7 @@ func (x *Contact_NotRegistered) String() string { func (*Contact_NotRegistered) ProtoMessage() {} func (x *Contact_NotRegistered) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[93] + mi := &file_backuppb_Backup_proto_msgTypes[90] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9377,7 +9068,7 @@ type Contact_Name struct { func (x *Contact_Name) Reset() { *x = Contact_Name{} - mi := &file_backuppb_Backup_proto_msgTypes[94] + mi := &file_backuppb_Backup_proto_msgTypes[91] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9389,7 +9080,7 @@ func (x *Contact_Name) String() string { func (*Contact_Name) ProtoMessage() {} func (x *Contact_Name) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[94] + mi := &file_backuppb_Backup_proto_msgTypes[91] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9438,14 +9129,13 @@ type Group_GroupSnapshot struct { InviteLinkPassword []byte `protobuf:"bytes,10,opt,name=inviteLinkPassword,proto3" json:"inviteLinkPassword,omitempty"` AnnouncementsOnly bool `protobuf:"varint,12,opt,name=announcements_only,json=announcementsOnly,proto3" json:"announcements_only,omitempty"` MembersBanned []*Group_MemberBanned `protobuf:"bytes,13,rep,name=members_banned,json=membersBanned,proto3" json:"members_banned,omitempty"` - Terminated bool `protobuf:"varint,14,opt,name=terminated,proto3" json:"terminated,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Group_GroupSnapshot) Reset() { *x = Group_GroupSnapshot{} - mi := &file_backuppb_Backup_proto_msgTypes[95] + mi := &file_backuppb_Backup_proto_msgTypes[92] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9457,7 +9147,7 @@ func (x *Group_GroupSnapshot) String() string { func (*Group_GroupSnapshot) ProtoMessage() {} func (x *Group_GroupSnapshot) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[95] + mi := &file_backuppb_Backup_proto_msgTypes[92] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9557,13 +9247,6 @@ func (x *Group_GroupSnapshot) GetMembersBanned() []*Group_MemberBanned { return nil } -func (x *Group_GroupSnapshot) GetTerminated() bool { - if x != nil { - return x.Terminated - } - return false -} - type Group_GroupAttributeBlob struct { state protoimpl.MessageState `protogen:"open.v1"` // If unset, consider the field it represents to not be present @@ -9581,7 +9264,7 @@ type Group_GroupAttributeBlob struct { func (x *Group_GroupAttributeBlob) Reset() { *x = Group_GroupAttributeBlob{} - mi := &file_backuppb_Backup_proto_msgTypes[96] + mi := &file_backuppb_Backup_proto_msgTypes[93] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9593,7 +9276,7 @@ func (x *Group_GroupAttributeBlob) String() string { func (*Group_GroupAttributeBlob) ProtoMessage() {} func (x *Group_GroupAttributeBlob) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[96] + mi := &file_backuppb_Backup_proto_msgTypes[93] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9685,15 +9368,13 @@ type Group_Member struct { UserId []byte `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` Role Group_Member_Role `protobuf:"varint,2,opt,name=role,proto3,enum=signal.backup.Group_Member_Role" json:"role,omitempty"` JoinedAtVersion uint32 `protobuf:"varint,5,opt,name=joinedAtVersion,proto3" json:"joinedAtVersion,omitempty"` - LabelEmoji string `protobuf:"bytes,6,opt,name=labelEmoji,proto3" json:"labelEmoji,omitempty"` - LabelString string `protobuf:"bytes,7,opt,name=labelString,proto3" json:"labelString,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Group_Member) Reset() { *x = Group_Member{} - mi := &file_backuppb_Backup_proto_msgTypes[97] + mi := &file_backuppb_Backup_proto_msgTypes[94] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9705,7 +9386,7 @@ func (x *Group_Member) String() string { func (*Group_Member) ProtoMessage() {} func (x *Group_Member) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[97] + mi := &file_backuppb_Backup_proto_msgTypes[94] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9742,20 +9423,6 @@ func (x *Group_Member) GetJoinedAtVersion() uint32 { return 0 } -func (x *Group_Member) GetLabelEmoji() string { - if x != nil { - return x.LabelEmoji - } - return "" -} - -func (x *Group_Member) GetLabelString() string { - if x != nil { - return x.LabelString - } - return "" -} - type Group_MemberPendingProfileKey struct { state protoimpl.MessageState `protogen:"open.v1"` Member *Group_Member `protobuf:"bytes,1,opt,name=member,proto3" json:"member,omitempty"` @@ -9767,7 +9434,7 @@ type Group_MemberPendingProfileKey struct { func (x *Group_MemberPendingProfileKey) Reset() { *x = Group_MemberPendingProfileKey{} - mi := &file_backuppb_Backup_proto_msgTypes[98] + mi := &file_backuppb_Backup_proto_msgTypes[95] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9779,7 +9446,7 @@ func (x *Group_MemberPendingProfileKey) String() string { func (*Group_MemberPendingProfileKey) ProtoMessage() {} func (x *Group_MemberPendingProfileKey) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[98] + mi := &file_backuppb_Backup_proto_msgTypes[95] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9826,7 +9493,7 @@ type Group_MemberPendingAdminApproval struct { func (x *Group_MemberPendingAdminApproval) Reset() { *x = Group_MemberPendingAdminApproval{} - mi := &file_backuppb_Backup_proto_msgTypes[99] + mi := &file_backuppb_Backup_proto_msgTypes[96] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9838,7 +9505,7 @@ func (x *Group_MemberPendingAdminApproval) String() string { func (*Group_MemberPendingAdminApproval) ProtoMessage() {} func (x *Group_MemberPendingAdminApproval) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[99] + mi := &file_backuppb_Backup_proto_msgTypes[96] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9878,7 +9545,7 @@ type Group_MemberBanned struct { func (x *Group_MemberBanned) Reset() { *x = Group_MemberBanned{} - mi := &file_backuppb_Backup_proto_msgTypes[100] + mi := &file_backuppb_Backup_proto_msgTypes[97] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9890,7 +9557,7 @@ func (x *Group_MemberBanned) String() string { func (*Group_MemberBanned) ProtoMessage() {} func (x *Group_MemberBanned) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[100] + mi := &file_backuppb_Backup_proto_msgTypes[97] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9925,14 +9592,13 @@ type Group_AccessControl struct { Attributes Group_AccessControl_AccessRequired `protobuf:"varint,1,opt,name=attributes,proto3,enum=signal.backup.Group_AccessControl_AccessRequired" json:"attributes,omitempty"` Members Group_AccessControl_AccessRequired `protobuf:"varint,2,opt,name=members,proto3,enum=signal.backup.Group_AccessControl_AccessRequired" json:"members,omitempty"` AddFromInviteLink Group_AccessControl_AccessRequired `protobuf:"varint,3,opt,name=addFromInviteLink,proto3,enum=signal.backup.Group_AccessControl_AccessRequired" json:"addFromInviteLink,omitempty"` - MemberLabel Group_AccessControl_AccessRequired `protobuf:"varint,4,opt,name=memberLabel,proto3,enum=signal.backup.Group_AccessControl_AccessRequired" json:"memberLabel,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Group_AccessControl) Reset() { *x = Group_AccessControl{} - mi := &file_backuppb_Backup_proto_msgTypes[101] + mi := &file_backuppb_Backup_proto_msgTypes[98] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9944,7 +9610,7 @@ func (x *Group_AccessControl) String() string { func (*Group_AccessControl) ProtoMessage() {} func (x *Group_AccessControl) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[101] + mi := &file_backuppb_Backup_proto_msgTypes[98] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9981,13 +9647,6 @@ func (x *Group_AccessControl) GetAddFromInviteLink() Group_AccessControl_AccessR return Group_AccessControl_UNKNOWN } -func (x *Group_AccessControl) GetMemberLabel() Group_AccessControl_AccessRequired { - if x != nil { - return x.MemberLabel - } - return Group_AccessControl_UNKNOWN -} - type ChatItem_IncomingMessageDetails struct { state protoimpl.MessageState `protogen:"open.v1"` DateReceived uint64 `protobuf:"varint,1,opt,name=dateReceived,proto3" json:"dateReceived,omitempty"` @@ -10000,7 +9659,7 @@ type ChatItem_IncomingMessageDetails struct { func (x *ChatItem_IncomingMessageDetails) Reset() { *x = ChatItem_IncomingMessageDetails{} - mi := &file_backuppb_Backup_proto_msgTypes[102] + mi := &file_backuppb_Backup_proto_msgTypes[99] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10012,7 +9671,7 @@ func (x *ChatItem_IncomingMessageDetails) String() string { func (*ChatItem_IncomingMessageDetails) ProtoMessage() {} func (x *ChatItem_IncomingMessageDetails) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[102] + mi := &file_backuppb_Backup_proto_msgTypes[99] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10066,7 +9725,7 @@ type ChatItem_OutgoingMessageDetails struct { func (x *ChatItem_OutgoingMessageDetails) Reset() { *x = ChatItem_OutgoingMessageDetails{} - mi := &file_backuppb_Backup_proto_msgTypes[103] + mi := &file_backuppb_Backup_proto_msgTypes[100] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10078,7 +9737,7 @@ func (x *ChatItem_OutgoingMessageDetails) String() string { func (*ChatItem_OutgoingMessageDetails) ProtoMessage() {} func (x *ChatItem_OutgoingMessageDetails) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[103] + mi := &file_backuppb_Backup_proto_msgTypes[100] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10116,7 +9775,7 @@ type ChatItem_DirectionlessMessageDetails struct { func (x *ChatItem_DirectionlessMessageDetails) Reset() { *x = ChatItem_DirectionlessMessageDetails{} - mi := &file_backuppb_Backup_proto_msgTypes[104] + mi := &file_backuppb_Backup_proto_msgTypes[101] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10128,7 +9787,7 @@ func (x *ChatItem_DirectionlessMessageDetails) String() string { func (*ChatItem_DirectionlessMessageDetails) ProtoMessage() {} func (x *ChatItem_DirectionlessMessageDetails) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[104] + mi := &file_backuppb_Backup_proto_msgTypes[101] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10158,7 +9817,7 @@ type ChatItem_PinDetails struct { func (x *ChatItem_PinDetails) Reset() { *x = ChatItem_PinDetails{} - mi := &file_backuppb_Backup_proto_msgTypes[105] + mi := &file_backuppb_Backup_proto_msgTypes[102] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10170,7 +9829,7 @@ func (x *ChatItem_PinDetails) String() string { func (*ChatItem_PinDetails) ProtoMessage() {} func (x *ChatItem_PinDetails) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[105] + mi := &file_backuppb_Backup_proto_msgTypes[102] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10242,7 +9901,7 @@ type SendStatus_Pending struct { func (x *SendStatus_Pending) Reset() { *x = SendStatus_Pending{} - mi := &file_backuppb_Backup_proto_msgTypes[106] + mi := &file_backuppb_Backup_proto_msgTypes[103] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10254,7 +9913,7 @@ func (x *SendStatus_Pending) String() string { func (*SendStatus_Pending) ProtoMessage() {} func (x *SendStatus_Pending) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[106] + mi := &file_backuppb_Backup_proto_msgTypes[103] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10279,7 +9938,7 @@ type SendStatus_Sent struct { func (x *SendStatus_Sent) Reset() { *x = SendStatus_Sent{} - mi := &file_backuppb_Backup_proto_msgTypes[107] + mi := &file_backuppb_Backup_proto_msgTypes[104] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10291,7 +9950,7 @@ func (x *SendStatus_Sent) String() string { func (*SendStatus_Sent) ProtoMessage() {} func (x *SendStatus_Sent) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[107] + mi := &file_backuppb_Backup_proto_msgTypes[104] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10323,7 +9982,7 @@ type SendStatus_Delivered struct { func (x *SendStatus_Delivered) Reset() { *x = SendStatus_Delivered{} - mi := &file_backuppb_Backup_proto_msgTypes[108] + mi := &file_backuppb_Backup_proto_msgTypes[105] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10335,7 +9994,7 @@ func (x *SendStatus_Delivered) String() string { func (*SendStatus_Delivered) ProtoMessage() {} func (x *SendStatus_Delivered) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[108] + mi := &file_backuppb_Backup_proto_msgTypes[105] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10367,7 +10026,7 @@ type SendStatus_Read struct { func (x *SendStatus_Read) Reset() { *x = SendStatus_Read{} - mi := &file_backuppb_Backup_proto_msgTypes[109] + mi := &file_backuppb_Backup_proto_msgTypes[106] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10379,7 +10038,7 @@ func (x *SendStatus_Read) String() string { func (*SendStatus_Read) ProtoMessage() {} func (x *SendStatus_Read) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[109] + mi := &file_backuppb_Backup_proto_msgTypes[106] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10411,7 +10070,7 @@ type SendStatus_Viewed struct { func (x *SendStatus_Viewed) Reset() { *x = SendStatus_Viewed{} - mi := &file_backuppb_Backup_proto_msgTypes[110] + mi := &file_backuppb_Backup_proto_msgTypes[107] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10423,7 +10082,7 @@ func (x *SendStatus_Viewed) String() string { func (*SendStatus_Viewed) ProtoMessage() {} func (x *SendStatus_Viewed) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[110] + mi := &file_backuppb_Backup_proto_msgTypes[107] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10455,7 +10114,7 @@ type SendStatus_Skipped struct { func (x *SendStatus_Skipped) Reset() { *x = SendStatus_Skipped{} - mi := &file_backuppb_Backup_proto_msgTypes[111] + mi := &file_backuppb_Backup_proto_msgTypes[108] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10467,7 +10126,7 @@ func (x *SendStatus_Skipped) String() string { func (*SendStatus_Skipped) ProtoMessage() {} func (x *SendStatus_Skipped) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[111] + mi := &file_backuppb_Backup_proto_msgTypes[108] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10492,7 +10151,7 @@ type SendStatus_Failed struct { func (x *SendStatus_Failed) Reset() { *x = SendStatus_Failed{} - mi := &file_backuppb_Backup_proto_msgTypes[112] + mi := &file_backuppb_Backup_proto_msgTypes[109] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10504,7 +10163,7 @@ func (x *SendStatus_Failed) String() string { func (*SendStatus_Failed) ProtoMessage() {} func (x *SendStatus_Failed) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[112] + mi := &file_backuppb_Backup_proto_msgTypes[109] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10537,7 +10196,7 @@ type DirectStoryReplyMessage_TextReply struct { func (x *DirectStoryReplyMessage_TextReply) Reset() { *x = DirectStoryReplyMessage_TextReply{} - mi := &file_backuppb_Backup_proto_msgTypes[113] + mi := &file_backuppb_Backup_proto_msgTypes[110] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10549,7 +10208,7 @@ func (x *DirectStoryReplyMessage_TextReply) String() string { func (*DirectStoryReplyMessage_TextReply) ProtoMessage() {} func (x *DirectStoryReplyMessage_TextReply) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[113] + mi := &file_backuppb_Backup_proto_msgTypes[110] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10594,7 +10253,7 @@ type PaymentNotification_TransactionDetails struct { func (x *PaymentNotification_TransactionDetails) Reset() { *x = PaymentNotification_TransactionDetails{} - mi := &file_backuppb_Backup_proto_msgTypes[114] + mi := &file_backuppb_Backup_proto_msgTypes[111] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10606,7 +10265,7 @@ func (x *PaymentNotification_TransactionDetails) String() string { func (*PaymentNotification_TransactionDetails) ProtoMessage() {} func (x *PaymentNotification_TransactionDetails) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[114] + mi := &file_backuppb_Backup_proto_msgTypes[111] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10675,7 +10334,7 @@ type PaymentNotification_TransactionDetails_MobileCoinTxoIdentification struct { func (x *PaymentNotification_TransactionDetails_MobileCoinTxoIdentification) Reset() { *x = PaymentNotification_TransactionDetails_MobileCoinTxoIdentification{} - mi := &file_backuppb_Backup_proto_msgTypes[115] + mi := &file_backuppb_Backup_proto_msgTypes[112] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10687,7 +10346,7 @@ func (x *PaymentNotification_TransactionDetails_MobileCoinTxoIdentification) Str func (*PaymentNotification_TransactionDetails_MobileCoinTxoIdentification) ProtoMessage() {} func (x *PaymentNotification_TransactionDetails_MobileCoinTxoIdentification) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[115] + mi := &file_backuppb_Backup_proto_msgTypes[112] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10726,7 +10385,7 @@ type PaymentNotification_TransactionDetails_FailedTransaction struct { func (x *PaymentNotification_TransactionDetails_FailedTransaction) Reset() { *x = PaymentNotification_TransactionDetails_FailedTransaction{} - mi := &file_backuppb_Backup_proto_msgTypes[116] + mi := &file_backuppb_Backup_proto_msgTypes[113] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10738,7 +10397,7 @@ func (x *PaymentNotification_TransactionDetails_FailedTransaction) String() stri func (*PaymentNotification_TransactionDetails_FailedTransaction) ProtoMessage() {} func (x *PaymentNotification_TransactionDetails_FailedTransaction) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[116] + mi := &file_backuppb_Backup_proto_msgTypes[113] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10779,7 +10438,7 @@ type PaymentNotification_TransactionDetails_Transaction struct { func (x *PaymentNotification_TransactionDetails_Transaction) Reset() { *x = PaymentNotification_TransactionDetails_Transaction{} - mi := &file_backuppb_Backup_proto_msgTypes[117] + mi := &file_backuppb_Backup_proto_msgTypes[114] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10791,7 +10450,7 @@ func (x *PaymentNotification_TransactionDetails_Transaction) String() string { func (*PaymentNotification_TransactionDetails_Transaction) ProtoMessage() {} func (x *PaymentNotification_TransactionDetails_Transaction) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[117] + mi := &file_backuppb_Backup_proto_msgTypes[114] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10870,7 +10529,7 @@ type ContactAttachment_Name struct { func (x *ContactAttachment_Name) Reset() { *x = ContactAttachment_Name{} - mi := &file_backuppb_Backup_proto_msgTypes[118] + mi := &file_backuppb_Backup_proto_msgTypes[115] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10882,7 +10541,7 @@ func (x *ContactAttachment_Name) String() string { func (*ContactAttachment_Name) ProtoMessage() {} func (x *ContactAttachment_Name) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[118] + mi := &file_backuppb_Backup_proto_msgTypes[115] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10951,7 +10610,7 @@ type ContactAttachment_Phone struct { func (x *ContactAttachment_Phone) Reset() { *x = ContactAttachment_Phone{} - mi := &file_backuppb_Backup_proto_msgTypes[119] + mi := &file_backuppb_Backup_proto_msgTypes[116] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10963,7 +10622,7 @@ func (x *ContactAttachment_Phone) String() string { func (*ContactAttachment_Phone) ProtoMessage() {} func (x *ContactAttachment_Phone) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[119] + mi := &file_backuppb_Backup_proto_msgTypes[116] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11011,7 +10670,7 @@ type ContactAttachment_Email struct { func (x *ContactAttachment_Email) Reset() { *x = ContactAttachment_Email{} - mi := &file_backuppb_Backup_proto_msgTypes[120] + mi := &file_backuppb_Backup_proto_msgTypes[117] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11023,7 +10682,7 @@ func (x *ContactAttachment_Email) String() string { func (*ContactAttachment_Email) ProtoMessage() {} func (x *ContactAttachment_Email) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[120] + mi := &file_backuppb_Backup_proto_msgTypes[117] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11077,7 +10736,7 @@ type ContactAttachment_PostalAddress struct { func (x *ContactAttachment_PostalAddress) Reset() { *x = ContactAttachment_PostalAddress{} - mi := &file_backuppb_Backup_proto_msgTypes[121] + mi := &file_backuppb_Backup_proto_msgTypes[118] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11089,7 +10748,7 @@ func (x *ContactAttachment_PostalAddress) String() string { func (*ContactAttachment_PostalAddress) ProtoMessage() {} func (x *ContactAttachment_PostalAddress) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[121] + mi := &file_backuppb_Backup_proto_msgTypes[118] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11204,7 +10863,7 @@ type FilePointer_LocatorInfo struct { func (x *FilePointer_LocatorInfo) Reset() { *x = FilePointer_LocatorInfo{} - mi := &file_backuppb_Backup_proto_msgTypes[122] + mi := &file_backuppb_Backup_proto_msgTypes[119] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11216,7 +10875,7 @@ func (x *FilePointer_LocatorInfo) String() string { func (*FilePointer_LocatorInfo) ProtoMessage() {} func (x *FilePointer_LocatorInfo) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[122] + mi := &file_backuppb_Backup_proto_msgTypes[119] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11336,7 +10995,7 @@ type Quote_QuotedAttachment struct { func (x *Quote_QuotedAttachment) Reset() { *x = Quote_QuotedAttachment{} - mi := &file_backuppb_Backup_proto_msgTypes[123] + mi := &file_backuppb_Backup_proto_msgTypes[120] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11348,7 +11007,7 @@ func (x *Quote_QuotedAttachment) String() string { func (*Quote_QuotedAttachment) ProtoMessage() {} func (x *Quote_QuotedAttachment) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[123] + mi := &file_backuppb_Backup_proto_msgTypes[120] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11395,7 +11054,7 @@ type Poll_PollOption struct { func (x *Poll_PollOption) Reset() { *x = Poll_PollOption{} - mi := &file_backuppb_Backup_proto_msgTypes[124] + mi := &file_backuppb_Backup_proto_msgTypes[121] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11407,7 +11066,7 @@ func (x *Poll_PollOption) String() string { func (*Poll_PollOption) ProtoMessage() {} func (x *Poll_PollOption) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[124] + mi := &file_backuppb_Backup_proto_msgTypes[121] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11447,7 +11106,7 @@ type Poll_PollOption_PollVote struct { func (x *Poll_PollOption_PollVote) Reset() { *x = Poll_PollOption_PollVote{} - mi := &file_backuppb_Backup_proto_msgTypes[125] + mi := &file_backuppb_Backup_proto_msgTypes[122] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11459,7 +11118,7 @@ func (x *Poll_PollOption_PollVote) String() string { func (*Poll_PollOption_PollVote) ProtoMessage() {} func (x *Poll_PollOption_PollVote) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[125] + mi := &file_backuppb_Backup_proto_msgTypes[122] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11529,8 +11188,6 @@ type GroupChangeChatUpdate_Update struct { // *GroupChangeChatUpdate_Update_GroupV2MigrationDroppedMembersUpdate // *GroupChangeChatUpdate_Update_GroupSequenceOfRequestsAndCancelsUpdate // *GroupChangeChatUpdate_Update_GroupExpirationTimerUpdate - // *GroupChangeChatUpdate_Update_GroupMemberLabelAccessLevelChangeUpdate - // *GroupChangeChatUpdate_Update_GroupTerminateChangeUpdate Update isGroupChangeChatUpdate_Update_Update `protobuf_oneof:"update"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -11538,7 +11195,7 @@ type GroupChangeChatUpdate_Update struct { func (x *GroupChangeChatUpdate_Update) Reset() { *x = GroupChangeChatUpdate_Update{} - mi := &file_backuppb_Backup_proto_msgTypes[126] + mi := &file_backuppb_Backup_proto_msgTypes[123] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -11550,7 +11207,7 @@ func (x *GroupChangeChatUpdate_Update) String() string { func (*GroupChangeChatUpdate_Update) ProtoMessage() {} func (x *GroupChangeChatUpdate_Update) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[126] + mi := &file_backuppb_Backup_proto_msgTypes[123] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -11563,7 +11220,7 @@ func (x *GroupChangeChatUpdate_Update) ProtoReflect() protoreflect.Message { // Deprecated: Use GroupChangeChatUpdate_Update.ProtoReflect.Descriptor instead. func (*GroupChangeChatUpdate_Update) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{43, 0} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{42, 0} } func (x *GroupChangeChatUpdate_Update) GetUpdate() isGroupChangeChatUpdate_Update_Update { @@ -11879,24 +11536,6 @@ func (x *GroupChangeChatUpdate_Update) GetGroupExpirationTimerUpdate() *GroupExp return nil } -func (x *GroupChangeChatUpdate_Update) GetGroupMemberLabelAccessLevelChangeUpdate() *GroupMemberLabelAccessLevelChangeUpdate { - if x != nil { - if x, ok := x.Update.(*GroupChangeChatUpdate_Update_GroupMemberLabelAccessLevelChangeUpdate); ok { - return x.GroupMemberLabelAccessLevelChangeUpdate - } - } - return nil -} - -func (x *GroupChangeChatUpdate_Update) GetGroupTerminateChangeUpdate() *GroupTerminateChangeUpdate { - if x != nil { - if x, ok := x.Update.(*GroupChangeChatUpdate_Update_GroupTerminateChangeUpdate); ok { - return x.GroupTerminateChangeUpdate - } - } - return nil -} - type isGroupChangeChatUpdate_Update_Update interface { isGroupChangeChatUpdate_Update_Update() } @@ -12037,14 +11676,6 @@ type GroupChangeChatUpdate_Update_GroupExpirationTimerUpdate struct { GroupExpirationTimerUpdate *GroupExpirationTimerUpdate `protobuf:"bytes,34,opt,name=groupExpirationTimerUpdate,proto3,oneof"` } -type GroupChangeChatUpdate_Update_GroupMemberLabelAccessLevelChangeUpdate struct { - GroupMemberLabelAccessLevelChangeUpdate *GroupMemberLabelAccessLevelChangeUpdate `protobuf:"bytes,35,opt,name=groupMemberLabelAccessLevelChangeUpdate,proto3,oneof"` -} - -type GroupChangeChatUpdate_Update_GroupTerminateChangeUpdate struct { - GroupTerminateChangeUpdate *GroupTerminateChangeUpdate `protobuf:"bytes,36,opt,name=groupTerminateChangeUpdate,proto3,oneof"` -} - func (*GroupChangeChatUpdate_Update_GenericGroupUpdate) isGroupChangeChatUpdate_Update_Update() {} func (*GroupChangeChatUpdate_Update_GroupCreationUpdate) isGroupChangeChatUpdate_Update_Update() {} @@ -12137,12 +11768,6 @@ func (*GroupChangeChatUpdate_Update_GroupSequenceOfRequestsAndCancelsUpdate) isG func (*GroupChangeChatUpdate_Update_GroupExpirationTimerUpdate) isGroupChangeChatUpdate_Update_Update() { } -func (*GroupChangeChatUpdate_Update_GroupMemberLabelAccessLevelChangeUpdate) isGroupChangeChatUpdate_Update_Update() { -} - -func (*GroupChangeChatUpdate_Update_GroupTerminateChangeUpdate) isGroupChangeChatUpdate_Update_Update() { -} - type GroupInvitationRevokedUpdate_Invitee struct { state protoimpl.MessageState `protogen:"open.v1"` InviterAci []byte `protobuf:"bytes,1,opt,name=inviterAci,proto3,oneof" json:"inviterAci,omitempty"` @@ -12156,7 +11781,7 @@ type GroupInvitationRevokedUpdate_Invitee struct { func (x *GroupInvitationRevokedUpdate_Invitee) Reset() { *x = GroupInvitationRevokedUpdate_Invitee{} - mi := &file_backuppb_Backup_proto_msgTypes[127] + mi := &file_backuppb_Backup_proto_msgTypes[124] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12168,7 +11793,7 @@ func (x *GroupInvitationRevokedUpdate_Invitee) String() string { func (*GroupInvitationRevokedUpdate_Invitee) ProtoMessage() {} func (x *GroupInvitationRevokedUpdate_Invitee) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[127] + mi := &file_backuppb_Backup_proto_msgTypes[124] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12181,7 +11806,7 @@ func (x *GroupInvitationRevokedUpdate_Invitee) ProtoReflect() protoreflect.Messa // Deprecated: Use GroupInvitationRevokedUpdate_Invitee.ProtoReflect.Descriptor instead. func (*GroupInvitationRevokedUpdate_Invitee) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{65, 0} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{62, 0} } func (x *GroupInvitationRevokedUpdate_Invitee) GetInviterAci() []byte { @@ -12216,7 +11841,7 @@ type ChatStyle_Gradient struct { func (x *ChatStyle_Gradient) Reset() { *x = ChatStyle_Gradient{} - mi := &file_backuppb_Backup_proto_msgTypes[128] + mi := &file_backuppb_Backup_proto_msgTypes[125] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12228,7 +11853,7 @@ func (x *ChatStyle_Gradient) String() string { func (*ChatStyle_Gradient) ProtoMessage() {} func (x *ChatStyle_Gradient) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[128] + mi := &file_backuppb_Backup_proto_msgTypes[125] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12241,7 +11866,7 @@ func (x *ChatStyle_Gradient) ProtoReflect() protoreflect.Message { // Deprecated: Use ChatStyle_Gradient.ProtoReflect.Descriptor instead. func (*ChatStyle_Gradient) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{83, 0} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{80, 0} } func (x *ChatStyle_Gradient) GetAngle() uint32 { @@ -12281,7 +11906,7 @@ type ChatStyle_CustomChatColor struct { func (x *ChatStyle_CustomChatColor) Reset() { *x = ChatStyle_CustomChatColor{} - mi := &file_backuppb_Backup_proto_msgTypes[129] + mi := &file_backuppb_Backup_proto_msgTypes[126] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12293,7 +11918,7 @@ func (x *ChatStyle_CustomChatColor) String() string { func (*ChatStyle_CustomChatColor) ProtoMessage() {} func (x *ChatStyle_CustomChatColor) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[129] + mi := &file_backuppb_Backup_proto_msgTypes[126] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12306,7 +11931,7 @@ func (x *ChatStyle_CustomChatColor) ProtoReflect() protoreflect.Message { // Deprecated: Use ChatStyle_CustomChatColor.ProtoReflect.Descriptor instead. func (*ChatStyle_CustomChatColor) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{83, 1} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{80, 1} } func (x *ChatStyle_CustomChatColor) GetId() uint64 { @@ -12365,7 +11990,7 @@ type ChatStyle_AutomaticBubbleColor struct { func (x *ChatStyle_AutomaticBubbleColor) Reset() { *x = ChatStyle_AutomaticBubbleColor{} - mi := &file_backuppb_Backup_proto_msgTypes[130] + mi := &file_backuppb_Backup_proto_msgTypes[127] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -12377,7 +12002,7 @@ func (x *ChatStyle_AutomaticBubbleColor) String() string { func (*ChatStyle_AutomaticBubbleColor) ProtoMessage() {} func (x *ChatStyle_AutomaticBubbleColor) ProtoReflect() protoreflect.Message { - mi := &file_backuppb_Backup_proto_msgTypes[130] + mi := &file_backuppb_Backup_proto_msgTypes[127] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -12390,7 +12015,7 @@ func (x *ChatStyle_AutomaticBubbleColor) ProtoReflect() protoreflect.Message { // Deprecated: Use ChatStyle_AutomaticBubbleColor.ProtoReflect.Descriptor instead. func (*ChatStyle_AutomaticBubbleColor) Descriptor() ([]byte, []int) { - return file_backuppb_Backup_proto_rawDescGZIP(), []int{83, 2} + return file_backuppb_Backup_proto_rawDescGZIP(), []int{80, 2} } var File_backuppb_Backup_proto protoreflect.FileDescriptor @@ -12417,7 +12042,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\n" + "chatFolder\x18\b \x01(\v2\x19.signal.backup.ChatFolderH\x00R\n" + "chatFolderB\x06\n" + - "\x04item\"\x9e)\n" + + "\x04item\"\xf9\"\n" + "\vAccountData\x12\x1e\n" + "\n" + "profileKey\x18\x01 \x01(\fR\n" + @@ -12436,7 +12061,8 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x06svrPin\x18\v \x01(\tR\x06svrPin\x12l\n" + "\x17androidSpecificSettings\x18\f \x01(\v22.signal.backup.AccountData.AndroidSpecificSettingsR\x17androidSpecificSettings\x12\x18\n" + "\abioText\x18\r \x01(\tR\abioText\x12\x1a\n" + - "\bbioEmoji\x18\x0e \x01(\tR\bbioEmoji\x1a\xf6\x01\n" + + "\bbioEmoji\x18\x0e \x01(\tR\bbioEmoji\x125\n" + + "\x13keyTransparencyData\x18\x0f \x01(\fH\x01R\x13keyTransparencyData\x88\x01\x01\x1a\xf6\x01\n" + "\fUsernameLink\x12\x18\n" + "\aentropy\x18\x01 \x01(\fR\aentropy\x12\x1a\n" + "\bserverId\x18\x02 \x01(\fR\bserverId\x12C\n" + @@ -12462,7 +12088,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\aUNKNOWN\x10\x00\x12\t\n" + "\x05NEVER\x10\x01\x12\b\n" + "\x04WIFI\x10\x02\x12\x15\n" + - "\x11WIFI_AND_CELLULAR\x10\x03\x1a\xb7\x16\n" + + "\x11WIFI_AND_CELLULAR\x10\x03\x1a\xc9\x0f\n" + "\x0fAccountSettings\x12\"\n" + "\freadReceipts\x18\x01 \x01(\bR\freadReceipts\x126\n" + "\x16sealedSenderIndicators\x18\x02 \x01(\bR\x16sealedSenderIndicators\x12*\n" + @@ -12495,32 +12121,11 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\bappTheme\x18\x1c \x01(\x0e2#.signal.backup.AccountData.AppThemeR\bappTheme\x12l\n" + "\x17callsUseLessDataSetting\x18\x1d \x01(\x0e22.signal.backup.AccountData.CallsUseLessDataSettingR\x17callsUseLessDataSetting\x12@\n" + "\x1ballowSealedSenderFromAnyone\x18\x1e \x01(\bR\x1ballowSealedSenderFromAnyone\x12D\n" + - "\x1dallowAutomaticKeyVerification\x18\x1f \x01(\bR\x1dallowAutomaticKeyVerification\x12L\n" + - "!hasSeenAdminDeleteEducationDialog\x18 \x01(\bR!hasSeenAdminDeleteEducationDialog\x12d\n" + - "\x0funreadBadgeType\x18! \x01(\x0e2:.signal.backup.AccountData.AccountSettings.UnreadBadgeTypeR\x0funreadBadgeType\x12?\n" + - "\x18includeMutedChatsInBadge\x18\" \x01(\bH\x04R\x18includeMutedChatsInBadge\x88\x01\x01\x129\n" + - "\x15reactionNotifications\x18# \x01(\bH\x05R\x15reactionNotifications\x88\x01\x01\x129\n" + - "\x15notifyForCallsIfMuted\x18$ \x01(\bH\x06R\x15notifyForCallsIfMuted\x88\x01\x01\x12?\n" + - "\x18notifyForMentionsIfMuted\x18% \x01(\bH\aR\x18notifyForMentionsIfMuted\x88\x01\x01\x12=\n" + - "\x17notifyForRepliesIfMuted\x18& \x01(\bH\bR\x17notifyForRepliesIfMuted\x88\x01\x01\x125\n" + - "\x13showUnreadReminders\x18' \x01(\bH\tR\x13showUnreadReminders\x88\x01\x01\x12;\n" + - "\x16notifyWhenContactJoins\x18( \x01(\bH\n" + - "R\x16notifyWhenContactJoins\x88\x01\x01\"P\n" + - "\x0fUnreadBadgeType\x12\x16\n" + - "\x12UNKNOWN_BADGE_TYPE\x10\x00\x12\x13\n" + - "\x0fUNREAD_MESSAGES\x10\x01\x12\x10\n" + - "\fUNREAD_CHATS\x10\x02B\x1b\n" + + "\x1dallowAutomaticKeyVerification\x18\x1f \x01(\bR\x1dallowAutomaticKeyVerificationB\x1b\n" + "\x19_storyViewReceiptsEnabledB\r\n" + "\v_backupTierB\x1b\n" + "\x19_screenLockTimeoutMinutesB\x0f\n" + - "\r_pinRemindersB\x1b\n" + - "\x19_includeMutedChatsInBadgeB\x18\n" + - "\x16_reactionNotificationsB\x18\n" + - "\x16_notifyForCallsIfMutedB\x1b\n" + - "\x19_notifyForMentionsIfMutedB\x1a\n" + - "\x18_notifyForRepliesIfMutedB\x16\n" + - "\x14_showUnreadRemindersB\x19\n" + - "\x17_notifyWhenContactJoinsJ\x04\b\x16\x10\x17J\x04\b\x19\x10\x1a\x1a\x86\x01\n" + + "\r_pinRemindersJ\x04\b\x16\x10\x17J\x04\b\x19\x10\x1a\x1a\x86\x01\n" + "\x0eSubscriberData\x12\"\n" + "\fsubscriberId\x18\x01 \x01(\fR\fsubscriberId\x12\"\n" + "\fcurrencyCode\x18\x02 \x01(\tR\fcurrencyCode\x12,\n" + @@ -12559,7 +12164,8 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x05NEVER\x10\x01\x12\x14\n" + "\x10MOBILE_DATA_ONLY\x10\x02\x12\x18\n" + "\x14WIFI_AND_MOBILE_DATA\x10\x03B\v\n" + - "\t_usernameJ\x04\b\b\x10\tJ\x04\b\x0f\x10\x10\"\x84\x03\n" + + "\t_usernameB\x16\n" + + "\x14_keyTransparencyDataJ\x04\b\b\x10\t\"\x84\x03\n" + "\tRecipient\x12\x0e\n" + "\x02id\x18\x01 \x01(\x04R\x02id\x122\n" + "\acontact\x18\x02 \x01(\v2\x16.signal.backup.ContactH\x00R\acontact\x12,\n" + @@ -12568,7 +12174,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x04self\x18\x05 \x01(\v2\x13.signal.backup.SelfH\x00R\x04self\x12A\n" + "\freleaseNotes\x18\x06 \x01(\v2\x1b.signal.backup.ReleaseNotesH\x00R\freleaseNotes\x125\n" + "\bcallLink\x18\a \x01(\v2\x17.signal.backup.CallLinkH\x00R\bcallLinkB\r\n" + - "\vdestination\"\xca\v\n" + + "\vdestination\"\x9a\v\n" + "\aContact\x12\x15\n" + "\x03aci\x18\x01 \x01(\fH\x01R\x03aci\x88\x01\x01\x12\x15\n" + "\x03pni\x18\x02 \x01(\fH\x02R\x03pni\x88\x01\x01\x12\x1f\n" + @@ -12599,8 +12205,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x0esystemNickname\x18\x14 \x01(\tR\x0esystemNickname\x12A\n" + "\vavatarColor\x18\x15 \x01(\x0e2\x1a.signal.backup.AvatarColorH\tR\vavatarColor\x88\x01\x01\x125\n" + "\x13keyTransparencyData\x18\x16 \x01(\fH\n" + - "R\x13keyTransparencyData\x88\x01\x01\x12.\n" + - "\x12blockedAtTimestamp\x18\x17 \x01(\x04R\x12blockedAtTimestamp\x1a\f\n" + + "R\x13keyTransparencyData\x88\x01\x01\x1a\f\n" + "\n" + "Registered\x1aE\n" + "\rNotRegistered\x124\n" + @@ -12629,7 +12234,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x12_profileFamilyNameB\x0e\n" + "\f_identityKeyB\x0e\n" + "\f_avatarColorB\x16\n" + - "\x14_keyTransparencyData\"\xf6\x13\n" + + "\x14_keyTransparencyData\"\x8f\x12\n" + "\x05Group\x12\x1c\n" + "\tmasterKey\x18\x01 \x01(\fR\tmasterKey\x12 \n" + "\vwhitelisted\x18\x02 \x01(\bR\vwhitelisted\x12\x1c\n" + @@ -12637,8 +12242,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\rstorySendMode\x18\x04 \x01(\x0e2\".signal.backup.Group.StorySendModeR\rstorySendMode\x12>\n" + "\bsnapshot\x18\x05 \x01(\v2\".signal.backup.Group.GroupSnapshotR\bsnapshot\x12\x18\n" + "\ablocked\x18\x06 \x01(\bR\ablocked\x12A\n" + - "\vavatarColor\x18\a \x01(\x0e2\x1a.signal.backup.AvatarColorH\x00R\vavatarColor\x88\x01\x01\x12.\n" + - "\x12blockedAtTimestamp\x18\b \x01(\x04R\x12blockedAtTimestamp\x1a\xe5\x06\n" + + "\vavatarColor\x18\a \x01(\x0e2\x1a.signal.backup.AvatarColorH\x00R\vavatarColor\x88\x01\x01\x1a\xc5\x06\n" + "\rGroupSnapshot\x12=\n" + "\x05title\x18\x02 \x01(\v2'.signal.backup.Group.GroupAttributeBlobR\x05title\x12I\n" + "\vdescription\x18\v \x01(\v2'.signal.backup.Group.GroupAttributeBlobR\vdescription\x12\x1c\n" + @@ -12652,24 +12256,17 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x12inviteLinkPassword\x18\n" + " \x01(\fR\x12inviteLinkPassword\x12-\n" + "\x12announcements_only\x18\f \x01(\bR\x11announcementsOnly\x12H\n" + - "\x0emembers_banned\x18\r \x03(\v2!.signal.backup.Group.MemberBannedR\rmembersBanned\x12\x1e\n" + - "\n" + - "terminated\x18\x0e \x01(\bR\n" + - "terminatedJ\x04\b\x01\x10\x02\x1a\xc3\x01\n" + + "\x0emembers_banned\x18\r \x03(\v2!.signal.backup.Group.MemberBannedR\rmembersBannedJ\x04\b\x01\x10\x02\x1a\xc3\x01\n" + "\x12GroupAttributeBlob\x12\x16\n" + "\x05title\x18\x01 \x01(\tH\x00R\x05title\x12\x18\n" + "\x06avatar\x18\x02 \x01(\fH\x00R\x06avatar\x12D\n" + "\x1cdisappearingMessagesDuration\x18\x03 \x01(\rH\x00R\x1cdisappearingMessagesDuration\x12*\n" + "\x0fdescriptionText\x18\x04 \x01(\tH\x00R\x0fdescriptionTextB\t\n" + - "\acontent\x1a\x83\x02\n" + + "\acontent\x1a\xc1\x01\n" + "\x06Member\x12\x16\n" + "\x06userId\x18\x01 \x01(\fR\x06userId\x124\n" + "\x04role\x18\x02 \x01(\x0e2 .signal.backup.Group.Member.RoleR\x04role\x12(\n" + - "\x0fjoinedAtVersion\x18\x05 \x01(\rR\x0fjoinedAtVersion\x12\x1e\n" + - "\n" + - "labelEmoji\x18\x06 \x01(\tR\n" + - "labelEmoji\x12 \n" + - "\vlabelString\x18\a \x01(\tR\vlabelString\"3\n" + + "\x0fjoinedAtVersion\x18\x05 \x01(\rR\x0fjoinedAtVersion\"3\n" + "\x04Role\x12\v\n" + "\aUNKNOWN\x10\x00\x12\v\n" + "\aDEFAULT\x10\x01\x12\x11\n" + @@ -12683,14 +12280,13 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\ttimestamp\x18\x04 \x01(\x04R\ttimestampJ\x04\b\x02\x10\x03J\x04\b\x03\x10\x04\x1aD\n" + "\fMemberBanned\x12\x16\n" + "\x06userId\x18\x01 \x01(\fR\x06userId\x12\x1c\n" + - "\ttimestamp\x18\x02 \x01(\x04R\ttimestamp\x1a\xbf\x03\n" + + "\ttimestamp\x18\x02 \x01(\x04R\ttimestamp\x1a\xea\x02\n" + "\rAccessControl\x12Q\n" + "\n" + "attributes\x18\x01 \x01(\x0e21.signal.backup.Group.AccessControl.AccessRequiredR\n" + "attributes\x12K\n" + "\amembers\x18\x02 \x01(\x0e21.signal.backup.Group.AccessControl.AccessRequiredR\amembers\x12_\n" + - "\x11addFromInviteLink\x18\x03 \x01(\x0e21.signal.backup.Group.AccessControl.AccessRequiredR\x11addFromInviteLink\x12S\n" + - "\vmemberLabel\x18\x04 \x01(\x0e21.signal.backup.Group.AccessControl.AccessRequiredR\vmemberLabel\"X\n" + + "\x11addFromInviteLink\x18\x03 \x01(\x0e21.signal.backup.Group.AccessControl.AccessRequiredR\x11addFromInviteLink\"X\n" + "\x0eAccessRequired\x12\v\n" + "\aUNKNOWN\x10\x00\x12\a\n" + "\x03ANY\x10\x01\x12\n" + @@ -12706,7 +12302,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x04Self\x12A\n" + "\vavatarColor\x18\x01 \x01(\x0e2\x1a.signal.backup.AvatarColorH\x00R\vavatarColor\x88\x01\x01B\x0e\n" + "\f_avatarColor\"\x0e\n" + - "\fReleaseNotes\"\xb0\x06\n" + + "\fReleaseNotes\"\xd3\x03\n" + "\x04Chat\x12\x0e\n" + "\x02id\x18\x01 \x01(\x04R\x02id\x12 \n" + "\vrecipientId\x18\x02 \x01(\x04R\vrecipientId\x12\x1a\n" + @@ -12718,29 +12314,23 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x1cdontNotifyForMentionsIfMuted\x18\b \x01(\bR\x1cdontNotifyForMentionsIfMuted\x12.\n" + "\x05style\x18\t \x01(\v2\x18.signal.backup.ChatStyleR\x05style\x12.\n" + "\x12expireTimerVersion\x18\n" + - " \x01(\rR\x12expireTimerVersion\x129\n" + - "\x15notifyForCallsIfMuted\x18\v \x01(\bH\x03R\x15notifyForCallsIfMuted\x88\x01\x01\x12?\n" + - "\x18notifyForMentionsIfMuted\x18\f \x01(\bH\x04R\x18notifyForMentionsIfMuted\x88\x01\x01\x12=\n" + - "\x17notifyForRepliesIfMuted\x18\r \x01(\bH\x05R\x17notifyForRepliesIfMuted\x88\x01\x01\x125\n" + - "\x13showUnreadReminders\x18\x0e \x01(\bH\x06R\x13showUnreadReminders\x88\x01\x01B\x0e\n" + + " \x01(\rR\x12expireTimerVersionB\x0e\n" + "\f_pinnedOrderB\x14\n" + "\x12_expirationTimerMsB\x0e\n" + - "\f_muteUntilMsB\x18\n" + - "\x16_notifyForCallsIfMutedB\x1b\n" + - "\x19_notifyForMentionsIfMutedB\x1a\n" + - "\x18_notifyForRepliesIfMutedB\x16\n" + - "\x14_showUnreadReminders\"\x95\x02\n" + + "\f_muteUntilMs\"\xb4\x02\n" + "\bCallLink\x12\x18\n" + "\arootKey\x18\x01 \x01(\fR\arootKey\x12\x1f\n" + "\badminKey\x18\x02 \x01(\fH\x00R\badminKey\x88\x01\x01\x12\x12\n" + "\x04name\x18\x03 \x01(\tR\x04name\x12H\n" + "\frestrictions\x18\x04 \x01(\x0e2$.signal.backup.CallLink.RestrictionsR\frestrictions\x12\"\n" + - "\fexpirationMs\x18\x05 \x01(\x04R\fexpirationMs\"9\n" + + "\fexpirationMs\x18\x05 \x01(\x04R\fexpirationMs\x12\x19\n" + + "\x05epoch\x18\x06 \x01(\fH\x01R\x05epoch\x88\x01\x01\"9\n" + "\fRestrictions\x12\v\n" + "\aUNKNOWN\x10\x00\x12\b\n" + "\x04NONE\x10\x01\x12\x12\n" + "\x0eADMIN_APPROVAL\x10\x02B\v\n" + - "\t_adminKeyJ\x04\b\x06\x10\a\"\xca\x01\n" + + "\t_adminKeyB\b\n" + + "\x06_epoch\"\xca\x01\n" + "\tAdHocCall\x12\x16\n" + "\x06callId\x18\x01 \x01(\x04R\x06callId\x12 \n" + "\vrecipientId\x18\x02 \x01(\x04R\vrecipientId\x124\n" + @@ -12764,7 +12354,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\tONLY_WITH\x10\x01\x12\x0e\n" + "\n" + "ALL_EXCEPT\x10\x02\x12\a\n" + - "\x03ALL\x10\x03\"\xbd\x0f\n" + + "\x03ALL\x10\x03\"\xe5\x0e\n" + "\bChatItem\x12\x16\n" + "\x06chatId\x18\x01 \x01(\x04R\x06chatId\x12\x1a\n" + "\bauthorId\x18\x02 \x01(\x04R\bauthorId\x12\x1a\n" + @@ -12786,8 +12376,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\tgiftBadge\x18\x11 \x01(\v2\x18.signal.backup.GiftBadgeH\x01R\tgiftBadge\x12J\n" + "\x0fviewOnceMessage\x18\x12 \x01(\v2\x1e.signal.backup.ViewOnceMessageH\x01R\x0fviewOnceMessage\x12b\n" + "\x17directStoryReplyMessage\x18\x13 \x01(\v2&.signal.backup.DirectStoryReplyMessageH\x01R\x17directStoryReplyMessage\x12)\n" + - "\x04poll\x18\x14 \x01(\v2\x13.signal.backup.PollH\x01R\x04poll\x12V\n" + - "\x13adminDeletedMessage\x18\x16 \x01(\v2\".signal.backup.AdminDeletedMessageH\x01R\x13adminDeletedMessage\x12B\n" + + "\x04poll\x18\x14 \x01(\v2\x13.signal.backup.PollH\x01R\x04poll\x12B\n" + "\n" + "pinDetails\x18\x15 \x01(\v2\".signal.backup.ChatItem.PinDetailsR\n" + "pinDetails\x1a\xb4\x01\n" + @@ -13117,9 +12706,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x05votes\x18\x02 \x03(\v2'.signal.backup.Poll.PollOption.PollVoteR\x05votes\x1aB\n" + "\bPollVote\x12\x18\n" + "\avoterId\x18\x01 \x01(\x04R\avoterId\x12\x1c\n" + - "\tvoteCount\x18\x02 \x01(\rR\tvoteCount\"/\n" + - "\x13AdminDeletedMessage\x12\x18\n" + - "\aadminId\x18\x01 \x01(\x04R\aadminId\"\xf7\x06\n" + + "\tvoteCount\x18\x02 \x01(\rR\tvoteCount\"\xf7\x06\n" + "\x11ChatUpdateMessage\x12E\n" + "\fsimpleUpdate\x18\x01 \x01(\v2\x1f.signal.backup.SimpleChatUpdateH\x00R\fsimpleUpdate\x12H\n" + "\vgroupChange\x18\x02 \x01(\v2$.signal.backup.GroupChangeChatUpdateH\x00R\vgroupChange\x12`\n" + @@ -13218,9 +12805,9 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\x15ThreadMergeChatUpdate\x12\"\n" + "\fpreviousE164\x18\x01 \x01(\x04R\fpreviousE164\"1\n" + "\x1bSessionSwitchoverChatUpdate\x12\x12\n" + - "\x04e164\x18\x01 \x01(\x04R\x04e164\"\x88!\n" + + "\x04e164\x18\x01 \x01(\x04R\x04e164\"\x86\x1f\n" + "\x15GroupChangeChatUpdate\x12E\n" + - "\aupdates\x18\x01 \x03(\v2+.signal.backup.GroupChangeChatUpdate.UpdateR\aupdates\x1a\xa7 \n" + + "\aupdates\x18\x01 \x03(\v2+.signal.backup.GroupChangeChatUpdate.UpdateR\aupdates\x1a\xa5\x1e\n" + "\x06Update\x12S\n" + "\x12genericGroupUpdate\x18\x01 \x01(\v2!.signal.backup.GenericGroupUpdateH\x00R\x12genericGroupUpdate\x12V\n" + "\x13groupCreationUpdate\x18\x02 \x01(\v2\".signal.backup.GroupCreationUpdateH\x00R\x13groupCreationUpdate\x12J\n" + @@ -13256,9 +12843,7 @@ const file_backuppb_Backup_proto_rawDesc = "" + "$groupV2MigrationInvitedMembersUpdate\x18\x1f \x01(\v23.signal.backup.GroupV2MigrationInvitedMembersUpdateH\x00R$groupV2MigrationInvitedMembersUpdate\x12\x89\x01\n" + "$groupV2MigrationDroppedMembersUpdate\x18 \x01(\v23.signal.backup.GroupV2MigrationDroppedMembersUpdateH\x00R$groupV2MigrationDroppedMembersUpdate\x12\x92\x01\n" + "'groupSequenceOfRequestsAndCancelsUpdate\x18! \x01(\v26.signal.backup.GroupSequenceOfRequestsAndCancelsUpdateH\x00R'groupSequenceOfRequestsAndCancelsUpdate\x12k\n" + - "\x1agroupExpirationTimerUpdate\x18\" \x01(\v2).signal.backup.GroupExpirationTimerUpdateH\x00R\x1agroupExpirationTimerUpdate\x12\x92\x01\n" + - "'groupMemberLabelAccessLevelChangeUpdate\x18# \x01(\v26.signal.backup.GroupMemberLabelAccessLevelChangeUpdateH\x00R'groupMemberLabelAccessLevelChangeUpdate\x12k\n" + - "\x1agroupTerminateChangeUpdate\x18$ \x01(\v2).signal.backup.GroupTerminateChangeUpdateH\x00R\x1agroupTerminateChangeUpdateB\b\n" + + "\x1agroupExpirationTimerUpdate\x18\" \x01(\v2).signal.backup.GroupExpirationTimerUpdateH\x00R\x1agroupExpirationTimerUpdateB\b\n" + "\x06update\"H\n" + "\x12GenericGroupUpdate\x12#\n" + "\n" + @@ -13303,17 +12888,6 @@ const file_backuppb_Backup_proto_rawDesc = "" + "updaterAci\x18\x01 \x01(\fH\x00R\n" + "updaterAci\x88\x01\x01\x12C\n" + "\vaccessLevel\x18\x02 \x01(\x0e2!.signal.backup.GroupV2AccessLevelR\vaccessLevelB\r\n" + - "\v_updaterAci\"\xa2\x01\n" + - "'GroupMemberLabelAccessLevelChangeUpdate\x12#\n" + - "\n" + - "updaterAci\x18\x01 \x01(\fH\x00R\n" + - "updaterAci\x88\x01\x01\x12C\n" + - "\vaccessLevel\x18\x02 \x01(\x0e2!.signal.backup.GroupV2AccessLevelR\vaccessLevelB\r\n" + - "\v_updaterAci\"P\n" + - "\x1aGroupTerminateChangeUpdate\x12#\n" + - "\n" + - "updaterAci\x18\x01 \x01(\fH\x00R\n" + - "updaterAci\x88\x01\x01B\r\n" + "\v_updaterAci\"\x87\x01\n" + "!GroupAnnouncementOnlyChangeUpdate\x12#\n" + "\n" + @@ -13602,8 +13176,8 @@ const file_backuppb_Backup_proto_rawDesc = "" + "\n" + "\x06MEMBER\x10\x02\x12\x11\n" + "\rADMINISTRATOR\x10\x03\x12\x11\n" + - "\rUNSATISFIABLE\x10\x04B)\n" + - "\x18org.signal.archive.proto\xba\x02\fBackupProto_b\x06proto3" + "\rUNSATISFIABLE\x10\x04B;\n" + + "*org.thoughtcrime.securesms.backup.v2.proto\xba\x02\fBackupProto_b\x06proto3" var ( file_backuppb_Backup_proto_rawDescOnce sync.Once @@ -13617,8 +13191,8 @@ func file_backuppb_Backup_proto_rawDescGZIP() []byte { return file_backuppb_Backup_proto_rawDescData } -var file_backuppb_Backup_proto_enumTypes = make([]protoimpl.EnumInfo, 37) -var file_backuppb_Backup_proto_msgTypes = make([]protoimpl.MessageInfo, 131) +var file_backuppb_Backup_proto_enumTypes = make([]protoimpl.EnumInfo, 36) +var file_backuppb_Backup_proto_msgTypes = make([]protoimpl.MessageInfo, 128) var file_backuppb_Backup_proto_goTypes = []any{ (AvatarColor)(0), // 0: signal.backup.AvatarColor (GroupV2AccessLevel)(0), // 1: signal.backup.GroupV2AccessLevel @@ -13628,369 +13202,359 @@ var file_backuppb_Backup_proto_goTypes = []any{ (AccountData_CallsUseLessDataSetting)(0), // 5: signal.backup.AccountData.CallsUseLessDataSetting (AccountData_UsernameLink_Color)(0), // 6: signal.backup.AccountData.UsernameLink.Color (AccountData_AutoDownloadSettings_AutoDownloadOption)(0), // 7: signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption - (AccountData_AccountSettings_UnreadBadgeType)(0), // 8: signal.backup.AccountData.AccountSettings.UnreadBadgeType - (AccountData_AndroidSpecificSettings_NavigationBarSize)(0), // 9: signal.backup.AccountData.AndroidSpecificSettings.NavigationBarSize - (Contact_IdentityState)(0), // 10: signal.backup.Contact.IdentityState - (Contact_Visibility)(0), // 11: signal.backup.Contact.Visibility - (Group_StorySendMode)(0), // 12: signal.backup.Group.StorySendMode - (Group_Member_Role)(0), // 13: signal.backup.Group.Member.Role - (Group_AccessControl_AccessRequired)(0), // 14: signal.backup.Group.AccessControl.AccessRequired - (CallLink_Restrictions)(0), // 15: signal.backup.CallLink.Restrictions - (AdHocCall_State)(0), // 16: signal.backup.AdHocCall.State - (DistributionList_PrivacyMode)(0), // 17: signal.backup.DistributionList.PrivacyMode - (SendStatus_Failed_FailureReason)(0), // 18: signal.backup.SendStatus.Failed.FailureReason - (PaymentNotification_TransactionDetails_FailedTransaction_FailureReason)(0), // 19: signal.backup.PaymentNotification.TransactionDetails.FailedTransaction.FailureReason - (PaymentNotification_TransactionDetails_Transaction_Status)(0), // 20: signal.backup.PaymentNotification.TransactionDetails.Transaction.Status - (GiftBadge_State)(0), // 21: signal.backup.GiftBadge.State - (ContactAttachment_Phone_Type)(0), // 22: signal.backup.ContactAttachment.Phone.Type - (ContactAttachment_Email_Type)(0), // 23: signal.backup.ContactAttachment.Email.Type - (ContactAttachment_PostalAddress_Type)(0), // 24: signal.backup.ContactAttachment.PostalAddress.Type - (MessageAttachment_Flag)(0), // 25: signal.backup.MessageAttachment.Flag - (Quote_Type)(0), // 26: signal.backup.Quote.Type - (BodyRange_Style)(0), // 27: signal.backup.BodyRange.Style - (IndividualCall_Type)(0), // 28: signal.backup.IndividualCall.Type - (IndividualCall_Direction)(0), // 29: signal.backup.IndividualCall.Direction - (IndividualCall_State)(0), // 30: signal.backup.IndividualCall.State - (GroupCall_State)(0), // 31: signal.backup.GroupCall.State - (SimpleChatUpdate_Type)(0), // 32: signal.backup.SimpleChatUpdate.Type - (ChatStyle_WallpaperPreset)(0), // 33: signal.backup.ChatStyle.WallpaperPreset - (ChatStyle_BubbleColorPreset)(0), // 34: signal.backup.ChatStyle.BubbleColorPreset - (NotificationProfile_DayOfWeek)(0), // 35: signal.backup.NotificationProfile.DayOfWeek - (ChatFolder_FolderType)(0), // 36: signal.backup.ChatFolder.FolderType - (*BackupInfo)(nil), // 37: signal.backup.BackupInfo - (*Frame)(nil), // 38: signal.backup.Frame - (*AccountData)(nil), // 39: signal.backup.AccountData - (*Recipient)(nil), // 40: signal.backup.Recipient - (*Contact)(nil), // 41: signal.backup.Contact - (*Group)(nil), // 42: signal.backup.Group - (*Self)(nil), // 43: signal.backup.Self - (*ReleaseNotes)(nil), // 44: signal.backup.ReleaseNotes - (*Chat)(nil), // 45: signal.backup.Chat - (*CallLink)(nil), // 46: signal.backup.CallLink - (*AdHocCall)(nil), // 47: signal.backup.AdHocCall - (*DistributionListItem)(nil), // 48: signal.backup.DistributionListItem - (*DistributionList)(nil), // 49: signal.backup.DistributionList - (*ChatItem)(nil), // 50: signal.backup.ChatItem - (*SendStatus)(nil), // 51: signal.backup.SendStatus - (*Text)(nil), // 52: signal.backup.Text - (*StandardMessage)(nil), // 53: signal.backup.StandardMessage - (*ContactMessage)(nil), // 54: signal.backup.ContactMessage - (*DirectStoryReplyMessage)(nil), // 55: signal.backup.DirectStoryReplyMessage - (*PaymentNotification)(nil), // 56: signal.backup.PaymentNotification - (*GiftBadge)(nil), // 57: signal.backup.GiftBadge - (*ViewOnceMessage)(nil), // 58: signal.backup.ViewOnceMessage - (*ContactAttachment)(nil), // 59: signal.backup.ContactAttachment - (*StickerMessage)(nil), // 60: signal.backup.StickerMessage - (*RemoteDeletedMessage)(nil), // 61: signal.backup.RemoteDeletedMessage - (*Sticker)(nil), // 62: signal.backup.Sticker - (*LinkPreview)(nil), // 63: signal.backup.LinkPreview - (*MessageAttachment)(nil), // 64: signal.backup.MessageAttachment - (*FilePointer)(nil), // 65: signal.backup.FilePointer - (*Quote)(nil), // 66: signal.backup.Quote - (*BodyRange)(nil), // 67: signal.backup.BodyRange - (*Reaction)(nil), // 68: signal.backup.Reaction - (*Poll)(nil), // 69: signal.backup.Poll - (*AdminDeletedMessage)(nil), // 70: signal.backup.AdminDeletedMessage - (*ChatUpdateMessage)(nil), // 71: signal.backup.ChatUpdateMessage - (*IndividualCall)(nil), // 72: signal.backup.IndividualCall - (*GroupCall)(nil), // 73: signal.backup.GroupCall - (*SimpleChatUpdate)(nil), // 74: signal.backup.SimpleChatUpdate - (*ExpirationTimerChatUpdate)(nil), // 75: signal.backup.ExpirationTimerChatUpdate - (*ProfileChangeChatUpdate)(nil), // 76: signal.backup.ProfileChangeChatUpdate - (*LearnedProfileChatUpdate)(nil), // 77: signal.backup.LearnedProfileChatUpdate - (*ThreadMergeChatUpdate)(nil), // 78: signal.backup.ThreadMergeChatUpdate - (*SessionSwitchoverChatUpdate)(nil), // 79: signal.backup.SessionSwitchoverChatUpdate - (*GroupChangeChatUpdate)(nil), // 80: signal.backup.GroupChangeChatUpdate - (*GenericGroupUpdate)(nil), // 81: signal.backup.GenericGroupUpdate - (*GroupCreationUpdate)(nil), // 82: signal.backup.GroupCreationUpdate - (*GroupNameUpdate)(nil), // 83: signal.backup.GroupNameUpdate - (*GroupAvatarUpdate)(nil), // 84: signal.backup.GroupAvatarUpdate - (*GroupDescriptionUpdate)(nil), // 85: signal.backup.GroupDescriptionUpdate - (*GroupMembershipAccessLevelChangeUpdate)(nil), // 86: signal.backup.GroupMembershipAccessLevelChangeUpdate - (*GroupAttributesAccessLevelChangeUpdate)(nil), // 87: signal.backup.GroupAttributesAccessLevelChangeUpdate - (*GroupMemberLabelAccessLevelChangeUpdate)(nil), // 88: signal.backup.GroupMemberLabelAccessLevelChangeUpdate - (*GroupTerminateChangeUpdate)(nil), // 89: signal.backup.GroupTerminateChangeUpdate - (*GroupAnnouncementOnlyChangeUpdate)(nil), // 90: signal.backup.GroupAnnouncementOnlyChangeUpdate - (*GroupAdminStatusUpdate)(nil), // 91: signal.backup.GroupAdminStatusUpdate - (*GroupMemberLeftUpdate)(nil), // 92: signal.backup.GroupMemberLeftUpdate - (*GroupMemberRemovedUpdate)(nil), // 93: signal.backup.GroupMemberRemovedUpdate - (*SelfInvitedToGroupUpdate)(nil), // 94: signal.backup.SelfInvitedToGroupUpdate - (*SelfInvitedOtherUserToGroupUpdate)(nil), // 95: signal.backup.SelfInvitedOtherUserToGroupUpdate - (*GroupUnknownInviteeUpdate)(nil), // 96: signal.backup.GroupUnknownInviteeUpdate - (*GroupInvitationAcceptedUpdate)(nil), // 97: signal.backup.GroupInvitationAcceptedUpdate - (*GroupInvitationDeclinedUpdate)(nil), // 98: signal.backup.GroupInvitationDeclinedUpdate - (*GroupMemberJoinedUpdate)(nil), // 99: signal.backup.GroupMemberJoinedUpdate - (*GroupMemberAddedUpdate)(nil), // 100: signal.backup.GroupMemberAddedUpdate - (*GroupSelfInvitationRevokedUpdate)(nil), // 101: signal.backup.GroupSelfInvitationRevokedUpdate - (*GroupInvitationRevokedUpdate)(nil), // 102: signal.backup.GroupInvitationRevokedUpdate - (*GroupJoinRequestUpdate)(nil), // 103: signal.backup.GroupJoinRequestUpdate - (*GroupJoinRequestApprovalUpdate)(nil), // 104: signal.backup.GroupJoinRequestApprovalUpdate - (*GroupJoinRequestCanceledUpdate)(nil), // 105: signal.backup.GroupJoinRequestCanceledUpdate - (*GroupSequenceOfRequestsAndCancelsUpdate)(nil), // 106: signal.backup.GroupSequenceOfRequestsAndCancelsUpdate - (*GroupInviteLinkResetUpdate)(nil), // 107: signal.backup.GroupInviteLinkResetUpdate - (*GroupInviteLinkEnabledUpdate)(nil), // 108: signal.backup.GroupInviteLinkEnabledUpdate - (*GroupInviteLinkAdminApprovalUpdate)(nil), // 109: signal.backup.GroupInviteLinkAdminApprovalUpdate - (*GroupInviteLinkDisabledUpdate)(nil), // 110: signal.backup.GroupInviteLinkDisabledUpdate - (*GroupMemberJoinedByLinkUpdate)(nil), // 111: signal.backup.GroupMemberJoinedByLinkUpdate - (*GroupV2MigrationUpdate)(nil), // 112: signal.backup.GroupV2MigrationUpdate - (*GroupV2MigrationSelfInvitedUpdate)(nil), // 113: signal.backup.GroupV2MigrationSelfInvitedUpdate - (*GroupV2MigrationInvitedMembersUpdate)(nil), // 114: signal.backup.GroupV2MigrationInvitedMembersUpdate - (*GroupV2MigrationDroppedMembersUpdate)(nil), // 115: signal.backup.GroupV2MigrationDroppedMembersUpdate - (*GroupExpirationTimerUpdate)(nil), // 116: signal.backup.GroupExpirationTimerUpdate - (*PollTerminateUpdate)(nil), // 117: signal.backup.PollTerminateUpdate - (*PinMessageUpdate)(nil), // 118: signal.backup.PinMessageUpdate - (*StickerPack)(nil), // 119: signal.backup.StickerPack - (*ChatStyle)(nil), // 120: signal.backup.ChatStyle - (*NotificationProfile)(nil), // 121: signal.backup.NotificationProfile - (*ChatFolder)(nil), // 122: signal.backup.ChatFolder - (*AccountData_UsernameLink)(nil), // 123: signal.backup.AccountData.UsernameLink - (*AccountData_AutoDownloadSettings)(nil), // 124: signal.backup.AccountData.AutoDownloadSettings - (*AccountData_AccountSettings)(nil), // 125: signal.backup.AccountData.AccountSettings - (*AccountData_SubscriberData)(nil), // 126: signal.backup.AccountData.SubscriberData - (*AccountData_IAPSubscriberData)(nil), // 127: signal.backup.AccountData.IAPSubscriberData - (*AccountData_AndroidSpecificSettings)(nil), // 128: signal.backup.AccountData.AndroidSpecificSettings - (*Contact_Registered)(nil), // 129: signal.backup.Contact.Registered - (*Contact_NotRegistered)(nil), // 130: signal.backup.Contact.NotRegistered - (*Contact_Name)(nil), // 131: signal.backup.Contact.Name - (*Group_GroupSnapshot)(nil), // 132: signal.backup.Group.GroupSnapshot - (*Group_GroupAttributeBlob)(nil), // 133: signal.backup.Group.GroupAttributeBlob - (*Group_Member)(nil), // 134: signal.backup.Group.Member - (*Group_MemberPendingProfileKey)(nil), // 135: signal.backup.Group.MemberPendingProfileKey - (*Group_MemberPendingAdminApproval)(nil), // 136: signal.backup.Group.MemberPendingAdminApproval - (*Group_MemberBanned)(nil), // 137: signal.backup.Group.MemberBanned - (*Group_AccessControl)(nil), // 138: signal.backup.Group.AccessControl - (*ChatItem_IncomingMessageDetails)(nil), // 139: signal.backup.ChatItem.IncomingMessageDetails - (*ChatItem_OutgoingMessageDetails)(nil), // 140: signal.backup.ChatItem.OutgoingMessageDetails - (*ChatItem_DirectionlessMessageDetails)(nil), // 141: signal.backup.ChatItem.DirectionlessMessageDetails - (*ChatItem_PinDetails)(nil), // 142: signal.backup.ChatItem.PinDetails - (*SendStatus_Pending)(nil), // 143: signal.backup.SendStatus.Pending - (*SendStatus_Sent)(nil), // 144: signal.backup.SendStatus.Sent - (*SendStatus_Delivered)(nil), // 145: signal.backup.SendStatus.Delivered - (*SendStatus_Read)(nil), // 146: signal.backup.SendStatus.Read - (*SendStatus_Viewed)(nil), // 147: signal.backup.SendStatus.Viewed - (*SendStatus_Skipped)(nil), // 148: signal.backup.SendStatus.Skipped - (*SendStatus_Failed)(nil), // 149: signal.backup.SendStatus.Failed - (*DirectStoryReplyMessage_TextReply)(nil), // 150: signal.backup.DirectStoryReplyMessage.TextReply - (*PaymentNotification_TransactionDetails)(nil), // 151: signal.backup.PaymentNotification.TransactionDetails - (*PaymentNotification_TransactionDetails_MobileCoinTxoIdentification)(nil), // 152: signal.backup.PaymentNotification.TransactionDetails.MobileCoinTxoIdentification - (*PaymentNotification_TransactionDetails_FailedTransaction)(nil), // 153: signal.backup.PaymentNotification.TransactionDetails.FailedTransaction - (*PaymentNotification_TransactionDetails_Transaction)(nil), // 154: signal.backup.PaymentNotification.TransactionDetails.Transaction - (*ContactAttachment_Name)(nil), // 155: signal.backup.ContactAttachment.Name - (*ContactAttachment_Phone)(nil), // 156: signal.backup.ContactAttachment.Phone - (*ContactAttachment_Email)(nil), // 157: signal.backup.ContactAttachment.Email - (*ContactAttachment_PostalAddress)(nil), // 158: signal.backup.ContactAttachment.PostalAddress - (*FilePointer_LocatorInfo)(nil), // 159: signal.backup.FilePointer.LocatorInfo - (*Quote_QuotedAttachment)(nil), // 160: signal.backup.Quote.QuotedAttachment - (*Poll_PollOption)(nil), // 161: signal.backup.Poll.PollOption - (*Poll_PollOption_PollVote)(nil), // 162: signal.backup.Poll.PollOption.PollVote - (*GroupChangeChatUpdate_Update)(nil), // 163: signal.backup.GroupChangeChatUpdate.Update - (*GroupInvitationRevokedUpdate_Invitee)(nil), // 164: signal.backup.GroupInvitationRevokedUpdate.Invitee - (*ChatStyle_Gradient)(nil), // 165: signal.backup.ChatStyle.Gradient - (*ChatStyle_CustomChatColor)(nil), // 166: signal.backup.ChatStyle.CustomChatColor - (*ChatStyle_AutomaticBubbleColor)(nil), // 167: signal.backup.ChatStyle.AutomaticBubbleColor + (AccountData_AndroidSpecificSettings_NavigationBarSize)(0), // 8: signal.backup.AccountData.AndroidSpecificSettings.NavigationBarSize + (Contact_IdentityState)(0), // 9: signal.backup.Contact.IdentityState + (Contact_Visibility)(0), // 10: signal.backup.Contact.Visibility + (Group_StorySendMode)(0), // 11: signal.backup.Group.StorySendMode + (Group_Member_Role)(0), // 12: signal.backup.Group.Member.Role + (Group_AccessControl_AccessRequired)(0), // 13: signal.backup.Group.AccessControl.AccessRequired + (CallLink_Restrictions)(0), // 14: signal.backup.CallLink.Restrictions + (AdHocCall_State)(0), // 15: signal.backup.AdHocCall.State + (DistributionList_PrivacyMode)(0), // 16: signal.backup.DistributionList.PrivacyMode + (SendStatus_Failed_FailureReason)(0), // 17: signal.backup.SendStatus.Failed.FailureReason + (PaymentNotification_TransactionDetails_FailedTransaction_FailureReason)(0), // 18: signal.backup.PaymentNotification.TransactionDetails.FailedTransaction.FailureReason + (PaymentNotification_TransactionDetails_Transaction_Status)(0), // 19: signal.backup.PaymentNotification.TransactionDetails.Transaction.Status + (GiftBadge_State)(0), // 20: signal.backup.GiftBadge.State + (ContactAttachment_Phone_Type)(0), // 21: signal.backup.ContactAttachment.Phone.Type + (ContactAttachment_Email_Type)(0), // 22: signal.backup.ContactAttachment.Email.Type + (ContactAttachment_PostalAddress_Type)(0), // 23: signal.backup.ContactAttachment.PostalAddress.Type + (MessageAttachment_Flag)(0), // 24: signal.backup.MessageAttachment.Flag + (Quote_Type)(0), // 25: signal.backup.Quote.Type + (BodyRange_Style)(0), // 26: signal.backup.BodyRange.Style + (IndividualCall_Type)(0), // 27: signal.backup.IndividualCall.Type + (IndividualCall_Direction)(0), // 28: signal.backup.IndividualCall.Direction + (IndividualCall_State)(0), // 29: signal.backup.IndividualCall.State + (GroupCall_State)(0), // 30: signal.backup.GroupCall.State + (SimpleChatUpdate_Type)(0), // 31: signal.backup.SimpleChatUpdate.Type + (ChatStyle_WallpaperPreset)(0), // 32: signal.backup.ChatStyle.WallpaperPreset + (ChatStyle_BubbleColorPreset)(0), // 33: signal.backup.ChatStyle.BubbleColorPreset + (NotificationProfile_DayOfWeek)(0), // 34: signal.backup.NotificationProfile.DayOfWeek + (ChatFolder_FolderType)(0), // 35: signal.backup.ChatFolder.FolderType + (*BackupInfo)(nil), // 36: signal.backup.BackupInfo + (*Frame)(nil), // 37: signal.backup.Frame + (*AccountData)(nil), // 38: signal.backup.AccountData + (*Recipient)(nil), // 39: signal.backup.Recipient + (*Contact)(nil), // 40: signal.backup.Contact + (*Group)(nil), // 41: signal.backup.Group + (*Self)(nil), // 42: signal.backup.Self + (*ReleaseNotes)(nil), // 43: signal.backup.ReleaseNotes + (*Chat)(nil), // 44: signal.backup.Chat + (*CallLink)(nil), // 45: signal.backup.CallLink + (*AdHocCall)(nil), // 46: signal.backup.AdHocCall + (*DistributionListItem)(nil), // 47: signal.backup.DistributionListItem + (*DistributionList)(nil), // 48: signal.backup.DistributionList + (*ChatItem)(nil), // 49: signal.backup.ChatItem + (*SendStatus)(nil), // 50: signal.backup.SendStatus + (*Text)(nil), // 51: signal.backup.Text + (*StandardMessage)(nil), // 52: signal.backup.StandardMessage + (*ContactMessage)(nil), // 53: signal.backup.ContactMessage + (*DirectStoryReplyMessage)(nil), // 54: signal.backup.DirectStoryReplyMessage + (*PaymentNotification)(nil), // 55: signal.backup.PaymentNotification + (*GiftBadge)(nil), // 56: signal.backup.GiftBadge + (*ViewOnceMessage)(nil), // 57: signal.backup.ViewOnceMessage + (*ContactAttachment)(nil), // 58: signal.backup.ContactAttachment + (*StickerMessage)(nil), // 59: signal.backup.StickerMessage + (*RemoteDeletedMessage)(nil), // 60: signal.backup.RemoteDeletedMessage + (*Sticker)(nil), // 61: signal.backup.Sticker + (*LinkPreview)(nil), // 62: signal.backup.LinkPreview + (*MessageAttachment)(nil), // 63: signal.backup.MessageAttachment + (*FilePointer)(nil), // 64: signal.backup.FilePointer + (*Quote)(nil), // 65: signal.backup.Quote + (*BodyRange)(nil), // 66: signal.backup.BodyRange + (*Reaction)(nil), // 67: signal.backup.Reaction + (*Poll)(nil), // 68: signal.backup.Poll + (*ChatUpdateMessage)(nil), // 69: signal.backup.ChatUpdateMessage + (*IndividualCall)(nil), // 70: signal.backup.IndividualCall + (*GroupCall)(nil), // 71: signal.backup.GroupCall + (*SimpleChatUpdate)(nil), // 72: signal.backup.SimpleChatUpdate + (*ExpirationTimerChatUpdate)(nil), // 73: signal.backup.ExpirationTimerChatUpdate + (*ProfileChangeChatUpdate)(nil), // 74: signal.backup.ProfileChangeChatUpdate + (*LearnedProfileChatUpdate)(nil), // 75: signal.backup.LearnedProfileChatUpdate + (*ThreadMergeChatUpdate)(nil), // 76: signal.backup.ThreadMergeChatUpdate + (*SessionSwitchoverChatUpdate)(nil), // 77: signal.backup.SessionSwitchoverChatUpdate + (*GroupChangeChatUpdate)(nil), // 78: signal.backup.GroupChangeChatUpdate + (*GenericGroupUpdate)(nil), // 79: signal.backup.GenericGroupUpdate + (*GroupCreationUpdate)(nil), // 80: signal.backup.GroupCreationUpdate + (*GroupNameUpdate)(nil), // 81: signal.backup.GroupNameUpdate + (*GroupAvatarUpdate)(nil), // 82: signal.backup.GroupAvatarUpdate + (*GroupDescriptionUpdate)(nil), // 83: signal.backup.GroupDescriptionUpdate + (*GroupMembershipAccessLevelChangeUpdate)(nil), // 84: signal.backup.GroupMembershipAccessLevelChangeUpdate + (*GroupAttributesAccessLevelChangeUpdate)(nil), // 85: signal.backup.GroupAttributesAccessLevelChangeUpdate + (*GroupAnnouncementOnlyChangeUpdate)(nil), // 86: signal.backup.GroupAnnouncementOnlyChangeUpdate + (*GroupAdminStatusUpdate)(nil), // 87: signal.backup.GroupAdminStatusUpdate + (*GroupMemberLeftUpdate)(nil), // 88: signal.backup.GroupMemberLeftUpdate + (*GroupMemberRemovedUpdate)(nil), // 89: signal.backup.GroupMemberRemovedUpdate + (*SelfInvitedToGroupUpdate)(nil), // 90: signal.backup.SelfInvitedToGroupUpdate + (*SelfInvitedOtherUserToGroupUpdate)(nil), // 91: signal.backup.SelfInvitedOtherUserToGroupUpdate + (*GroupUnknownInviteeUpdate)(nil), // 92: signal.backup.GroupUnknownInviteeUpdate + (*GroupInvitationAcceptedUpdate)(nil), // 93: signal.backup.GroupInvitationAcceptedUpdate + (*GroupInvitationDeclinedUpdate)(nil), // 94: signal.backup.GroupInvitationDeclinedUpdate + (*GroupMemberJoinedUpdate)(nil), // 95: signal.backup.GroupMemberJoinedUpdate + (*GroupMemberAddedUpdate)(nil), // 96: signal.backup.GroupMemberAddedUpdate + (*GroupSelfInvitationRevokedUpdate)(nil), // 97: signal.backup.GroupSelfInvitationRevokedUpdate + (*GroupInvitationRevokedUpdate)(nil), // 98: signal.backup.GroupInvitationRevokedUpdate + (*GroupJoinRequestUpdate)(nil), // 99: signal.backup.GroupJoinRequestUpdate + (*GroupJoinRequestApprovalUpdate)(nil), // 100: signal.backup.GroupJoinRequestApprovalUpdate + (*GroupJoinRequestCanceledUpdate)(nil), // 101: signal.backup.GroupJoinRequestCanceledUpdate + (*GroupSequenceOfRequestsAndCancelsUpdate)(nil), // 102: signal.backup.GroupSequenceOfRequestsAndCancelsUpdate + (*GroupInviteLinkResetUpdate)(nil), // 103: signal.backup.GroupInviteLinkResetUpdate + (*GroupInviteLinkEnabledUpdate)(nil), // 104: signal.backup.GroupInviteLinkEnabledUpdate + (*GroupInviteLinkAdminApprovalUpdate)(nil), // 105: signal.backup.GroupInviteLinkAdminApprovalUpdate + (*GroupInviteLinkDisabledUpdate)(nil), // 106: signal.backup.GroupInviteLinkDisabledUpdate + (*GroupMemberJoinedByLinkUpdate)(nil), // 107: signal.backup.GroupMemberJoinedByLinkUpdate + (*GroupV2MigrationUpdate)(nil), // 108: signal.backup.GroupV2MigrationUpdate + (*GroupV2MigrationSelfInvitedUpdate)(nil), // 109: signal.backup.GroupV2MigrationSelfInvitedUpdate + (*GroupV2MigrationInvitedMembersUpdate)(nil), // 110: signal.backup.GroupV2MigrationInvitedMembersUpdate + (*GroupV2MigrationDroppedMembersUpdate)(nil), // 111: signal.backup.GroupV2MigrationDroppedMembersUpdate + (*GroupExpirationTimerUpdate)(nil), // 112: signal.backup.GroupExpirationTimerUpdate + (*PollTerminateUpdate)(nil), // 113: signal.backup.PollTerminateUpdate + (*PinMessageUpdate)(nil), // 114: signal.backup.PinMessageUpdate + (*StickerPack)(nil), // 115: signal.backup.StickerPack + (*ChatStyle)(nil), // 116: signal.backup.ChatStyle + (*NotificationProfile)(nil), // 117: signal.backup.NotificationProfile + (*ChatFolder)(nil), // 118: signal.backup.ChatFolder + (*AccountData_UsernameLink)(nil), // 119: signal.backup.AccountData.UsernameLink + (*AccountData_AutoDownloadSettings)(nil), // 120: signal.backup.AccountData.AutoDownloadSettings + (*AccountData_AccountSettings)(nil), // 121: signal.backup.AccountData.AccountSettings + (*AccountData_SubscriberData)(nil), // 122: signal.backup.AccountData.SubscriberData + (*AccountData_IAPSubscriberData)(nil), // 123: signal.backup.AccountData.IAPSubscriberData + (*AccountData_AndroidSpecificSettings)(nil), // 124: signal.backup.AccountData.AndroidSpecificSettings + (*Contact_Registered)(nil), // 125: signal.backup.Contact.Registered + (*Contact_NotRegistered)(nil), // 126: signal.backup.Contact.NotRegistered + (*Contact_Name)(nil), // 127: signal.backup.Contact.Name + (*Group_GroupSnapshot)(nil), // 128: signal.backup.Group.GroupSnapshot + (*Group_GroupAttributeBlob)(nil), // 129: signal.backup.Group.GroupAttributeBlob + (*Group_Member)(nil), // 130: signal.backup.Group.Member + (*Group_MemberPendingProfileKey)(nil), // 131: signal.backup.Group.MemberPendingProfileKey + (*Group_MemberPendingAdminApproval)(nil), // 132: signal.backup.Group.MemberPendingAdminApproval + (*Group_MemberBanned)(nil), // 133: signal.backup.Group.MemberBanned + (*Group_AccessControl)(nil), // 134: signal.backup.Group.AccessControl + (*ChatItem_IncomingMessageDetails)(nil), // 135: signal.backup.ChatItem.IncomingMessageDetails + (*ChatItem_OutgoingMessageDetails)(nil), // 136: signal.backup.ChatItem.OutgoingMessageDetails + (*ChatItem_DirectionlessMessageDetails)(nil), // 137: signal.backup.ChatItem.DirectionlessMessageDetails + (*ChatItem_PinDetails)(nil), // 138: signal.backup.ChatItem.PinDetails + (*SendStatus_Pending)(nil), // 139: signal.backup.SendStatus.Pending + (*SendStatus_Sent)(nil), // 140: signal.backup.SendStatus.Sent + (*SendStatus_Delivered)(nil), // 141: signal.backup.SendStatus.Delivered + (*SendStatus_Read)(nil), // 142: signal.backup.SendStatus.Read + (*SendStatus_Viewed)(nil), // 143: signal.backup.SendStatus.Viewed + (*SendStatus_Skipped)(nil), // 144: signal.backup.SendStatus.Skipped + (*SendStatus_Failed)(nil), // 145: signal.backup.SendStatus.Failed + (*DirectStoryReplyMessage_TextReply)(nil), // 146: signal.backup.DirectStoryReplyMessage.TextReply + (*PaymentNotification_TransactionDetails)(nil), // 147: signal.backup.PaymentNotification.TransactionDetails + (*PaymentNotification_TransactionDetails_MobileCoinTxoIdentification)(nil), // 148: signal.backup.PaymentNotification.TransactionDetails.MobileCoinTxoIdentification + (*PaymentNotification_TransactionDetails_FailedTransaction)(nil), // 149: signal.backup.PaymentNotification.TransactionDetails.FailedTransaction + (*PaymentNotification_TransactionDetails_Transaction)(nil), // 150: signal.backup.PaymentNotification.TransactionDetails.Transaction + (*ContactAttachment_Name)(nil), // 151: signal.backup.ContactAttachment.Name + (*ContactAttachment_Phone)(nil), // 152: signal.backup.ContactAttachment.Phone + (*ContactAttachment_Email)(nil), // 153: signal.backup.ContactAttachment.Email + (*ContactAttachment_PostalAddress)(nil), // 154: signal.backup.ContactAttachment.PostalAddress + (*FilePointer_LocatorInfo)(nil), // 155: signal.backup.FilePointer.LocatorInfo + (*Quote_QuotedAttachment)(nil), // 156: signal.backup.Quote.QuotedAttachment + (*Poll_PollOption)(nil), // 157: signal.backup.Poll.PollOption + (*Poll_PollOption_PollVote)(nil), // 158: signal.backup.Poll.PollOption.PollVote + (*GroupChangeChatUpdate_Update)(nil), // 159: signal.backup.GroupChangeChatUpdate.Update + (*GroupInvitationRevokedUpdate_Invitee)(nil), // 160: signal.backup.GroupInvitationRevokedUpdate.Invitee + (*ChatStyle_Gradient)(nil), // 161: signal.backup.ChatStyle.Gradient + (*ChatStyle_CustomChatColor)(nil), // 162: signal.backup.ChatStyle.CustomChatColor + (*ChatStyle_AutomaticBubbleColor)(nil), // 163: signal.backup.ChatStyle.AutomaticBubbleColor } var file_backuppb_Backup_proto_depIdxs = []int32{ - 39, // 0: signal.backup.Frame.account:type_name -> signal.backup.AccountData - 40, // 1: signal.backup.Frame.recipient:type_name -> signal.backup.Recipient - 45, // 2: signal.backup.Frame.chat:type_name -> signal.backup.Chat - 50, // 3: signal.backup.Frame.chatItem:type_name -> signal.backup.ChatItem - 119, // 4: signal.backup.Frame.stickerPack:type_name -> signal.backup.StickerPack - 47, // 5: signal.backup.Frame.adHocCall:type_name -> signal.backup.AdHocCall - 121, // 6: signal.backup.Frame.notificationProfile:type_name -> signal.backup.NotificationProfile - 122, // 7: signal.backup.Frame.chatFolder:type_name -> signal.backup.ChatFolder - 123, // 8: signal.backup.AccountData.usernameLink:type_name -> signal.backup.AccountData.UsernameLink - 126, // 9: signal.backup.AccountData.donationSubscriberData:type_name -> signal.backup.AccountData.SubscriberData - 125, // 10: signal.backup.AccountData.accountSettings:type_name -> signal.backup.AccountData.AccountSettings - 127, // 11: signal.backup.AccountData.backupsSubscriberData:type_name -> signal.backup.AccountData.IAPSubscriberData - 128, // 12: signal.backup.AccountData.androidSpecificSettings:type_name -> signal.backup.AccountData.AndroidSpecificSettings - 41, // 13: signal.backup.Recipient.contact:type_name -> signal.backup.Contact - 42, // 14: signal.backup.Recipient.group:type_name -> signal.backup.Group - 48, // 15: signal.backup.Recipient.distributionList:type_name -> signal.backup.DistributionListItem - 43, // 16: signal.backup.Recipient.self:type_name -> signal.backup.Self - 44, // 17: signal.backup.Recipient.releaseNotes:type_name -> signal.backup.ReleaseNotes - 46, // 18: signal.backup.Recipient.callLink:type_name -> signal.backup.CallLink - 11, // 19: signal.backup.Contact.visibility:type_name -> signal.backup.Contact.Visibility - 129, // 20: signal.backup.Contact.registered:type_name -> signal.backup.Contact.Registered - 130, // 21: signal.backup.Contact.notRegistered:type_name -> signal.backup.Contact.NotRegistered - 10, // 22: signal.backup.Contact.identityState:type_name -> signal.backup.Contact.IdentityState - 131, // 23: signal.backup.Contact.nickname:type_name -> signal.backup.Contact.Name + 38, // 0: signal.backup.Frame.account:type_name -> signal.backup.AccountData + 39, // 1: signal.backup.Frame.recipient:type_name -> signal.backup.Recipient + 44, // 2: signal.backup.Frame.chat:type_name -> signal.backup.Chat + 49, // 3: signal.backup.Frame.chatItem:type_name -> signal.backup.ChatItem + 115, // 4: signal.backup.Frame.stickerPack:type_name -> signal.backup.StickerPack + 46, // 5: signal.backup.Frame.adHocCall:type_name -> signal.backup.AdHocCall + 117, // 6: signal.backup.Frame.notificationProfile:type_name -> signal.backup.NotificationProfile + 118, // 7: signal.backup.Frame.chatFolder:type_name -> signal.backup.ChatFolder + 119, // 8: signal.backup.AccountData.usernameLink:type_name -> signal.backup.AccountData.UsernameLink + 122, // 9: signal.backup.AccountData.donationSubscriberData:type_name -> signal.backup.AccountData.SubscriberData + 121, // 10: signal.backup.AccountData.accountSettings:type_name -> signal.backup.AccountData.AccountSettings + 123, // 11: signal.backup.AccountData.backupsSubscriberData:type_name -> signal.backup.AccountData.IAPSubscriberData + 124, // 12: signal.backup.AccountData.androidSpecificSettings:type_name -> signal.backup.AccountData.AndroidSpecificSettings + 40, // 13: signal.backup.Recipient.contact:type_name -> signal.backup.Contact + 41, // 14: signal.backup.Recipient.group:type_name -> signal.backup.Group + 47, // 15: signal.backup.Recipient.distributionList:type_name -> signal.backup.DistributionListItem + 42, // 16: signal.backup.Recipient.self:type_name -> signal.backup.Self + 43, // 17: signal.backup.Recipient.releaseNotes:type_name -> signal.backup.ReleaseNotes + 45, // 18: signal.backup.Recipient.callLink:type_name -> signal.backup.CallLink + 10, // 19: signal.backup.Contact.visibility:type_name -> signal.backup.Contact.Visibility + 125, // 20: signal.backup.Contact.registered:type_name -> signal.backup.Contact.Registered + 126, // 21: signal.backup.Contact.notRegistered:type_name -> signal.backup.Contact.NotRegistered + 9, // 22: signal.backup.Contact.identityState:type_name -> signal.backup.Contact.IdentityState + 127, // 23: signal.backup.Contact.nickname:type_name -> signal.backup.Contact.Name 0, // 24: signal.backup.Contact.avatarColor:type_name -> signal.backup.AvatarColor - 12, // 25: signal.backup.Group.storySendMode:type_name -> signal.backup.Group.StorySendMode - 132, // 26: signal.backup.Group.snapshot:type_name -> signal.backup.Group.GroupSnapshot + 11, // 25: signal.backup.Group.storySendMode:type_name -> signal.backup.Group.StorySendMode + 128, // 26: signal.backup.Group.snapshot:type_name -> signal.backup.Group.GroupSnapshot 0, // 27: signal.backup.Group.avatarColor:type_name -> signal.backup.AvatarColor 0, // 28: signal.backup.Self.avatarColor:type_name -> signal.backup.AvatarColor - 120, // 29: signal.backup.Chat.style:type_name -> signal.backup.ChatStyle - 15, // 30: signal.backup.CallLink.restrictions:type_name -> signal.backup.CallLink.Restrictions - 16, // 31: signal.backup.AdHocCall.state:type_name -> signal.backup.AdHocCall.State - 49, // 32: signal.backup.DistributionListItem.distributionList:type_name -> signal.backup.DistributionList - 17, // 33: signal.backup.DistributionList.privacyMode:type_name -> signal.backup.DistributionList.PrivacyMode - 50, // 34: signal.backup.ChatItem.revisions:type_name -> signal.backup.ChatItem - 139, // 35: signal.backup.ChatItem.incoming:type_name -> signal.backup.ChatItem.IncomingMessageDetails - 140, // 36: signal.backup.ChatItem.outgoing:type_name -> signal.backup.ChatItem.OutgoingMessageDetails - 141, // 37: signal.backup.ChatItem.directionless:type_name -> signal.backup.ChatItem.DirectionlessMessageDetails - 53, // 38: signal.backup.ChatItem.standardMessage:type_name -> signal.backup.StandardMessage - 54, // 39: signal.backup.ChatItem.contactMessage:type_name -> signal.backup.ContactMessage - 60, // 40: signal.backup.ChatItem.stickerMessage:type_name -> signal.backup.StickerMessage - 61, // 41: signal.backup.ChatItem.remoteDeletedMessage:type_name -> signal.backup.RemoteDeletedMessage - 71, // 42: signal.backup.ChatItem.updateMessage:type_name -> signal.backup.ChatUpdateMessage - 56, // 43: signal.backup.ChatItem.paymentNotification:type_name -> signal.backup.PaymentNotification - 57, // 44: signal.backup.ChatItem.giftBadge:type_name -> signal.backup.GiftBadge - 58, // 45: signal.backup.ChatItem.viewOnceMessage:type_name -> signal.backup.ViewOnceMessage - 55, // 46: signal.backup.ChatItem.directStoryReplyMessage:type_name -> signal.backup.DirectStoryReplyMessage - 69, // 47: signal.backup.ChatItem.poll:type_name -> signal.backup.Poll - 70, // 48: signal.backup.ChatItem.adminDeletedMessage:type_name -> signal.backup.AdminDeletedMessage - 142, // 49: signal.backup.ChatItem.pinDetails:type_name -> signal.backup.ChatItem.PinDetails - 143, // 50: signal.backup.SendStatus.pending:type_name -> signal.backup.SendStatus.Pending - 144, // 51: signal.backup.SendStatus.sent:type_name -> signal.backup.SendStatus.Sent - 145, // 52: signal.backup.SendStatus.delivered:type_name -> signal.backup.SendStatus.Delivered - 146, // 53: signal.backup.SendStatus.read:type_name -> signal.backup.SendStatus.Read - 147, // 54: signal.backup.SendStatus.viewed:type_name -> signal.backup.SendStatus.Viewed - 148, // 55: signal.backup.SendStatus.skipped:type_name -> signal.backup.SendStatus.Skipped - 149, // 56: signal.backup.SendStatus.failed:type_name -> signal.backup.SendStatus.Failed - 67, // 57: signal.backup.Text.bodyRanges:type_name -> signal.backup.BodyRange - 66, // 58: signal.backup.StandardMessage.quote:type_name -> signal.backup.Quote - 52, // 59: signal.backup.StandardMessage.text:type_name -> signal.backup.Text - 64, // 60: signal.backup.StandardMessage.attachments:type_name -> signal.backup.MessageAttachment - 63, // 61: signal.backup.StandardMessage.linkPreview:type_name -> signal.backup.LinkPreview - 65, // 62: signal.backup.StandardMessage.longText:type_name -> signal.backup.FilePointer - 68, // 63: signal.backup.StandardMessage.reactions:type_name -> signal.backup.Reaction - 59, // 64: signal.backup.ContactMessage.contact:type_name -> signal.backup.ContactAttachment - 68, // 65: signal.backup.ContactMessage.reactions:type_name -> signal.backup.Reaction - 150, // 66: signal.backup.DirectStoryReplyMessage.textReply:type_name -> signal.backup.DirectStoryReplyMessage.TextReply - 68, // 67: signal.backup.DirectStoryReplyMessage.reactions:type_name -> signal.backup.Reaction - 151, // 68: signal.backup.PaymentNotification.transactionDetails:type_name -> signal.backup.PaymentNotification.TransactionDetails - 21, // 69: signal.backup.GiftBadge.state:type_name -> signal.backup.GiftBadge.State - 64, // 70: signal.backup.ViewOnceMessage.attachment:type_name -> signal.backup.MessageAttachment - 68, // 71: signal.backup.ViewOnceMessage.reactions:type_name -> signal.backup.Reaction - 155, // 72: signal.backup.ContactAttachment.name:type_name -> signal.backup.ContactAttachment.Name - 156, // 73: signal.backup.ContactAttachment.number:type_name -> signal.backup.ContactAttachment.Phone - 157, // 74: signal.backup.ContactAttachment.email:type_name -> signal.backup.ContactAttachment.Email - 158, // 75: signal.backup.ContactAttachment.address:type_name -> signal.backup.ContactAttachment.PostalAddress - 65, // 76: signal.backup.ContactAttachment.avatar:type_name -> signal.backup.FilePointer - 62, // 77: signal.backup.StickerMessage.sticker:type_name -> signal.backup.Sticker - 68, // 78: signal.backup.StickerMessage.reactions:type_name -> signal.backup.Reaction - 65, // 79: signal.backup.Sticker.data:type_name -> signal.backup.FilePointer - 65, // 80: signal.backup.LinkPreview.image:type_name -> signal.backup.FilePointer - 65, // 81: signal.backup.MessageAttachment.pointer:type_name -> signal.backup.FilePointer - 25, // 82: signal.backup.MessageAttachment.flag:type_name -> signal.backup.MessageAttachment.Flag - 159, // 83: signal.backup.FilePointer.locatorInfo:type_name -> signal.backup.FilePointer.LocatorInfo - 52, // 84: signal.backup.Quote.text:type_name -> signal.backup.Text - 160, // 85: signal.backup.Quote.attachments:type_name -> signal.backup.Quote.QuotedAttachment - 26, // 86: signal.backup.Quote.type:type_name -> signal.backup.Quote.Type - 27, // 87: signal.backup.BodyRange.style:type_name -> signal.backup.BodyRange.Style - 161, // 88: signal.backup.Poll.options:type_name -> signal.backup.Poll.PollOption - 68, // 89: signal.backup.Poll.reactions:type_name -> signal.backup.Reaction - 74, // 90: signal.backup.ChatUpdateMessage.simpleUpdate:type_name -> signal.backup.SimpleChatUpdate - 80, // 91: signal.backup.ChatUpdateMessage.groupChange:type_name -> signal.backup.GroupChangeChatUpdate - 75, // 92: signal.backup.ChatUpdateMessage.expirationTimerChange:type_name -> signal.backup.ExpirationTimerChatUpdate - 76, // 93: signal.backup.ChatUpdateMessage.profileChange:type_name -> signal.backup.ProfileChangeChatUpdate - 78, // 94: signal.backup.ChatUpdateMessage.threadMerge:type_name -> signal.backup.ThreadMergeChatUpdate - 79, // 95: signal.backup.ChatUpdateMessage.sessionSwitchover:type_name -> signal.backup.SessionSwitchoverChatUpdate - 72, // 96: signal.backup.ChatUpdateMessage.individualCall:type_name -> signal.backup.IndividualCall - 73, // 97: signal.backup.ChatUpdateMessage.groupCall:type_name -> signal.backup.GroupCall - 77, // 98: signal.backup.ChatUpdateMessage.learnedProfileChange:type_name -> signal.backup.LearnedProfileChatUpdate - 117, // 99: signal.backup.ChatUpdateMessage.pollTerminate:type_name -> signal.backup.PollTerminateUpdate - 118, // 100: signal.backup.ChatUpdateMessage.pinMessage:type_name -> signal.backup.PinMessageUpdate - 28, // 101: signal.backup.IndividualCall.type:type_name -> signal.backup.IndividualCall.Type - 29, // 102: signal.backup.IndividualCall.direction:type_name -> signal.backup.IndividualCall.Direction - 30, // 103: signal.backup.IndividualCall.state:type_name -> signal.backup.IndividualCall.State - 31, // 104: signal.backup.GroupCall.state:type_name -> signal.backup.GroupCall.State - 32, // 105: signal.backup.SimpleChatUpdate.type:type_name -> signal.backup.SimpleChatUpdate.Type - 163, // 106: signal.backup.GroupChangeChatUpdate.updates:type_name -> signal.backup.GroupChangeChatUpdate.Update - 1, // 107: signal.backup.GroupMembershipAccessLevelChangeUpdate.accessLevel:type_name -> signal.backup.GroupV2AccessLevel - 1, // 108: signal.backup.GroupAttributesAccessLevelChangeUpdate.accessLevel:type_name -> signal.backup.GroupV2AccessLevel - 1, // 109: signal.backup.GroupMemberLabelAccessLevelChangeUpdate.accessLevel:type_name -> signal.backup.GroupV2AccessLevel - 164, // 110: signal.backup.GroupInvitationRevokedUpdate.invitees:type_name -> signal.backup.GroupInvitationRevokedUpdate.Invitee - 33, // 111: signal.backup.ChatStyle.wallpaperPreset:type_name -> signal.backup.ChatStyle.WallpaperPreset - 65, // 112: signal.backup.ChatStyle.wallpaperPhoto:type_name -> signal.backup.FilePointer - 167, // 113: signal.backup.ChatStyle.autoBubbleColor:type_name -> signal.backup.ChatStyle.AutomaticBubbleColor - 34, // 114: signal.backup.ChatStyle.bubbleColorPreset:type_name -> signal.backup.ChatStyle.BubbleColorPreset - 35, // 115: signal.backup.NotificationProfile.scheduleDaysEnabled:type_name -> signal.backup.NotificationProfile.DayOfWeek - 36, // 116: signal.backup.ChatFolder.folderType:type_name -> signal.backup.ChatFolder.FolderType - 6, // 117: signal.backup.AccountData.UsernameLink.color:type_name -> signal.backup.AccountData.UsernameLink.Color - 7, // 118: signal.backup.AccountData.AutoDownloadSettings.images:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption - 7, // 119: signal.backup.AccountData.AutoDownloadSettings.audio:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption - 7, // 120: signal.backup.AccountData.AutoDownloadSettings.video:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption - 7, // 121: signal.backup.AccountData.AutoDownloadSettings.documents:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption - 2, // 122: signal.backup.AccountData.AccountSettings.phoneNumberSharingMode:type_name -> signal.backup.AccountData.PhoneNumberSharingMode - 120, // 123: signal.backup.AccountData.AccountSettings.defaultChatStyle:type_name -> signal.backup.ChatStyle - 166, // 124: signal.backup.AccountData.AccountSettings.customChatColors:type_name -> signal.backup.ChatStyle.CustomChatColor - 3, // 125: signal.backup.AccountData.AccountSettings.defaultSentMediaQuality:type_name -> signal.backup.AccountData.SentMediaQuality - 124, // 126: signal.backup.AccountData.AccountSettings.autoDownloadSettings:type_name -> signal.backup.AccountData.AutoDownloadSettings - 4, // 127: signal.backup.AccountData.AccountSettings.appTheme:type_name -> signal.backup.AccountData.AppTheme - 5, // 128: signal.backup.AccountData.AccountSettings.callsUseLessDataSetting:type_name -> signal.backup.AccountData.CallsUseLessDataSetting - 8, // 129: signal.backup.AccountData.AccountSettings.unreadBadgeType:type_name -> signal.backup.AccountData.AccountSettings.UnreadBadgeType - 9, // 130: signal.backup.AccountData.AndroidSpecificSettings.navigationBarSize:type_name -> signal.backup.AccountData.AndroidSpecificSettings.NavigationBarSize - 133, // 131: signal.backup.Group.GroupSnapshot.title:type_name -> signal.backup.Group.GroupAttributeBlob - 133, // 132: signal.backup.Group.GroupSnapshot.description:type_name -> signal.backup.Group.GroupAttributeBlob - 133, // 133: signal.backup.Group.GroupSnapshot.disappearingMessagesTimer:type_name -> signal.backup.Group.GroupAttributeBlob - 138, // 134: signal.backup.Group.GroupSnapshot.accessControl:type_name -> signal.backup.Group.AccessControl - 134, // 135: signal.backup.Group.GroupSnapshot.members:type_name -> signal.backup.Group.Member - 135, // 136: signal.backup.Group.GroupSnapshot.membersPendingProfileKey:type_name -> signal.backup.Group.MemberPendingProfileKey - 136, // 137: signal.backup.Group.GroupSnapshot.membersPendingAdminApproval:type_name -> signal.backup.Group.MemberPendingAdminApproval - 137, // 138: signal.backup.Group.GroupSnapshot.members_banned:type_name -> signal.backup.Group.MemberBanned - 13, // 139: signal.backup.Group.Member.role:type_name -> signal.backup.Group.Member.Role - 134, // 140: signal.backup.Group.MemberPendingProfileKey.member:type_name -> signal.backup.Group.Member - 14, // 141: signal.backup.Group.AccessControl.attributes:type_name -> signal.backup.Group.AccessControl.AccessRequired - 14, // 142: signal.backup.Group.AccessControl.members:type_name -> signal.backup.Group.AccessControl.AccessRequired - 14, // 143: signal.backup.Group.AccessControl.addFromInviteLink:type_name -> signal.backup.Group.AccessControl.AccessRequired - 14, // 144: signal.backup.Group.AccessControl.memberLabel:type_name -> signal.backup.Group.AccessControl.AccessRequired - 51, // 145: signal.backup.ChatItem.OutgoingMessageDetails.sendStatus:type_name -> signal.backup.SendStatus - 18, // 146: signal.backup.SendStatus.Failed.reason:type_name -> signal.backup.SendStatus.Failed.FailureReason - 52, // 147: signal.backup.DirectStoryReplyMessage.TextReply.text:type_name -> signal.backup.Text - 65, // 148: signal.backup.DirectStoryReplyMessage.TextReply.longText:type_name -> signal.backup.FilePointer - 154, // 149: signal.backup.PaymentNotification.TransactionDetails.transaction:type_name -> signal.backup.PaymentNotification.TransactionDetails.Transaction - 153, // 150: signal.backup.PaymentNotification.TransactionDetails.failedTransaction:type_name -> signal.backup.PaymentNotification.TransactionDetails.FailedTransaction - 19, // 151: signal.backup.PaymentNotification.TransactionDetails.FailedTransaction.reason:type_name -> signal.backup.PaymentNotification.TransactionDetails.FailedTransaction.FailureReason - 20, // 152: signal.backup.PaymentNotification.TransactionDetails.Transaction.status:type_name -> signal.backup.PaymentNotification.TransactionDetails.Transaction.Status - 152, // 153: signal.backup.PaymentNotification.TransactionDetails.Transaction.mobileCoinIdentification:type_name -> signal.backup.PaymentNotification.TransactionDetails.MobileCoinTxoIdentification - 22, // 154: signal.backup.ContactAttachment.Phone.type:type_name -> signal.backup.ContactAttachment.Phone.Type - 23, // 155: signal.backup.ContactAttachment.Email.type:type_name -> signal.backup.ContactAttachment.Email.Type - 24, // 156: signal.backup.ContactAttachment.PostalAddress.type:type_name -> signal.backup.ContactAttachment.PostalAddress.Type - 64, // 157: signal.backup.Quote.QuotedAttachment.thumbnail:type_name -> signal.backup.MessageAttachment - 162, // 158: signal.backup.Poll.PollOption.votes:type_name -> signal.backup.Poll.PollOption.PollVote - 81, // 159: signal.backup.GroupChangeChatUpdate.Update.genericGroupUpdate:type_name -> signal.backup.GenericGroupUpdate - 82, // 160: signal.backup.GroupChangeChatUpdate.Update.groupCreationUpdate:type_name -> signal.backup.GroupCreationUpdate - 83, // 161: signal.backup.GroupChangeChatUpdate.Update.groupNameUpdate:type_name -> signal.backup.GroupNameUpdate - 84, // 162: signal.backup.GroupChangeChatUpdate.Update.groupAvatarUpdate:type_name -> signal.backup.GroupAvatarUpdate - 85, // 163: signal.backup.GroupChangeChatUpdate.Update.groupDescriptionUpdate:type_name -> signal.backup.GroupDescriptionUpdate - 86, // 164: signal.backup.GroupChangeChatUpdate.Update.groupMembershipAccessLevelChangeUpdate:type_name -> signal.backup.GroupMembershipAccessLevelChangeUpdate - 87, // 165: signal.backup.GroupChangeChatUpdate.Update.groupAttributesAccessLevelChangeUpdate:type_name -> signal.backup.GroupAttributesAccessLevelChangeUpdate - 90, // 166: signal.backup.GroupChangeChatUpdate.Update.groupAnnouncementOnlyChangeUpdate:type_name -> signal.backup.GroupAnnouncementOnlyChangeUpdate - 91, // 167: signal.backup.GroupChangeChatUpdate.Update.groupAdminStatusUpdate:type_name -> signal.backup.GroupAdminStatusUpdate - 92, // 168: signal.backup.GroupChangeChatUpdate.Update.groupMemberLeftUpdate:type_name -> signal.backup.GroupMemberLeftUpdate - 93, // 169: signal.backup.GroupChangeChatUpdate.Update.groupMemberRemovedUpdate:type_name -> signal.backup.GroupMemberRemovedUpdate - 94, // 170: signal.backup.GroupChangeChatUpdate.Update.selfInvitedToGroupUpdate:type_name -> signal.backup.SelfInvitedToGroupUpdate - 95, // 171: signal.backup.GroupChangeChatUpdate.Update.selfInvitedOtherUserToGroupUpdate:type_name -> signal.backup.SelfInvitedOtherUserToGroupUpdate - 96, // 172: signal.backup.GroupChangeChatUpdate.Update.groupUnknownInviteeUpdate:type_name -> signal.backup.GroupUnknownInviteeUpdate - 97, // 173: signal.backup.GroupChangeChatUpdate.Update.groupInvitationAcceptedUpdate:type_name -> signal.backup.GroupInvitationAcceptedUpdate - 98, // 174: signal.backup.GroupChangeChatUpdate.Update.groupInvitationDeclinedUpdate:type_name -> signal.backup.GroupInvitationDeclinedUpdate - 99, // 175: signal.backup.GroupChangeChatUpdate.Update.groupMemberJoinedUpdate:type_name -> signal.backup.GroupMemberJoinedUpdate - 100, // 176: signal.backup.GroupChangeChatUpdate.Update.groupMemberAddedUpdate:type_name -> signal.backup.GroupMemberAddedUpdate - 101, // 177: signal.backup.GroupChangeChatUpdate.Update.groupSelfInvitationRevokedUpdate:type_name -> signal.backup.GroupSelfInvitationRevokedUpdate - 102, // 178: signal.backup.GroupChangeChatUpdate.Update.groupInvitationRevokedUpdate:type_name -> signal.backup.GroupInvitationRevokedUpdate - 103, // 179: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestUpdate:type_name -> signal.backup.GroupJoinRequestUpdate - 104, // 180: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestApprovalUpdate:type_name -> signal.backup.GroupJoinRequestApprovalUpdate - 105, // 181: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestCanceledUpdate:type_name -> signal.backup.GroupJoinRequestCanceledUpdate - 107, // 182: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkResetUpdate:type_name -> signal.backup.GroupInviteLinkResetUpdate - 108, // 183: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkEnabledUpdate:type_name -> signal.backup.GroupInviteLinkEnabledUpdate - 109, // 184: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkAdminApprovalUpdate:type_name -> signal.backup.GroupInviteLinkAdminApprovalUpdate - 110, // 185: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkDisabledUpdate:type_name -> signal.backup.GroupInviteLinkDisabledUpdate - 111, // 186: signal.backup.GroupChangeChatUpdate.Update.groupMemberJoinedByLinkUpdate:type_name -> signal.backup.GroupMemberJoinedByLinkUpdate - 112, // 187: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationUpdate:type_name -> signal.backup.GroupV2MigrationUpdate - 113, // 188: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationSelfInvitedUpdate:type_name -> signal.backup.GroupV2MigrationSelfInvitedUpdate - 114, // 189: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationInvitedMembersUpdate:type_name -> signal.backup.GroupV2MigrationInvitedMembersUpdate - 115, // 190: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationDroppedMembersUpdate:type_name -> signal.backup.GroupV2MigrationDroppedMembersUpdate - 106, // 191: signal.backup.GroupChangeChatUpdate.Update.groupSequenceOfRequestsAndCancelsUpdate:type_name -> signal.backup.GroupSequenceOfRequestsAndCancelsUpdate - 116, // 192: signal.backup.GroupChangeChatUpdate.Update.groupExpirationTimerUpdate:type_name -> signal.backup.GroupExpirationTimerUpdate - 88, // 193: signal.backup.GroupChangeChatUpdate.Update.groupMemberLabelAccessLevelChangeUpdate:type_name -> signal.backup.GroupMemberLabelAccessLevelChangeUpdate - 89, // 194: signal.backup.GroupChangeChatUpdate.Update.groupTerminateChangeUpdate:type_name -> signal.backup.GroupTerminateChangeUpdate - 165, // 195: signal.backup.ChatStyle.CustomChatColor.gradient:type_name -> signal.backup.ChatStyle.Gradient - 196, // [196:196] is the sub-list for method output_type - 196, // [196:196] is the sub-list for method input_type - 196, // [196:196] is the sub-list for extension type_name - 196, // [196:196] is the sub-list for extension extendee - 0, // [0:196] is the sub-list for field type_name + 116, // 29: signal.backup.Chat.style:type_name -> signal.backup.ChatStyle + 14, // 30: signal.backup.CallLink.restrictions:type_name -> signal.backup.CallLink.Restrictions + 15, // 31: signal.backup.AdHocCall.state:type_name -> signal.backup.AdHocCall.State + 48, // 32: signal.backup.DistributionListItem.distributionList:type_name -> signal.backup.DistributionList + 16, // 33: signal.backup.DistributionList.privacyMode:type_name -> signal.backup.DistributionList.PrivacyMode + 49, // 34: signal.backup.ChatItem.revisions:type_name -> signal.backup.ChatItem + 135, // 35: signal.backup.ChatItem.incoming:type_name -> signal.backup.ChatItem.IncomingMessageDetails + 136, // 36: signal.backup.ChatItem.outgoing:type_name -> signal.backup.ChatItem.OutgoingMessageDetails + 137, // 37: signal.backup.ChatItem.directionless:type_name -> signal.backup.ChatItem.DirectionlessMessageDetails + 52, // 38: signal.backup.ChatItem.standardMessage:type_name -> signal.backup.StandardMessage + 53, // 39: signal.backup.ChatItem.contactMessage:type_name -> signal.backup.ContactMessage + 59, // 40: signal.backup.ChatItem.stickerMessage:type_name -> signal.backup.StickerMessage + 60, // 41: signal.backup.ChatItem.remoteDeletedMessage:type_name -> signal.backup.RemoteDeletedMessage + 69, // 42: signal.backup.ChatItem.updateMessage:type_name -> signal.backup.ChatUpdateMessage + 55, // 43: signal.backup.ChatItem.paymentNotification:type_name -> signal.backup.PaymentNotification + 56, // 44: signal.backup.ChatItem.giftBadge:type_name -> signal.backup.GiftBadge + 57, // 45: signal.backup.ChatItem.viewOnceMessage:type_name -> signal.backup.ViewOnceMessage + 54, // 46: signal.backup.ChatItem.directStoryReplyMessage:type_name -> signal.backup.DirectStoryReplyMessage + 68, // 47: signal.backup.ChatItem.poll:type_name -> signal.backup.Poll + 138, // 48: signal.backup.ChatItem.pinDetails:type_name -> signal.backup.ChatItem.PinDetails + 139, // 49: signal.backup.SendStatus.pending:type_name -> signal.backup.SendStatus.Pending + 140, // 50: signal.backup.SendStatus.sent:type_name -> signal.backup.SendStatus.Sent + 141, // 51: signal.backup.SendStatus.delivered:type_name -> signal.backup.SendStatus.Delivered + 142, // 52: signal.backup.SendStatus.read:type_name -> signal.backup.SendStatus.Read + 143, // 53: signal.backup.SendStatus.viewed:type_name -> signal.backup.SendStatus.Viewed + 144, // 54: signal.backup.SendStatus.skipped:type_name -> signal.backup.SendStatus.Skipped + 145, // 55: signal.backup.SendStatus.failed:type_name -> signal.backup.SendStatus.Failed + 66, // 56: signal.backup.Text.bodyRanges:type_name -> signal.backup.BodyRange + 65, // 57: signal.backup.StandardMessage.quote:type_name -> signal.backup.Quote + 51, // 58: signal.backup.StandardMessage.text:type_name -> signal.backup.Text + 63, // 59: signal.backup.StandardMessage.attachments:type_name -> signal.backup.MessageAttachment + 62, // 60: signal.backup.StandardMessage.linkPreview:type_name -> signal.backup.LinkPreview + 64, // 61: signal.backup.StandardMessage.longText:type_name -> signal.backup.FilePointer + 67, // 62: signal.backup.StandardMessage.reactions:type_name -> signal.backup.Reaction + 58, // 63: signal.backup.ContactMessage.contact:type_name -> signal.backup.ContactAttachment + 67, // 64: signal.backup.ContactMessage.reactions:type_name -> signal.backup.Reaction + 146, // 65: signal.backup.DirectStoryReplyMessage.textReply:type_name -> signal.backup.DirectStoryReplyMessage.TextReply + 67, // 66: signal.backup.DirectStoryReplyMessage.reactions:type_name -> signal.backup.Reaction + 147, // 67: signal.backup.PaymentNotification.transactionDetails:type_name -> signal.backup.PaymentNotification.TransactionDetails + 20, // 68: signal.backup.GiftBadge.state:type_name -> signal.backup.GiftBadge.State + 63, // 69: signal.backup.ViewOnceMessage.attachment:type_name -> signal.backup.MessageAttachment + 67, // 70: signal.backup.ViewOnceMessage.reactions:type_name -> signal.backup.Reaction + 151, // 71: signal.backup.ContactAttachment.name:type_name -> signal.backup.ContactAttachment.Name + 152, // 72: signal.backup.ContactAttachment.number:type_name -> signal.backup.ContactAttachment.Phone + 153, // 73: signal.backup.ContactAttachment.email:type_name -> signal.backup.ContactAttachment.Email + 154, // 74: signal.backup.ContactAttachment.address:type_name -> signal.backup.ContactAttachment.PostalAddress + 64, // 75: signal.backup.ContactAttachment.avatar:type_name -> signal.backup.FilePointer + 61, // 76: signal.backup.StickerMessage.sticker:type_name -> signal.backup.Sticker + 67, // 77: signal.backup.StickerMessage.reactions:type_name -> signal.backup.Reaction + 64, // 78: signal.backup.Sticker.data:type_name -> signal.backup.FilePointer + 64, // 79: signal.backup.LinkPreview.image:type_name -> signal.backup.FilePointer + 64, // 80: signal.backup.MessageAttachment.pointer:type_name -> signal.backup.FilePointer + 24, // 81: signal.backup.MessageAttachment.flag:type_name -> signal.backup.MessageAttachment.Flag + 155, // 82: signal.backup.FilePointer.locatorInfo:type_name -> signal.backup.FilePointer.LocatorInfo + 51, // 83: signal.backup.Quote.text:type_name -> signal.backup.Text + 156, // 84: signal.backup.Quote.attachments:type_name -> signal.backup.Quote.QuotedAttachment + 25, // 85: signal.backup.Quote.type:type_name -> signal.backup.Quote.Type + 26, // 86: signal.backup.BodyRange.style:type_name -> signal.backup.BodyRange.Style + 157, // 87: signal.backup.Poll.options:type_name -> signal.backup.Poll.PollOption + 67, // 88: signal.backup.Poll.reactions:type_name -> signal.backup.Reaction + 72, // 89: signal.backup.ChatUpdateMessage.simpleUpdate:type_name -> signal.backup.SimpleChatUpdate + 78, // 90: signal.backup.ChatUpdateMessage.groupChange:type_name -> signal.backup.GroupChangeChatUpdate + 73, // 91: signal.backup.ChatUpdateMessage.expirationTimerChange:type_name -> signal.backup.ExpirationTimerChatUpdate + 74, // 92: signal.backup.ChatUpdateMessage.profileChange:type_name -> signal.backup.ProfileChangeChatUpdate + 76, // 93: signal.backup.ChatUpdateMessage.threadMerge:type_name -> signal.backup.ThreadMergeChatUpdate + 77, // 94: signal.backup.ChatUpdateMessage.sessionSwitchover:type_name -> signal.backup.SessionSwitchoverChatUpdate + 70, // 95: signal.backup.ChatUpdateMessage.individualCall:type_name -> signal.backup.IndividualCall + 71, // 96: signal.backup.ChatUpdateMessage.groupCall:type_name -> signal.backup.GroupCall + 75, // 97: signal.backup.ChatUpdateMessage.learnedProfileChange:type_name -> signal.backup.LearnedProfileChatUpdate + 113, // 98: signal.backup.ChatUpdateMessage.pollTerminate:type_name -> signal.backup.PollTerminateUpdate + 114, // 99: signal.backup.ChatUpdateMessage.pinMessage:type_name -> signal.backup.PinMessageUpdate + 27, // 100: signal.backup.IndividualCall.type:type_name -> signal.backup.IndividualCall.Type + 28, // 101: signal.backup.IndividualCall.direction:type_name -> signal.backup.IndividualCall.Direction + 29, // 102: signal.backup.IndividualCall.state:type_name -> signal.backup.IndividualCall.State + 30, // 103: signal.backup.GroupCall.state:type_name -> signal.backup.GroupCall.State + 31, // 104: signal.backup.SimpleChatUpdate.type:type_name -> signal.backup.SimpleChatUpdate.Type + 159, // 105: signal.backup.GroupChangeChatUpdate.updates:type_name -> signal.backup.GroupChangeChatUpdate.Update + 1, // 106: signal.backup.GroupMembershipAccessLevelChangeUpdate.accessLevel:type_name -> signal.backup.GroupV2AccessLevel + 1, // 107: signal.backup.GroupAttributesAccessLevelChangeUpdate.accessLevel:type_name -> signal.backup.GroupV2AccessLevel + 160, // 108: signal.backup.GroupInvitationRevokedUpdate.invitees:type_name -> signal.backup.GroupInvitationRevokedUpdate.Invitee + 32, // 109: signal.backup.ChatStyle.wallpaperPreset:type_name -> signal.backup.ChatStyle.WallpaperPreset + 64, // 110: signal.backup.ChatStyle.wallpaperPhoto:type_name -> signal.backup.FilePointer + 163, // 111: signal.backup.ChatStyle.autoBubbleColor:type_name -> signal.backup.ChatStyle.AutomaticBubbleColor + 33, // 112: signal.backup.ChatStyle.bubbleColorPreset:type_name -> signal.backup.ChatStyle.BubbleColorPreset + 34, // 113: signal.backup.NotificationProfile.scheduleDaysEnabled:type_name -> signal.backup.NotificationProfile.DayOfWeek + 35, // 114: signal.backup.ChatFolder.folderType:type_name -> signal.backup.ChatFolder.FolderType + 6, // 115: signal.backup.AccountData.UsernameLink.color:type_name -> signal.backup.AccountData.UsernameLink.Color + 7, // 116: signal.backup.AccountData.AutoDownloadSettings.images:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption + 7, // 117: signal.backup.AccountData.AutoDownloadSettings.audio:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption + 7, // 118: signal.backup.AccountData.AutoDownloadSettings.video:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption + 7, // 119: signal.backup.AccountData.AutoDownloadSettings.documents:type_name -> signal.backup.AccountData.AutoDownloadSettings.AutoDownloadOption + 2, // 120: signal.backup.AccountData.AccountSettings.phoneNumberSharingMode:type_name -> signal.backup.AccountData.PhoneNumberSharingMode + 116, // 121: signal.backup.AccountData.AccountSettings.defaultChatStyle:type_name -> signal.backup.ChatStyle + 162, // 122: signal.backup.AccountData.AccountSettings.customChatColors:type_name -> signal.backup.ChatStyle.CustomChatColor + 3, // 123: signal.backup.AccountData.AccountSettings.defaultSentMediaQuality:type_name -> signal.backup.AccountData.SentMediaQuality + 120, // 124: signal.backup.AccountData.AccountSettings.autoDownloadSettings:type_name -> signal.backup.AccountData.AutoDownloadSettings + 4, // 125: signal.backup.AccountData.AccountSettings.appTheme:type_name -> signal.backup.AccountData.AppTheme + 5, // 126: signal.backup.AccountData.AccountSettings.callsUseLessDataSetting:type_name -> signal.backup.AccountData.CallsUseLessDataSetting + 8, // 127: signal.backup.AccountData.AndroidSpecificSettings.navigationBarSize:type_name -> signal.backup.AccountData.AndroidSpecificSettings.NavigationBarSize + 129, // 128: signal.backup.Group.GroupSnapshot.title:type_name -> signal.backup.Group.GroupAttributeBlob + 129, // 129: signal.backup.Group.GroupSnapshot.description:type_name -> signal.backup.Group.GroupAttributeBlob + 129, // 130: signal.backup.Group.GroupSnapshot.disappearingMessagesTimer:type_name -> signal.backup.Group.GroupAttributeBlob + 134, // 131: signal.backup.Group.GroupSnapshot.accessControl:type_name -> signal.backup.Group.AccessControl + 130, // 132: signal.backup.Group.GroupSnapshot.members:type_name -> signal.backup.Group.Member + 131, // 133: signal.backup.Group.GroupSnapshot.membersPendingProfileKey:type_name -> signal.backup.Group.MemberPendingProfileKey + 132, // 134: signal.backup.Group.GroupSnapshot.membersPendingAdminApproval:type_name -> signal.backup.Group.MemberPendingAdminApproval + 133, // 135: signal.backup.Group.GroupSnapshot.members_banned:type_name -> signal.backup.Group.MemberBanned + 12, // 136: signal.backup.Group.Member.role:type_name -> signal.backup.Group.Member.Role + 130, // 137: signal.backup.Group.MemberPendingProfileKey.member:type_name -> signal.backup.Group.Member + 13, // 138: signal.backup.Group.AccessControl.attributes:type_name -> signal.backup.Group.AccessControl.AccessRequired + 13, // 139: signal.backup.Group.AccessControl.members:type_name -> signal.backup.Group.AccessControl.AccessRequired + 13, // 140: signal.backup.Group.AccessControl.addFromInviteLink:type_name -> signal.backup.Group.AccessControl.AccessRequired + 50, // 141: signal.backup.ChatItem.OutgoingMessageDetails.sendStatus:type_name -> signal.backup.SendStatus + 17, // 142: signal.backup.SendStatus.Failed.reason:type_name -> signal.backup.SendStatus.Failed.FailureReason + 51, // 143: signal.backup.DirectStoryReplyMessage.TextReply.text:type_name -> signal.backup.Text + 64, // 144: signal.backup.DirectStoryReplyMessage.TextReply.longText:type_name -> signal.backup.FilePointer + 150, // 145: signal.backup.PaymentNotification.TransactionDetails.transaction:type_name -> signal.backup.PaymentNotification.TransactionDetails.Transaction + 149, // 146: signal.backup.PaymentNotification.TransactionDetails.failedTransaction:type_name -> signal.backup.PaymentNotification.TransactionDetails.FailedTransaction + 18, // 147: signal.backup.PaymentNotification.TransactionDetails.FailedTransaction.reason:type_name -> signal.backup.PaymentNotification.TransactionDetails.FailedTransaction.FailureReason + 19, // 148: signal.backup.PaymentNotification.TransactionDetails.Transaction.status:type_name -> signal.backup.PaymentNotification.TransactionDetails.Transaction.Status + 148, // 149: signal.backup.PaymentNotification.TransactionDetails.Transaction.mobileCoinIdentification:type_name -> signal.backup.PaymentNotification.TransactionDetails.MobileCoinTxoIdentification + 21, // 150: signal.backup.ContactAttachment.Phone.type:type_name -> signal.backup.ContactAttachment.Phone.Type + 22, // 151: signal.backup.ContactAttachment.Email.type:type_name -> signal.backup.ContactAttachment.Email.Type + 23, // 152: signal.backup.ContactAttachment.PostalAddress.type:type_name -> signal.backup.ContactAttachment.PostalAddress.Type + 63, // 153: signal.backup.Quote.QuotedAttachment.thumbnail:type_name -> signal.backup.MessageAttachment + 158, // 154: signal.backup.Poll.PollOption.votes:type_name -> signal.backup.Poll.PollOption.PollVote + 79, // 155: signal.backup.GroupChangeChatUpdate.Update.genericGroupUpdate:type_name -> signal.backup.GenericGroupUpdate + 80, // 156: signal.backup.GroupChangeChatUpdate.Update.groupCreationUpdate:type_name -> signal.backup.GroupCreationUpdate + 81, // 157: signal.backup.GroupChangeChatUpdate.Update.groupNameUpdate:type_name -> signal.backup.GroupNameUpdate + 82, // 158: signal.backup.GroupChangeChatUpdate.Update.groupAvatarUpdate:type_name -> signal.backup.GroupAvatarUpdate + 83, // 159: signal.backup.GroupChangeChatUpdate.Update.groupDescriptionUpdate:type_name -> signal.backup.GroupDescriptionUpdate + 84, // 160: signal.backup.GroupChangeChatUpdate.Update.groupMembershipAccessLevelChangeUpdate:type_name -> signal.backup.GroupMembershipAccessLevelChangeUpdate + 85, // 161: signal.backup.GroupChangeChatUpdate.Update.groupAttributesAccessLevelChangeUpdate:type_name -> signal.backup.GroupAttributesAccessLevelChangeUpdate + 86, // 162: signal.backup.GroupChangeChatUpdate.Update.groupAnnouncementOnlyChangeUpdate:type_name -> signal.backup.GroupAnnouncementOnlyChangeUpdate + 87, // 163: signal.backup.GroupChangeChatUpdate.Update.groupAdminStatusUpdate:type_name -> signal.backup.GroupAdminStatusUpdate + 88, // 164: signal.backup.GroupChangeChatUpdate.Update.groupMemberLeftUpdate:type_name -> signal.backup.GroupMemberLeftUpdate + 89, // 165: signal.backup.GroupChangeChatUpdate.Update.groupMemberRemovedUpdate:type_name -> signal.backup.GroupMemberRemovedUpdate + 90, // 166: signal.backup.GroupChangeChatUpdate.Update.selfInvitedToGroupUpdate:type_name -> signal.backup.SelfInvitedToGroupUpdate + 91, // 167: signal.backup.GroupChangeChatUpdate.Update.selfInvitedOtherUserToGroupUpdate:type_name -> signal.backup.SelfInvitedOtherUserToGroupUpdate + 92, // 168: signal.backup.GroupChangeChatUpdate.Update.groupUnknownInviteeUpdate:type_name -> signal.backup.GroupUnknownInviteeUpdate + 93, // 169: signal.backup.GroupChangeChatUpdate.Update.groupInvitationAcceptedUpdate:type_name -> signal.backup.GroupInvitationAcceptedUpdate + 94, // 170: signal.backup.GroupChangeChatUpdate.Update.groupInvitationDeclinedUpdate:type_name -> signal.backup.GroupInvitationDeclinedUpdate + 95, // 171: signal.backup.GroupChangeChatUpdate.Update.groupMemberJoinedUpdate:type_name -> signal.backup.GroupMemberJoinedUpdate + 96, // 172: signal.backup.GroupChangeChatUpdate.Update.groupMemberAddedUpdate:type_name -> signal.backup.GroupMemberAddedUpdate + 97, // 173: signal.backup.GroupChangeChatUpdate.Update.groupSelfInvitationRevokedUpdate:type_name -> signal.backup.GroupSelfInvitationRevokedUpdate + 98, // 174: signal.backup.GroupChangeChatUpdate.Update.groupInvitationRevokedUpdate:type_name -> signal.backup.GroupInvitationRevokedUpdate + 99, // 175: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestUpdate:type_name -> signal.backup.GroupJoinRequestUpdate + 100, // 176: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestApprovalUpdate:type_name -> signal.backup.GroupJoinRequestApprovalUpdate + 101, // 177: signal.backup.GroupChangeChatUpdate.Update.groupJoinRequestCanceledUpdate:type_name -> signal.backup.GroupJoinRequestCanceledUpdate + 103, // 178: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkResetUpdate:type_name -> signal.backup.GroupInviteLinkResetUpdate + 104, // 179: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkEnabledUpdate:type_name -> signal.backup.GroupInviteLinkEnabledUpdate + 105, // 180: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkAdminApprovalUpdate:type_name -> signal.backup.GroupInviteLinkAdminApprovalUpdate + 106, // 181: signal.backup.GroupChangeChatUpdate.Update.groupInviteLinkDisabledUpdate:type_name -> signal.backup.GroupInviteLinkDisabledUpdate + 107, // 182: signal.backup.GroupChangeChatUpdate.Update.groupMemberJoinedByLinkUpdate:type_name -> signal.backup.GroupMemberJoinedByLinkUpdate + 108, // 183: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationUpdate:type_name -> signal.backup.GroupV2MigrationUpdate + 109, // 184: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationSelfInvitedUpdate:type_name -> signal.backup.GroupV2MigrationSelfInvitedUpdate + 110, // 185: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationInvitedMembersUpdate:type_name -> signal.backup.GroupV2MigrationInvitedMembersUpdate + 111, // 186: signal.backup.GroupChangeChatUpdate.Update.groupV2MigrationDroppedMembersUpdate:type_name -> signal.backup.GroupV2MigrationDroppedMembersUpdate + 102, // 187: signal.backup.GroupChangeChatUpdate.Update.groupSequenceOfRequestsAndCancelsUpdate:type_name -> signal.backup.GroupSequenceOfRequestsAndCancelsUpdate + 112, // 188: signal.backup.GroupChangeChatUpdate.Update.groupExpirationTimerUpdate:type_name -> signal.backup.GroupExpirationTimerUpdate + 161, // 189: signal.backup.ChatStyle.CustomChatColor.gradient:type_name -> signal.backup.ChatStyle.Gradient + 190, // [190:190] is the sub-list for method output_type + 190, // [190:190] is the sub-list for method input_type + 190, // [190:190] is the sub-list for extension type_name + 190, // [190:190] is the sub-list for extension extendee + 0, // [0:190] is the sub-list for field type_name } func init() { file_backuppb_Backup_proto_init() } @@ -14043,7 +13607,6 @@ func file_backuppb_Backup_proto_init() { (*ChatItem_ViewOnceMessage)(nil), (*ChatItem_DirectStoryReplyMessage)(nil), (*ChatItem_Poll)(nil), - (*ChatItem_AdminDeletedMessage)(nil), } file_backuppb_Backup_proto_msgTypes[14].OneofWrappers = []any{ (*SendStatus_Pending_)(nil), @@ -14070,7 +13633,7 @@ func file_backuppb_Backup_proto_init() { (*BodyRange_MentionAci)(nil), (*BodyRange_Style_)(nil), } - file_backuppb_Backup_proto_msgTypes[34].OneofWrappers = []any{ + file_backuppb_Backup_proto_msgTypes[33].OneofWrappers = []any{ (*ChatUpdateMessage_SimpleUpdate)(nil), (*ChatUpdateMessage_GroupChange)(nil), (*ChatUpdateMessage_ExpirationTimerChange)(nil), @@ -14083,12 +13646,13 @@ func file_backuppb_Backup_proto_init() { (*ChatUpdateMessage_PollTerminate)(nil), (*ChatUpdateMessage_PinMessage)(nil), } + file_backuppb_Backup_proto_msgTypes[34].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[35].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[36].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[40].OneofWrappers = []any{ + file_backuppb_Backup_proto_msgTypes[39].OneofWrappers = []any{ (*LearnedProfileChatUpdate_E164)(nil), (*LearnedProfileChatUpdate_Username)(nil), } + file_backuppb_Backup_proto_msgTypes[43].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[44].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[45].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[46].OneofWrappers = []any{} @@ -14097,58 +13661,55 @@ func file_backuppb_Backup_proto_init() { file_backuppb_Backup_proto_msgTypes[49].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[50].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[51].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[52].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[53].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[54].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[56].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[57].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[59].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[58].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[60].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[61].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[63].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[62].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[64].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[65].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[67].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[68].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[69].OneofWrappers = []any{} file_backuppb_Backup_proto_msgTypes[70].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[71].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[72].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[73].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[79].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[83].OneofWrappers = []any{ + file_backuppb_Backup_proto_msgTypes[76].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[80].OneofWrappers = []any{ (*ChatStyle_WallpaperPreset_)(nil), (*ChatStyle_WallpaperPhoto)(nil), (*ChatStyle_AutoBubbleColor)(nil), (*ChatStyle_BubbleColorPreset_)(nil), (*ChatStyle_CustomColorId)(nil), } - file_backuppb_Backup_proto_msgTypes[84].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[88].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[90].OneofWrappers = []any{ + file_backuppb_Backup_proto_msgTypes[81].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[85].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[87].OneofWrappers = []any{ (*AccountData_IAPSubscriberData_PurchaseToken)(nil), (*AccountData_IAPSubscriberData_OriginalTransactionId)(nil), } - file_backuppb_Backup_proto_msgTypes[96].OneofWrappers = []any{ + file_backuppb_Backup_proto_msgTypes[93].OneofWrappers = []any{ (*Group_GroupAttributeBlob_Title)(nil), (*Group_GroupAttributeBlob_Avatar)(nil), (*Group_GroupAttributeBlob_DisappearingMessagesDuration)(nil), (*Group_GroupAttributeBlob_DescriptionText)(nil), } - file_backuppb_Backup_proto_msgTypes[102].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[105].OneofWrappers = []any{ + file_backuppb_Backup_proto_msgTypes[99].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[102].OneofWrappers = []any{ (*ChatItem_PinDetails_PinExpiresAtTimestamp)(nil), (*ChatItem_PinDetails_PinNeverExpires)(nil), } - file_backuppb_Backup_proto_msgTypes[114].OneofWrappers = []any{ + file_backuppb_Backup_proto_msgTypes[111].OneofWrappers = []any{ (*PaymentNotification_TransactionDetails_Transaction_)(nil), (*PaymentNotification_TransactionDetails_FailedTransaction_)(nil), } - file_backuppb_Backup_proto_msgTypes[117].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[122].OneofWrappers = []any{ + file_backuppb_Backup_proto_msgTypes[114].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[119].OneofWrappers = []any{ (*FilePointer_LocatorInfo_PlaintextHash)(nil), (*FilePointer_LocatorInfo_EncryptedDigest)(nil), } - file_backuppb_Backup_proto_msgTypes[123].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[126].OneofWrappers = []any{ + file_backuppb_Backup_proto_msgTypes[120].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[123].OneofWrappers = []any{ (*GroupChangeChatUpdate_Update_GenericGroupUpdate)(nil), (*GroupChangeChatUpdate_Update_GroupCreationUpdate)(nil), (*GroupChangeChatUpdate_Update_GroupNameUpdate)(nil), @@ -14183,11 +13744,9 @@ func file_backuppb_Backup_proto_init() { (*GroupChangeChatUpdate_Update_GroupV2MigrationDroppedMembersUpdate)(nil), (*GroupChangeChatUpdate_Update_GroupSequenceOfRequestsAndCancelsUpdate)(nil), (*GroupChangeChatUpdate_Update_GroupExpirationTimerUpdate)(nil), - (*GroupChangeChatUpdate_Update_GroupMemberLabelAccessLevelChangeUpdate)(nil), - (*GroupChangeChatUpdate_Update_GroupTerminateChangeUpdate)(nil), } - file_backuppb_Backup_proto_msgTypes[127].OneofWrappers = []any{} - file_backuppb_Backup_proto_msgTypes[129].OneofWrappers = []any{ + file_backuppb_Backup_proto_msgTypes[124].OneofWrappers = []any{} + file_backuppb_Backup_proto_msgTypes[126].OneofWrappers = []any{ (*ChatStyle_CustomChatColor_Solid)(nil), (*ChatStyle_CustomChatColor_Gradient)(nil), } @@ -14196,8 +13755,8 @@ func file_backuppb_Backup_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_backuppb_Backup_proto_rawDesc), len(file_backuppb_Backup_proto_rawDesc)), - NumEnums: 37, - NumMessages: 131, + NumEnums: 36, + NumMessages: 128, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/signalmeow/protobuf/backuppb/Backup.pb.raw b/pkg/signalmeow/protobuf/backuppb/Backup.pb.raw new file mode 100644 index 0000000..c72802f Binary files /dev/null and b/pkg/signalmeow/protobuf/backuppb/Backup.pb.raw differ diff --git a/pkg/signalmeow/protobuf/backuppb/Backup.proto b/pkg/signalmeow/protobuf/backuppb/Backup.proto index 32b3ac3..1b70167 100644 --- a/pkg/signalmeow/protobuf/backuppb/Backup.proto +++ b/pkg/signalmeow/protobuf/backuppb/Backup.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package signal.backup; -option java_package = "org.signal.archive.proto"; +option java_package = "org.thoughtcrime.securesms.backup.v2.proto"; option swift_prefix = "BackupProto_"; message BackupInfo { @@ -103,12 +103,6 @@ message AccountData { } message AccountSettings { - enum UnreadBadgeType { - UNKNOWN_BADGE_TYPE = 0; // Interpret as "Unread messages" - UNREAD_MESSAGES = 1; - UNREAD_CHATS = 2; - } - bool readReceipts = 1; bool sealedSenderIndicators = 2; bool typingIndicators = 3; @@ -141,15 +135,6 @@ message AccountData { CallsUseLessDataSetting callsUseLessDataSetting = 29; // If unset, treat the same as "Unknown" case bool allowSealedSenderFromAnyone = 30; bool allowAutomaticKeyVerification = 31; - bool hasSeenAdminDeleteEducationDialog = 32; - UnreadBadgeType unreadBadgeType = 33; // Only used in ios/desktop - optional bool includeMutedChatsInBadge = 34; // Only used in ios/desktop. If unset, consider this disabled - optional bool reactionNotifications = 35; // If unset, consider this enabled - optional bool notifyForCallsIfMuted = 36; // If unset, consider this disabled - optional bool notifyForMentionsIfMuted = 37; // If unset, consider this enabled - optional bool notifyForRepliesIfMuted = 38; // If unset, consider this enabled - optional bool showUnreadReminders = 39; // If unset, consider this enabled - optional bool notifyWhenContactJoins = 40; // If unset, consider this disabled } message SubscriberData { @@ -196,7 +181,7 @@ message AccountData { AndroidSpecificSettings androidSpecificSettings = 12; string bioText = 13; string bioEmoji = 14; - reserved /*keyTransparencyData*/ 15; // No longer want to persist self-KT data + optional bytes keyTransparencyData = 15; } message Recipient { @@ -286,7 +271,6 @@ message Contact { string systemNickname = 20; optional AvatarColor avatarColor = 21; optional bytes keyTransparencyData = 22; - uint64 blockedAtTimestamp = 23; // if `blocked` is true, 0 means unknown block time } message Group { @@ -303,7 +287,6 @@ message Group { GroupSnapshot snapshot = 5; bool blocked = 6; optional AvatarColor avatarColor = 7; - uint64 blockedAtTimestamp = 8; // if `blocked` is true, 0 means unknown block time // These are simply plaintext copies of the groups proto from Groups.proto. // They should be kept completely in-sync with Groups.proto. @@ -324,7 +307,6 @@ message Group { bytes inviteLinkPassword = 10; bool announcements_only = 12; repeated MemberBanned members_banned = 13; - bool terminated = 14; } message GroupAttributeBlob { @@ -349,8 +331,6 @@ message Group { reserved /*profileKey*/ 3; // This field is ignored in Backups, in favor of Contact frames for members reserved /*presentation*/ 4; // This field is deprecated in the context of static group state uint32 joinedAtVersion = 5; - string labelEmoji = 6; - string labelString = 7; } message MemberPendingProfileKey { @@ -383,7 +363,6 @@ message Group { AccessRequired attributes = 1; AccessRequired members = 2; AccessRequired addFromInviteLink = 3; - AccessRequired memberLabel = 4; } } @@ -401,13 +380,9 @@ message Chat { optional uint64 expirationTimerMs = 5; optional uint64 muteUntilMs = 6; // INT64_MAX (2^63 - 1) = "always muted". bool markedUnread = 7; - bool dontNotifyForMentionsIfMuted = 8; // will be deprecated in favor of [notifyForMentionsIfMuted] + bool dontNotifyForMentionsIfMuted = 8; ChatStyle style = 9; uint32 expireTimerVersion = 10; - optional bool notifyForCallsIfMuted = 11; // If unset, use default global settings - optional bool notifyForMentionsIfMuted = 12; // If unset, use default global settings. Only for groups. If [dontNotifyForMentionsIfMuted] is true, this should be initialized to false. - optional bool notifyForRepliesIfMuted = 13; // If unset, use default global settings. Only for groups. - optional bool showUnreadReminders = 14; // If unset, use default global settings } /** @@ -430,7 +405,7 @@ message CallLink { string name = 3; Restrictions restrictions = 4; uint64 expirationMs = 5; - reserved /*epoch*/ 6; + optional bytes epoch = 6; // May be absent/empty for older links } message AdHocCall { @@ -523,7 +498,6 @@ message ChatItem { ViewOnceMessage viewOnceMessage = 18; DirectStoryReplyMessage directStoryReplyMessage = 19; // group story reply messages are not backed up Poll poll = 20; - AdminDeletedMessage adminDeletedMessage = 22; } PinDetails pinDetails = 21; // only set if message is pinned @@ -924,10 +898,6 @@ message Poll { repeated Reaction reactions = 5; } -message AdminDeletedMessage { - uint64 adminId = 1; // id of the admin that deleted the message -} - message ChatUpdateMessage { // If unset, importers should ignore the update message without throwing an error. oneof update { @@ -1098,8 +1068,6 @@ message GroupChangeChatUpdate { GroupV2MigrationDroppedMembersUpdate groupV2MigrationDroppedMembersUpdate = 32; GroupSequenceOfRequestsAndCancelsUpdate groupSequenceOfRequestsAndCancelsUpdate = 33; GroupExpirationTimerUpdate groupExpirationTimerUpdate = 34; - GroupMemberLabelAccessLevelChangeUpdate groupMemberLabelAccessLevelChangeUpdate = 35; - GroupTerminateChangeUpdate groupTerminateChangeUpdate = 36; } } @@ -1151,15 +1119,6 @@ message GroupAttributesAccessLevelChangeUpdate { GroupV2AccessLevel accessLevel = 2; } -message GroupMemberLabelAccessLevelChangeUpdate { - optional bytes updaterAci = 1; - GroupV2AccessLevel accessLevel = 2; -} - -message GroupTerminateChangeUpdate { - optional bytes updaterAci = 1; -} - message GroupAnnouncementOnlyChangeUpdate { optional bytes updaterAci = 1; bool isAnnouncementOnly = 2; diff --git a/pkg/signalmeow/protobuf/build-protos.sh b/pkg/signalmeow/protobuf/build-protos.sh index 5a34136..54116ec 100755 --- a/pkg/signalmeow/protobuf/build-protos.sh +++ b/pkg/signalmeow/protobuf/build-protos.sh @@ -1,18 +1,15 @@ -#!/bin/bash -cd $(dirname "$0") -BASE_IMPORT_PATH="go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" -opts=() -for file in */*.proto; do - opts+=("--go_opt=M${file}=${BASE_IMPORT_PATH}/$(dirname "$file")") - opts+=("--go-grpc_opt=M${file}=${BASE_IMPORT_PATH}/$(dirname "$file")") +#!/bin/sh +PKG_IMPORT_PATH="go.mau.fi/mautrix-signal/pkg/signalmeow/signalpb" +for file in *.proto +do + # Requires https://go-review.googlesource.com/c/protobuf/+/369634 + protoc --go_out=. \ + --go_opt=M${file}=$PKG_IMPORT_PATH \ + --go_opt=paths=source_relative \ + $file done -for file in org/signal/chat/*.proto; do - file_without_ext=$(basename "$file" .proto) - opts+=("--go_opt=M${file}=${BASE_IMPORT_PATH}/rpc/${file_without_ext}") - opts+=("--go-grpc_opt=M${file}=${BASE_IMPORT_PATH}/rpc/${file_without_ext}") -done -protoc --go_out=. --go-grpc_out=. \ - --go_opt=module=$BASE_IMPORT_PATH \ - --go-grpc_opt=module=$BASE_IMPORT_PATH "${opts[@]}" \ - */*.proto org/signal/chat/*.proto +protoc --go_out=. \ + --go_opt=Mbackuppb/Backup.proto=$PKG_IMPORT_PATH/backuppb \ + --go_opt=paths=source_relative \ + backuppb/Backup.proto pre-commit run -a diff --git a/pkg/signalmeow/protobuf/cds2pb/cds2.pb.go b/pkg/signalmeow/protobuf/cds2pb/cds2.pb.go deleted file mode 100644 index 2c8634a..0000000 --- a/pkg/signalmeow/protobuf/cds2pb/cds2.pb.go +++ /dev/null @@ -1,259 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: cds2pb/cds2.proto - -package cds2pb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ClientRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Each ACI/UAK pair is a 32-byte buffer, containing the 16-byte ACI followed - // by its 16-byte UAK. - AciUakPairs []byte `protobuf:"bytes,1,opt,name=aci_uak_pairs,json=aciUakPairs,proto3" json:"aci_uak_pairs,omitempty"` - // Each E164 is an 8-byte big-endian number, as 8 bytes. - PrevE164S []byte `protobuf:"bytes,2,opt,name=prev_e164s,json=prevE164s,proto3" json:"prev_e164s,omitempty"` - NewE164S []byte `protobuf:"bytes,3,opt,name=new_e164s,json=newE164s,proto3" json:"new_e164s,omitempty"` - DiscardE164S []byte `protobuf:"bytes,4,opt,name=discard_e164s,json=discardE164s,proto3" json:"discard_e164s,omitempty"` - // If set, a token which allows rate limiting to discount the e164s in - // the request's prev_e164s, only counting new_e164s. If not set, then - // rate limiting considers both prev_e164s' and new_e164s' size. - Token []byte `protobuf:"bytes,6,opt,name=token,proto3" json:"token,omitempty"` - // After receiving a new token from the server, send back a message just - // containing a token_ack. - TokenAck bool `protobuf:"varint,7,opt,name=token_ack,json=tokenAck,proto3" json:"token_ack,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClientRequest) Reset() { - *x = ClientRequest{} - mi := &file_cds2pb_cds2_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClientRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClientRequest) ProtoMessage() {} - -func (x *ClientRequest) ProtoReflect() protoreflect.Message { - mi := &file_cds2pb_cds2_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClientRequest.ProtoReflect.Descriptor instead. -func (*ClientRequest) Descriptor() ([]byte, []int) { - return file_cds2pb_cds2_proto_rawDescGZIP(), []int{0} -} - -func (x *ClientRequest) GetAciUakPairs() []byte { - if x != nil { - return x.AciUakPairs - } - return nil -} - -func (x *ClientRequest) GetPrevE164S() []byte { - if x != nil { - return x.PrevE164S - } - return nil -} - -func (x *ClientRequest) GetNewE164S() []byte { - if x != nil { - return x.NewE164S - } - return nil -} - -func (x *ClientRequest) GetDiscardE164S() []byte { - if x != nil { - return x.DiscardE164S - } - return nil -} - -func (x *ClientRequest) GetToken() []byte { - if x != nil { - return x.Token - } - return nil -} - -func (x *ClientRequest) GetTokenAck() bool { - if x != nil { - return x.TokenAck - } - return false -} - -type ClientResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Each triple is an 8-byte e164, a 16-byte PNI, and a 16-byte ACI. - // If the e164 was not found, PNI and ACI are all zeros. If the PNI - // was found but the ACI was not, the PNI will be non-zero and the ACI - // will be all zeros. ACI will be returned if one of the returned - // PNIs has an ACI/UAK pair that matches. - // - // Should the request be successful (IE: a successful status returned), - // |e164_pni_aci_triple| will always equal |e164| of the request, - // so the entire marshalled size of the response will be (2+32)*|e164|, - // where the additional 2 bytes are the id/type/length additions of the - // protobuf marshaling added to each byte array. This avoids any data - // leakage based on the size of the encrypted output. - E164PniAciTriples []byte `protobuf:"bytes,1,opt,name=e164_pni_aci_triples,json=e164PniAciTriples,proto3" json:"e164_pni_aci_triples,omitempty"` - // A token which allows subsequent calls' rate limiting to discount the - // e164s sent up in this request, only counting those in the next - // request's new_e164s. - Token []byte `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` - // On a successful response to a token_ack request, the number of permits - // that were deducted from the user's rate-limit in order to process the - // request - DebugPermitsUsed int32 `protobuf:"varint,4,opt,name=debug_permits_used,json=debugPermitsUsed,proto3" json:"debug_permits_used,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClientResponse) Reset() { - *x = ClientResponse{} - mi := &file_cds2pb_cds2_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClientResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClientResponse) ProtoMessage() {} - -func (x *ClientResponse) ProtoReflect() protoreflect.Message { - mi := &file_cds2pb_cds2_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClientResponse.ProtoReflect.Descriptor instead. -func (*ClientResponse) Descriptor() ([]byte, []int) { - return file_cds2pb_cds2_proto_rawDescGZIP(), []int{1} -} - -func (x *ClientResponse) GetE164PniAciTriples() []byte { - if x != nil { - return x.E164PniAciTriples - } - return nil -} - -func (x *ClientResponse) GetToken() []byte { - if x != nil { - return x.Token - } - return nil -} - -func (x *ClientResponse) GetDebugPermitsUsed() int32 { - if x != nil { - return x.DebugPermitsUsed - } - return 0 -} - -var File_cds2pb_cds2_proto protoreflect.FileDescriptor - -const file_cds2pb_cds2_proto_rawDesc = "" + - "\n" + - "\x11cds2pb/cds2.proto\x12\x0forg.signal.cdsi\"\xd3\x01\n" + - "\rClientRequest\x12\"\n" + - "\raci_uak_pairs\x18\x01 \x01(\fR\vaciUakPairs\x12\x1d\n" + - "\n" + - "prev_e164s\x18\x02 \x01(\fR\tprevE164s\x12\x1b\n" + - "\tnew_e164s\x18\x03 \x01(\fR\bnewE164s\x12#\n" + - "\rdiscard_e164s\x18\x04 \x01(\fR\fdiscardE164s\x12\x14\n" + - "\x05token\x18\x06 \x01(\fR\x05token\x12\x1b\n" + - "\ttoken_ack\x18\a \x01(\bR\btokenAckJ\x04\b\x05\x10\x06J\x04\b\b\x10\t\"\x8b\x01\n" + - "\x0eClientResponse\x12/\n" + - "\x14e164_pni_aci_triples\x18\x01 \x01(\fR\x11e164PniAciTriples\x12\x14\n" + - "\x05token\x18\x03 \x01(\fR\x05token\x12,\n" + - "\x12debug_permits_used\x18\x04 \x01(\x05R\x10debugPermitsUsedJ\x04\b\x02\x10\x03b\x06proto3" - -var ( - file_cds2pb_cds2_proto_rawDescOnce sync.Once - file_cds2pb_cds2_proto_rawDescData []byte -) - -func file_cds2pb_cds2_proto_rawDescGZIP() []byte { - file_cds2pb_cds2_proto_rawDescOnce.Do(func() { - file_cds2pb_cds2_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_cds2pb_cds2_proto_rawDesc), len(file_cds2pb_cds2_proto_rawDesc))) - }) - return file_cds2pb_cds2_proto_rawDescData -} - -var file_cds2pb_cds2_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_cds2pb_cds2_proto_goTypes = []any{ - (*ClientRequest)(nil), // 0: org.signal.cdsi.ClientRequest - (*ClientResponse)(nil), // 1: org.signal.cdsi.ClientResponse -} -var file_cds2pb_cds2_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_cds2pb_cds2_proto_init() } -func file_cds2pb_cds2_proto_init() { - if File_cds2pb_cds2_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_cds2pb_cds2_proto_rawDesc), len(file_cds2pb_cds2_proto_rawDesc)), - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cds2pb_cds2_proto_goTypes, - DependencyIndexes: file_cds2pb_cds2_proto_depIdxs, - MessageInfos: file_cds2pb_cds2_proto_msgTypes, - }.Build() - File_cds2pb_cds2_proto = out.File - file_cds2pb_cds2_proto_goTypes = nil - file_cds2pb_cds2_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/signalpb/extra.go b/pkg/signalmeow/protobuf/extra.go similarity index 100% rename from pkg/signalmeow/protobuf/signalpb/extra.go rename to pkg/signalmeow/protobuf/extra.go diff --git a/pkg/signalmeow/protobuf/org/signal/chat/account.proto b/pkg/signalmeow/protobuf/org/signal/chat/account.proto deleted file mode 100644 index c12755b..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/account.proto +++ /dev/null @@ -1,608 +0,0 @@ -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.account; - -import "google/protobuf/empty.proto"; - -import "org/signal/chat/common.proto"; -import "org/signal/chat/errors.proto"; -import "org/signal/chat/messages.proto"; -import "org/signal/chat/require.proto"; -import "org/signal/chat/tag.proto"; - -// Provides methods for working with Signal accounts. -service Accounts { - option (require.auth) = AUTH_ONLY_AUTHENTICATED; - - // Returns basic identifiers for the authenticated account. - rpc GetAccountIdentity(GetAccountIdentityRequest) returns (GetAccountIdentityResponse) {} - - // Returns entitlements for the authenticated account. - rpc GetEntitlements(GetEntitlementsRequest) returns (GetEntitlementsResponse) {} - - // Deletes the authenticated account, purging all associated data in the - // process. - rpc DeleteAccount(DeleteAccountRequest) returns (DeleteAccountResponse) {} - - // Sets the registration lock secret for the authenticated account. To remove - // a registration lock, please use `ClearRegistrationLock`. - rpc SetRegistrationLock(SetRegistrationLockRequest) returns (SetRegistrationLockResponse) {} - - // Removes any registration lock credentials from the authenticated account. - rpc ClearRegistrationLock(ClearRegistrationLockRequest) returns (ClearRegistrationLockResponse) {} - - // Attempts to reserve one of multiple given username hashes. Reserved - // usernames may be claimed later via `ConfirmUsernameHash`. - rpc ReserveUsernameHash(ReserveUsernameHashRequest) returns (ReserveUsernameHashResponse) {} - - // Sets the username hash/encrypted username to a previously-reserved value - // (see `ReserveUsernameHash`). - rpc ConfirmUsernameHash(ConfirmUsernameHashRequest) returns (ConfirmUsernameHashResponse) {} - - // Clears the current username hash, ciphertext, and link for the - // authenticated user. - rpc DeleteUsernameHash(DeleteUsernameHashRequest) returns (DeleteUsernameHashResponse) {} - - // Associates the given username ciphertext with the account, replacing any - // previously stored ciphertext. A new link handle will optionally be created, - // and the link handle to use will be returned in any event. - rpc SetUsernameLink(SetUsernameLinkRequest) returns (SetUsernameLinkResponse) {} - - // Clears any username link associated with the authenticated account. - rpc DeleteUsernameLink(DeleteUsernameLinkRequest) returns (DeleteUsernameLinkResponse) {} - - // Configures "unidentified access" keys and preferences for the authenticated - // account. Other users permitted to interact with this account anonymously - // may take actions like fetching pre-keys and profiles for this account or - // sending sealed-sender messages without providing identifying credentials. - rpc ConfigureUnidentifiedAccess(ConfigureUnidentifiedAccessRequest) returns (ConfigureUnidentifiedAccessResponse) {} - - // Sets whether the authenticated account may be discovered by phone number - // via the Contact Discovery Service (CDS). - rpc SetDiscoverableByPhoneNumber(SetDiscoverableByPhoneNumberRequest) returns (SetDiscoverableByPhoneNumberResponse) {} - - // Sets the registration recovery password for the authenticated account. - rpc SetRegistrationRecoveryPassword(SetRegistrationRecoveryPasswordRequest) returns (SetRegistrationRecoveryPasswordResponse) {} - - // Store a public key used to issue and verify zero-knowledge (anonymous) credentials for the account. - rpc SetZkCredentialKey(SetZkCredentialKeyRequest) returns (SetZkCredentialKeyResponse) {} - - // Changes the phone number associated with the authenticated account. - rpc ChangeNumber(ChangeNumberRequest) returns (ChangeNumberResponse) {} - - // Produces a report of non-ephemeral account data stored by the service - rpc GetAccountDataReport(GetAccountDataReportRequest) returns (GetAccountDataReportResponse) {} - - // Gets the capabilities for the authenticated account. - rpc GetCapabilities(GetCapabilitiesRequest) returns (GetCapabilitiesResponse) {} - - // Generates and stores a pending TOTP key for the authenticated account. - // To "activate" the key, callers must call the `ConfirmTotpKey` endpoint. - rpc GenerateTotpKey(GenerateTotpKeyRequest) returns (GenerateTotpKeyResponse) {} - - // Confirms that the caller has stored and can derive one-time passwords from - // a pending TOTP key generated via `GenerateTotpKey` and stores/activates the - // key for the caller's account - rpc ConfirmTotpKey(ConfirmTotpKeyRequest) returns (ConfirmTotpKeyResponse) {} - - // Returns a list of confirmed TOTP keys for the authenticated account - rpc ListTotpKeys(ListTotpKeysRequest) returns (ListTotpKeysResponse) {} - - // Updates encrypted, user-supplied metadata (e.g. a human-readable name and - // creation timestamp) for an existing, confirmed TOTP key - rpc SetTotpKeyMetadata(SetTotpKeyMetadataRequest) returns (SetTotpKeyMetadataResponse) {} - - // Removes a TOTP from the authenticated account - rpc RemoveTotpKey(RemoveTotpKeyRequest) returns (RemoveTotpKeyResponse) {} -} - -// Provides methods for looking up Signal accounts. Callers must not provide -// identifying credentials when calling methods in this service. -service AccountsAnonymous { - option (require.auth) = AUTH_ONLY_ANONYMOUS; - - // Checks whether an account with the given service identifier exists. - rpc CheckAccountExistence(CheckAccountExistenceRequest) returns (CheckAccountExistenceResponse) {} - - // Finds the service identifier of the account associated with the given - // username hash. - rpc LookupUsernameHash(LookupUsernameHashRequest) returns (LookupUsernameHashResponse) {} - - // Finds the encrypted username identified by a given username link handle. - rpc LookupUsernameLink(LookupUsernameLinkRequest) returns (LookupUsernameLinkResponse) {} - - // Gets the publicly-visible capabilities enabled on the account identified by - // the provided ACI. - rpc GetCapabilities(GetCapabilitiesAnonymousRequest) returns (GetCapabilitiesAnonymousResponse) {} -} - -message GetAccountIdentityRequest { -} - -message GetAccountIdentityResponse { - // The identifiers for the authenticated account. - common.AccountIdentifiers account_identifiers = 1; -} - -message GetEntitlementsRequest { -} - -message GetEntitlementsResponse { - message BadgeEntitlement { - // The id of the badge the account is entitled. Metadata to display for - // badges may be obtained by cross-referencing badge ids with - // RemoteConfiguration.GetBadges. - string badge_id = 1; - // When the badge expires, in number of seconds since epoch - uint64 expiration_epoch_seconds = 2; - // Whether the badge is currently configured to be visible - bool visible = 3; - } - - message BackupEntitlement { - // The backup level of the account - uint64 level = 1; - // When the backup entitlement expires, in number of seconds since epoch - uint64 expiration_epoch_seconds = 2; - } - - // Active badges added via Donations.redeemReceipt - repeated BadgeEntitlement badges = 1; - - // If present, the backup level set via Backups.redeemReceipt - BackupEntitlement backup = 2; -} - -message DeleteAccountRequest { -} - -message DeleteAccountResponse { -} - -message SetRegistrationLockRequest { - // The new registration lock secret for the authenticated account. - bytes registration_lock = 1 [(require.exactlySize) = 32]; -} - -message SetRegistrationLockResponse { -} - -message ClearRegistrationLockRequest { -} - -message ClearRegistrationLockResponse { -} - -message ReserveUsernameHashRequest { - // A prioritized list of username hashes to attempt to reserve. - repeated bytes username_hashes = 1 [(require.size) = {min: 1, max: 20}, (require.each) = {exactlySize: 32}]; -} - -message UsernameNotAvailable {} - -message ReserveUsernameHashResponse { - oneof response { - // The first username hash that was available (and actually reserved). - bytes username_hash = 1; - - // Indicates that, of all of the candidate hashes provided, none were - // available. Callers may generate a new set of hashes and and retry. - UsernameNotAvailable username_not_available = 2 [(tag.reason) = "username_not_available"]; - } -} - -message ConfirmUsernameHashRequest { - // The username hash to claim for the authenticated account. - bytes username_hash = 1 [(require.exactlySize) = 32]; - - // A zero-knowledge proof that the given username hash was generated by the - // Signal username algorithm. - bytes zk_proof = 2 [(require.nonEmpty) = true]; - - // The ciphertext of the chosen username for use in public-facing contexts - // (e.g. links and QR codes). - bytes username_ciphertext = 3 [(require.size) = {min: 1, max: 128}]; -} - -message ConfirmUsernameHashResponse { - message ConfirmedUsernameHash { - reserved 1; // username_hash - - // The server-generated username link handle for the newly-confirmed username. - bytes username_link_handle = 2; - } - - oneof response { - // The details of the successfully confirmed username. - ConfirmedUsernameHash confirmed_username_hash = 1; - - // The provided hash was not reserved for the account. - errors.FailedPrecondition reservation_not_found = 2 [(tag.reason) = "reservation_not_found"]; - - // The reservation has lapsed and the requested username has been claimed by - // another caller. - UsernameNotAvailable username_not_available = 3 [(tag.reason) = "username_not_available"]; - } -} - -message DeleteUsernameHashRequest { -} - -message DeleteUsernameHashResponse { -} - -message SetUsernameLinkRequest { - // The username ciphertext for which to generate a new link handle. - bytes username_ciphertext = 1 [(require.size) = {min: 1, max: 128}]; - - // If true and the account already had an encrypted username stored, the - // existing link handle will be reused. Otherwise a new link handle will be - // created. - bool keep_link_handle = 2; -} - - -message SetUsernameLinkResponse { - oneof response { - // A new link handle for the given username ciphertext. - bytes username_link_handle = 1; - - // The authenticated account did not have a username set. - errors.FailedPrecondition no_username_set = 2 [(tag.reason) = "no_username_set"]; - - } -} - -message DeleteUsernameLinkRequest { -} - -message DeleteUsernameLinkResponse { -} - -message ConfigureUnidentifiedAccessRequest { - oneof configuration { - // The key that other users must provide to interact with this account - // anonymously (i.e. to retrieve keys or profiles or to send messages) unless - // unrestricted unidentified access is permitted. Must be present if - // unrestricted unidentified access is not allowed. - bytes unidentified_access_key = 1 [(require.exactlySize) = 16]; - - // If set, any user may interact with this account anonymously without - // providing an unidentified access key. Otherwise, users must provide the - // given unidentified access key to interact with this account anonymously. - // Setting unrestricted unidentified access will clear any existing - // unidentified_access_key - google.protobuf.Empty allow_unrestricted_unidentified_access = 2; - } -} - -message ConfigureUnidentifiedAccessResponse { -} - -message SetDiscoverableByPhoneNumberRequest { - // If true, the authenticated account may be discovered by phone number via - // the Contact Discovery Service (CDS). Otherwise, other users must discover - // this account by other means (i.e. by username). - bool discoverable_by_phone_number = 1; -} - -message SetDiscoverableByPhoneNumberResponse { -} - -message SetRegistrationRecoveryPasswordRequest { - // The new registration recovery password for the authenticated account. - bytes registration_recovery_password = 1 [(require.exactlySize) = 32]; -} - -message SetRegistrationRecoveryPasswordResponse { -} - -message CheckAccountExistenceRequest { - // The service identifier of an account that may or may not exist. - common.ServiceIdentifier service_identifier = 1; -} - -message CheckAccountExistenceResponse { - // True if an account exists with the given service identifier or false if no - // account was found. - bool account_exists = 1; -} - -message LookupUsernameHashRequest { - // A 32-byte username hash for which to find an account. - bytes username_hash = 1 [(require.exactlySize) = 32]; -} - -message LookupUsernameHashResponse { - oneof response { - // The service identifier associated with the provided username hash. - common.ServiceIdentifier service_identifier = 1; - - // No account was found for the provided username hash. - errors.NotFound not_found = 2 [(tag.reason) = "not_found"]; - } -} - -message LookupUsernameLinkRequest { - // The link handle for which to find an encrypted username. Link handles are - // 16-byte representations of UUIDs. - bytes username_link_handle = 1 [(require.exactlySize) = 16]; -} - -message LookupUsernameLinkResponse { - oneof response { - // The ciphertext of the username identified by the provided link handle. - bytes username_ciphertext = 1; - - - // No username was found for the provided link handle. - errors.NotFound not_found = 2 [(tag.reason) = "not_found"]; - } -} - -message SetZkCredentialKeyRequest { - // A serialized libsignal ZkCredentialPublicKey - bytes public_key = 1 [(require.exactlySize) = 33]; -} - -message SetZkCredentialKeyResponse { - // A random, non-zero, value that must be included in credential requests using the key. - // - // This value allows the server to ratchet the resulting binding identity, - // as reverting to the previous key will result in a new rotation ID. - uint64 rotation_id = 1; -} - -message ChangeNumberRequest { - // A means of authenticating the change-number request for the new phone - // number. Exactly one must be provided. - oneof verification { - // A verified registration session ID (as returned by the registration - // service) for the new phone number. - bytes session_id = 1 [(require.nonEmpty) = true]; - - // A registration recovery password for the new phone number. - bytes recovery_password = 2 [(require.exactlySize) = 32]; - } - - // The new phone number for the authenticated account. - string number = 3 [(require.e164) = true]; - - // The registration lock secret for the new phone number, if the account - // associated with the new phone number has a registration lock configured. - bytes registration_lock = 4 [(require.exactlySize) = 0, (require.exactlySize) = 32]; - - // The new public identity key to use for the phone-number identity (PNI) - // associated with the new phone number. - bytes pni_identity_key = 5 [(require.nonEmpty) = true]; - - // Synchronization messages to send to companion devices to supply the private - // keys associated with the new identity key and their new pre-keys. Exactly - // one message must be supplied for each device other than the sending - // (primary) device. May be omitted if no companion devices are linked to the - // account. - messages.IndividualRecipientMessageBundle device_messages = 6; - - // A new signed EC pre-key for each device on the account, including the - // sending device, keyed by device ID. Each must be accompanied by a valid - // signature from the identity key in this request. - map device_pni_signed_pre_keys = 7; - - // A new signed post-quantum last-resort pre-key for each device on the - // account, including the sending device, keyed by device ID. Each must be - // accompanied by a valid signature from the identity key in this request. - map device_pni_pq_last_resort_pre_keys = 8; - - // The new phone-number-identity registration ID for each device on the - // account, including the sending device, keyed by device ID. - map pni_registration_ids = 9; -} - -message ChangeNumberResponse { - oneof response { - // The identifiers of the account after the successful - // number change. - common.AccountIdentifiers account_identifiers = 1; - - // Mismatched number of devices or device ids in 'devices to notify' list - messages.MismatchedDevices mismatched_devices = 2 [(tag.reason) = "mismatched_devices"]; - - // The account associated with the new phone number has a registration lock, - // and the provided registration lock secret was missing or incorrect. - RegistrationLockFailure registration_lock_failure = 3 [(tag.reason) = "registration_lock_failure"]; - - // Mismatched registration ids in 'devices to notify' list - StaleDevices stale_devices = 4 [(tag.reason) = "stale_devices"]; - - // One or more device messages was too large - errors.FailedPrecondition message_too_large = 5 [(tag.reason) = "message_too_large"]; - - // The registration session is unverified - errors.FailedPrecondition unverified_registration_session = 6 [(tag.reason) = "unverified_registration_session"]; - - // The number does not match the registration session, or the registration session is invalid - errors.FailedPrecondition invalid_registration_session = 7 [(tag.reason) = "invalid_registration_session"]; - - errors.FailedPrecondition recovery_password_verification_failed = 8 [(tag.reason) = "recovery_password_verification_failed"]; - } -} - -// Information about the current Registration lock and SVR credentials. With a correct PIN, the credentials can -// be used to recover the secret used to derive the registration lock password. -message RegistrationLockFailure { - // Time remaining in milliseconds before the existing registration lock expires - uint64 time_remaining_millis = 1; - - // Credentials that can be used with SVR2 - ExternalServiceCredentials svr2_credentials = 2; -} - -// A username/password pair for authenticating with an external service. -message ExternalServiceCredentials { - // A username that can be presented to authenticate with the external service. - string username = 1; - - // A password that can be presented to authenticate with the external service. - string password = 2; -} - -// A list of devices that are linked to the account but presented a stale -// registration ID (indicating the device has likely been replaced by another -// device). -message StaleDevices { - // The IDs of devices that are no longer active. - repeated uint32 stale_devices = 1 [(require.each) = {range: {max: 0x7f}}]; -} - -message GetAccountDataReportRequest { -} - -message GetAccountDataReportResponse { - // The JSON representation of the data report - string json = 3; - // A plaintext representation of the data report - string text = 4; -} - -message GetCapabilitiesRequest { -} - -message Capabilities { - // A list of capabilities enabled on the account. - repeated common.DeviceCapability capabilities = 1; -} - -message GetCapabilitiesResponse { - // A list of capabilities enabled on the account. - Capabilities capabilities = 1; -} - -message GetCapabilitiesAnonymousRequest { - // The ACI of the account for which to get capabilities. - common.ServiceIdentifier account_identifier = 1 [(require.present) = true, (require.identityType) = IDENTITY_TYPE_ACI]; - - oneof authentication { - // The unidentified access key for the targeted account. - bytes unidentified_access_key = 2 [(require.exactlySize) = 16]; - - // A group send endorsement token for the targeted account. - bytes group_send_token = 3 [(require.nonEmpty) = true]; - } -} - -message GetCapabilitiesAnonymousResponse { - oneof response { - // A list of capabilities enabled on the account. - Capabilities capabilities = 1; - errors.NotFound not_found = 2 [(tag.reason) = "not_found"]; - errors.FailedUnidentifiedAuthorization failed_unidentified_authorization = 3 [(tag.reason) = "failed_unidentified_authorization"]; - } -} - -message TotpParameters { - // The HMAC algorithm (e.g. "HmacSHA256") used by the TOTP generator - string algorithm = 1; - - // The length of one-time passwords (in decimal digits) produced and expected - // by the TOTP generator - uint32 password_length = 2; - - // The time step (in seconds) used by the TOTP generator - uint32 time_step_seconds = 3; -} - -message GenerateTotpKeyRequest { -} - -message GenerateTotpKeyResponse { - message KeyGenerated { - // The raw TOTP key - bytes key = 1; - - // The TOTP parameters associated with the generated key - TotpParameters totp_parameters = 2; - } - - oneof response { - // A new, pending TOTP key has been generated and added to the authenticated - // account - KeyGenerated key_generated = 1; - - // The authenticated account already has too many TOTP keys, and the caller - // must remove one before adding more - errors.FailedPrecondition too_many_totp_keys = 2 [(tag.reason) = "too_many_totp_keys"]; - } -} - -message ConfirmTotpKeyRequest { - // A one-time password derived from the current pending TOTP key - uint32 one_time_password = 1; - - // The ciphertext of user-provided metadata (presumably including a - // human-readable name and creation timestamp) to be attached to the - // newly-confirmed key - bytes metadata_ciphertext = 2 [(require.exactlySize) = 160]; -} - -message ConfirmTotpKeyResponse { - message KeyConfirmed { - // The account-specific identifier for the newly-confirmed TOTP key - uint32 key_id = 1; - } - - oneof response { - // The provided one-time password was accepted and the pending TOTP key was - // stored with the provided name ciphertext - KeyConfirmed key_confirmed = 1; - - // The provided one-time password was not valid for any reason (including - // incorrect passwords, misaligned clocks, or missing account records) - errors.FailedPrecondition one_time_password_not_verified = 2 [(tag.reason) = "one_time_password_not_verified"]; - } -} - -message ListTotpKeysRequest {} - -message ListTotpKeysResponse { - message TotpKeyMetadata { - // The user-provided ciphertext for metadata associated with this TOTP key - bytes metadata_ciphertext = 1; - - // The TOTP parameters associated with this key - TotpParameters totp_parameters = 2; - } - - map keys = 1; -} - -message SetTotpKeyMetadataRequest { - // The account-specific identifier of the TOTP key to modify - uint32 key_id = 1; - - // The ciphertext of the new user-provided metadata to be attached to the - // identified key - bytes metadata_ciphertext = 2 [(require.exactlySize) = 160]; -} - -message SetTotpKeyMetadataResponse { - message MetadataUpdated { - } - - oneof response { - // New metadata was stored for the identified TOTP key - MetadataUpdated metadata_updated = 1; - - // No TOTP was found with the given ID - errors.NotFound key_not_found = 2 [(tag.reason) = "key_not_found"]; - } -} - -message RemoveTotpKeyRequest { - // The account-specific identifier of the TOTP key to remove - uint32 key_id = 1; -} - -message RemoveTotpKeyResponse { -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/attachments.proto b/pkg/signalmeow/protobuf/org/signal/chat/attachments.proto deleted file mode 100644 index b51ed13..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/attachments.proto +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2026 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.attachments; - -import "org/signal/chat/common.proto"; -import "org/signal/chat/require.proto"; -import "org/signal/chat/errors.proto"; -import "org/signal/chat/tag.proto"; - -service Attachments { - option (require.auth) = AUTH_ONLY_AUTHENTICATED; - - // Retrieve an upload form that can be used to perform a resumable upload - rpc GetUploadForm(GetUploadFormRequest) returns (GetUploadFormResponse) {} - - // Retrieve an upload form that can be used to upload a sticker pack - rpc GetStickerUploadForm(GetStickerUploadFormRequest) returns (GetStickerUploadFormResponse) {} -} - -message GetUploadFormRequest { - // The length of the attachment for the requested upload form. Uploads - // performed with this form will be limited to the provided length. - uint64 uploadLength = 1 [(require.range) = {min: 1}]; -} - -message GetUploadFormResponse { - oneof outcome { - common.UploadForm upload_form = 1; - - // The request size was larger than the maximum supported upload size. The - // maximum upload size is subject to change and is governed by - // `global.attachments.maxBytes` - errors.FailedPrecondition exceeds_max_upload_length = 2 [(tag.reason) = "oversize_upload"]; - } -} - -message GetStickerUploadFormRequest { - // The number of stickers in the sticker pack to upload - uint32 sticker_count = 1 [(require.range) = {min: 1, max: 201}]; -} - -message GetStickerUploadFormResponse { - // A randomly-generated ID for the new sticker pack - string pack_id = 1; - - // An upload form clients must use to upload a manifest for the sticker pack - common.S3UploadForm manifest_upload_form = 2; - - // Upload forms for individual stickers within the sticker pack - repeated common.S3UploadForm sticker_upload_forms = 3; -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/backups.proto b/pkg/signalmeow/protobuf/org/signal/chat/backups.proto deleted file mode 100644 index 92b7506..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/backups.proto +++ /dev/null @@ -1,554 +0,0 @@ -/* - * Copyright 2024 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.backup; - -import "google/protobuf/empty.proto"; -import "org/signal/chat/common.proto"; -import "org/signal/chat/errors.proto"; -import "org/signal/chat/require.proto"; -import "org/signal/chat/tag.proto"; - -// Service for backup operations that require account authentication. -// -// Most actual backup operations operate on the backup-id and cannot be linked -// to the caller's account, but setting up anonymous credentials and changing -// backup tier requires account authentication. -service Backups { - option (require.auth) = AUTH_ONLY_AUTHENTICATED; - - // Set (blinded) backup-id(s) for the account. - // - // Each account may have a single active backup-id for each credential type - // that can be used to store and retrieve backups. Once the backup-id is set, - // BackupAuthCredentials can be generated using GetBackupAuthCredentials. - // - // The blinded backup-id and the key-pair used to blind it must be derived - // from a recoverable secret. - // - // At least one of the credential types must be set on the request. - // Only the primary device can set a blinded backup-id. - rpc SetBackupId(SetBackupIdRequest) returns (SetBackupIdResponse) {} - - // Redeem a receipt acquired from /v1/subscription/{subscriberId}/receipt_credentials - // to mark the account as eligible for the paid backup tier. - // - // After successful redemption, subsequent requests to - // GetBackupAuthCredentials will return credentials with the level on the - // provided receipt until the expiration time on the receipt. - rpc RedeemReceipt(RedeemReceiptRequest) returns (RedeemReceiptResponse) {} - - // After setting a blinded backup-id with PUT /v1/archives/, this fetches - // credentials that can be used to perform operations against that backup-id. - // Clients may (and should) request up to 7 days of credentials at a time. - // - // The redemption_start and redemption_end seconds must be UTC day aligned, and - // must not span more than 7 days. - // - // Each credential contains a receipt level which indicates the backup level - // the credential is good for. If the account has paid backup access that - // expires at some point in the provided redemption window, credentials with - // redemption times after the expiration may be on a lower backup level. - // - // Clients must validate the receipt level on the credential matches a known - // receipt level before using it. - rpc GetBackupAuthCredentials(GetBackupAuthCredentialsRequest) returns (GetBackupAuthCredentialsResponse) {} -} - -message SetBackupIdRequest { - // A BackupAuthCredentialRequest containing a blinded encrypted backup-id, - // encoded in standard padded base64. This backup-id should be used for - // message backups only, and must have the message backup type set on the - // credential. If absent, the message credential request will not be updated. - bytes messages_backup_auth_credential_request = 1; - - // A BackupAuthCredentialRequest containing a blinded encrypted backup-id, - // encoded in standard padded base64. This backup-id should be used for - // media only, and must have the media type set on the credential. If absent, - // the media credential request will not be updated. - bytes media_backup_auth_credential_request = 2; -} - -message SetBackupIdResponse {} - - -message RedeemReceiptRequest { - // Presentation for a previously acquired receipt, serialized with libsignal - bytes presentation = 1; -} - -message RedeemReceiptResponse { - oneof response { - // The receipt was successfully redeemed - google.protobuf.Empty success = 1; - - // The target account does not have a backup-id commitment - errors.FailedPrecondition account_missing_commitment = 2 [(tag.reason) = "account_missing_commitment"]; - - // The provided receipt presentation was malformed or expired - errors.FailedPrecondition invalid_receipt = 3 [(tag.reason) = "invalid_receipt"]; - } -} - -message GetBackupAuthCredentialsRequest { - // The redemption time for the first credential. This must be a day-aligned - // seconds since epoch in UTC. - int64 redemption_start = 1 [(require.range).min = 1]; - - // The redemption time for the last credential. This must be a day-aligned - // seconds since epoch in UTC. The span between redemptionStart and - // redemptionEnd must not exceed 7 days. - int64 redemption_stop = 2 [(require.range).min = 1]; -} - -message GetBackupAuthCredentialsResponse { - message Credentials { - // The requested message backup ZkCredentials indexed by the start of their - // validity period. The smallest key should be for the requested - // redemption_start, the largest for the requested redemption_end. - map message_credentials = 1; - - // The requested media backup ZkCredentials indexed by the start of their - // validity period. The smallest key should be for the requested - // redemption_start, the largest for the requested redemption_end. - map media_credentials = 2; - } - - // The requested credentials. If absent, there was no existing blinded - // backup id associated with the provided account. - Credentials credentials = 1; -} - -// Service for backup operations with anonymous credentials -// -// This service never requires account authentication. It instead requires a -// backup-id authenticated with an anonymous credential that cannot be linked -// to the account. -// -// To register an anonymous credential: -// -// 1. Set a backup-id on the authenticated channel via Backups::SetBackupId -// 2. Retrieve BackupAuthCredentials via Backups::GetBackupAuthCredentials -// 3. Generate a key pair and set the public key via -// BackupsAnonymous::SetPublicKey -// -// Unless otherwise noted, requests for this service require a -// SignedPresentation, which includes: -// -// - a presentation generated from a BackupAuthCredential issued by -// GetBackupAuthCredentials -// - a signature of that presentation using the private key of a key pair -// previously set with SetPublicKey. -service BackupsAnonymous { - option (require.auth) = AUTH_ONLY_ANONYMOUS; - - // Retrieve credentials used to read objects stored on the backup cdn - rpc GetCdnCredentials(GetCdnCredentialsRequest) returns (GetCdnCredentialsResponse) {} - - // Retrieve credentials used to interact with the SecureValueRecoveryB service - rpc GetSvrBCredentials(GetSvrBCredentialsRequest) returns (GetSvrBCredentialsResponse) {} - - // Retrieve information about the currently stored message backup - rpc GetMessageBackupInfo(GetBackupInfoRequest) returns (GetMessageBackupInfoResponse) {} - - // Retrieve information about the currently stored media backup - rpc GetMediaBackupInfo(GetBackupInfoRequest) returns (GetMediaBackupInfoResponse) {} - - // Permanently set the public key of an ED25519 key-pair for the backup-id. - // All requests (including this one!) must sign their BackupAuthCredential - // presentations with the private key corresponding to the provided public key. - rpc SetPublicKey(SetPublicKeyRequest) returns (SetPublicKeyResponse) {} - - // Refresh the backup, indicating that the backup is still active. Clients - // must periodically upload new backups or perform a refresh. If a backup has - // not been active for 30 days, it may be deleted. - rpc Refresh(RefreshRequest) returns (RefreshResponse) {} - - // Retrieve an upload form that can be used to perform a resumable upload - rpc GetUploadForm(GetUploadFormRequest) returns (GetUploadFormResponse) {} - - // Copy and re-encrypt media from the attachments cdn into the backup cdn. - // The original, already encrypted, attachments will be encrypted with the - // provided key material before being copied. - // - // The copy operation is not atomic and responses will be returned as copy - // operations complete with detailed information about the outcome. If an - // error is encountered, not all requests may be reflected in the responses. - // - // On retries, a particular destination media id must not be reused with a - // different source media id or different encryption parameters. - // - // The response stream may be closed with STREAM_CLOSED error reason. In this - // case, a BackupStreamClosed message will be present in the error details. - rpc CopyMedia(CopyMediaRequest) returns (stream CopyMediaResponse) {} - - // Retrieve a page of media objects stored for this backup-id. A client may - // have previously stored media objects that are no longer referenced in their - // current backup. To reclaim storage space used by these orphaned objects, - // perform a list operation and remove any unreferenced media objects - // via DeleteMedia. - rpc ListMedia(ListMediaRequest) returns (ListMediaResponse) {} - - // Delete media objects stored with this backup-id. Streams the locations of - // media items back when the item has successfully been removed. - // - // The response stream may be closed with STREAM_CLOSED error reason. In this - // case, a BackupStreamClosed message will be present in the error details. - rpc DeleteMedia(DeleteMediaRequest) returns (stream DeleteMediaResponse) {} - - // Delete all backup metadata, objects, and stored public key. To use - // backups again, a public key must be resupplied. - rpc DeleteAll(DeleteAllRequest) returns (DeleteAllResponse) {} -} - -message SignedPresentation { - // Presentation of a BackupAuthCredential previously retrieved from - // GetBackupAuthCredentials on the authenticated channel - bytes presentation = 1 [(require.nonEmpty) = true]; - - // The presentation signed with the private key corresponding to the public - // key set with SetPublicKey - bytes presentation_signature = 2 [(require.nonEmpty) = true]; -} - -message SetPublicKeyRequest { - SignedPresentation signed_presentation = 1; - - // The public key, serialized in libsignal's elliptic-curve public key format. - bytes public_key = 2 [(require.nonEmpty) = true]; -} - -message SetPublicKeyResponse { - oneof response { - // The public key was successfully set - google.protobuf.Empty success = 1; - - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - // - // This may also be returned if there was an existing public key and the - // provided public key did not match. - errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; - } -} - -message GetCdnCredentialsRequest { - SignedPresentation signed_presentation = 1; - uint32 cdn = 2; -} -message GetCdnCredentialsResponse { - message CdnCredentials { - map headers = 1; - } - oneof response { - // Headers to include with requests to the read from the backup CDN. Includes - // time limited read-only credentials. - CdnCredentials cdn_credentials = 1; - - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; - } -} - -message GetSvrBCredentialsRequest { - SignedPresentation signed_presentation = 1; -} - -message GetSvrBCredentialsResponse { - message SvrBCredentials { - // A username that can be presented to authenticate with SVRB - string username = 1; - - // A password that can be presented to authenticate with SVRB - string password = 2; - } - - oneof response { - SvrBCredentials svrb_credentials = 1; - - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; - } -} - -message GetBackupInfoRequest { - SignedPresentation signed_presentation = 1; -} -message GetMessageBackupInfoResponse { - message MessageBackupInfo { - // The base directory of your backup data on the cdn. Always non-empty, even - // if a backup has not actually been stored to the cdn. If a backup was - // previously uploaded and has not expired, it can be found in the returned - // cdn at /backup_dir/backup_name. - string backup_dir = 1; - - // The CDN type where the message backup is stored. Media may be stored - // elsewhere. - uint32 cdn = 2; - - // The location of the message backup on the cdn. Always non-empty, even - // if a backup has not actually been stored to the cdn. If a backup was - // previously uploaded and has not expired, it can be found in the returned - // cdn at /backup_dir/backup_name. - string backup_name = 3; - } - - oneof response { - MessageBackupInfo backup_info = 1; - - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; - } -} -message GetMediaBackupInfoResponse { - message MediaBackupInfo { - // The base directory of your backup data on the cdn. Always non-empty, even - // if no media has been stored to the cdn or the credential is for a tier - // that does not support media. - string backup_dir = 1; - - // The prefix path component for media objects on a cdn. Stored media for a - // media_id can be found at /backup_dir/media_dir/media_id, where the - // media_id is encoded in unpadded url-safe base64. Always non-empty, even - // if no media has been stored to the cdn or the credential is for a tier - // that does not support media. - string media_dir = 2; - - // The amount of space used to store media - uint64 used_space = 3; - } - - oneof response { - MediaBackupInfo backup_info = 1; - - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; - } -} - -message RefreshRequest { - SignedPresentation signed_presentation = 1; -} -message RefreshResponse { - oneof response { - // The backup was successfully refreshed - google.protobuf.Empty success = 1; - - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; - } -} - -message GetUploadFormRequest { - SignedPresentation signed_presentation = 1; - - message MessagesUploadType {} - message MediaUploadType {} - oneof upload_type { - // Retrieve an upload form that can be used to perform a resumable upload of - // a message backup. The finished upload will be available on the backup cdn. - MessagesUploadType messages = 2; - - // Retrieve an upload form for a temporary location that can be used to - // perform a resumable upload of an attachment. After uploading, the - // attachment can be copied into the backup via CopyMedia. - // - // Behaves identically to the account authenticated version at /attachments. - MediaUploadType media = 3; - } - - // The length of the attachment for the requested upload form. Uploads - // performed with this form will be limited to the provided length. - uint64 uploadLength = 4 [(require.range) = {min: 1}]; -} -message GetUploadFormResponse { - oneof response { - common.UploadForm upload_form = 1; - - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; - - // The request size was larger than the maximum supported upload size. The - // maximum upload size is subject to change and is governed by - // `global.attachments.maxBytes` - errors.FailedPrecondition exceeds_max_upload_length = 3 [(tag.reason) = "oversize_upload"]; - } -} - -message CopyMediaItem { - // The attachment cdn of the object to copy into the backup - uint32 source_attachment_cdn = 1 [(require.range).min = 1, (require.range).max = 3]; - - // The attachment key of the object to copy into the backup - string source_key = 2 [(require.nonEmpty) = true, (require.base64url) = true]; - - // The length of the source attachment before the encryption applied by the - // copy operation - uint64 object_length = 3; - - // media_id to copy on to the backup CDN - bytes media_id = 4 [(require.exactlySize) = 15]; - - // A 32-byte key for the MAC - bytes hmac_key = 5 [(require.exactlySize) = 32]; - - // A 32-byte encryption key for AES - bytes encryption_key = 6 [(require.exactlySize) = 32]; -} - -message CopyMediaRequest { - SignedPresentation signed_presentation = 1; - - // Items to copy - repeated CopyMediaItem items = 2 [(require.size) = {min: 1, max: 1000}]; -} - -message CopyMediaResponse { - message SourceNotFound {} - message WrongSourceLength {} - message OutOfSpace {} - message CopySuccess { - // The backup cdn where this media object is stored - uint32 cdn = 1; - } - - // The 15-byte media_id from the corresponding CopyMediaItem in the request - bytes media_id = 1; - - oneof response { - // The media item was successfully copied into the backup - CopySuccess success = 2; - - // The source object was not found - SourceNotFound source_not_found = 3 [(tag.reason) = "source_not_found"]; - - // The provided object length was incorrect - WrongSourceLength wrong_source_length = 4 [(tag.reason) = "wrong_source_length"]; - - // All media capacity has been consumed. Free some space to continue. - OutOfSpace out_of_space = 5 [(tag.reason) = "out_of_space"]; - } -} - -// The reason why a media stream RPC is being prematurely closed by the server. -message BackupStreamClosed { - oneof reason { - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - errors.FailedZkAuthentication failed_authentication = 1 [(tag.reason) = "failed_authentication"]; - } -} - -message ListMediaRequest { - SignedPresentation signed_presentation = 1; - - // A cursor returned by a previous call to ListMedia, absent on the first call - optional string cursor = 2; - - // If provided, the maximum number of entries to return in a page. If absent, - // a server-chosen default is used. - optional uint32 limit = 3 [(require.range) = {min: 1, max: 10000}]; -} - -message ListMediaResponse { - message ListEntry { - // The backup cdn where this media object is stored - uint32 cdn = 1; - // The media_id of the object - bytes media_id = 2; - // The length of the object in bytes - uint64 length = 3; - } - - message ListResult { - - // A page of media objects stored for this backup ID - repeated ListEntry page = 1; - - // The base directory of the backup data on the cdn. The stored media can be - // found at /backup_dir/media_dir/media_id, where the media_id is encoded with - // unpadded url-safe base64. - string backup_dir = 2; - - // The prefix path component for the media objects. The stored media for - // media_id can be found at /backup_dir/media_dir/media_id, where the media_id - // is encoded with unpadded url-safe base64. - string media_dir = 3; - - // If set, the cursor value to pass to the next list request to continue - // listing. If absent, all objects have been listed - optional string cursor = 4; - } - - oneof response { - ListResult list_result = 1; - - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; - } -} - -message DeleteAllRequest { - SignedPresentation signed_presentation = 1; -} -message DeleteAllResponse { - oneof response { - // The backup was successfully scheduled for deletion - google.protobuf.Empty success = 1; - - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; - } -} - -message DeleteMediaItem { - // The backup cdn where this media object is stored - uint32 cdn = 1; - - // The media_id of the object to delete - bytes media_id = 2 [(require.exactlySize) = 15]; -} - -message DeleteMediaRequest { - SignedPresentation signed_presentation = 1; - - repeated DeleteMediaItem items = 2 [(require.size) = {min: 1, max: 1000}]; -} - -message DeleteMediaResponse { - DeleteMediaItem deleted_item = 1; -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/call_quality.proto b/pkg/signalmeow/protobuf/org/signal/chat/call_quality.proto deleted file mode 100644 index 4438c5f..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/call_quality.proto +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2025 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.calling.quality; - -import "org/signal/chat/require.proto"; - -// Provides methods for submitting call quality surveys -service CallQuality { - option (require.auth) = AUTH_ONLY_ANONYMOUS; - - // Submits a call quality survey response. - rpc SubmitCallQualitySurvey(SubmitCallQualitySurveyRequest) returns (SubmitCallQualitySurveyResponse) {} -} - -message SubmitCallQualitySurveyRequest { - // Indicates whether the caller was generally satisfied with the quality of - // the call - bool user_satisfied = 1; - - // A list of call quality issues selected by the caller - repeated string call_quality_issues = 2; - - // A free-form description of any additional issues as written by the caller - optional string additional_issues_description = 3; - - // A URL for a set of debug logs associated with the call if the caller chose - // to submit debug logs - optional string debug_log_url = 4; - - // The time at which the call started in milliseconds since the epoch - int64 start_timestamp = 5; - - // The time at which the call ended in milliseconds since the epoch - int64 end_timestamp = 6; - - // The type of call; note that direct voice calls can become video calls and - // vice versa, and this field indicates which mode was selected at call - // initiation time. At the time of writing, expected call types are - // "direct_voice", "direct_video", "group", and "call_link". - string call_type = 7; - - // Indicates whether the call completed without error or if it terminated - // abnormally - bool success = 8; - - // A client-defined, but human-readable reason for call termination - string call_end_reason = 9; - - // The median round-trip time, measured in milliseconds, for STUN/ICE packets - // (i.e. connection maintenance and establishment) - optional float connection_rtt_median = 10; - - // The median round-trip time, measured in milliseconds, for RTP/RTCP packets - // for audio streams - optional float audio_rtt_median = 11; - - // The median round-trip time, measured in milliseconds, for RTP/RTCP packets - // for video streams - optional float video_rtt_median = 12; - - // The median jitter for audio streams, measured in milliseconds, for the - // duration of the call as measured by the client submitting the survey - optional float audio_recv_jitter_median = 13; - - // The median jitter for video streams, measured in milliseconds, for the - // duration of the call as measured by the client submitting the survey - optional float video_recv_jitter_median = 14; - - // The median jitter for audio streams, measured in milliseconds, for the - // duration of the call as measured by the remote endpoint in the call (either - // the peer of the client submitting the survey in a direct call or the SFU in - // a group call) - optional float audio_send_jitter_median = 15; - - // The median jitter for video streams, measured in milliseconds, for the - // duration of the call as measured by the remote endpoint in the call (either - // the peer of the client submitting the survey in a direct call or the SFU in - // a group call) - optional float video_send_jitter_median = 16; - - // The fraction of audio packets lost over the duration of the call as - // measured by the client submitting the survey - optional float audio_recv_packet_loss_fraction = 17; - - // The fraction of video packets lost over the duration of the call as - // measured by the client submitting the survey - optional float video_recv_packet_loss_fraction = 18; - - // The fraction of audio packets lost over the duration of the call as - // measured by the remote endpoint in the call (either the peer of the client - // submitting the survey in a direct call or the SFU in a group call) - optional float audio_send_packet_loss_fraction = 19; - - // The fraction of video packets lost over the duration of the call as - // measured by the remote endpoint in the call (either the peer of the client - // submitting the survey in a direct call or the SFU in a group call) - optional float video_send_packet_loss_fraction = 20; - - // Machine-generated telemetry from the call; this is a serialized protobuf - // entity generated (and, critically, explained to the user!) by the calling - // library - optional bytes call_telemetry = 21; - - // A hash of a call ID (shared between clients and never sent to the calling - // server) that can be used to correlate survey responses from multiple - // participants in a call - optional bytes call_id_hash = 22; -} - -message SubmitCallQualitySurveyResponse { -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/calling.proto b/pkg/signalmeow/protobuf/org/signal/chat/calling.proto deleted file mode 100644 index afe6972..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/calling.proto +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2023 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.calling; - -import "org/signal/chat/require.proto"; - -// Provides methods for getting credentials and relay options for one-on-one -// calls. -service Calling { - option (require.auth) = AUTH_ONLY_AUTHENTICATED; - - // Retrieves TURN credentials and relay options for one-on-one calls. - rpc GetCallingRelays(GetCallingRelaysRequest) returns (GetCallingRelaysResponse) {} -} - -message GetCallingRelaysRequest {} - -message GetCallingRelaysResponse { - message HostnameUrlList { - // A collection of hostname-based TURN, TURNS, or STUN URLs a client can use - // to connect to a relay. - repeated string urls = 1; - } - - message IpUrlList { - // A collection of IP-based TURN, TURNS, or STUN URLs a client can use to - // connect to a relay. - repeated string urls = 1; - - // A hostname clients must use to validate the relay's TLS certificate when - // connecting via an IP-based TURNS URL. May not be specified if `urls` - // contains no TURNS URLs. - optional string hostname = 2; - } - - message Relay { - // A username that can be presented to authenticate with a TURN server. - string username = 1; - - // A password that can be presented to authenticate with a TURN server. - string password = 2; - - // The duration, in seconds, after which the included username and password - // will no longer be valid. - uint64 credential_ttl_seconds = 3; - - // A collection of hostname-based URLs clients may use to connect to this - // relay. - optional HostnameUrlList hostname_urls = 4; - - // A collection of IP-based URLs clients may use to connect to this relay. - optional IpUrlList ip_urls = 5; - } - - // A collection of calling relays a client may use for one-on-one calls. - repeated Relay relays = 1; -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/challenge.proto b/pkg/signalmeow/protobuf/org/signal/chat/challenge.proto deleted file mode 100644 index a3eef30..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/challenge.proto +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2026 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.challenge; - -import "org/signal/chat/require.proto"; - -service Challenge { - option (require.auth) = AUTH_ONLY_AUTHENTICATED; - // Submit proof of a challenge completion - - // Some server endpoints (the "send message" endpoint, for example) may return - // a response indicating the client must complete a challenge before continuing. - // Clients may use this endpoint to provide proof of a completed challenge. - // If successful, the client may then continue their original operation. - rpc HandleChallengeResponse(AnswerChallengeRequest) returns (AnswerChallengeResponse) {} -} - -message AnswerChallengeRequest { - - message AnswerPushChallengeRequest { - // The challenge string provided to the client via a push payload - string challenge = 1 [(require.nonEmpty) = true]; - } - - message AnswerCaptchaChallengeRequest { - // A string representing a solved captcha - // Example: signal-hcaptcha.30b01b46-d8c9-4c30-bbd7-9719acfe0c10.challenge.abcdefg1345 - string captcha = 1 [(require.nonEmpty) = true]; - } - - // The opaque token id from the ChallengeRequired response returned by the - // server endpoint that requested the challenge - string token = 1 [(require.nonEmpty) = true]; - - oneof request { - AnswerPushChallengeRequest push = 2; - AnswerCaptchaChallengeRequest captcha = 3; - } - -} - -message AnswerChallengeResponse { - // Whether the challenge proof was accepted - bool success = 1; -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/common.proto b/pkg/signalmeow/protobuf/org/signal/chat/common.proto deleted file mode 100644 index a2cf057..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/common.proto +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright 2023 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.common; - -import "org/signal/chat/require.proto"; - -enum IdentityType { - IDENTITY_TYPE_UNSPECIFIED = 0; - IDENTITY_TYPE_ACI = 1; - IDENTITY_TYPE_PNI = 2; -} - -message ServiceIdentifier { - // The type of identity represented by this service identifier. - IdentityType identity_type = 1 [(require.specified) = true]; - - // The UUID of the identity represented by this service identifier. - bytes uuid = 2 [(require.exactlySize) = 16]; -} - -// All identifiers associated with an account. -message AccountIdentifiers { - // A list of service identifiers for the identified account. Always includes - // exactly one ACI service identifier and at most one PNI service identifier. - repeated ServiceIdentifier service_identifiers = 1; - - // The phone number associated with the identified account. May be empty if - // the given account does not have a phone number. - string e164 = 2 [(org.signal.chat.require.e164) = true]; - - // The username hash (if any) associated with the identified account. May be - // empty if no username is associated with the identified account. - bytes username_hash = 3 [(org.signal.chat.require.exactlySize) = 0, (org.signal.chat.require.exactlySize) = 32]; - - // The username link handle UUID associated with the identified account. - // May be empty if no username is associated with the identified account. - bytes username_link_handle = 4 [(org.signal.chat.require.exactlySize) = 0, (org.signal.chat.require.exactlySize) = 16]; -} - -message EcPreKey { - // A locally-unique identifier for this key, which will be provided by - // peers using this key to encrypt messages so the private key can be looked - // up. - int32 key_id = 1 [(require.range).min = 0]; - - // The public key, serialized in libsignal's elliptic-curve public key format. - bytes public_key = 2 [(require.nonEmpty) = true]; -} - -message EcSignedPreKey { - // A locally-unique identifier for this key, which will be provided by - // peers using this key to encrypt messages so the private key can be looked - // up. - int32 key_id = 1 [(require.range).min = 0]; - - // The public key, serialized in libsignal's elliptic-curve public key format. - bytes public_key = 2 [(require.nonEmpty) = true]; - - // A signature of the public key, verifiable with the identity key for the - // account/identity associated with this pre-key. - bytes signature = 3 [(require.nonEmpty) = true]; -} - -message KemSignedPreKey { - // An locally-unique identifier for this key, which will be provided by peers - // using this key to encrypt messages so the private key can be looked up. - int32 key_id = 1 [(require.range).min = 0]; - - // The public key, serialized in libsignal's Kyber1024 public key format. - bytes public_key = 2 [(require.nonEmpty) = true]; - - // A signature of the public key, verifiable with the identity key for the - // account/identity associated with this pre-key. - bytes signature = 3 [(require.nonEmpty) = true]; -} - -enum DeviceCapability { - DEVICE_CAPABILITY_UNSPECIFIED = 0; - DEVICE_CAPABILITY_STORAGE = 1; - DEVICE_CAPABILITY_TRANSFER = 2; - reserved 3; - reserved 4; - reserved 5; - DEVICE_CAPABILITY_ATTACHMENT_BACKFILL = 6; - DEVICE_CAPABILITY_SPARSE_POST_QUANTUM_RATCHET = 7; - DEVICE_CAPABILITY_PROFILES_V2 = 8; - DEVICE_CAPABILITY_USERNAME_CHANGE_SYNC_MESSAGE = 9; - DEVICE_CAPABILITY_OPTIONAL_PHONE_NUMBER = 10; -} - -message ZkCredential { - /* - * Day on which this credential can be redeemed, in UTC seconds since epoch - */ - int64 redemption_time = 1; - - /* - * The ZK credential, using libsignal's serialization - */ - bytes credential = 2 [(require.nonEmpty) = true]; -} - -// An upload location and credentials which may be used to upload an object -// to an external CDN -message UploadForm { - // Indicates the CDN type. 3 indicates resumable uploads using TUS - uint32 cdn = 1; - - // The location within the specified cdn where the finished upload can be found - string key = 2; - - // A map of headers to include with all upload requests. Potentially contains - // time-limited upload credentials - map headers = 3; - - // The URL to upload to with the appropriate protocol - string signed_upload_location = 4; -} - -// An upload location, credentials, and metadata which may be used to upload an -// object to AWS S3 -message S3UploadForm { - // The S3 key (i.e. path and filename) for the uploaded file. - string key = 1; - - // A scoped credential. Includes the AWS access key, date, region targeted, - // and AWS service. - string credential = 2; - - // The type of access control for the uploaded file. - string acl = 3; - - // The algorithm used to calculate a signature on the S3 policy. - string algorithm = 4; - - // The timestamp (formatted as "yyyyMMdd'T'HHmmssX") at which the S3 policy - // and signature were generated. - string date = 5; - - // The S3 policy (as a base64-encoded JSON string) used to upload the file. - string policy = 6; - - // A digital signature (formatted as a hex string) on the S3 policy. - string signature = 7; -} - -message BadgeSvg { - // File name of the scalable vector graphic for light mode. - string light = 1; - // File name of the scalable vector graphic for dark mode. - string dark = 2; -} - -message Badge { - // An ID that uniquely identifies the badge. - string id = 1; - // The category the badge falls in ("donor" or "other"). - string category = 2; - // The badge name. - string name = 3; - // The badge description. - string description = 4; - // Different size badge SVG files. - repeated string sprites6 = 5; - // File name of the scalable vector graphic representing this badge. - string svg = 6; - // Pairs of light/dark SVG files designed for display at different sizes. - repeated BadgeSvg svgs = 7; -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/credentials.proto b/pkg/signalmeow/protobuf/org/signal/chat/credentials.proto deleted file mode 100644 index fa9dce7..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/credentials.proto +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright 2023 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -import "org/signal/chat/require.proto"; - -package org.signal.chat.credentials; - -// Provides methods for obtaining and verifying credentials that allow an -// authenticated user to authenticate in another service or context without -// revealing their identity. -service Credentials { - option (require.auth) = AUTH_ONLY_AUTHENTICATED; - - // Generates and returns an external service credentials for the caller. - rpc GetExternalServiceCredentials(GetExternalServiceCredentialsRequest) - returns (GetExternalServiceCredentialsResponse) {} - - // Generates a pair of delivery certificates that the holder can include to - // identify themselves to a message recipient (but not the server) in a - // sealed-sender message. - rpc GetDeliveryCertificate(GetDeliveryCertificateRequest) - returns (GetDeliveryCertificateResponse) {} - - // Generates a set of zero-knowledge credentials for various group-related - // actions. - rpc GetGroupCredentials(GetGroupCredentialsRequest) - returns (GetGroupCredentialsResponse) {} - - // Generates zero-knowledge credentials for creating call links. - rpc GetCreateCallLinkCredentials(GetCreateCallLinkCredentialsRequest) - returns (GetCreateCallLinkCredentialsResponse) {} -} - -// Provides methods for working with previously-generated credentials without -// revealing an association between the credentials and the caller's identity to -// the server. -service CredentialsAnonymous { - option (require.auth) = AUTH_ONLY_ANONYMOUS; - - // Given a list of secure value recovery (SVR) service credentials and a phone - // number, checks and returns which of the provided credentials were generated - // by the user with the given phone number and have not yet expired. - rpc CheckSvrCredentials(CheckSvrCredentialsRequest) - returns (CheckSvrCredentialsResponse) {} -} - -enum ExternalServiceType { - EXTERNAL_SERVICE_TYPE_UNSPECIFIED = 0; - EXTERNAL_SERVICE_TYPE_DIRECTORY = 1; - EXTERNAL_SERVICE_TYPE_PAYMENTS = 2; - EXTERNAL_SERVICE_TYPE_STORAGE = 3; - EXTERNAL_SERVICE_TYPE_SVR = 4; -} - -message GetExternalServiceCredentialsRequest { - // A service to request credentials for. - ExternalServiceType externalService = 1; -} - -message GetExternalServiceCredentialsResponse { - // A username that can be presented to authenticate with the external service. - string username = 1; - - // A password that can be presented to authenticate with the external service. - string password = 2; -} - -enum AuthCheckResult { - AUTH_CHECK_RESULT_UNSPECIFIED = 0; - // The credentials could be used to make a call to SVR service by the user - // associated with the `CheckSvrCredentialsRequest.number` phone number. - AUTH_CHECK_RESULT_MATCH = 1; - // The credentials were generated by a different user. - AUTH_CHECK_RESULT_NO_MATCH = 2; - // This status indicates that the corresponding credentials token should no longer be used. - // This may be because it has expired or invalid, but it can also mean that there is a more - // recent token in the request which should be used instead. - AUTH_CHECK_RESULT_INVALID = 3; -} - -message CheckSvrCredentialsRequest { - // A phone number in the E164 format to check the passwords against. - // Only passwords generated for the user associated with the given number will be marked as `AUTH_CHECK_RESULT_MATCH`. - string number = 1; - - // A list of credentials from previously made calls to `ExternalServiceCredentials.GetExternalServiceCredentials()` - // for `EXTERNAL_SERVICE_TYPE_SVR`. This list may contain credentials generated by different users. Up to 10 credentials - // can be checked. - repeated string passwords = 2 [(require.nonEmpty) = true, (require.size) = {max: 10}]; -} - -// For each of the credentials tokens in the `CheckSvrCredentialsRequest` contains the result of the check. -message CheckSvrCredentialsResponse { - - map matches = 1; -} - -message GetDeliveryCertificateRequest { -} - -// A pair of message delivery certificates. The response unconditionally -// includes certificates with and without the caller's phone number so the -// server never learns anything about the caller's intent to share their phone -// number with their contacts. -message GetDeliveryCertificateResponse { - // A delivery receipt that includes the caller's phone number; may be empty if - // the authenticated account does not have a phone number - bytes certificate_with_e164 = 1; - - // A delivery receipt that does not include the caller's phone number - bytes certificate_without_e164 = 2; -} - -message GetGroupCredentialsRequest { - // The earliest time for which to issue group credentials; must be aligned to - // a UTC day boundary and may be no more than one day in the past at the time - // of the call. - uint64 redemption_start_seconds = 1; - - // The latest time for which to issue group credentials; must be aligned to a - // UTC day boundary and no more than seven days in the future at the time of - // the call. - uint64 redemption_end_seconds = 2; -} - -message GetGroupCredentialsResponse { - // A zero-knowledge credential that may be redeemed at or up to one day after - // the given redemption time - message CredentialAndRedemptionTime { - bytes credential = 1; - uint64 redemption_time_seconds = 2; - } - - // A collection of credentials allowing the holder to anonymously - // authenticate themselves for group-related actions - repeated CredentialAndRedemptionTime group_credentials = 1; - - // A collection of credentials allowing the holder to read, update, and delete - // group call links - repeated CredentialAndRedemptionTime call_link_auth_credentials = 2; - - // The phone number identifier for which the included credentials were - // generated. Empty if the account does not have a phone number. - bytes pni = 3; -} - -message GetCreateCallLinkCredentialsRequest { - // A zero-knowledge credential request - bytes credential_request = 1; -} - -message GetCreateCallLinkCredentialsResponse { - // A zero-knowledge credential that may be redeemed at or up to one day after - // the given redemption time - bytes credential = 1; - - // The earliest time, in seconds since the epoch, at which the associated - // credential may be redeemed - uint64 redemption_time_seconds = 2; -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/device.proto b/pkg/signalmeow/protobuf/org/signal/chat/device.proto deleted file mode 100644 index 06ad70d..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/device.proto +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright 2023 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.device; - -import "google/protobuf/empty.proto"; - -import "org/signal/chat/common.proto"; -import "org/signal/chat/errors.proto"; -import "org/signal/chat/require.proto"; -import "org/signal/chat/tag.proto"; - -// Provides methods for working with devices attached to a Signal account. -service Devices { - option (require.auth) = AUTH_ONLY_AUTHENTICATED; - - // Returns a list of devices associated with the caller's account. - rpc GetDevices(GetDevicesRequest) returns (GetDevicesResponse) {} - - // Removes a linked device from the caller's account. - // - // Linked devices may only remove themselves. Primary devices may remove - // any device other than themselves. - rpc RemoveDevice(RemoveDeviceRequest) returns (RemoveDeviceResponse) {} - - // Sets the encrypted human-readable name for a specific devices. Primary - // devices may change the name of any device associated with their account, - // but linked devices may only change their own name. The response will - // indicate if the target device was not found. - rpc SetDeviceName(SetDeviceNameRequest) returns (SetDeviceNameResponse) {} - - // Sets the token(s) the server should use to send new message notifications - // to the authenticated device. - rpc SetPushToken(SetPushTokenRequest) returns (SetPushTokenResponse) {} - - // Removes any push tokens associated with the authenticated device. After - // calling this method, the server will assume that the authenticated device - // will periodically poll for new messages. - rpc ClearPushToken(ClearPushTokenRequest) returns (ClearPushTokenResponse) {} - - // Declares that the authenticated device supports certain features. - rpc SetCapabilities(SetCapabilitiesRequest) returns (SetCapabilitiesResponse) {} -} - -message GetDevicesRequest {} - -message GetDevicesResponse { - message LinkedDevice { - // The identifier for the device within an account. - uint32 id = 1; - - // A sequence of bytes that encodes an encrypted human-readable name for - // this device. - bytes name = 2; - - // The approximate time, in milliseconds since the epoch, at which this - // device last connected to the server. - uint64 last_seen = 3; - - // The registration ID of the given device. - uint32 registration_id = 4 [(require.range).max = 0x3fff]; - - // A sequence of bytes that encodes the time, - // in milliseconds since the epoch, at which this device was - // attached to its parent account. - bytes created_at_ciphertext = 5; - } - - // A list of devices linked to the authenticated account. - repeated LinkedDevice devices = 1; -} - -message RemoveDeviceRequest { - // The identifier for the device to remove from the authenticated account. The - // identifier must not be for the primary device. - uint32 id = 1; -} - -message SetDeviceNameRequest { - // A sequence of bytes that encodes an encrypted human-readable name for this - // device. - bytes name = 1 [(require.size) = {min: 1, max: 225}]; - - // The identifier for the device for which to set a name. - uint32 id = 2; -} - -message SetDeviceNameResponse { - oneof response { - // The device name was successfully set - google.protobuf.Empty success = 1; - - // No device with the provided identifier was found on the account - errors.NotFound target_device_not_found = 2 [(tag.reason) = "not_found"]; - } -} - -message RemoveDeviceResponse {} - -message SetPushTokenRequest { - message ApnsTokenRequest { - // A "standard" APNs device token. - string apns_token = 1 [(require.nonEmpty) = true]; - } - - message FcmTokenRequest { - // An FCM push token. - string fcm_token = 1 [(require.nonEmpty) = true]; - } - - oneof token_request { - // If present, specifies the APNs device token(s) the server will use to - // send new message notifications to the authenticated device. - ApnsTokenRequest apns_token_request = 1; - - // If present, specifies the FCM push token the server will use to send new - // message notifications to the authenticated device. - FcmTokenRequest fcm_token_request = 2; - } -} - -message SetPushTokenResponse {} - -message ClearPushTokenRequest {} - -message ClearPushTokenResponse {} - -message SetCapabilitiesRequest { - repeated common.DeviceCapability capabilities = 1; -} - -message SetCapabilitiesResponse {} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/donations.proto b/pkg/signalmeow/protobuf/org/signal/chat/donations.proto deleted file mode 100644 index 0ea3022..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/donations.proto +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2026 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.donations; - -import "google/protobuf/empty.proto"; -import "org/signal/chat/require.proto"; -import "org/signal/chat/errors.proto"; -import "org/signal/chat/tag.proto"; - -service Donations { - option (require.auth) = AUTH_ONLY_AUTHENTICATED; - // Redeem a receipt acquired from Subscriptions.CreateSubscriptionReceiptCredentials - // to add a badge to the account. After successful redemption, profile - // responses will include the corresponding badge (if configured as visible) - // until the expiration time on the receipt. - rpc RedeemReceipt(RedeemReceiptRequest) returns (RedeemReceiptResponse) {} - - // Generate a set of anonymous, single-use, permits for use with /v1/subscription endpoints. - // - // If rate limited, reduce requested permit count and/or try again after the prescribed delay. - rpc CreateDonationPermit(CreateDonationPermitRequest) returns (CreateDonationPermitResponse) {} -} - -message RedeemReceiptRequest { - // Presentation of the ZK receipt acquired when the subscription was created - bytes receiptCredentialPresentation = 1 [(require.exactlySize) = 329]; - // If true, the corresponding badge should be visible on the profile - bool visible = 2; - // If true, and the new badge is visible, it should be the primary badge on the profile - bool primary = 3; -} - -message RedeemReceiptResponse { - oneof response { - // The receipt was successfully redeemed - google.protobuf.Empty success = 1; - // The provided presentation is invalid - errors.FailedZkAuthentication failed_authentication = 2 [(tag.reason) = "failed_authentication"]; - // The receipt was already redeemed for a different account - errors.FailedPrecondition already_redeemed = 3 [(tag.reason) = "already_redeemed"]; - } -} - -message CreateDonationPermitRequest { - // a serialized libsignal DonationPermitRequest - bytes donation_permit_request = 1 [(require.nonEmpty) = true]; -} - -message CreateDonationPermitResponse { - // a serialized libsignal DonationPermitResponse - bytes donation_permit_response = 1; -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/errors.proto b/pkg/signalmeow/protobuf/org/signal/chat/errors.proto deleted file mode 100644 index 356f8aa..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/errors.proto +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2025 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.errors; - -// Response message that indicates a particular resource was not found. -message NotFound {} - -// Response message that indicates that some precondition of the request was not -// met. For example, if there was a request to update foo, but foo had not been -// set, this would be an appropriate error. -message FailedPrecondition { - // An optional description indicating what precondition failed. - string description = 1; -} - -// Response message that authentication via an anonymous credential failed. -message FailedZkAuthentication { - // An optional description with additional information about the failure. - string description = 1; -} - -// Response message that indicates authorization to perform an unidentified -// operation via an endorsement or access key failed -message FailedUnidentifiedAuthorization { - // An optional description with additional information about the failure. - string description = 1; -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/keys.proto b/pkg/signalmeow/protobuf/org/signal/chat/keys.proto deleted file mode 100644 index ca79c7c..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/keys.proto +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright 2023 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.keys; - -import "google/protobuf/empty.proto"; - -import "org/signal/chat/common.proto"; -import "org/signal/chat/errors.proto"; -import "org/signal/chat/require.proto"; -import "org/signal/chat/tag.proto"; - -// Provides methods for working with pre-keys. -service Keys { - option (require.auth) = AUTH_ONLY_AUTHENTICATED; - - // Retrieves an approximate count of the number of the various kinds of - // pre-keys stored for the authenticated device. - rpc GetPreKeyCount (GetPreKeyCountRequest) returns (GetPreKeyCountResponse) {} - - // Retrieves a set of pre-keys for establishing a session with the targeted - // device or devices. Note that callers with an unidentified access key for - // the targeted account should use the version of this method in - // `KeysAnonymous` instead. - rpc GetPreKeys(GetPreKeysRequest) returns (GetPreKeysResponse) {} - - // Uploads a new set of one-time EC pre-keys for the authenticated device, - // clearing any previously-stored pre-keys. Note that all keys submitted via - // a single call to this method _must_ have the same identity type (i.e. if - // the first key has an ACI identity type, then all other keys in the same - // stream must also have an ACI identity type). The provided list of pre-keys - // must be non-empty. - rpc SetOneTimeEcPreKeys (SetOneTimeEcPreKeysRequest) returns (SetPreKeyResponse) {} - - // Uploads a new set of one-time KEM pre-keys for the authenticated device, - // clearing any previously-stored pre-keys. Note that all keys submitted via - // a single call to this method _must_ have the same identity type (i.e. if - // the first key has an ACI identity type, then all other keys in the same - // stream must also have an ACI identity type). The provided list of pre-keys - // must be non-empty. - rpc SetOneTimeKemSignedPreKeys (SetOneTimeKemSignedPreKeysRequest) returns (SetPreKeyResponse) {} - - // Sets the signed EC pre-key for one identity (i.e. ACI or PNI) associated - // with the authenticated device. - rpc SetEcSignedPreKey (SetEcSignedPreKeyRequest) returns (SetPreKeyResponse) {} - - // Sets the last-resort KEM pre-key for one identity (i.e. ACI or PNI) - // associated with the authenticated device. - rpc SetKemLastResortPreKey (SetKemLastResortPreKeyRequest) returns (SetPreKeyResponse) {} -} - -// Provides methods for working with pre-keys using "unidentified access" -// credentials. -service KeysAnonymous { - option (require.auth) = AUTH_ONLY_ANONYMOUS; - - // Retrieves a set of pre-keys for establishing a session with the targeted - // device or devices. Callers must not submit any self-identifying credentials - // when calling this method and must instead present the targeted account's - // unidentified access key as an anonymous authentication mechanism. Callers - // without an unidentified access key should use the equivalent, authenticated - // method in `Keys` instead. - rpc GetPreKeys(GetPreKeysAnonymousRequest) returns (GetPreKeysAnonymousResponse) {} - - // Checks identity key fingerprints of the target accounts. - // - // Returns a stream of elements, each one representing an account that had a mismatched - // identity key fingerprint with the server and the corresponding identity key stored by the server. - rpc CheckIdentityKeys(stream CheckIdentityKeyRequest) returns (stream CheckIdentityKeyResponse) {} -} - -message GetPreKeyCountRequest { -} - -message GetPreKeyCountResponse { - // The approximate number of one-time EC pre-keys stored for the - // authenticated device and associated with the caller's ACI. - uint32 aci_ec_pre_key_count = 1; - - // The approximate number of one-time Kyber pre-keys stored for the - // authenticated device and associated with the caller's ACI. - uint32 aci_kem_pre_key_count = 2; - - // The approximate number of one-time EC pre-keys stored for the - // authenticated device and associated with the caller's PNI. 0 if - // the account does not possess a phone number. - uint32 pni_ec_pre_key_count = 3; - - // The approximate number of one-time KEM pre-keys stored for the - // authenticated device and associated with the caller's PNI. 0 if - // the account does not possess a phone number. - uint32 pni_kem_pre_key_count = 4; -} - -message GetPreKeysRequest { - // The service identifier of the account for which to retrieve pre-keys. - common.ServiceIdentifier target_identifier = 1; - - // The ID of the device associated with the targeted account for which to - // retrieve pre-keys. If not set, pre-keys are returned for all devices - // associated with the targeted account. - optional uint32 device_id = 2; -} - -message GetPreKeysAnonymousRequest { - // The request to retrieve pre-keys for a specific account/device(s). - GetPreKeysRequest request = 1; - - // A means to authorize the request. - oneof authorization { - // The unidentified access key (UAK) for the targeted account. - bytes unidentified_access_key = 2; - - // A group send endorsement token for the targeted account. - bytes group_send_token = 3; - - // The destination account allows unrestricted unidentified access - google.protobuf.Empty unrestricted_access = 4; - } -} - -message DevicePreKeyBundle { - // The EC signed pre-key associated with the targeted - // account/device/identity. - common.EcSignedPreKey ec_signed_pre_key = 1; - - // A one-time EC pre-key for the targeted account/device/identity. May not - // be set if no one-time EC pre-keys are available. - common.EcPreKey ec_one_time_pre_key = 2; - - // A one-time KEM pre-key (or a last-resort KEM pre-key) for the targeted - // account/device/identity. - common.KemSignedPreKey kem_one_time_pre_key = 3; - - // The registration ID for the targeted account/device/identity. - uint32 registration_id = 4; -} - -message AccountPreKeyBundles { - // The identity key associated with the targeted account/identity. - bytes identity_key = 1; - - // A map of device IDs to pre-key "bundles" for the targeted account. - map device_pre_keys = 2; - - // Whether the account has enabled sealed sender from anyone. Always false - // if the request was for a PNI, which does not allow any unidentified access. - bool unrestricted_unidentified_access = 3; - - // If the target supports unidentified access and has an unidentified access - // key, a fingerprint of the target's UAK. This may be used to detect a change - // in the UAK that the sender has for the target before actually sending a message. Otherwise, empty. - bytes unidentified_access_key_fingerprint = 4; -} - -message GetPreKeysResponse { - oneof response { - // The requested pre-key bundles - AccountPreKeyBundles pre_keys = 1; - - // Either the target account was not found, no active device with the given - // ID (if specified) was found on the target account. - errors.NotFound target_not_found = 2 [(tag.reason) = "not_found"]; - } -} - -message GetPreKeysAnonymousResponse { - oneof response { - // The requested pre-key bundles - AccountPreKeyBundles pre_keys = 1; - - // Either the target account was not found, no active device with the given - // ID (if specified) was found on the target account. - errors.NotFound target_not_found = 2 [(tag.reason) = "not_found"]; - - // The provided unidentified authorization credential was invalid - errors.FailedUnidentifiedAuthorization failed_unidentified_authorization = 3 [(tag.reason) = "failed_unidentified_authorization"]; - } -} - -message SetOneTimeEcPreKeysRequest { - // The identity type (i.e. ACI/PNI) with which the keys in this request are - // associated. - common.IdentityType identity_type = 1; - - // The unsigned EC pre-keys to be stored. - repeated common.EcPreKey pre_keys = 2 [(require.size) = {min: 1, max: 100}]; -} - -message SetOneTimeKemSignedPreKeysRequest { - // The identity type (i.e. ACI/PNI) with which the keys in this request are - // associated. - common.IdentityType identity_type = 1; - - // The KEM pre-keys to be stored. - repeated common.KemSignedPreKey pre_keys = 2 [(require.size) = {min: 1, max: 100}]; -} - -message SetEcSignedPreKeyRequest { - // The identity type (i.e. ACI/PNI) with which this key is associated. - common.IdentityType identity_type = 1; - - // The signed EC pre-key itself. - common.EcSignedPreKey signed_pre_key = 2 [(require.present) = true]; -} - -message SetKemLastResortPreKeyRequest { - // The identity type (i.e. ACI/PNI) with which this key is associated. - common.IdentityType identity_type = 1; - - // The signed KEM pre-key itself. - common.KemSignedPreKey signed_pre_key = 2 [(require.present) = true]; -} - -message SetPreKeyResponse { -} - -message CheckIdentityKeyRequest { - // The service identifier of the account for which we want to check the associated identity key fingerprint. - common.ServiceIdentifier target_identifier = 1; - // The most significant 4 bytes of the SHA-256 hash of the identity key associated with the target account/identity type. - bytes fingerprint = 2 [(require.exactlySize) = 4]; -} - -message CheckIdentityKeyResponse { - // The service identifier of the account for which there is a mismatch between the client and server identity key fingerprints. - common.ServiceIdentifier target_identifier = 1; - // The identity key that is stored by the server for the target account/identity type. - bytes identity_key = 2; -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/login_purchase.proto b/pkg/signalmeow/protobuf/org/signal/chat/login_purchase.proto deleted file mode 100644 index 236deb5..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/login_purchase.proto +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2026 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.purchase; - -import "org/signal/chat/require.proto"; -import "org/signal/chat/errors.proto"; -import "org/signal/chat/tag.proto"; -import "org/signal/chat/subscriptions.proto"; - -// Service for one-time purchases of logins -service LoginPurchase { - option (require.auth) = AUTH_ONLY_ANONYMOUS; - - // Obtain a ZK receipt credential for a completed one-time login payment. - // - // The receipt credential can then be presented at registration - rpc CreateLoginReceiptCredential(CreateLoginReceiptCredentialRequest) returns (CreateLoginReceiptCredentialResponse) {} -} - -message CreateLoginReceiptCredentialRequest { - // The payment processor. Currently, only GOOGLE_PLAY_BILLING and - // APPLE_APP_STORE are supported. - PaymentProvider processor = 1 [(require.specified) = true]; - - // The identifier of a completed purchase for a signal login within the - // payment provider - string purchase_identifier = 2 [(require.nonEmpty) = true]; - - // The receipt credential request. Subsequent retries to create a login - // credential for the same purchase_identifier must use an identical - // receipt_credential_request. - // - // Callers must validate that the generated receipt credential has the - // following properties: - // - // - Level == 300 (The login level) - // - ExpirationTime % 86400 == 0 - // - ExpirationTime == PurchaseTime + (5 * 366 * 86400) +/- (7 * 86400) - bytes receipt_credential_request = 3 [(require.nonEmpty) = true]; -} - -message CreateLoginReceiptCredentialResponse { - message CreateLoginReceiptCredentialResult { - bytes receipt_credential_response = 1; - } - - oneof response { - CreateLoginReceiptCredentialResult result = 1; - // The purchase is still pending with the payment provider. The client may retry later. - errors.FailedPrecondition payment_still_processing = 2 [(tag.reason) = "payment_still_processing"]; - // The purchase did not complete successfully. - PaymentRequired payment_required = 3 [(tag.reason) = "payment_required"]; - // The payment provider has no purchase with the provided purchase_identifier - errors.NotFound payment_not_found = 4 [(tag.reason) = "payment_not_found"]; - // The purchase was already redeemed for a receipt credential, but with a different receipt credential request - errors.FailedPrecondition receipt_already_issued = 5 [(tag.reason) = "receipt_already_issued"]; - } -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/messages.proto b/pkg/signalmeow/protobuf/org/signal/chat/messages.proto deleted file mode 100644 index b6bb6a7..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/messages.proto +++ /dev/null @@ -1,437 +0,0 @@ -/* - * Copyright 2025 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.messages; - -import "google/protobuf/empty.proto"; - -import "org/signal/chat/common.proto"; -import "org/signal/chat/require.proto"; -import "org/signal/chat/errors.proto"; -import "org/signal/chat/tag.proto"; - -import "signalpb/SignalService.proto"; - -// Provides methods for sending "unsealed sender" messages. -service Messages { - - option (require.auth) = AUTH_ONLY_AUTHENTICATED; - - // Sends an "unsealed sender" message to all devices linked to a single - // destination account. - // - // The destination account must not be the same as the authenticated caller. - // Callers should use `SendSyncMessage` to send messages to themselves. - rpc SendMessage(SendAuthenticatedSenderMessageRequest) returns (SendMessageAuthenticatedSenderResponse) {} - - // Sends a "sync" message to all other devices linked to the authenticated - // sender's account. - rpc SendSyncMessage(SendSyncMessageRequest) returns (SendMessageAuthenticatedSenderResponse) {} - - // Retrieve messages for the authenticated device. When the caller receives - // and successfully processes a message returned in a GetMessagesResponse they - // must send a corresponding GetMessagesRequest indicating that the message - // has been processed (an ack). Acks should only be sent for messages - // delivered via the currently open RPC. - // - // Only the first GetMessagesRequest may contain request parameters that - // configure the stream. The first request must not contain an ack. - // - // The server will keep the stream open until the client disconnects. Only - // one GetMessages stream may be open per device. If a second GetMessages - // stream is opened, the server may terminate any of the streams with - // a STREAM_CLOSED error reason. A GetMessagesStreamClosed message will be - // present in the error details. - rpc GetMessages(stream GetMessagesRequest) returns (stream GetMessagesResponse) {} -} - -message GetMessagesRequest { - message GetMessageOptions { - // If present and true, the server will not deliver any messages with the - // story flag set. This flag may only be set on the first GetMessagesRequest - // sent from the client to the server in an RPC stream. - bool drop_stories = 1; - } - oneof request { - // Configuration options for the message stream. Required for the first - // request of the stream, forbidden on subsequent reqeusts. - GetMessageOptions options = 1; - - // The server_guid of an envelope previously returned in a - // GetMessagesResponse that has been successfully processed by the caller. - // Forbidden on the first request of the stream, required on subsequent - // requests. - bytes server_guid_ack = 2; - } -} - -// The reason why a GetMessages RPC is being closed by the server. -message GetMessagesStreamClosed { - oneof reason { - // Another caller has opened a GetMessages stream for the same device. - google.protobuf.Empty conflicting_stream = 1; - } -} - -message GetMessagesResponse { - oneof response { - // A message. On successful receipt of an envelope the caller should ack - // the envelope by sending a GetMessagesRequest with the envelope's server - // guid. Acks should only be sent for envelopes received on the currently - // open RPC. - signalservice.Envelope envelope = 1; - - // An indicator that all outstanding messages for the device have been - // drained and acked by the client. The stream will remain open and continue - // to deliver newly arrived messages. - google.protobuf.Empty queue_empty = 2; - } -} - -// Provides methods for sending "sealed sender" messages. -service MessagesAnonymous { - - option (require.auth) = AUTH_ONLY_ANONYMOUS; - - // Sends a "sealed sender" message to all devices linked to a single - // destination account. - // - // If this RPC is authorized with an unidentified access key, it will fail - // with an authorization failure if the credential is invalid OR if the - // destination account was not found. If it is authorized using a group send - // token, it will fail with an authorization failure if the credential is - // invalid and with an destination not found error if the account does not - // exist - rpc SendSingleRecipientMessage(SendSealedSenderMessageRequest) returns (SendMessageResponse) {} - - // Sends a "sealed sender" message with a common payload to all devices linked - // to multiple destination accounts. - rpc SendMultiRecipientMessage(SendMultiRecipientMessageRequest) returns (SendMultiRecipientMessageResponse) {} - - // Sends a story message to devices linked to a single destination account. - rpc SendStory(SendStoryMessageRequest) returns (SendMessageResponse) {} - - // Sends a story message with a common payload to devices linked to devices - // linked to multiple destination accounts. - rpc SendMultiRecipientStory(SendMultiRecipientStoryRequest) returns (SendMultiRecipientMessageResponse) {} -} - -message IndividualRecipientMessageBundle { - - // A message for an individual device linked to a destination account. - message Message { - - // The registration ID for the destination device. - uint32 registration_id = 1 [(require.range).max = 0x3fff]; - - // The content of the message to deliver to the destination device. - bytes payload = 2 [(require.size) = {min: 1, max: 262144}]; // 256 KiB - - // The message type of the message. If this message is part of an - // unidentified send, this must be UNIDENTIFIED_SENDER - SendMessageType type = 3; - } - - // The time, in milliseconds since the epoch, at which this message was - // originally sent from the perspective of the sender. Note that the maximum - // allowable timestamp for JavaScript clients is less than Long.MAX_VALUE; see - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_epoch_timestamps_and_invalid_date - // for additional details and discussion. - uint64 timestamp = 1 [(require.range).min = 1, (require.range).max = 8640000000000000]; - - // A map of device IDs to individual messages. Generally, callers must include - // one message for each device linked to the destination account. In cases of - // "sync messages" where a sender is distributing information to other devices - // linked to the sender's account, senders may omit a message for the sending - // device. - map messages = 2 [(require.nonEmpty) = true]; -} - -enum SendMessageType { - UNSPECIFIED = 0; - - // A double-ratchet message represents a "normal," "unsealed-sender" message - // encrypted using the Double Ratchet within an established Signal session. - DOUBLE_RATCHET = 1; - - // A prekey message begins a new Signal session. The `content` of a prekey - // message is a superset of a double-ratchet message's `content` and - // contains the sender's identity public key and information identifying the - // pre-keys used in the message's ciphertext. - PREKEY_MESSAGE = 2; - - // A plaintext message is used solely to convey encryption error receipts - // and never contains encrypted message content. Encryption error receipts - // must be delivered in plaintext because encryption/decryption of a prior - // message failed and there is no reason to believe that - // encryption/decryption of subsequent messages with the same key material - // would succeed. - // - // Critically, plaintext messages never have "real" message content - // generated by users. Plaintext messages include sender information. - PLAINTEXT_CONTENT = 3; - - // An unidentified sender message is an encrypted message. No other - // information about the type of the encrypted message is known to the server. - // - // Unidenitfied sender messages require an unidentified access token or a - // group send endorsement token to prove the unidentified sender is authorized - // to send messages to the destination. - UNIDENTIFIED_SENDER = 4; -} - -message SendAuthenticatedSenderMessageRequest { - - // The service identifier of the account to which to deliver the message. - common.ServiceIdentifier destination = 1; - - // If true, this message will only be delivered to destination devices that - // have an active message delivery channel with a Signal server. - bool ephemeral = 2; - - // Indicates whether this message is urgent and should trigger a high-priority - // notification if the destination device does not have an active message - // delivery channel with a Signal server - bool urgent = 3; - - // The messages to send to the destination account. - IndividualRecipientMessageBundle messages = 4; -} - -message SendMessageAuthenticatedSenderResponse { - - // The outcome of the message delivery - oneof response { - - // The message was successfully delivered to all destination devices - google.protobuf.Empty success = 1; - - // A list of discrepancies between the destination devices identified in a - // request to send a message and the devices that are actually linked to an - // account. - MismatchedDevices mismatched_devices = 2 [(tag.reason) = "mismatched_devices"]; - - // A description of a challenge callers must complete before sending - // additional messages. - ChallengeRequired challenge_required = 3 [(tag.reason) = "challenge_required"]; - - // The destination account did not exist - errors.NotFound destination_not_found = 4 [(tag.reason) = "destination_not_found"]; - - } -} - - -message SendSyncMessageRequest { - - // Indicates whether this message is urgent and should trigger a high-priority - // notification if the destination device does not have an active message - // delivery channel with a Signal server - bool urgent = 1; - - // The messages to send to the destination account. - IndividualRecipientMessageBundle messages = 2; -} - -message SendSealedSenderMessageRequest { - - // The service identifier of the account to which to deliver the message. - common.ServiceIdentifier destination = 1; - - // If true, this message will only be delivered to destination devices that - // have an active message delivery channel with a Signal server. - bool ephemeral = 2; - - // Indicates whether this message is urgent and should trigger a high-priority - // notification if the destination device does not have an active message - // delivery channel with a Signal server - bool urgent = 3; - - // The messages to send to the destination account. - IndividualRecipientMessageBundle messages = 4; - - // A means to authorize the request. - oneof authorization { - - // The unidentified access key (UAK) for the destination account. - bytes unidentified_access_key = 5 [(require.exactlySize) = 16]; - - // A group send endorsement token for the destination account. - bytes group_send_token = 6; - - // The destination account allows unrestricted unidentified access - google.protobuf.Empty unrestricted_access = 7; - } -} - -message SendStoryMessageRequest { - - // The service identifier of the account to which to deliver the message. - common.ServiceIdentifier destination = 1; - - // Indicates whether this message is urgent and should trigger a high-priority - // notification if the destination device does not have an active message - // delivery channel with a Signal server - bool urgent = 2; - - // The messages to send to the destination account. - IndividualRecipientMessageBundle messages = 3; -} - -message SendMessageResponse { - - // The outcome of the message delivery - oneof response { - - // The message was successfully delivered to all destination devices - google.protobuf.Empty success = 1; - - // A list of discrepancies between the destination devices identified in a - // request to send a message and the devices that are actually linked to an - // account. - MismatchedDevices mismatched_devices = 2 [(tag.reason) = "mismatched_devices"]; - - // The provided unidentified authorization credential was invalid - errors.FailedUnidentifiedAuthorization failed_unidentified_authorization = 3 [(tag.reason) = "failed_unidentified_authorization"]; - - // The destination account did not exist - errors.NotFound destination_not_found = 4 [(tag.reason) = "destination_not_found"]; - - } -} - -message MultiRecipientMessage { - - // The time, in milliseconds since the epoch, at which this message was - // originally sent from the perspective of the sender. Note that the maximum - // allowable timestamp for JavaScript clients is less than Long.MAX_VALUE; see - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_epoch_timestamps_and_invalid_date - // for additional details and discussion. - uint64 timestamp = 1 [(require.range).min = 1, (require.range).max = 8640000000000000]; - - // The serialized multi-recipient message payload. - bytes payload = 2 [(require.size).max = 762144]; // 256 KiB payload + (5000 * 100) of overhead -} - -message SendMultiRecipientMessageRequest { - - // If true, this message will only be delivered to destination devices that - // have an active message delivery channel with a Signal server. - bool ephemeral = 1; - - // Indicates whether this message is urgent and should trigger a high-priority - // notification if the destination device does not have an active message - // delivery channel with a Signal server - bool urgent = 2; - - // The multi-recipient message to send to all destination accounts and - // devices. - MultiRecipientMessage message = 3; - - // A group send endorsement token for the destination account. - bytes group_send_token = 4 [(require.nonEmpty) = true]; -} - -message SendMultiRecipientStoryRequest { - - // Indicates whether this message is urgent and should trigger a high-priority - // notification if the destination device does not have an active message - // delivery channel with a Signal server - bool urgent = 1; - - // The multi-recipient story message to send to all destination accounts and - // devices. - MultiRecipientMessage message = 2; -} - -message MultiRecipientSuccess { - // A list of destination service identifiers that could not be resolved to - // registered Signal accounts. The message in the original request was sent - // to all service identifiers/devices in the original request except for the - // destination devices associated with the service identifiers in this list. - repeated common.ServiceIdentifier unresolved_recipients = 1; -} - -message SendMultiRecipientMessageResponse { - - // The outcome of the message delivery - oneof response { - // The message was sent to at least some of the destination accounts/devices - // identified in the original request. - MultiRecipientSuccess success = 1; - - // A list of sets of discrepancies between the destination devices - // identified in a request to send a message and the devices that are - // actually linked to a destination account. - MultiRecipientMismatchedDevices mismatched_devices = 2 [(tag.reason) = "mismatched_devices"]; - - // The provided unidentified authorization credential was invalid - errors.FailedUnidentifiedAuthorization failed_unidentified_authorization = 3 [(tag.reason) = "failed_unidentified_authorization"]; - } -} - -message MismatchedDevices { - - // The service identifier to which the devices named in this object are - // linked. - common.ServiceIdentifier service_identifier = 1; - - // A list of device IDs that are linked to the destination account, but were - // not included in the collection of messages bound for the destination - // account. - repeated uint32 missing_devices = 2 [(require.each) = {range: {max: 0x7f}}]; - - // A list of device IDs that were included in the collection of messages bound - // for the destination account, but are not currently linked to the - // destination account. - repeated uint32 extra_devices = 3 [(require.each) = {range: {max: 0x7f}}]; - - // A list of device IDs that present in the collection of messages bound for - // the destination account and are linked to the destination account, but have - // a different registration ID than the registration ID presented by the - // sender (indicating that the destination device has likely been replaced by - // another device). - repeated uint32 stale_devices = 4 [(require.each) = {range: {max: 0x7f}}]; -} - -message MultiRecipientMismatchedDevices { - - // A list of sets of discrepancies between the destination devices identified - // in a request to send a message and the devices that are actually linked to - // a destination account. - repeated MismatchedDevices mismatched_devices = 1; -} - -message ChallengeRequired { - - enum ChallengeType { - UNSPECIFIED = 0; - - // A challenge that callers can fulfill by completing a captcha. - CAPTCHA = 1; - - // A challenge that callers can fulfill by supplying a token delivered via - // push notification. - PUSH_CHALLENGE = 2; - }; - - // An opaque token identifying this challenge request. Clients must generally - // submit this token when submitting a challenge response. - string token = 1; - - // A list of challenge types callers may choose to complete to resolve the - // challenge requirement. May be empty, in which case callers cannot resolve - // the challenge by any means other than waiting. - repeated ChallengeType challenge_options = 2; - - // A duration (in seconds) after which the challenge requirement may be - // resolved by simply waiting. May not be set if the challenge cannot be - // resolved by waiting. - optional uint64 retry_after_seconds = 3; -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/one_time_donations.proto b/pkg/signalmeow/protobuf/org/signal/chat/one_time_donations.proto deleted file mode 100644 index 11e53ab..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/one_time_donations.proto +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright 2026 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.purchase; - -import "org/signal/chat/require.proto"; -import "org/signal/chat/errors.proto"; -import "org/signal/chat/tag.proto"; -import "org/signal/chat/subscriptions.proto"; - -// Service for making one-time donation payments (boost and gift) -// -// Configuration for one-time donations can be found in ProductConfiguration. -service OneTimeDonations { - option (require.auth) = AUTH_ONLY_ANONYMOUS; - - // Create a Stripe payment intent and return a client secret that can be used to complete the payment. - // Once the payment is complete, the paymentIntentId can be used with CreateBoostReceiptCredentials - rpc CreateBoost(CreateBoostRequest) returns (CreateBoostResponse) {} - - // Create a PayPal one-time payment. - // Once the payment is complete, call ConfirmPayPalBoost with the payment ID and token - rpc CreatePayPalBoost(CreatePayPalBoostRequest) returns (CreatePayPalBoostResponse) {} - - // Confirm a PayPal one-time payment - rpc ConfirmPayPalBoost(ConfirmPayPalBoostRequest) returns (ConfirmPayPalBoostResponse) {} - - // Obtain a ZK receipt credential for a completed one-time donation payment. - // The receipt credential can then be used to redeem the one-time donation entitlement - // via Donations.RedeemReceipt - rpc CreateBoostReceiptCredentials(CreateBoostReceiptCredentialsRequest) returns (CreateBoostReceiptCredentialsResponse) {} -} - -// The amount is below the minimum for the currency. -message AmountBelowMinimumError { - // The minimum amount for the currency - string minimum = 1; -} - -// The SEPA Direct Debit amount exceeds the allowed maximum. -message AmountAboveSepaLimitError { - // The maximum amount for a SEPA transaction - string maximum = 1; -} - -message CreateBoostRequest { - // ISO 4217 currency code, case-insensitive (e.g. "usd", "EUR") - string currency = 1 [(require.exactlySize) = 3]; - // The amount to pay in the [currency's minor unit](https://docs.stripe.com/currencies#minor-units) - uint64 amount = 2 [(require.range).min = 1]; - // The level for the boost payment - uint64 level = 3 [(require.range).min = 1]; - // The payment method - PaymentMethod payment_method = 4 [(require.specified) = true]; - // A donation permit retrieved from Donations.createDonationPermit - bytes donation_permit = 5 [(require.nonEmpty) = true]; -} - -message CreateBoostResponse { - oneof response { - // A client secret that can be used to complete a stripe PaymentIntent - string client_secret = 1; - // The amount is below the minimum for the currency - AmountBelowMinimumError amount_below_minimum = 2 [(tag.reason) = "amount_below_minimum"]; - // The amount exceeds the maximum for SEPA Direct Debit - AmountAboveSepaLimitError amount_above_sepa_limit = 3 [(tag.reason) = "amount_above_sepa_limit"]; - // The requested currency is not supported for the given payment method - errors.FailedPrecondition unsupported_currency = 4 [(tag.reason) = "unsupported_currency"]; - // The requested level is not a valid one-time donation level - errors.FailedPrecondition unsupported_level = 5 [(tag.reason) = "unsupported_level"]; - // Donation permit was invalid or already spent - errors.FailedZkAuthentication permit_rejected = 6 [(tag.reason) = "permit_rejected"]; - // The amount in the specified currency is not supported by the payment provider - errors.FailedPrecondition invalid_amount = 7 [(tag.reason) = "invalid_amount"]; - } -} - -message CreatePayPalBoostRequest { - // ISO 4217 currency code, case-insensitive (e.g. "usd", "EUR") - string currency = 1 [(require.exactlySize) = 3]; - // Amount in the currency's minor unit (e.g. cents for USD), must be >= 1 - uint64 amount = 2 [(require.range).min = 1]; - // Donation level. - uint64 level = 3 [(require.range).min = 1]; - // URL to redirect the user to after PayPal approval - string return_url = 4 [(require.nonEmpty) = true]; - // URL to redirect the user to if they cancel - string cancel_url = 5 [(require.nonEmpty) = true]; -} - -message CreatePayPalBoostResponse { - message CreatePayPalBoostResult { - string approval_url = 1; - string payment_id = 2; - } - oneof response { - CreatePayPalBoostResult result = 1; - // The amount is below the minimum for the currency - AmountBelowMinimumError amount_below_minimum = 2 [(tag.reason) = "amount_below_minimum"]; - // The requested currency is not supported for PayPal - errors.FailedPrecondition unsupported_currency = 3 [(tag.reason) = "unsupported_currency"]; - // The requested level is not a valid one-time donation level - errors.FailedPrecondition unsupported_level = 4 [(tag.reason) = "unsupported_level"]; - } -} - -message ConfirmPayPalBoostRequest { - // ISO 4217 currency code, case-insensitive (e.g. "usd", "EUR") - string currency = 1 [(require.exactlySize) = 3]; - // Amount in the currency's minor unit, must be >= 1 - uint64 amount = 2 [(require.range).min = 1]; - // Donation level. - uint64 level = 3 [(require.range).min = 1]; - // PayPal payer ID from the approval redirect - string payer_id = 4 [(require.nonEmpty) = true]; - // PayPal payment ID (PAYID-…) from CreatePayPalBoost - string payment_id = 5 [(require.nonEmpty) = true]; - // PayPal payment token (EC-…) from the approval redirect - string payment_token = 6 [(require.nonEmpty) = true]; -} - -message ConfirmPayPalBoostResponse { - message ConfirmPayPalBoostResult { - string payment_id = 1; - } - oneof response { - ConfirmPayPalBoostResult result = 1; - // The amount is below the minimum for the currency - AmountBelowMinimumError amount_below_minimum = 2 [(tag.reason) = "amount_below_minimum"]; - // The requested currency is not supported for PayPal - errors.FailedPrecondition unsupported_currency = 3 [(tag.reason) = "unsupported_currency"]; - // The requested level is not a valid one-time donation level - errors.FailedPrecondition unsupported_level = 4 [(tag.reason) = "unsupported_level"]; - // The payment failed; see charge failure details - ChargeFailure charge_failure = 5 [(tag.reason) = "charge_failure"]; - } -} - -message CreateBoostReceiptCredentialsRequest { - // a payment ID from the processor - string payment_intent_id = 1 [(require.nonEmpty) = true]; - // ZK blind-signature receipt credential request bytes - bytes receipt_credential_request = 2 [(require.nonEmpty) = true]; - // The processor that handled the payment - PaymentProvider processor = 3 [(require.specified) = true]; -} - -message CreateBoostReceiptCredentialsResponse { - message CreateBoostReceiptCredentialsResult { - bytes receipt_credential_response = 1; - } - oneof response { - CreateBoostReceiptCredentialsResult result = 1; - // Payment is still processing; client should retry - errors.FailedPrecondition payment_still_processing = 2 [(tag.reason) = "payment_still_processing"]; - // Payment failed - PaymentRequired payment_required = 3 [(tag.reason) = "payment_required"]; - // Payment intent not found - errors.NotFound payment_not_found = 4 [(tag.reason) = "payment_not_found"]; - // A receipt credential was already issued for this payment - errors.FailedPrecondition receipt_already_issued = 5 [(tag.reason) = "receipt_already_issued"]; - } -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/payments.proto b/pkg/signalmeow/protobuf/org/signal/chat/payments.proto deleted file mode 100644 index 79e9455..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/payments.proto +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2023 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.payments; - -import "org/signal/chat/require.proto"; - -// Provides methods for working with payments. -service Payments { - option (require.auth) = AUTH_ONLY_AUTHENTICATED; - - - rpc GetCurrencyConversions(GetCurrencyConversionsRequest) returns (GetCurrencyConversionsResponse) {} -} - -message GetCurrencyConversionsRequest { -} - -message GetCurrencyConversionsResponse { - - message CurrencyConversionEntity { - - string base = 1; - - map conversions = 2; - } - - uint64 timestamp = 1; - - repeated CurrencyConversionEntity currencies = 2; -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/product_configuration.proto b/pkg/signalmeow/protobuf/org/signal/chat/product_configuration.proto deleted file mode 100644 index c9e894e..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/product_configuration.proto +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2026 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.purchase; - -import "org/signal/chat/require.proto"; -import "org/signal/chat/subscriptions.proto"; - -// Retrieve product metadata for one-time donations, subscriptions, and backups -service ProductConfiguration { - option (require.auth) = AUTH_ONLY_ANONYMOUS; - - // Returns configuration for donation subscriptions, backup subscriptions, and one-time donation ( - // "boost" and "gift") minimum and suggested amounts. Badges are referenced by ID only; resolve those - // IDs to full badge details via RemoteConfiguration.GetBadges. - rpc GetConfiguration(GetConfigurationRequest) returns (GetConfigurationResponse) {} -} - -message GetConfigurationRequest {} - -message GetConfigurationResponse { - // Map of lower-cased ISO 3 currency codes to currency-specific configuration - map currencies = 1; - // Map of numeric donation level IDs to level-specific badge configuration - map badge_levels = 2; - // Configuration for backup subscription options - BackupConfiguration backup = 3; - // Maximum value of a one-time SEPA donation - string sepa_maximum_euros = 4; - // Configuration for one-time Signal Login purchases - LoginConfiguration login = 5; -} - -message AmountList { - // NOTE: this is a string instead of a numeric type because it is intended - // for display purposes only - repeated string amounts = 1; -} - -message CurrencyConfiguration { - // Minimum one-time donation - // NOTE: this is a string instead of a numeric type because it is intended - // for display purposes only - string minimum = 1; - // Map of one-time donation level IDs to suggested amounts - map one_time = 2; - // Map of subscription level IDs to the amount charged - map subscription = 3; - // Map of backup subscription level IDs to the amount charged - map backup_subscription = 4; - repeated PaymentMethod supported_payment_methods = 5; -} - -message LevelConfiguration { - // The ID of the badge awarded at this level. Resolve to full badge details - // via RemoteConfiguration.GetBadges. - string badge_id = 1; - - // The duration for which a badge is valid. Present only for - // one-time (boost, gift) badges - optional uint64 badge_duration_seconds = 2; -} - -// Configuration for a backup level - use to present appropriate client interfaces -message BackupLevelConfiguration { - // The amount of media storage in bytes that a paying subscriber may store - uint64 storage_allowance_bytes = 1; - // The play billing productID associated with this backup level - string play_product_id = 2; - // The duration, in days, for which your backed up media is retained on the server after you stop refreshing with a paid credential - uint64 media_ttl_days = 3; -} - -message BackupConfiguration { - // A map of numeric backup level IDs to level-specific backup configuration - map levels = 1; - // The number of days of media a free tier backup user gets - uint64 free_tier_media_days = 2; -} - -// Configuration for one-time Signal Login purchases -message LoginConfiguration { - // The receipt level associated with a Signal Login purchase - uint64 level = 1; - // The play billing productID associated with a Signal Login purchase - string play_product_id = 2; - // The App Store productID associated with a Signal Login purchase - string app_store_product_id = 3; -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/profile.proto b/pkg/signalmeow/protobuf/org/signal/chat/profile.proto deleted file mode 100644 index 78d4370..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/profile.proto +++ /dev/null @@ -1,406 +0,0 @@ -/* - * Copyright 2023 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.profile; - -import "google/protobuf/empty.proto"; - -import "org/signal/chat/common.proto"; -import "org/signal/chat/errors.proto"; -import "org/signal/chat/require.proto"; -import "org/signal/chat/tag.proto"; - -// Provides methods for working with profiles and profile-related data. -service Profile { - option (require.auth) = AUTH_ONLY_AUTHENTICATED; - - // Sets profile data and, if needed, returns credentials used by clients to upload a v1 avatar. - rpc SetProfile(SetProfileRequest) returns (SetProfileResponse) {} - - // Retrieves profile data. Callers with an unidentified access key for the account - // should use the version of this method in `ProfileAnonymous` instead. - rpc GetProfile(GetProfileRequest) returns (GetProfileResponse) {} - - // Returns anonymous credentials that may be presented with avatar operations in ProfilesAnonymous - // - // Note: `Accounts.SetZkCredentialKey` is a pre-requisite for this RPC - rpc GetAvatarCredentials(GetAvatarCredentialsRequest) returns (GetAvatarCredentialsResponse) {} -} - -// Provides methods for working with profiles and profile-related data using "unidentified access" -// credentials. Callers must not submit any self-identifying credentials -// when calling methods in this service and must instead present the targeted account's -// unidentified access key as an anonymous authentication mechanism. Callers -// without an unidentified access key should use the equivalent, authenticated -// methods in `Profile` instead. -service ProfileAnonymous { - option (require.auth) = AUTH_ONLY_ANONYMOUS; - - // Retrieves profile data. - rpc GetProfile(GetProfileAnonymousRequest) returns (GetProfileAnonymousResponse) {} - - // Retrieves a profile key credential. - rpc GetExpiringProfileKeyCredential(GetExpiringProfileKeyCredentialAnonymousRequest) returns (GetExpiringProfileKeyCredentialAnonymousResponse) {} - - // Returns credentials to upload a v2 avatar. After uploading the avatar, the client - // must call SetProfile with the new avatar URL in the encrypted `data`. - // - // Because avatars are uploaded anonymously, they have an expiration equal to the - // idle account expiration. Clients must periodically (recommended: every 90 days) - // call ExtendAvatarTTL to extend the TTl. - // - // Note: any existing avatar associated with these credentials will be deleted immediately - rpc GetAvatarUploadForm(GetAvatarUploadFormRequest) returns (GetAvatarUploadFormResponse) {} - - // Extends the TTL of the avatar currently associated with the request’s avatar auth credential - rpc ExtendAvatarTTL(ExtendAvatarTTLRequest) returns (ExtendAvatarTTLResponse) {} - - // Deletes the avatar currently associated with the request’s avatar auth credential. - // - // Clients must also call SetProfile to remove the avatar from the encrypted `data`. - rpc DeleteAvatar(DeleteAvatarRequest) returns (DeleteAvatarResponse) {} -} - -message SetProfileV1Request { - enum AvatarChange { - AVATAR_CHANGE_UNCHANGED = 0; - AVATAR_CHANGE_CLEAR = 1; - AVATAR_CHANGE_UPDATE = 2; - } - - // The ciphertext of a name that users must set on the profile. - bytes name = 1 [(require.exactlySize) = 81, (require.exactlySize) = 285]; - - // An enum to indicate what change, if any, is made to the avatar with this request. - AvatarChange avatar_change = 2; - - // The ciphertext of an emoji that users can set on their profile. - bytes about_emoji = 3 [(require.exactlySize) = 0, (require.exactlySize) = 60]; - - // The ciphertext of a description that users can set on their profile. - bytes about = 4 [(require.exactlySize) = 0, (require.exactlySize) = 156, (require.exactlySize) = 282, (require.exactlySize) = 540]; - - // The ciphertext of the phone-number sharing setting on the profile. 29-byte encrypted boolean. - bytes phone_number_sharing = 6 [(require.exactlySize) = 29]; -} - -message SetProfileRequest { - - // The profile version. Required. - bytes version = 1 [(require.exactlySize) = 32]; - - // The ciphertext of a serialized Profile protobuf. Required. - // 937 max length = 909 plaintext serialization + 28 bytes encryption overhead - bytes data = 2 [(require.nonEmpty) = true, (require.size).max = 937]; - - // The SHA-256 hash of the Profile ciphertext being replaced. - // This is used an optimistic lock against concurrent changes. - // - // Optional, if this is the initial request to create a version. - bytes expected_current_data_hash = 3 [(require.exactlySize) = 0, (require.exactlySize) = 32]; - - // The current profile version being updated. - // This is used as an optimistic lock against concurrent changes. - // - // Optional, if there is no current profile version for the account. - bytes expected_current_version = 4 [(require.exactlySize) = 0, (require.exactlySize) = 32]; - - // The ciphertext of the MobileCoin wallet ID on the profile. - bytes payment_address = 5 [(require.exactlySize) = 0, (require.exactlySize) = 582]; - - // A list of badge IDs associated with the profile. - repeated string badge_ids = 6; - - // The profile key commitment. Used to issue a profile key credential response. - // - // Required during the v1 -> v2 migration period. Afterwards will be optional, if this is an update to an existing version. - bytes commitment = 7 [(require.exactlySize) = 0, (require.exactlySize) = 97]; - - // An embedded v1 request. Required during the v1 -> v2 migration period. - // - // Because this is a temporary field during the migration, it has the highest - // field number without serialization overhead. This is purely aesthetic. - SetProfileV1Request v1Request = 15 [(require.present) = true]; - - // next: 8 -} - -// Indicates that the account is not permitted to set a payment address, -// due to a disallowed country prefix on the account's phone number. -message PaymentsForbiddenInRegion {} - -// Indicates that the account does not have the Profiles v2 capability, which -// is required to call Profiles.SetProfile -message ProfilesV2CapabilityRequired {} - - -message SetProfileResult { - // If the request included a v1 avatar change, this field contains the policy - // and credential used by clients to upload an avatar to the CDN. - // - // Because this is a temporary field during the migration, it has the highest - // field number without serialization overhead. This is purely aesthetic. - optional common.S3UploadForm v1_avatar_upload_form = 15; - - // next: 1 -} - -message SetProfileResponse { - oneof response { - SetProfileResult result = 1; - // The current data hash did not match the request's expectation, indicating - // another device on the account may have written an update the caller does not know about. - errors.FailedPrecondition expected_data_write_conflict = 2 [(tag.reason) = "expected_data_write_conflict"]; - // Payments are not permitted in the account's region, based on its phone - // number or the caller's IP address if the account does not have a phone - // number. The request should be retried without `payment_address. - PaymentsForbiddenInRegion payments_forbidden_in_region = 3 [(tag.reason) = "payments_forbidden_in_region"]; - // The current version did not match the request's expectation, indicating - // another device on the account may have created a new version the caller does not know about. - errors.FailedPrecondition expected_version_write_conflict = 4 [(tag.reason) = "expected_version_write_conflict"]; - - // Because this is a temporary field during the migration, it has the highest - // field number without serialization overhead. This is purely aesthetic. - ProfilesV2CapabilityRequired profiles_v2_capability_required = 15 [(tag.reason) = "profiles_v2_capability_required"]; - - // next: 4 - } -} - -message GetProfileRequest { - // The ACI of the account for which to get profile data. - common.ServiceIdentifier account_identifier = 1 [(require.present) = true, (require.identityType) = IDENTITY_TYPE_ACI]; - // The profile version to retrieve. - bytes version = 2 [(require.exactlySize) = 32]; - - // The `etag` from the previous request for this Profile version. If - // unchanged, the response will omit `profile` and `etag_matched` will be - // `true`. - bytes etag = 3 [(require.exactlySize) = 0, (require.exactlySize) = 10]; -} - -message GetProfileAnonymousRequest { - // Contains the data necessary to request a profile. - GetProfileRequest request = 1 [(require.present) = true]; - oneof authentication { - // The unidentified access key for the targeted account. - bytes unidentified_access_key = 2 [(require.exactlySize) = 16]; - - // A group send endorsement token for the targeted account. - bytes group_send_token = 3 [(require.nonEmpty) = true]; - } -} - -message AccountInfo { - // The account identity key of the targeted account. - bytes identity_key = 1; - - // A checksum of the unidentified access key for the targeted account. - bytes unidentified_access_key_fingerprint = 2; - - // Whether the account has enabled sealed sender from anyone. - bool unrestricted_unidentified_access = 3; - - // A list of the badges ids associated with the account. Metadata to display - // badges may be obtained by cross-referencing badge ids with - // RemoteConfiguration.GetBadges. - repeated string badge_ids = 4; -} - -message ProfileResult { - // The ciphertext of the requested version of the profile - bytes data = 1; - - // The ciphertext of the MobileCoin wallet ID on the profile. - bytes payment_address = 2; - - // Information about the targeted account - AccountInfo account_info = 3; - - // An entity tag for the profile. This may be used in subsequent requests - // for this profile version to optimize bandwidth. - // - // Note that this hash will not match the expected_data_hash used on - // SetProfile for concurrency control. - // - // Clients may validate that the value has been correctly calculated by - // calculating a 10-byte truncated TupleHash256 as follows: - // - // ``` - // TupleHash256(S = "ProfileETag/v1", L = 80 bits, tuple = [ - // data, - // payment_address, - // account_info.identity_key, - // account_info.unidentified_access_key_fingerprint, - // account_info.unrestricted_unidentified_access ? 0x01 : 0x00, - // uint32BE(count(account_info.badge_ids)), - // utf8(id) for each id in sortLexAscendingByUtf8Bytes(account_info.badge_ids), - // ]) - //``` - // - // Absent/empty fields contribute an empty element (not zero bytes omitted): - // a missing payment_address is still a present, zero-length tuple element. - // - // This etag will always exclusively cover the documented fields. If fields - // are added in the future, a new etag field must be introduced. - bytes etag = 4; -} - -message LegacyProfileResult { - - // The ciphertext of the name on the profile. - bytes name = 1; - // The ciphertext of the description on the profile. - bytes about = 2; - // The ciphertext of the emoji on the profile. - bytes about_emoji = 3; - // The cdn0 path of the avatar on the profile. - string avatar = 4; - // The ciphertext of the phone-number sharing setting on the profile. - bytes phone_number_sharing = 5; - // The ciphertext of the MobileCoin wallet ID on the profile. - bytes payment_address = 6; - // Information about the targeted account - AccountInfo account_info = 7; -} - - -message GetProfileResponse { - oneof response { - // The full profile data. The current profile did not match the provided - // etag (or no etag was provided). - ProfileResult profile = 1; - - // The current profile matched the provided etag. If present, this will always be true. - bool etag_matched = 2 [(tag.reason) = "etag_match"]; - - errors.NotFound not_found = 3 [(tag.reason) = "not_found"]; - - // Will be present if there is no v2 Profile data for this version. - // - // Because this is a temporary field during the migration, it has the highest - // field number without serialization overhead. This is purely aesthetic. - LegacyProfileResult legacy_profile = 15 [(tag.reason) = "legacy_profile"]; - } - // next: 4 -} - -message GetProfileAnonymousResponse { - oneof response { - // The full profile data. The current profile did not match the provided - // etag (or no etag was provided). - ProfileResult profile = 1; - - // The current profile matched the provided etag. If present, this will always be true. - bool etag_matched = 2 [(tag.reason) = "etag_match"]; - - errors.NotFound not_found = 3 [(tag.reason) = "not_found"]; - errors.FailedUnidentifiedAuthorization failed_unidentified_authorization = 4 [(tag.reason) = "failed_unidentified_authorization"]; - - // Will be present if there is no v2 Profile data for this version. - // - // Because this is a temporary field during the migration, it has the highest - // field number without serialization overhead. This is purely aesthetic. - LegacyProfileResult profile_v1 = 15 [(tag.reason) = "profile_v1"]; - } - // next: 5 -} - -message GetExpiringProfileKeyCredentialRequest { - // The ACI of the account for which to get a profile key credential. - common.ServiceIdentifier account_identifier = 1 [(require.present) = true, (require.identityType) = IDENTITY_TYPE_ACI]; - // A zkgroup request for a profile key credential. - bytes credential_request = 2 [(require.nonEmpty) = true]; - // The type of credential being requested. - CredentialType credential_type = 3 [(require.specified) = true]; - // The profile version for which to generate a profile key credential. - bytes version = 4 [(require.exactlySize) = 32]; -} - -message GetExpiringProfileKeyCredentialAnonymousRequest { - // Contains the data necessary to request an expiring profile key credential. - GetExpiringProfileKeyCredentialRequest request = 1 [(require.present) = true]; - // The unidentified access key for the targeted account. - bytes unidentified_access_key = 2 [(require.exactlySize) = 16]; -} - -message GetExpiringProfileKeyCredentialResult { - // A zkgroup credential used by a client to prove that it has the profile key - // of a targeted account. - bytes profile_key_credential = 1; -} - -message GetExpiringProfileKeyCredentialAnonymousResponse { - oneof response { - GetExpiringProfileKeyCredentialResult result = 1; - errors.NotFound not_found = 2 [(tag.reason) = "not_found"]; - errors.FailedUnidentifiedAuthorization failed_unidentified_authorization = 3 [(tag.reason) = "failed_unidentified_authorization"]; - } -} - -enum CredentialType { - CREDENTIAL_TYPE_UNSPECIFIED = 0; - CREDENTIAL_TYPE_EXPIRING_PROFILE_KEY = 1; -} - -// avatar auth - -message GetAvatarCredentialsRequest { - bytes avatar_credentials_request = 1; -} - -message GetAvatarCredentialsResponse { - oneof response { - bytes avatar_credentials = 1; - - // the client must call Accounts.SetZkCredentialKey to call this method - errors.FailedPrecondition missing_zk_credential_key = 2 [(tag.reason) = "missing_zk_credential_key"]; - } -} - -message GetAvatarUploadFormRequest { - bytes avatar_credentials_presentation = 1; - - // The length of the attachment for the requested upload form. Uploads - // performed with this form will be limited to the provided length. - uint32 upload_length = 2 [(require.range) = {min: 1, max: 10485760 /* 10 MiB */}]; -} - -message GetAvatarUploadFormResponse { - oneof response { - common.S3UploadForm avatar_upload_form = 1; - - errors.FailedZkAuthentication invalid_credentials_presentation = 2 [(tag.reason) = "invalid_credentials_presentation"]; - } -} - -message ExtendAvatarTTLRequest { - bytes avatar_credentials_presentation = 1; -} - -message ExtendAvatarTTLResponse { - oneof response { - // The avatar that was extended. May be used as a check against state de-synchronization. - string path = 1; - errors.FailedZkAuthentication invalid_credentials_presentation = 2 [(tag.reason) = "invalid_credentials_presentation"]; - // the identity does not have an active avatar - errors.NotFound not_found = 3 [(tag.reason) = "no_active_avatar"]; - } -} - -message DeleteAvatarRequest { - bytes avatar_credentials_presentation = 1; -} - -message DeleteAvatarResponse { - oneof response { - google.protobuf.Empty success = 1; - errors.FailedZkAuthentication invalid_credentials_presentation = 2 [(tag.reason) = "invalid_credentials_presentation"]; - } -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/remote_configuration.proto b/pkg/signalmeow/protobuf/org/signal/chat/remote_configuration.proto deleted file mode 100644 index ffbfbcd..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/remote_configuration.proto +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 2026 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.remoteconfiguration; - -import "org/signal/chat/common.proto"; -import "org/signal/chat/require.proto"; -import "org/signal/chat/tag.proto"; - -// Provides remote configuration applicable to the authenticated user -service RemoteConfiguration { - option (require.auth) = AUTH_ONLY_AUTHENTICATED; - - // Fetches the configuration for the authenticated user. Returned - // values are based on the authenticated account and caller's client platform, - // which is derived from the "User-Agent" header. - rpc GetConfiguration(GetConfigurationRequest) returns (GetConfigurationResponse) {} - - // Returns detailed information for all configured badges, keyed by badge ID. - // - // Badge descriptions may contain localized strings. Callers should set their - // language preferences via an "Accept-Language" header on the request - // https://datatracker.ietf.org/doc/html/rfc3282#section-3 - // - // Callers may cache a badges result for up to 1 day before checking (via - // etag) if there are any new updates. - rpc GetBadges(GetBadgesRequest) returns (GetBadgesResponse) {} -} - -message GetConfigurationRequest { - // If present, the etag from a prior GetConfigurationResponse. If the - // provided etag matches the current configuration etag, the server may elide - // the configuration response. - bytes etag = 1; -} - -message GetConfigurationResponse { - oneof response { - // The full configuration and corresponding etag. - TaggedConfiguration tagged_configuration = 1; - - // The etag in the request matched the current configuration etag. - bool etag_matched = 2 [(tag.reason) = "etag_match"]; - } -} - -message Configuration { - // A map of namespaced configuration keys to their resolved values. All - // configuration values are represented as strings. boolean values are - // represented as the strings "true" or "false". - map configuration = 1; -} - -message TaggedConfiguration { - Configuration configuration = 1; - - // An entity tag for `configuration`. This may be supplied in a - // subsequent request to optimize bandwidth when the configuration has not - // changed. - bytes etag = 2; -} - -message GetBadgesRequest { - // If present, the etag from a prior GetBadgesResponse. If the provided etag - // matches the current badge etag, the server may elide the badge response. - bytes etag = 1; -} - -message GetBadgesResponse { - oneof response { - // The full set of badges and corresponding etag. - TaggedBadges tagged_badges = 1; - - // The etag in the request matched the current badge etag. - bool etag_matched = 2 [(tag.reason) = "etag_match"]; - } -} - -message Badges { - // A map of badge ID to the detailed information for that badge. - map badges = 1; -} - -message TaggedBadges { - Badges badges = 1; - - // An entity tag for `badges`. This may be supplied in a subsequent request - // to optimize bandwidth when the set of badges has not changed. - bytes etag = 2; -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/require.proto b/pkg/signalmeow/protobuf/org/signal/chat/require.proto deleted file mode 100644 index 868a3fe..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/require.proto +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright 2023 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.require; - -import "google/protobuf/descriptor.proto"; - -extend google.protobuf.FieldOptions { - /* - * Requires a field to have content of non-zero size/length. - * Applies to both `optional` and regular fields, i.e. if the field is not set - * or has a default value, it's considered to be empty. This does not apply - * to fields that are contained in a `oneof`. - * - * ``` - * import "org/signal/chat/require.proto"; - * - * message Data { - * string nonEmptyString = 1 [(require.nonEmpty) = true]; - * bytes nonEmptyBytes = 2 [(require.nonEmpty) = true]; - * optional string nonEmptyStringOptional = 3 [(require.nonEmpty) = true]; - * optional bytes nonEmptyBytesOptional = 4 [(require.nonEmpty) = true]; - * repeated string nonEmptyList = 5 [(require.nonEmpty) = true]; - * } - * ``` - * - * Applicable to fields of type `string`, `byte`, and `repeated` fields. - */ - optional bool nonEmpty = 70001; - - /* - * Requires a enum field to have value with an index greater than zero. - * Applies to both `optional` and regular fields, i.e. if the field is not set or has a default value, - * its index will be <= 0. - * - * ``` - * import "org/signal/chat/require.proto"; - * - * message Data { - * Color color = 1 [(require.specified) = true]; - * } - * - * enum Color { - * COLOR_UNSPECIFIED = 0; - * COLOR_RED = 1; - * COLOR_GREEN = 2; - * COLOR_BLUE = 3; - * } - * ``` - */ - optional bool specified = 70002; - - /* - * Requires a size/length of a field to be within certain boundaries. - * Applies to both `optional` and regular fields, i.e. if the field is not set - * or has a default value, its size considered to be zero. However, if the - * field is contained in a `oneof` and is not set, this annotation does not - * apply. - * - * ``` - * import "org/signal/chat/require.proto"; - * - * message Data { - * - * string name = 1 [(require.size) = {min: 3, max: 8}]; - * - * optional string address = 2 [(require.size) = {min: 3, max: 8}]; - * } - * ``` - * - * Applicable to fields of type `string`, `byte`, and `repeated` fields. - */ - optional SizeConstraint size = 70003; - - /* - * Requires a size/length of a field to be within certain boundaries. - * Applies to both `optional` and regular fields, i.e. if the field is not set - * or has a default value, its size considered to be zero. However, if the - * field is contained in a `oneof` and is not set, this annotation does not - * apply. - * - * ``` - * import "org/signal/chat/require.proto"; - * - * message Data { - * - * string zip = 1 [(require.exactlySize) = 5]; - * - * optional string exactlySizeVariants = 2 [(require.exactlySize) = 2, (require.exactlySize) = 4]; - * } - * ``` - * - * Applicable to fields of type `string`, `byte`, and `repeated` fields. - */ - repeated uint32 exactlySize = 70004; - - /* - * Requires a value of a string field to be a valid E164-normalized phone number. - * If the field is `optional`, this check allows a value to be not set. - * - * ``` - * import "org/signal/chat/require.proto"; - * - * message Data { - * string number = 1 [(require.e164)]; - * } - * ``` - */ - optional bool e164 = 70005; - - /* - * Requires an integer value to be within a certain range. The range boundaries are specified - * with the values of type `int32`, which should be enough for all practical purposes. - * - * If the field is `optional`, this check allows a value to be not set. - * - * ``` - * import "org/signal/chat/require.proto"; - * - * message Data { - * int32 byte = 1 [(require.range) = {min: -128, max: 127}]; - * uint32 unsignedByte = 2 [(require.range).max = 255]; - * } - * ``` - */ - optional ValueRangeConstraint range = 70006; - - /* - * Require a value of a message field to be present. - * - * Applies to both `optional` and regular fields (both of which have explicit - * presence for the message type anyways). This does not apply to fields that - * are contained in a `oneof`. - * - * ``` - * import "org/signal/chat/require.proto"; - * message Data { - * message MyMessage {} - * MyMessage myMessage = 1 [(require.present) = true]; - * } - *```` - */ - optional bool present = 70007; - - /* - * Requires a value of a string field to be a valid base64 URL string. The - * string may be padded or unpadded. If the field is `optional`, this check - * allows a value to be not set. - * - * ``` - * import "org/signal/chat/require.proto"; - * - * message Data { - * string myString = 1 [(require.base64url) = true]; - * } - * ``` - */ - optional bool base64url = 70008; - - /* - * Requires a common.ServiceIdentifier field to have its IdentityType - * be the given type (`aci` or `pni`). - * - * ``` - * import "org/signal/chat/require.proto"; - * import "org/signal/chat/common.proto"; - * - * message Data { - * common.ServiceIdentifier accountIdentifier = 1 [(require.identityType) = IDENTITY_TYPE_ACI]; - * } - * ``` - */ - optional IdentityType identityType = 70009; - - /* - * Applies element-wise constraints to the elements of a `repeated` field. - * Top-level `require.*` annotations on a `repeated` field constrain the - * collection itself (e.g. element count), `each` constrains the - * individual elements. - * - * ``` - * import "org/signal/chat/require.proto"; - * - * message Data { - * // 1-20 username hashes, each exactly 32 bytes - * repeated bytes username_hashes = 1 [ - * (require.size) = {min: 1, max: 20}, - * (require.each) = { exactlySize: 32 } - * ]; - * } - * ``` - * - * Applicable only to `repeated` fields. - */ - optional ElementConstraint each = 70010; - - // next 70011 -} - -message ElementConstraint { - optional bool nonEmpty = 1; - optional SizeConstraint size = 2; - repeated uint32 exactlySize = 3; - optional bool e164 = 4; - optional bool base64url = 5; - optional ValueRangeConstraint range = 6; - optional IdentityType identityType = 7; - optional bool specified = 8; -} - -message SizeConstraint { - optional uint32 min = 1; - optional uint32 max = 2; -} - -message ValueRangeConstraint { - optional int64 min = 1; - optional int64 max = 2; -} - -extend google.protobuf.ServiceOptions { - /* - * Indicates that all methods in a given service require a certain kind of authentication. - * - * ``` - * import "org/signal/chat/require.proto"; - * - * service AuthService { - * option (require.auth) = AUTH_ONLY_AUTHENTICATED; - * - * rpc AuthenticatedMethod (google.protobuf.Empty) returns (google.protobuf.Empty) {} - * } - * ``` - */ - optional Auth auth = 71001; -} - -enum Auth { - AUTH_UNSPECIFIED = 0; - AUTH_ONLY_AUTHENTICATED = 1; - AUTH_ONLY_ANONYMOUS = 2; -} - -// This is duplicated from common.proto because: -// -// 1. importing would be a circular dependency -// 2. the canonical declaration belongs there -enum IdentityType { - IDENTITY_TYPE_UNSPECIFIED = 0; - IDENTITY_TYPE_ACI = 1; - IDENTITY_TYPE_PNI = 2; -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/subscriptions.proto b/pkg/signalmeow/protobuf/org/signal/chat/subscriptions.proto deleted file mode 100644 index a820bac..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/subscriptions.proto +++ /dev/null @@ -1,441 +0,0 @@ -/* - * Copyright 2026 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.purchase; - -import "google/protobuf/empty.proto"; -import "org/signal/chat/common.proto"; -import "org/signal/chat/require.proto"; -import "org/signal/chat/errors.proto"; -import "org/signal/chat/tag.proto"; - -// Service for creating donation subscriptions -// -// Configuration for subscription levels can be found in ProductConfiguration. -service Subscriptions { - option (require.auth) = AUTH_ONLY_ANONYMOUS; - // Creates a subscriber record if it does not exist, otherwise refreshes its last access time. - - // Subscribers MUST periodically hit this endpoint to update the access time on the subscription record. Subscribers - // SHOULD attempt to make an update call approximately every 3 days. Not accessing this endpoint for an extended - // period of time will result in the subscription being canceled. - rpc UpdateSubscriber(UpdateSubscriberRequest) returns (UpdateSubscriberResponse) {} - - // Cancels any current subscription at the end of the current subscription period. - // - // Note: Apple IAP subscriptions do not support server-side cancellation, so this method should only be called after - // cancelling a subscription from storekit to keep server data up to date. - rpc DeleteSubscriber(DeleteSubscriberRequest) returns (DeleteSubscriberResponse) {} - - // Returns a client secret that can be used to set up a new payment method with the payment processor. - rpc CreatePaymentMethod(CreatePaymentMethodRequest) returns (CreatePaymentMethodResponse) {} - - // Returns a PayPal billing agreement approval URL and token that can be used to set up PayPal as a payment method. - rpc CreatePayPalPaymentMethod(CreatePayPalPaymentMethodRequest) returns (CreatePayPalPaymentMethodResponse) {} - - // Sets the default payment method for a subscriber. - rpc SetDefaultPaymentMethod(SetDefaultPaymentMethodRequest) returns (SetDefaultPaymentMethodResponse) {} - - // Sets the subscription level and currency for a subscriber. - rpc SetSubscriptionLevel(SetSubscriptionLevelRequest) returns (SetSubscriptionLevelResponse) {} - - // Returns information about the current subscription associated with the provided subscriberId if one exists. - // - // Although it uses [Stripe's values](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses), - // the status field in the response is generic, with [Braintree-specific values](https://developer.paypal.com/braintree/docs/guides/recurring-billing/overview#subscription-statuses) mapped - // to Stripe's. Since we don't support trials or unpaid subscriptions, the associated statuses will never be returned - // by the API. - rpc GetSubscriptionInformation(GetSubscriptionInformationRequest) returns (GetSubscriptionInformationResponse) {} - - // Create a receipt from a valid payment invoice that can be used to obtain an entitlement - // - // This request is repeatable so long as the ReceiptCredentialRequest remains the same. Clients should use the same - // ReceiptCredentialRequest value until they attempt to redeem the resulting ReceiptCredentialPresentation. After - // this point, the ReceiptCredentialRequest MUST NOT be reused or you may not be able to redeem a valid payment - // invoice. Clients SHOULD retry requests at this endpoint with the same ReceiptCredentialRequest value until - // receiving a response. After receiving a response, clients should then compute the ReceiptCredentialPresentation - // and redeem it at the receipt redemption endpoint. Once the first attempt is made there, the same - // ReceiptCredentialRequest MUST NOT be used again to request receipt credentials. - // - // Note that you may in fact redeem TWO or more invoices for the same ReceiptCredentialRequest while retrying this - // operation if a later invoice gets paid while you are retrying. However, the returned receipt is always for the - // latest invoice, so it will have the latest expiration possible and no entitlement time will be lost. The important - // thing is not to reuse ReceiptCredentialRequest after you have started attempting to redeem the associated - // ReceiptCredentialPresentation. Then you may produce a ReceiptCredentialPresentation for a later invoice that - // cannot be redeemed. - // - // Clients MUST validate that the generated receipt credential's level and expiration matches their expectations. - rpc GetReceiptCredentials(GetReceiptCredentialsRequest) returns (GetReceiptCredentialsResponse) {} - - // Set a token that represents an IAP subscription made with App Store/Google Play Billing. - // - // To set up an App Store subscription: - // 1. Create a subscriber with UpdateSubscriber (you must regularly refresh this subscriber) - // 2. [Create a subscription](https://developer.apple.com/documentation/storekit/in-app_purchase/) with the App Store - // directly via StoreKit and obtain a originalTransactionId. - // 3. Call this RPC with the originalTransactionId - // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the - // entitlement - // - // Play Billing: Set a purchaseToken that represents an IAP subscription made with Google Play Billing. - // - // To set up a subscription with Google Play Billing: - // 1. Create a subscriber with UpdateSubscriber (you must regularly refresh this subscriber) - // 2. [Create a subscription](https://developer.android.com/google/play/billing/integrate) with Google Play Billing - // directly and obtain a purchaseToken. Do not [acknowledge](https://developer.android.com/google/play/billing/integrate#subscriptions) - // the purchaseToken. - // 3. Call this RPC with the purchaseToken - // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the - // entitlement - // - // After calling this method, the payment is confirmed. Callers must durably store their subscriberId before calling - // this method to ensure their payment is tracked. - // - // Once a purchaseToken to is posted to a subscriberId, the same subscriberId must not be used with another payment - // method. A different playbilling purchaseToken can be posted to the same subscriberId, in this case the subscription - // associated with the old purchaseToken will be cancelled. - rpc SetIapSubscription(SetIapSubscriptionRequest) returns (SetIapSubscriptionResponse) {} - - // Returns a localized bank mandate for the specified bank transfer type - rpc GetBankMandate(GetBankMandateRequest) returns (GetBankMandateResponse) {} -} - -message UpdateSubscriberRequest { - bytes subscriber_id = 1 [(require.exactlySize) = 32]; - // A libsignal DonationPermit from rpc Donations.CreateDonationPermit. - // Not required if the subscriber already exists. - bytes donation_permit = 2; -} - -message UpdateSubscriberResponse { - oneof response { - google.protobuf.Empty success = 1; - // subscriberId authentication failure - errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 2 [(tag.reason) = "subscriber_id_mismatch"]; - // The donation permit was expired or already spent - errors.FailedZkAuthentication permit_rejected = 3 [(tag.reason) = "permit_rejected"]; - } -} - -message DeleteSubscriberRequest { - bytes subscriberId = 1 [(require.exactlySize) = 32]; -} - -message DeleteSubscriberResponse { - oneof response { - google.protobuf.Empty success = 1; - errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; - // The associated subscription is not a type that can be cancelled by the server. Cancel client-side, and then retry. - errors.FailedPrecondition cannot_cancel_subscription = 3 [(tag.reason) = "cannot_cancel_subscription"]; - } -} - -enum PaymentProvider { - PAYMENT_PROVIDER_UNKNOWN = 0; - PAYMENT_PROVIDER_STRIPE = 1; - PAYMENT_PROVIDER_BRAINTREE = 2; - PAYMENT_PROVIDER_GOOGLE_PLAY_BILLING = 3; - PAYMENT_PROVIDER_APPLE_APP_STORE = 4; -} - -enum PaymentMethod { - PAYMENT_METHOD_UNKNOWN = 0; - // A credit card or debit card, including those from Apple Pay and Google Pay - PAYMENT_METHOD_CARD = 1; - // A SEPA debit account - PAYMENT_METHOD_SEPA_DEBIT = 2; - // An iDEAL account - PAYMENT_METHOD_IDEAL = 3; - // A PayPal account - PAYMENT_METHOD_PAYPAL = 4; - PAYMENT_METHOD_GOOGLE_PLAY_BILLING = 5; - PAYMENT_METHOD_APPLE_APP_STORE = 6; -} - -enum SubscriptionStatus { - SUBSCRIPTION_STATUS_UNKNOWN = 0; - // The subscription is in good standing and the most recent payment was successful. - SUBSCRIPTION_STATUS_ACTIVE = 1; - // Payment failed when creating the subscription, or the subscription's start date is in the future. - SUBSCRIPTION_STATUS_INCOMPLETE = 2; - // Payment on the latest renewal failed but there are processor retries left, or payment wasn't attempted. - SUBSCRIPTION_STATUS_PAST_DUE = 3; - // The subscription has been canceled. - SUBSCRIPTION_STATUS_CANCELED = 4; - // The latest renewal hasn't been paid but the subscription remains in place. - SUBSCRIPTION_STATUS_UNPAID = 5; -} - -message CreatePaymentMethodRequest { - // Only PAYMENT_METHOD_CARD, PAYMENT_METHOD_SEPA_DEBIT, and PAYMENT_METHOD_IDEAL are supported; - // other values will result in an INVALID_ARGUMENT error. - bytes subscriber_id = 1 [(require.exactlySize) = 32]; - PaymentMethod payment_method = 2 [(require.specified) = true]; - // a libsignal DonationPermit from rpc Donations.CreateDonationPermit - bytes donation_permit = 3 [(require.nonEmpty) = true]; -} - -message CreatePaymentMethodResponse { - message CreatePaymentMethodResult { - string clientSecret = 1; - PaymentProvider paymentProvider = 2; - } - - oneof response { - CreatePaymentMethodResult result = 1; - errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; - // subscriberId authentication failure - errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; - // New payment processor does not match existing processor associated with the subscription - errors.FailedPrecondition subscription_processor_conflict = 4 [(tag.reason) = "subscription_processor_conflict"]; - // The donation permit was expired or already spent - errors.FailedZkAuthentication permit_rejected = 5 [(tag.reason) = "permit_rejected"]; - } -} - -message CreatePayPalPaymentMethodRequest { - bytes subscriberId = 1 [(require.exactlySize) = 32]; - // a callback URL (e.g. an in-client URL handler) for when the user approved the payment - string returnUrl = 2; - // a callback URL (e.g. an in-client URL handler) for when the user did not approve the payment - string cancelUrl = 3; -} - -message CreatePayPalPaymentMethodResponse { - message CreatePayPalPaymentMethodResult { - // a URL to open where the user may approve the payment - string approvalUrl = 1; - // an opaque PayPal payment identifier to use with SetDefaultPaymentMethodRequest - string token = 2; - } - - oneof response { - CreatePayPalPaymentMethodResult result = 1; - errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; - // subscriberId authentication failure - errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; - // New payment processor does not match existing processor associated with the subscription - errors.FailedPrecondition subscription_processor_conflict = 4 [(tag.reason) = "subscription_processor_conflict"]; - } -} - -message SetDefaultPaymentMethodRequest { - message StripePaymentMethod { - string paymentMethodToken = 1 [(require.nonEmpty) = true]; - } - message BraintreePaymentMethod { - string paymentMethodToken = 1 [(require.nonEmpty) = true]; - } - message SepaPaymentMethod { - string setupIntentId = 1 [(require.nonEmpty) = true]; - } - - bytes subscriberId = 1 [(require.exactlySize) = 32]; - oneof request { - StripePaymentMethod stripe = 2; - BraintreePaymentMethod braintree = 3; - SepaPaymentMethod sepa = 4; - } -} - -message SetDefaultPaymentMethodResponse { - oneof response { - google.protobuf.Empty success = 1; - errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; - // subscriberId authentication failure - errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; - errors.FailedPrecondition payment_method_not_set_up = 4 [(tag.reason) = "payment_method_not_set_up"]; - // Payment processor does not match existing processor associated with the subscription - errors.FailedPrecondition subscription_processor_conflict = 5 [(tag.reason) = "subscription_processor_conflict"]; - } -} - -message SetSubscriptionLevelRequest { - bytes subscriberId = 1 [(require.exactlySize) = 32]; - uint64 level = 2; - string currency = 3; - string idempotencyKey = 4; -} - -// Information about a charge failure. - -// Meaningfully interpreting chargeFailure response fields requires inspecting the processor field first. -// -// For Stripe, code will be one of the [codes defined here](https://stripe.com/docs/api/charges/object#charge_object-failure_code), -// while message [may contain a further textual description](https://stripe.com/docs/api/charges/object#charge_object-failure_message). -// The outcome fields are optional, but present values will directly map to Stripe [response properties](https://stripe.com/docs/api/charges/object#charge_object-outcome-network_status) -// -// For Braintree, the outcome fields will be null. The code and message will contain one of -// - a processor decline code (as a string) in code, and associated text in message, as defined this [table](https://developer.paypal.com/braintree/docs/reference/general/processor-responses/authorization-responses) -// - `gateway` in code, with a [reason](https://developer.paypal.com/braintree/articles/control-panel/transactions/gateway-rejections) in message -// - `code` = "unknown", message = "unknown" -// -// IAP payment processors will never include charge failure information, and detailed order information should be -// retrieved from the payment processor directly -message ChargeFailure { - PaymentProvider processor = 1; - // See [Stripe failure codes](https://stripe.com/docs/api/charges/object#charge_object-failure_code) or - // [Braintree decline codes](https://developer.paypal.com/braintree/docs/reference/general/processor-responses/authorization-responses#decline-codes) - // depending on which processor was used - string code = 2; - // See [Stripe failure codes](https://stripe.com/docs/api/charges/object#charge_object-failure_code) or - // [Braintree decline codes](https://developer.paypal.com/braintree/docs/reference/general/processor-responses/authorization-responses#decline-codes) - // depending on which processor was used - string message = 3; - // See [Outcome Network Status](https://stripe.com/docs/api/charges/object#charge_object-outcome-network_status) - optional string outcome_network_status = 4; - // See [Outcome Reason](https://stripe.com/docs/api/charges/object#charge_object-outcome-reason) - optional string outcome_reason = 5; - // See [Outcome Type](https://stripe.com/docs/api/charges/object#charge_object-outcome-type) - optional string outcome_type = 6; -} - -message PaymentRequired { - optional ChargeFailure charge_failure = 1; -} - -message SetSubscriptionLevelResponse { - message SetSubscriptionLevelResult { - uint64 level = 1; - } - - oneof response { - SetSubscriptionLevelResult success = 1; - errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; - // subscriberId authentication failure - errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; - // New payment processor does not match existing processor associated with the subscription - errors.FailedPrecondition subscription_processor_conflict = 4 [(tag.reason) = "subscription_processor_conflict"]; - errors.FailedPrecondition payment_method_not_set_up = 5 [(tag.reason) = "payment_method_not_set_up"]; - // The payment processor does not support this operation - errors.FailedPrecondition unsupported_operation = 6 [(tag.reason) = "unsupported_operation"]; - // The requested level was invalid - errors.FailedPrecondition unsupported_level = 7 [(tag.reason) = "unsupported_level"]; - // The requested currency was invalid - errors.FailedPrecondition unsupported_currency = 8 [(tag.reason) = "unsupported_currency"]; - // The card could not be charged - errors.FailedPrecondition payment_requires_action = 9 [(tag.reason) = "payment_requires_action"]; - // Cannot transition from existing level to the requested level - errors.FailedPrecondition invalid_level_transition = 10 [(tag.reason) = "invalid_level_transition"]; - // The idempotency key was invalid or re-used with a modified request - errors.FailedPrecondition invalid_idempotency_key = 11 [(tag.reason) = "invalid_idempotency_key"]; - // The payment failed; see charge failure details - ChargeFailure charge_failure = 12 [(tag.reason) = "charge_failure"]; - } -} - -message SetIapSubscriptionRequest { - message AppStorePurchase { - string original_transaction_id = 1 [(require.nonEmpty) = true]; - } - message PlayBillingPurchase { - string purchase_token = 1 [(require.nonEmpty) = true]; - } - - bytes subscriberId = 1 [(require.exactlySize) = 32]; - oneof request { - AppStorePurchase app_store = 2; - PlayBillingPurchase play_billing = 3; - } -} - -message SetIapSubscriptionResponse { - message SetIapSubscriptionResult { - uint64 level = 1; - } - - oneof response { - SetIapSubscriptionResult success = 1; - errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; - // subscriberId authentication failure - errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; - // New payment processor does not match existing processor associated with the subscription - errors.FailedPrecondition subscription_processor_conflict = 4 [(tag.reason) = "subscription_processor_conflict"]; - errors.FailedPrecondition payment_required = 5 [(tag.reason) = "payment_required"]; - errors.FailedPrecondition invalid_transaction = 6 [(tag.reason) = "invalid_transaction"]; - } -} - -message GetReceiptCredentialsRequest { - bytes subscriberId = 1 [(require.exactlySize) = 32]; - bytes receiptCredentialRequest = 2 [(require.exactlySize) = 97]; -} - -message GetReceiptCredentialsResponse { - message GetReceiptCredentialsResult { - bytes receiptCredentialResponse = 1; - } - - oneof response { - GetReceiptCredentialsResult success = 1; - errors.NotFound subscriber_not_found = 2 [(tag.reason) = "subscriber_not_found"]; - // subscriberId authentication failure - errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 3 [(tag.reason) = "subscriber_id_mismatch"]; - // No invoice has been issued for this subscription OR invoice is in 'draft' or 'open' state - errors.FailedPrecondition no_paid_invoice = 4 [(tag.reason) = "no_paid_invoice"]; - // Invoice is in any state other than 'draft', 'open', or 'paid'; Charge failure details may be present - PaymentRequired payment_required = 5 [(tag.reason) = "payment_required"]; - // Latest paid receipt on subscription was already redeemed for a receipt credential but with a different GetReceiptCredentialRequest - errors.FailedPrecondition already_redeemed = 6 [(tag.reason) = "already_redeemed"]; - } -} - -message GetSubscriptionInformationRequest { - bytes subscriberId = 1 [(require.exactlySize) = 32]; -} - -message GetSubscriptionInformationResponse { - message Subscription { - // The subscription level - uint64 level = 1; - // If present, UNIX Epoch Timestamp in seconds, can be used to calculate next billing date. - optional uint64 billing_cycle_anchor = 2; - // UNIX Epoch Timestamp in seconds, when the current subscription period ends - uint64 end_of_current_period = 3; - // Whether there is a currently active subscription - bool active = 4; - // If true, an active subscription will not auto-renew at the end of the current period - bool cancel_at_period_end = 5; - // A three-letter ISO 4217 currency code for currency used in the subscription - string currency = 6; - // The amount paid for the subscription in the currency's smallest unit - uint64 amount = 7; - // The subscription's status, mapped to Stripe's statuses. trialing will never be returned - SubscriptionStatus status = 8; - // The payment provider associated with the subscription - PaymentProvider processor = 9; - // The payment method associated with the subscription - PaymentMethod payment_method = 10; - // Whether the latest charge for the subscription is in a non-terminal state - bool payment_processing = 11; - // if present, contains information that may be interpreted to help the user fix a failure - optional ChargeFailure charge_failure = 12; - } - - oneof response { - Subscription success = 1; - google.protobuf.Empty no_subscription = 2; - errors.NotFound subscriber_not_found = 3 [(tag.reason) = "subscriber_not_found"]; - // subscriberId authentication failure - errors.FailedUnidentifiedAuthorization subscriber_id_mismatch = 4 [(tag.reason) = "subscriber_id_mismatch"]; - } -} - -enum BankTransferType { - BANK_TRANSFER_TYPE_UNKNOWN = 0; - BANK_TRANSFER_TYPE_SEPA_DEBIT = 1; -} - -message GetBankMandateRequest { - BankTransferType bank_transfer_type = 1 [(require.specified) = true]; -} - -message GetBankMandateResponse { - string mandate = 1; -} diff --git a/pkg/signalmeow/protobuf/org/signal/chat/tag.proto b/pkg/signalmeow/protobuf/org/signal/chat/tag.proto deleted file mode 100644 index 507a805..0000000 --- a/pkg/signalmeow/protobuf/org/signal/chat/tag.proto +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2025 Signal Messenger, LLC - * SPDX-License-Identifier: AGPL-3.0-only - */ - -syntax = "proto3"; - -option java_multiple_files = true; - -package org.signal.chat.tag; - -import "google/protobuf/descriptor.proto"; - -extend google.protobuf.FieldOptions { - // Indicate that a message which includes this field (directly or indirectly) - // was generated for a particular reason. - // - // ``` - // import "org/signal/chat/tag.proto" - // - // message LookupThingResponse { - // oneof response { - // string thing = 1; - // Error not_found = 2 [(tag.reason) = "not_found"]; - // Error forbidden = 3 [(tag.reason) = "forbidden"]; - // } - // } - // ``` - // - // Metrics middleware may then inspect `LookupThingResponse` and tag responses - // with the provided reason. This is useful when multiple outcomes are - // potentially represented with a status = "OK" RPC response. - // - // Valid messages should only have a single reason set. If a message has - // multiple fields present that have a reason option set, no guarantees are - // made about the reason that is selected. - optional string reason = 71000; -} diff --git a/pkg/signalmeow/protobuf/rpc/account/account.pb.go b/pkg/signalmeow/protobuf/rpc/account/account.pb.go deleted file mode 100644 index 9b9e4ae..0000000 --- a/pkg/signalmeow/protobuf/rpc/account/account.pb.go +++ /dev/null @@ -1,4186 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/account.proto - -package account - -import ( - common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" - errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" - messages "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/messages" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetAccountIdentityRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetAccountIdentityRequest) Reset() { - *x = GetAccountIdentityRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetAccountIdentityRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAccountIdentityRequest) ProtoMessage() {} - -func (x *GetAccountIdentityRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAccountIdentityRequest.ProtoReflect.Descriptor instead. -func (*GetAccountIdentityRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{0} -} - -type GetAccountIdentityResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The identifiers for the authenticated account. - AccountIdentifiers *common.AccountIdentifiers `protobuf:"bytes,1,opt,name=account_identifiers,json=accountIdentifiers,proto3" json:"account_identifiers,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetAccountIdentityResponse) Reset() { - *x = GetAccountIdentityResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetAccountIdentityResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAccountIdentityResponse) ProtoMessage() {} - -func (x *GetAccountIdentityResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAccountIdentityResponse.ProtoReflect.Descriptor instead. -func (*GetAccountIdentityResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{1} -} - -func (x *GetAccountIdentityResponse) GetAccountIdentifiers() *common.AccountIdentifiers { - if x != nil { - return x.AccountIdentifiers - } - return nil -} - -type GetEntitlementsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetEntitlementsRequest) Reset() { - *x = GetEntitlementsRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetEntitlementsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetEntitlementsRequest) ProtoMessage() {} - -func (x *GetEntitlementsRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetEntitlementsRequest.ProtoReflect.Descriptor instead. -func (*GetEntitlementsRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{2} -} - -type GetEntitlementsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Active badges added via Donations.redeemReceipt - Badges []*GetEntitlementsResponse_BadgeEntitlement `protobuf:"bytes,1,rep,name=badges,proto3" json:"badges,omitempty"` - // If present, the backup level set via Backups.redeemReceipt - Backup *GetEntitlementsResponse_BackupEntitlement `protobuf:"bytes,2,opt,name=backup,proto3" json:"backup,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetEntitlementsResponse) Reset() { - *x = GetEntitlementsResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetEntitlementsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetEntitlementsResponse) ProtoMessage() {} - -func (x *GetEntitlementsResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetEntitlementsResponse.ProtoReflect.Descriptor instead. -func (*GetEntitlementsResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{3} -} - -func (x *GetEntitlementsResponse) GetBadges() []*GetEntitlementsResponse_BadgeEntitlement { - if x != nil { - return x.Badges - } - return nil -} - -func (x *GetEntitlementsResponse) GetBackup() *GetEntitlementsResponse_BackupEntitlement { - if x != nil { - return x.Backup - } - return nil -} - -type DeleteAccountRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteAccountRequest) Reset() { - *x = DeleteAccountRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteAccountRequest) ProtoMessage() {} - -func (x *DeleteAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteAccountRequest.ProtoReflect.Descriptor instead. -func (*DeleteAccountRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{4} -} - -type DeleteAccountResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteAccountResponse) Reset() { - *x = DeleteAccountResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteAccountResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteAccountResponse) ProtoMessage() {} - -func (x *DeleteAccountResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteAccountResponse.ProtoReflect.Descriptor instead. -func (*DeleteAccountResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{5} -} - -type SetRegistrationLockRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The new registration lock secret for the authenticated account. - RegistrationLock []byte `protobuf:"bytes,1,opt,name=registration_lock,json=registrationLock,proto3" json:"registration_lock,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetRegistrationLockRequest) Reset() { - *x = SetRegistrationLockRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetRegistrationLockRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetRegistrationLockRequest) ProtoMessage() {} - -func (x *SetRegistrationLockRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetRegistrationLockRequest.ProtoReflect.Descriptor instead. -func (*SetRegistrationLockRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{6} -} - -func (x *SetRegistrationLockRequest) GetRegistrationLock() []byte { - if x != nil { - return x.RegistrationLock - } - return nil -} - -type SetRegistrationLockResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetRegistrationLockResponse) Reset() { - *x = SetRegistrationLockResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetRegistrationLockResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetRegistrationLockResponse) ProtoMessage() {} - -func (x *SetRegistrationLockResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetRegistrationLockResponse.ProtoReflect.Descriptor instead. -func (*SetRegistrationLockResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{7} -} - -type ClearRegistrationLockRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClearRegistrationLockRequest) Reset() { - *x = ClearRegistrationLockRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClearRegistrationLockRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClearRegistrationLockRequest) ProtoMessage() {} - -func (x *ClearRegistrationLockRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClearRegistrationLockRequest.ProtoReflect.Descriptor instead. -func (*ClearRegistrationLockRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{8} -} - -type ClearRegistrationLockResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClearRegistrationLockResponse) Reset() { - *x = ClearRegistrationLockResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClearRegistrationLockResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClearRegistrationLockResponse) ProtoMessage() {} - -func (x *ClearRegistrationLockResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClearRegistrationLockResponse.ProtoReflect.Descriptor instead. -func (*ClearRegistrationLockResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{9} -} - -type ReserveUsernameHashRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A prioritized list of username hashes to attempt to reserve. - UsernameHashes [][]byte `protobuf:"bytes,1,rep,name=username_hashes,json=usernameHashes,proto3" json:"username_hashes,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ReserveUsernameHashRequest) Reset() { - *x = ReserveUsernameHashRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ReserveUsernameHashRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReserveUsernameHashRequest) ProtoMessage() {} - -func (x *ReserveUsernameHashRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ReserveUsernameHashRequest.ProtoReflect.Descriptor instead. -func (*ReserveUsernameHashRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{10} -} - -func (x *ReserveUsernameHashRequest) GetUsernameHashes() [][]byte { - if x != nil { - return x.UsernameHashes - } - return nil -} - -type UsernameNotAvailable struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UsernameNotAvailable) Reset() { - *x = UsernameNotAvailable{} - mi := &file_org_signal_chat_account_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UsernameNotAvailable) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UsernameNotAvailable) ProtoMessage() {} - -func (x *UsernameNotAvailable) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UsernameNotAvailable.ProtoReflect.Descriptor instead. -func (*UsernameNotAvailable) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{11} -} - -type ReserveUsernameHashResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *ReserveUsernameHashResponse_UsernameHash - // *ReserveUsernameHashResponse_UsernameNotAvailable - Response isReserveUsernameHashResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ReserveUsernameHashResponse) Reset() { - *x = ReserveUsernameHashResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ReserveUsernameHashResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReserveUsernameHashResponse) ProtoMessage() {} - -func (x *ReserveUsernameHashResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ReserveUsernameHashResponse.ProtoReflect.Descriptor instead. -func (*ReserveUsernameHashResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{12} -} - -func (x *ReserveUsernameHashResponse) GetResponse() isReserveUsernameHashResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *ReserveUsernameHashResponse) GetUsernameHash() []byte { - if x != nil { - if x, ok := x.Response.(*ReserveUsernameHashResponse_UsernameHash); ok { - return x.UsernameHash - } - } - return nil -} - -func (x *ReserveUsernameHashResponse) GetUsernameNotAvailable() *UsernameNotAvailable { - if x != nil { - if x, ok := x.Response.(*ReserveUsernameHashResponse_UsernameNotAvailable); ok { - return x.UsernameNotAvailable - } - } - return nil -} - -type isReserveUsernameHashResponse_Response interface { - isReserveUsernameHashResponse_Response() -} - -type ReserveUsernameHashResponse_UsernameHash struct { - // The first username hash that was available (and actually reserved). - UsernameHash []byte `protobuf:"bytes,1,opt,name=username_hash,json=usernameHash,proto3,oneof"` -} - -type ReserveUsernameHashResponse_UsernameNotAvailable struct { - // Indicates that, of all of the candidate hashes provided, none were - // available. Callers may generate a new set of hashes and and retry. - UsernameNotAvailable *UsernameNotAvailable `protobuf:"bytes,2,opt,name=username_not_available,json=usernameNotAvailable,proto3,oneof"` -} - -func (*ReserveUsernameHashResponse_UsernameHash) isReserveUsernameHashResponse_Response() {} - -func (*ReserveUsernameHashResponse_UsernameNotAvailable) isReserveUsernameHashResponse_Response() {} - -type ConfirmUsernameHashRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The username hash to claim for the authenticated account. - UsernameHash []byte `protobuf:"bytes,1,opt,name=username_hash,json=usernameHash,proto3" json:"username_hash,omitempty"` - // A zero-knowledge proof that the given username hash was generated by the - // Signal username algorithm. - ZkProof []byte `protobuf:"bytes,2,opt,name=zk_proof,json=zkProof,proto3" json:"zk_proof,omitempty"` - // The ciphertext of the chosen username for use in public-facing contexts - // (e.g. links and QR codes). - UsernameCiphertext []byte `protobuf:"bytes,3,opt,name=username_ciphertext,json=usernameCiphertext,proto3" json:"username_ciphertext,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ConfirmUsernameHashRequest) Reset() { - *x = ConfirmUsernameHashRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfirmUsernameHashRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmUsernameHashRequest) ProtoMessage() {} - -func (x *ConfirmUsernameHashRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmUsernameHashRequest.ProtoReflect.Descriptor instead. -func (*ConfirmUsernameHashRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{13} -} - -func (x *ConfirmUsernameHashRequest) GetUsernameHash() []byte { - if x != nil { - return x.UsernameHash - } - return nil -} - -func (x *ConfirmUsernameHashRequest) GetZkProof() []byte { - if x != nil { - return x.ZkProof - } - return nil -} - -func (x *ConfirmUsernameHashRequest) GetUsernameCiphertext() []byte { - if x != nil { - return x.UsernameCiphertext - } - return nil -} - -type ConfirmUsernameHashResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *ConfirmUsernameHashResponse_ConfirmedUsernameHash_ - // *ConfirmUsernameHashResponse_ReservationNotFound - // *ConfirmUsernameHashResponse_UsernameNotAvailable - Response isConfirmUsernameHashResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ConfirmUsernameHashResponse) Reset() { - *x = ConfirmUsernameHashResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfirmUsernameHashResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmUsernameHashResponse) ProtoMessage() {} - -func (x *ConfirmUsernameHashResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmUsernameHashResponse.ProtoReflect.Descriptor instead. -func (*ConfirmUsernameHashResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{14} -} - -func (x *ConfirmUsernameHashResponse) GetResponse() isConfirmUsernameHashResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *ConfirmUsernameHashResponse) GetConfirmedUsernameHash() *ConfirmUsernameHashResponse_ConfirmedUsernameHash { - if x != nil { - if x, ok := x.Response.(*ConfirmUsernameHashResponse_ConfirmedUsernameHash_); ok { - return x.ConfirmedUsernameHash - } - } - return nil -} - -func (x *ConfirmUsernameHashResponse) GetReservationNotFound() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*ConfirmUsernameHashResponse_ReservationNotFound); ok { - return x.ReservationNotFound - } - } - return nil -} - -func (x *ConfirmUsernameHashResponse) GetUsernameNotAvailable() *UsernameNotAvailable { - if x != nil { - if x, ok := x.Response.(*ConfirmUsernameHashResponse_UsernameNotAvailable); ok { - return x.UsernameNotAvailable - } - } - return nil -} - -type isConfirmUsernameHashResponse_Response interface { - isConfirmUsernameHashResponse_Response() -} - -type ConfirmUsernameHashResponse_ConfirmedUsernameHash_ struct { - // The details of the successfully confirmed username. - ConfirmedUsernameHash *ConfirmUsernameHashResponse_ConfirmedUsernameHash `protobuf:"bytes,1,opt,name=confirmed_username_hash,json=confirmedUsernameHash,proto3,oneof"` -} - -type ConfirmUsernameHashResponse_ReservationNotFound struct { - // The provided hash was not reserved for the account. - ReservationNotFound *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=reservation_not_found,json=reservationNotFound,proto3,oneof"` -} - -type ConfirmUsernameHashResponse_UsernameNotAvailable struct { - // The reservation has lapsed and the requested username has been claimed by - // another caller. - UsernameNotAvailable *UsernameNotAvailable `protobuf:"bytes,3,opt,name=username_not_available,json=usernameNotAvailable,proto3,oneof"` -} - -func (*ConfirmUsernameHashResponse_ConfirmedUsernameHash_) isConfirmUsernameHashResponse_Response() {} - -func (*ConfirmUsernameHashResponse_ReservationNotFound) isConfirmUsernameHashResponse_Response() {} - -func (*ConfirmUsernameHashResponse_UsernameNotAvailable) isConfirmUsernameHashResponse_Response() {} - -type DeleteUsernameHashRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteUsernameHashRequest) Reset() { - *x = DeleteUsernameHashRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteUsernameHashRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteUsernameHashRequest) ProtoMessage() {} - -func (x *DeleteUsernameHashRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[15] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteUsernameHashRequest.ProtoReflect.Descriptor instead. -func (*DeleteUsernameHashRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{15} -} - -type DeleteUsernameHashResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteUsernameHashResponse) Reset() { - *x = DeleteUsernameHashResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteUsernameHashResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteUsernameHashResponse) ProtoMessage() {} - -func (x *DeleteUsernameHashResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[16] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteUsernameHashResponse.ProtoReflect.Descriptor instead. -func (*DeleteUsernameHashResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{16} -} - -type SetUsernameLinkRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The username ciphertext for which to generate a new link handle. - UsernameCiphertext []byte `protobuf:"bytes,1,opt,name=username_ciphertext,json=usernameCiphertext,proto3" json:"username_ciphertext,omitempty"` - // If true and the account already had an encrypted username stored, the - // existing link handle will be reused. Otherwise a new link handle will be - // created. - KeepLinkHandle bool `protobuf:"varint,2,opt,name=keep_link_handle,json=keepLinkHandle,proto3" json:"keep_link_handle,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetUsernameLinkRequest) Reset() { - *x = SetUsernameLinkRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetUsernameLinkRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetUsernameLinkRequest) ProtoMessage() {} - -func (x *SetUsernameLinkRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[17] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetUsernameLinkRequest.ProtoReflect.Descriptor instead. -func (*SetUsernameLinkRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{17} -} - -func (x *SetUsernameLinkRequest) GetUsernameCiphertext() []byte { - if x != nil { - return x.UsernameCiphertext - } - return nil -} - -func (x *SetUsernameLinkRequest) GetKeepLinkHandle() bool { - if x != nil { - return x.KeepLinkHandle - } - return false -} - -type SetUsernameLinkResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *SetUsernameLinkResponse_UsernameLinkHandle - // *SetUsernameLinkResponse_NoUsernameSet - Response isSetUsernameLinkResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetUsernameLinkResponse) Reset() { - *x = SetUsernameLinkResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetUsernameLinkResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetUsernameLinkResponse) ProtoMessage() {} - -func (x *SetUsernameLinkResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[18] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetUsernameLinkResponse.ProtoReflect.Descriptor instead. -func (*SetUsernameLinkResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{18} -} - -func (x *SetUsernameLinkResponse) GetResponse() isSetUsernameLinkResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *SetUsernameLinkResponse) GetUsernameLinkHandle() []byte { - if x != nil { - if x, ok := x.Response.(*SetUsernameLinkResponse_UsernameLinkHandle); ok { - return x.UsernameLinkHandle - } - } - return nil -} - -func (x *SetUsernameLinkResponse) GetNoUsernameSet() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetUsernameLinkResponse_NoUsernameSet); ok { - return x.NoUsernameSet - } - } - return nil -} - -type isSetUsernameLinkResponse_Response interface { - isSetUsernameLinkResponse_Response() -} - -type SetUsernameLinkResponse_UsernameLinkHandle struct { - // A new link handle for the given username ciphertext. - UsernameLinkHandle []byte `protobuf:"bytes,1,opt,name=username_link_handle,json=usernameLinkHandle,proto3,oneof"` -} - -type SetUsernameLinkResponse_NoUsernameSet struct { - // The authenticated account did not have a username set. - NoUsernameSet *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=no_username_set,json=noUsernameSet,proto3,oneof"` -} - -func (*SetUsernameLinkResponse_UsernameLinkHandle) isSetUsernameLinkResponse_Response() {} - -func (*SetUsernameLinkResponse_NoUsernameSet) isSetUsernameLinkResponse_Response() {} - -type DeleteUsernameLinkRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteUsernameLinkRequest) Reset() { - *x = DeleteUsernameLinkRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteUsernameLinkRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteUsernameLinkRequest) ProtoMessage() {} - -func (x *DeleteUsernameLinkRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[19] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteUsernameLinkRequest.ProtoReflect.Descriptor instead. -func (*DeleteUsernameLinkRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{19} -} - -type DeleteUsernameLinkResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteUsernameLinkResponse) Reset() { - *x = DeleteUsernameLinkResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteUsernameLinkResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteUsernameLinkResponse) ProtoMessage() {} - -func (x *DeleteUsernameLinkResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[20] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteUsernameLinkResponse.ProtoReflect.Descriptor instead. -func (*DeleteUsernameLinkResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{20} -} - -type ConfigureUnidentifiedAccessRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Configuration: - // - // *ConfigureUnidentifiedAccessRequest_UnidentifiedAccessKey - // *ConfigureUnidentifiedAccessRequest_AllowUnrestrictedUnidentifiedAccess - Configuration isConfigureUnidentifiedAccessRequest_Configuration `protobuf_oneof:"configuration"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ConfigureUnidentifiedAccessRequest) Reset() { - *x = ConfigureUnidentifiedAccessRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfigureUnidentifiedAccessRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfigureUnidentifiedAccessRequest) ProtoMessage() {} - -func (x *ConfigureUnidentifiedAccessRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[21] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfigureUnidentifiedAccessRequest.ProtoReflect.Descriptor instead. -func (*ConfigureUnidentifiedAccessRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{21} -} - -func (x *ConfigureUnidentifiedAccessRequest) GetConfiguration() isConfigureUnidentifiedAccessRequest_Configuration { - if x != nil { - return x.Configuration - } - return nil -} - -func (x *ConfigureUnidentifiedAccessRequest) GetUnidentifiedAccessKey() []byte { - if x != nil { - if x, ok := x.Configuration.(*ConfigureUnidentifiedAccessRequest_UnidentifiedAccessKey); ok { - return x.UnidentifiedAccessKey - } - } - return nil -} - -func (x *ConfigureUnidentifiedAccessRequest) GetAllowUnrestrictedUnidentifiedAccess() *emptypb.Empty { - if x != nil { - if x, ok := x.Configuration.(*ConfigureUnidentifiedAccessRequest_AllowUnrestrictedUnidentifiedAccess); ok { - return x.AllowUnrestrictedUnidentifiedAccess - } - } - return nil -} - -type isConfigureUnidentifiedAccessRequest_Configuration interface { - isConfigureUnidentifiedAccessRequest_Configuration() -} - -type ConfigureUnidentifiedAccessRequest_UnidentifiedAccessKey struct { - // The key that other users must provide to interact with this account - // anonymously (i.e. to retrieve keys or profiles or to send messages) unless - // unrestricted unidentified access is permitted. Must be present if - // unrestricted unidentified access is not allowed. - UnidentifiedAccessKey []byte `protobuf:"bytes,1,opt,name=unidentified_access_key,json=unidentifiedAccessKey,proto3,oneof"` -} - -type ConfigureUnidentifiedAccessRequest_AllowUnrestrictedUnidentifiedAccess struct { - // If set, any user may interact with this account anonymously without - // providing an unidentified access key. Otherwise, users must provide the - // given unidentified access key to interact with this account anonymously. - // Setting unrestricted unidentified access will clear any existing - // unidentified_access_key - AllowUnrestrictedUnidentifiedAccess *emptypb.Empty `protobuf:"bytes,2,opt,name=allow_unrestricted_unidentified_access,json=allowUnrestrictedUnidentifiedAccess,proto3,oneof"` -} - -func (*ConfigureUnidentifiedAccessRequest_UnidentifiedAccessKey) isConfigureUnidentifiedAccessRequest_Configuration() { -} - -func (*ConfigureUnidentifiedAccessRequest_AllowUnrestrictedUnidentifiedAccess) isConfigureUnidentifiedAccessRequest_Configuration() { -} - -type ConfigureUnidentifiedAccessResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ConfigureUnidentifiedAccessResponse) Reset() { - *x = ConfigureUnidentifiedAccessResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfigureUnidentifiedAccessResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfigureUnidentifiedAccessResponse) ProtoMessage() {} - -func (x *ConfigureUnidentifiedAccessResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[22] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfigureUnidentifiedAccessResponse.ProtoReflect.Descriptor instead. -func (*ConfigureUnidentifiedAccessResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{22} -} - -type SetDiscoverableByPhoneNumberRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // If true, the authenticated account may be discovered by phone number via - // the Contact Discovery Service (CDS). Otherwise, other users must discover - // this account by other means (i.e. by username). - DiscoverableByPhoneNumber bool `protobuf:"varint,1,opt,name=discoverable_by_phone_number,json=discoverableByPhoneNumber,proto3" json:"discoverable_by_phone_number,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetDiscoverableByPhoneNumberRequest) Reset() { - *x = SetDiscoverableByPhoneNumberRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetDiscoverableByPhoneNumberRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetDiscoverableByPhoneNumberRequest) ProtoMessage() {} - -func (x *SetDiscoverableByPhoneNumberRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[23] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetDiscoverableByPhoneNumberRequest.ProtoReflect.Descriptor instead. -func (*SetDiscoverableByPhoneNumberRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{23} -} - -func (x *SetDiscoverableByPhoneNumberRequest) GetDiscoverableByPhoneNumber() bool { - if x != nil { - return x.DiscoverableByPhoneNumber - } - return false -} - -type SetDiscoverableByPhoneNumberResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetDiscoverableByPhoneNumberResponse) Reset() { - *x = SetDiscoverableByPhoneNumberResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetDiscoverableByPhoneNumberResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetDiscoverableByPhoneNumberResponse) ProtoMessage() {} - -func (x *SetDiscoverableByPhoneNumberResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[24] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetDiscoverableByPhoneNumberResponse.ProtoReflect.Descriptor instead. -func (*SetDiscoverableByPhoneNumberResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{24} -} - -type SetRegistrationRecoveryPasswordRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The new registration recovery password for the authenticated account. - RegistrationRecoveryPassword []byte `protobuf:"bytes,1,opt,name=registration_recovery_password,json=registrationRecoveryPassword,proto3" json:"registration_recovery_password,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetRegistrationRecoveryPasswordRequest) Reset() { - *x = SetRegistrationRecoveryPasswordRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetRegistrationRecoveryPasswordRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetRegistrationRecoveryPasswordRequest) ProtoMessage() {} - -func (x *SetRegistrationRecoveryPasswordRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[25] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetRegistrationRecoveryPasswordRequest.ProtoReflect.Descriptor instead. -func (*SetRegistrationRecoveryPasswordRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{25} -} - -func (x *SetRegistrationRecoveryPasswordRequest) GetRegistrationRecoveryPassword() []byte { - if x != nil { - return x.RegistrationRecoveryPassword - } - return nil -} - -type SetRegistrationRecoveryPasswordResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetRegistrationRecoveryPasswordResponse) Reset() { - *x = SetRegistrationRecoveryPasswordResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetRegistrationRecoveryPasswordResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetRegistrationRecoveryPasswordResponse) ProtoMessage() {} - -func (x *SetRegistrationRecoveryPasswordResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[26] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetRegistrationRecoveryPasswordResponse.ProtoReflect.Descriptor instead. -func (*SetRegistrationRecoveryPasswordResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{26} -} - -type CheckAccountExistenceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The service identifier of an account that may or may not exist. - ServiceIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=service_identifier,json=serviceIdentifier,proto3" json:"service_identifier,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CheckAccountExistenceRequest) Reset() { - *x = CheckAccountExistenceRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CheckAccountExistenceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckAccountExistenceRequest) ProtoMessage() {} - -func (x *CheckAccountExistenceRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[27] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckAccountExistenceRequest.ProtoReflect.Descriptor instead. -func (*CheckAccountExistenceRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{27} -} - -func (x *CheckAccountExistenceRequest) GetServiceIdentifier() *common.ServiceIdentifier { - if x != nil { - return x.ServiceIdentifier - } - return nil -} - -type CheckAccountExistenceResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // True if an account exists with the given service identifier or false if no - // account was found. - AccountExists bool `protobuf:"varint,1,opt,name=account_exists,json=accountExists,proto3" json:"account_exists,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CheckAccountExistenceResponse) Reset() { - *x = CheckAccountExistenceResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CheckAccountExistenceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckAccountExistenceResponse) ProtoMessage() {} - -func (x *CheckAccountExistenceResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[28] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckAccountExistenceResponse.ProtoReflect.Descriptor instead. -func (*CheckAccountExistenceResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{28} -} - -func (x *CheckAccountExistenceResponse) GetAccountExists() bool { - if x != nil { - return x.AccountExists - } - return false -} - -type LookupUsernameHashRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A 32-byte username hash for which to find an account. - UsernameHash []byte `protobuf:"bytes,1,opt,name=username_hash,json=usernameHash,proto3" json:"username_hash,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LookupUsernameHashRequest) Reset() { - *x = LookupUsernameHashRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LookupUsernameHashRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LookupUsernameHashRequest) ProtoMessage() {} - -func (x *LookupUsernameHashRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[29] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LookupUsernameHashRequest.ProtoReflect.Descriptor instead. -func (*LookupUsernameHashRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{29} -} - -func (x *LookupUsernameHashRequest) GetUsernameHash() []byte { - if x != nil { - return x.UsernameHash - } - return nil -} - -type LookupUsernameHashResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *LookupUsernameHashResponse_ServiceIdentifier - // *LookupUsernameHashResponse_NotFound - Response isLookupUsernameHashResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LookupUsernameHashResponse) Reset() { - *x = LookupUsernameHashResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LookupUsernameHashResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LookupUsernameHashResponse) ProtoMessage() {} - -func (x *LookupUsernameHashResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[30] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LookupUsernameHashResponse.ProtoReflect.Descriptor instead. -func (*LookupUsernameHashResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{30} -} - -func (x *LookupUsernameHashResponse) GetResponse() isLookupUsernameHashResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *LookupUsernameHashResponse) GetServiceIdentifier() *common.ServiceIdentifier { - if x != nil { - if x, ok := x.Response.(*LookupUsernameHashResponse_ServiceIdentifier); ok { - return x.ServiceIdentifier - } - } - return nil -} - -func (x *LookupUsernameHashResponse) GetNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*LookupUsernameHashResponse_NotFound); ok { - return x.NotFound - } - } - return nil -} - -type isLookupUsernameHashResponse_Response interface { - isLookupUsernameHashResponse_Response() -} - -type LookupUsernameHashResponse_ServiceIdentifier struct { - // The service identifier associated with the provided username hash. - ServiceIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=service_identifier,json=serviceIdentifier,proto3,oneof"` -} - -type LookupUsernameHashResponse_NotFound struct { - // No account was found for the provided username hash. - NotFound *errors.NotFound `protobuf:"bytes,2,opt,name=not_found,json=notFound,proto3,oneof"` -} - -func (*LookupUsernameHashResponse_ServiceIdentifier) isLookupUsernameHashResponse_Response() {} - -func (*LookupUsernameHashResponse_NotFound) isLookupUsernameHashResponse_Response() {} - -type LookupUsernameLinkRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The link handle for which to find an encrypted username. Link handles are - // 16-byte representations of UUIDs. - UsernameLinkHandle []byte `protobuf:"bytes,1,opt,name=username_link_handle,json=usernameLinkHandle,proto3" json:"username_link_handle,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LookupUsernameLinkRequest) Reset() { - *x = LookupUsernameLinkRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LookupUsernameLinkRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LookupUsernameLinkRequest) ProtoMessage() {} - -func (x *LookupUsernameLinkRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[31] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LookupUsernameLinkRequest.ProtoReflect.Descriptor instead. -func (*LookupUsernameLinkRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{31} -} - -func (x *LookupUsernameLinkRequest) GetUsernameLinkHandle() []byte { - if x != nil { - return x.UsernameLinkHandle - } - return nil -} - -type LookupUsernameLinkResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *LookupUsernameLinkResponse_UsernameCiphertext - // *LookupUsernameLinkResponse_NotFound - Response isLookupUsernameLinkResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LookupUsernameLinkResponse) Reset() { - *x = LookupUsernameLinkResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LookupUsernameLinkResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LookupUsernameLinkResponse) ProtoMessage() {} - -func (x *LookupUsernameLinkResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[32] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LookupUsernameLinkResponse.ProtoReflect.Descriptor instead. -func (*LookupUsernameLinkResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{32} -} - -func (x *LookupUsernameLinkResponse) GetResponse() isLookupUsernameLinkResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *LookupUsernameLinkResponse) GetUsernameCiphertext() []byte { - if x != nil { - if x, ok := x.Response.(*LookupUsernameLinkResponse_UsernameCiphertext); ok { - return x.UsernameCiphertext - } - } - return nil -} - -func (x *LookupUsernameLinkResponse) GetNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*LookupUsernameLinkResponse_NotFound); ok { - return x.NotFound - } - } - return nil -} - -type isLookupUsernameLinkResponse_Response interface { - isLookupUsernameLinkResponse_Response() -} - -type LookupUsernameLinkResponse_UsernameCiphertext struct { - // The ciphertext of the username identified by the provided link handle. - UsernameCiphertext []byte `protobuf:"bytes,1,opt,name=username_ciphertext,json=usernameCiphertext,proto3,oneof"` -} - -type LookupUsernameLinkResponse_NotFound struct { - // No username was found for the provided link handle. - NotFound *errors.NotFound `protobuf:"bytes,2,opt,name=not_found,json=notFound,proto3,oneof"` -} - -func (*LookupUsernameLinkResponse_UsernameCiphertext) isLookupUsernameLinkResponse_Response() {} - -func (*LookupUsernameLinkResponse_NotFound) isLookupUsernameLinkResponse_Response() {} - -type SetZkCredentialKeyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A serialized libsignal ZkCredentialPublicKey - PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetZkCredentialKeyRequest) Reset() { - *x = SetZkCredentialKeyRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetZkCredentialKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetZkCredentialKeyRequest) ProtoMessage() {} - -func (x *SetZkCredentialKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[33] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetZkCredentialKeyRequest.ProtoReflect.Descriptor instead. -func (*SetZkCredentialKeyRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{33} -} - -func (x *SetZkCredentialKeyRequest) GetPublicKey() []byte { - if x != nil { - return x.PublicKey - } - return nil -} - -type SetZkCredentialKeyResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A random, non-zero, value that must be included in credential requests using the key. - // - // This value allows the server to ratchet the resulting binding identity, - // as reverting to the previous key will result in a new rotation ID. - RotationId uint64 `protobuf:"varint,1,opt,name=rotation_id,json=rotationId,proto3" json:"rotation_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetZkCredentialKeyResponse) Reset() { - *x = SetZkCredentialKeyResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetZkCredentialKeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetZkCredentialKeyResponse) ProtoMessage() {} - -func (x *SetZkCredentialKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[34] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetZkCredentialKeyResponse.ProtoReflect.Descriptor instead. -func (*SetZkCredentialKeyResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{34} -} - -func (x *SetZkCredentialKeyResponse) GetRotationId() uint64 { - if x != nil { - return x.RotationId - } - return 0 -} - -type ChangeNumberRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A means of authenticating the change-number request for the new phone - // number. Exactly one must be provided. - // - // Types that are valid to be assigned to Verification: - // - // *ChangeNumberRequest_SessionId - // *ChangeNumberRequest_RecoveryPassword - Verification isChangeNumberRequest_Verification `protobuf_oneof:"verification"` - // The new phone number for the authenticated account. - Number string `protobuf:"bytes,3,opt,name=number,proto3" json:"number,omitempty"` - // The registration lock secret for the new phone number, if the account - // associated with the new phone number has a registration lock configured. - RegistrationLock []byte `protobuf:"bytes,4,opt,name=registration_lock,json=registrationLock,proto3" json:"registration_lock,omitempty"` - // The new public identity key to use for the phone-number identity (PNI) - // associated with the new phone number. - PniIdentityKey []byte `protobuf:"bytes,5,opt,name=pni_identity_key,json=pniIdentityKey,proto3" json:"pni_identity_key,omitempty"` - // Synchronization messages to send to companion devices to supply the private - // keys associated with the new identity key and their new pre-keys. Exactly - // one message must be supplied for each device other than the sending - // (primary) device. May be omitted if no companion devices are linked to the - // account. - DeviceMessages *messages.IndividualRecipientMessageBundle `protobuf:"bytes,6,opt,name=device_messages,json=deviceMessages,proto3" json:"device_messages,omitempty"` - // A new signed EC pre-key for each device on the account, including the - // sending device, keyed by device ID. Each must be accompanied by a valid - // signature from the identity key in this request. - DevicePniSignedPreKeys map[uint32]*common.EcSignedPreKey `protobuf:"bytes,7,rep,name=device_pni_signed_pre_keys,json=devicePniSignedPreKeys,proto3" json:"device_pni_signed_pre_keys,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // A new signed post-quantum last-resort pre-key for each device on the - // account, including the sending device, keyed by device ID. Each must be - // accompanied by a valid signature from the identity key in this request. - DevicePniPqLastResortPreKeys map[uint32]*common.KemSignedPreKey `protobuf:"bytes,8,rep,name=device_pni_pq_last_resort_pre_keys,json=devicePniPqLastResortPreKeys,proto3" json:"device_pni_pq_last_resort_pre_keys,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // The new phone-number-identity registration ID for each device on the - // account, including the sending device, keyed by device ID. - PniRegistrationIds map[uint32]uint32 `protobuf:"bytes,9,rep,name=pni_registration_ids,json=pniRegistrationIds,proto3" json:"pni_registration_ids,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ChangeNumberRequest) Reset() { - *x = ChangeNumberRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ChangeNumberRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangeNumberRequest) ProtoMessage() {} - -func (x *ChangeNumberRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[35] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChangeNumberRequest.ProtoReflect.Descriptor instead. -func (*ChangeNumberRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{35} -} - -func (x *ChangeNumberRequest) GetVerification() isChangeNumberRequest_Verification { - if x != nil { - return x.Verification - } - return nil -} - -func (x *ChangeNumberRequest) GetSessionId() []byte { - if x != nil { - if x, ok := x.Verification.(*ChangeNumberRequest_SessionId); ok { - return x.SessionId - } - } - return nil -} - -func (x *ChangeNumberRequest) GetRecoveryPassword() []byte { - if x != nil { - if x, ok := x.Verification.(*ChangeNumberRequest_RecoveryPassword); ok { - return x.RecoveryPassword - } - } - return nil -} - -func (x *ChangeNumberRequest) GetNumber() string { - if x != nil { - return x.Number - } - return "" -} - -func (x *ChangeNumberRequest) GetRegistrationLock() []byte { - if x != nil { - return x.RegistrationLock - } - return nil -} - -func (x *ChangeNumberRequest) GetPniIdentityKey() []byte { - if x != nil { - return x.PniIdentityKey - } - return nil -} - -func (x *ChangeNumberRequest) GetDeviceMessages() *messages.IndividualRecipientMessageBundle { - if x != nil { - return x.DeviceMessages - } - return nil -} - -func (x *ChangeNumberRequest) GetDevicePniSignedPreKeys() map[uint32]*common.EcSignedPreKey { - if x != nil { - return x.DevicePniSignedPreKeys - } - return nil -} - -func (x *ChangeNumberRequest) GetDevicePniPqLastResortPreKeys() map[uint32]*common.KemSignedPreKey { - if x != nil { - return x.DevicePniPqLastResortPreKeys - } - return nil -} - -func (x *ChangeNumberRequest) GetPniRegistrationIds() map[uint32]uint32 { - if x != nil { - return x.PniRegistrationIds - } - return nil -} - -type isChangeNumberRequest_Verification interface { - isChangeNumberRequest_Verification() -} - -type ChangeNumberRequest_SessionId struct { - // A verified registration session ID (as returned by the registration - // service) for the new phone number. - SessionId []byte `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3,oneof"` -} - -type ChangeNumberRequest_RecoveryPassword struct { - // A registration recovery password for the new phone number. - RecoveryPassword []byte `protobuf:"bytes,2,opt,name=recovery_password,json=recoveryPassword,proto3,oneof"` -} - -func (*ChangeNumberRequest_SessionId) isChangeNumberRequest_Verification() {} - -func (*ChangeNumberRequest_RecoveryPassword) isChangeNumberRequest_Verification() {} - -type ChangeNumberResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *ChangeNumberResponse_AccountIdentifiers - // *ChangeNumberResponse_MismatchedDevices - // *ChangeNumberResponse_RegistrationLockFailure - // *ChangeNumberResponse_StaleDevices - // *ChangeNumberResponse_MessageTooLarge - // *ChangeNumberResponse_UnverifiedRegistrationSession - // *ChangeNumberResponse_InvalidRegistrationSession - // *ChangeNumberResponse_RecoveryPasswordVerificationFailed - Response isChangeNumberResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ChangeNumberResponse) Reset() { - *x = ChangeNumberResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ChangeNumberResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangeNumberResponse) ProtoMessage() {} - -func (x *ChangeNumberResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[36] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChangeNumberResponse.ProtoReflect.Descriptor instead. -func (*ChangeNumberResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{36} -} - -func (x *ChangeNumberResponse) GetResponse() isChangeNumberResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *ChangeNumberResponse) GetAccountIdentifiers() *common.AccountIdentifiers { - if x != nil { - if x, ok := x.Response.(*ChangeNumberResponse_AccountIdentifiers); ok { - return x.AccountIdentifiers - } - } - return nil -} - -func (x *ChangeNumberResponse) GetMismatchedDevices() *messages.MismatchedDevices { - if x != nil { - if x, ok := x.Response.(*ChangeNumberResponse_MismatchedDevices); ok { - return x.MismatchedDevices - } - } - return nil -} - -func (x *ChangeNumberResponse) GetRegistrationLockFailure() *RegistrationLockFailure { - if x != nil { - if x, ok := x.Response.(*ChangeNumberResponse_RegistrationLockFailure); ok { - return x.RegistrationLockFailure - } - } - return nil -} - -func (x *ChangeNumberResponse) GetStaleDevices() *StaleDevices { - if x != nil { - if x, ok := x.Response.(*ChangeNumberResponse_StaleDevices); ok { - return x.StaleDevices - } - } - return nil -} - -func (x *ChangeNumberResponse) GetMessageTooLarge() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*ChangeNumberResponse_MessageTooLarge); ok { - return x.MessageTooLarge - } - } - return nil -} - -func (x *ChangeNumberResponse) GetUnverifiedRegistrationSession() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*ChangeNumberResponse_UnverifiedRegistrationSession); ok { - return x.UnverifiedRegistrationSession - } - } - return nil -} - -func (x *ChangeNumberResponse) GetInvalidRegistrationSession() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*ChangeNumberResponse_InvalidRegistrationSession); ok { - return x.InvalidRegistrationSession - } - } - return nil -} - -func (x *ChangeNumberResponse) GetRecoveryPasswordVerificationFailed() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*ChangeNumberResponse_RecoveryPasswordVerificationFailed); ok { - return x.RecoveryPasswordVerificationFailed - } - } - return nil -} - -type isChangeNumberResponse_Response interface { - isChangeNumberResponse_Response() -} - -type ChangeNumberResponse_AccountIdentifiers struct { - // The identifiers of the account after the successful - // number change. - AccountIdentifiers *common.AccountIdentifiers `protobuf:"bytes,1,opt,name=account_identifiers,json=accountIdentifiers,proto3,oneof"` -} - -type ChangeNumberResponse_MismatchedDevices struct { - // Mismatched number of devices or device ids in 'devices to notify' list - MismatchedDevices *messages.MismatchedDevices `protobuf:"bytes,2,opt,name=mismatched_devices,json=mismatchedDevices,proto3,oneof"` -} - -type ChangeNumberResponse_RegistrationLockFailure struct { - // The account associated with the new phone number has a registration lock, - // and the provided registration lock secret was missing or incorrect. - RegistrationLockFailure *RegistrationLockFailure `protobuf:"bytes,3,opt,name=registration_lock_failure,json=registrationLockFailure,proto3,oneof"` -} - -type ChangeNumberResponse_StaleDevices struct { - // Mismatched registration ids in 'devices to notify' list - StaleDevices *StaleDevices `protobuf:"bytes,4,opt,name=stale_devices,json=staleDevices,proto3,oneof"` -} - -type ChangeNumberResponse_MessageTooLarge struct { - // One or more device messages was too large - MessageTooLarge *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=message_too_large,json=messageTooLarge,proto3,oneof"` -} - -type ChangeNumberResponse_UnverifiedRegistrationSession struct { - // The registration session is unverified - UnverifiedRegistrationSession *errors.FailedPrecondition `protobuf:"bytes,6,opt,name=unverified_registration_session,json=unverifiedRegistrationSession,proto3,oneof"` -} - -type ChangeNumberResponse_InvalidRegistrationSession struct { - // The number does not match the registration session, or the registration session is invalid - InvalidRegistrationSession *errors.FailedPrecondition `protobuf:"bytes,7,opt,name=invalid_registration_session,json=invalidRegistrationSession,proto3,oneof"` -} - -type ChangeNumberResponse_RecoveryPasswordVerificationFailed struct { - RecoveryPasswordVerificationFailed *errors.FailedPrecondition `protobuf:"bytes,8,opt,name=recovery_password_verification_failed,json=recoveryPasswordVerificationFailed,proto3,oneof"` -} - -func (*ChangeNumberResponse_AccountIdentifiers) isChangeNumberResponse_Response() {} - -func (*ChangeNumberResponse_MismatchedDevices) isChangeNumberResponse_Response() {} - -func (*ChangeNumberResponse_RegistrationLockFailure) isChangeNumberResponse_Response() {} - -func (*ChangeNumberResponse_StaleDevices) isChangeNumberResponse_Response() {} - -func (*ChangeNumberResponse_MessageTooLarge) isChangeNumberResponse_Response() {} - -func (*ChangeNumberResponse_UnverifiedRegistrationSession) isChangeNumberResponse_Response() {} - -func (*ChangeNumberResponse_InvalidRegistrationSession) isChangeNumberResponse_Response() {} - -func (*ChangeNumberResponse_RecoveryPasswordVerificationFailed) isChangeNumberResponse_Response() {} - -// Information about the current Registration lock and SVR credentials. With a correct PIN, the credentials can -// be used to recover the secret used to derive the registration lock password. -type RegistrationLockFailure struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Time remaining in milliseconds before the existing registration lock expires - TimeRemainingMillis uint64 `protobuf:"varint,1,opt,name=time_remaining_millis,json=timeRemainingMillis,proto3" json:"time_remaining_millis,omitempty"` - // Credentials that can be used with SVR2 - Svr2Credentials *ExternalServiceCredentials `protobuf:"bytes,2,opt,name=svr2_credentials,json=svr2Credentials,proto3" json:"svr2_credentials,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RegistrationLockFailure) Reset() { - *x = RegistrationLockFailure{} - mi := &file_org_signal_chat_account_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RegistrationLockFailure) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegistrationLockFailure) ProtoMessage() {} - -func (x *RegistrationLockFailure) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[37] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegistrationLockFailure.ProtoReflect.Descriptor instead. -func (*RegistrationLockFailure) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{37} -} - -func (x *RegistrationLockFailure) GetTimeRemainingMillis() uint64 { - if x != nil { - return x.TimeRemainingMillis - } - return 0 -} - -func (x *RegistrationLockFailure) GetSvr2Credentials() *ExternalServiceCredentials { - if x != nil { - return x.Svr2Credentials - } - return nil -} - -// A username/password pair for authenticating with an external service. -type ExternalServiceCredentials struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A username that can be presented to authenticate with the external service. - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - // A password that can be presented to authenticate with the external service. - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ExternalServiceCredentials) Reset() { - *x = ExternalServiceCredentials{} - mi := &file_org_signal_chat_account_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ExternalServiceCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExternalServiceCredentials) ProtoMessage() {} - -func (x *ExternalServiceCredentials) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[38] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExternalServiceCredentials.ProtoReflect.Descriptor instead. -func (*ExternalServiceCredentials) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{38} -} - -func (x *ExternalServiceCredentials) GetUsername() string { - if x != nil { - return x.Username - } - return "" -} - -func (x *ExternalServiceCredentials) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -// A list of devices that are linked to the account but presented a stale -// registration ID (indicating the device has likely been replaced by another -// device). -type StaleDevices struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The IDs of devices that are no longer active. - StaleDevices []uint32 `protobuf:"varint,1,rep,packed,name=stale_devices,json=staleDevices,proto3" json:"stale_devices,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StaleDevices) Reset() { - *x = StaleDevices{} - mi := &file_org_signal_chat_account_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StaleDevices) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StaleDevices) ProtoMessage() {} - -func (x *StaleDevices) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[39] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StaleDevices.ProtoReflect.Descriptor instead. -func (*StaleDevices) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{39} -} - -func (x *StaleDevices) GetStaleDevices() []uint32 { - if x != nil { - return x.StaleDevices - } - return nil -} - -type GetAccountDataReportRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetAccountDataReportRequest) Reset() { - *x = GetAccountDataReportRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetAccountDataReportRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAccountDataReportRequest) ProtoMessage() {} - -func (x *GetAccountDataReportRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[40] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAccountDataReportRequest.ProtoReflect.Descriptor instead. -func (*GetAccountDataReportRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{40} -} - -type GetAccountDataReportResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The JSON representation of the data report - Json string `protobuf:"bytes,3,opt,name=json,proto3" json:"json,omitempty"` - // A plaintext representation of the data report - Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetAccountDataReportResponse) Reset() { - *x = GetAccountDataReportResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetAccountDataReportResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAccountDataReportResponse) ProtoMessage() {} - -func (x *GetAccountDataReportResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[41] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAccountDataReportResponse.ProtoReflect.Descriptor instead. -func (*GetAccountDataReportResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{41} -} - -func (x *GetAccountDataReportResponse) GetJson() string { - if x != nil { - return x.Json - } - return "" -} - -func (x *GetAccountDataReportResponse) GetText() string { - if x != nil { - return x.Text - } - return "" -} - -type GetCapabilitiesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCapabilitiesRequest) Reset() { - *x = GetCapabilitiesRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCapabilitiesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCapabilitiesRequest) ProtoMessage() {} - -func (x *GetCapabilitiesRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[42] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCapabilitiesRequest.ProtoReflect.Descriptor instead. -func (*GetCapabilitiesRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{42} -} - -type Capabilities struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A list of capabilities enabled on the account. - Capabilities []common.DeviceCapability `protobuf:"varint,1,rep,packed,name=capabilities,proto3,enum=org.signal.chat.common.DeviceCapability" json:"capabilities,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Capabilities) Reset() { - *x = Capabilities{} - mi := &file_org_signal_chat_account_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Capabilities) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Capabilities) ProtoMessage() {} - -func (x *Capabilities) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[43] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Capabilities.ProtoReflect.Descriptor instead. -func (*Capabilities) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{43} -} - -func (x *Capabilities) GetCapabilities() []common.DeviceCapability { - if x != nil { - return x.Capabilities - } - return nil -} - -type GetCapabilitiesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A list of capabilities enabled on the account. - Capabilities *Capabilities `protobuf:"bytes,1,opt,name=capabilities,proto3" json:"capabilities,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCapabilitiesResponse) Reset() { - *x = GetCapabilitiesResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCapabilitiesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCapabilitiesResponse) ProtoMessage() {} - -func (x *GetCapabilitiesResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[44] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCapabilitiesResponse.ProtoReflect.Descriptor instead. -func (*GetCapabilitiesResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{44} -} - -func (x *GetCapabilitiesResponse) GetCapabilities() *Capabilities { - if x != nil { - return x.Capabilities - } - return nil -} - -type GetCapabilitiesAnonymousRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The ACI of the account for which to get capabilities. - AccountIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=account_identifier,json=accountIdentifier,proto3" json:"account_identifier,omitempty"` - // Types that are valid to be assigned to Authentication: - // - // *GetCapabilitiesAnonymousRequest_UnidentifiedAccessKey - // *GetCapabilitiesAnonymousRequest_GroupSendToken - Authentication isGetCapabilitiesAnonymousRequest_Authentication `protobuf_oneof:"authentication"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCapabilitiesAnonymousRequest) Reset() { - *x = GetCapabilitiesAnonymousRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCapabilitiesAnonymousRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCapabilitiesAnonymousRequest) ProtoMessage() {} - -func (x *GetCapabilitiesAnonymousRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[45] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCapabilitiesAnonymousRequest.ProtoReflect.Descriptor instead. -func (*GetCapabilitiesAnonymousRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{45} -} - -func (x *GetCapabilitiesAnonymousRequest) GetAccountIdentifier() *common.ServiceIdentifier { - if x != nil { - return x.AccountIdentifier - } - return nil -} - -func (x *GetCapabilitiesAnonymousRequest) GetAuthentication() isGetCapabilitiesAnonymousRequest_Authentication { - if x != nil { - return x.Authentication - } - return nil -} - -func (x *GetCapabilitiesAnonymousRequest) GetUnidentifiedAccessKey() []byte { - if x != nil { - if x, ok := x.Authentication.(*GetCapabilitiesAnonymousRequest_UnidentifiedAccessKey); ok { - return x.UnidentifiedAccessKey - } - } - return nil -} - -func (x *GetCapabilitiesAnonymousRequest) GetGroupSendToken() []byte { - if x != nil { - if x, ok := x.Authentication.(*GetCapabilitiesAnonymousRequest_GroupSendToken); ok { - return x.GroupSendToken - } - } - return nil -} - -type isGetCapabilitiesAnonymousRequest_Authentication interface { - isGetCapabilitiesAnonymousRequest_Authentication() -} - -type GetCapabilitiesAnonymousRequest_UnidentifiedAccessKey struct { - // The unidentified access key for the targeted account. - UnidentifiedAccessKey []byte `protobuf:"bytes,2,opt,name=unidentified_access_key,json=unidentifiedAccessKey,proto3,oneof"` -} - -type GetCapabilitiesAnonymousRequest_GroupSendToken struct { - // A group send endorsement token for the targeted account. - GroupSendToken []byte `protobuf:"bytes,3,opt,name=group_send_token,json=groupSendToken,proto3,oneof"` -} - -func (*GetCapabilitiesAnonymousRequest_UnidentifiedAccessKey) isGetCapabilitiesAnonymousRequest_Authentication() { -} - -func (*GetCapabilitiesAnonymousRequest_GroupSendToken) isGetCapabilitiesAnonymousRequest_Authentication() { -} - -type GetCapabilitiesAnonymousResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetCapabilitiesAnonymousResponse_Capabilities - // *GetCapabilitiesAnonymousResponse_NotFound - // *GetCapabilitiesAnonymousResponse_FailedUnidentifiedAuthorization - Response isGetCapabilitiesAnonymousResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCapabilitiesAnonymousResponse) Reset() { - *x = GetCapabilitiesAnonymousResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCapabilitiesAnonymousResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCapabilitiesAnonymousResponse) ProtoMessage() {} - -func (x *GetCapabilitiesAnonymousResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[46] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCapabilitiesAnonymousResponse.ProtoReflect.Descriptor instead. -func (*GetCapabilitiesAnonymousResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{46} -} - -func (x *GetCapabilitiesAnonymousResponse) GetResponse() isGetCapabilitiesAnonymousResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetCapabilitiesAnonymousResponse) GetCapabilities() *Capabilities { - if x != nil { - if x, ok := x.Response.(*GetCapabilitiesAnonymousResponse_Capabilities); ok { - return x.Capabilities - } - } - return nil -} - -func (x *GetCapabilitiesAnonymousResponse) GetNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*GetCapabilitiesAnonymousResponse_NotFound); ok { - return x.NotFound - } - } - return nil -} - -func (x *GetCapabilitiesAnonymousResponse) GetFailedUnidentifiedAuthorization() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*GetCapabilitiesAnonymousResponse_FailedUnidentifiedAuthorization); ok { - return x.FailedUnidentifiedAuthorization - } - } - return nil -} - -type isGetCapabilitiesAnonymousResponse_Response interface { - isGetCapabilitiesAnonymousResponse_Response() -} - -type GetCapabilitiesAnonymousResponse_Capabilities struct { - // A list of capabilities enabled on the account. - Capabilities *Capabilities `protobuf:"bytes,1,opt,name=capabilities,proto3,oneof"` -} - -type GetCapabilitiesAnonymousResponse_NotFound struct { - NotFound *errors.NotFound `protobuf:"bytes,2,opt,name=not_found,json=notFound,proto3,oneof"` -} - -type GetCapabilitiesAnonymousResponse_FailedUnidentifiedAuthorization struct { - FailedUnidentifiedAuthorization *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=failed_unidentified_authorization,json=failedUnidentifiedAuthorization,proto3,oneof"` -} - -func (*GetCapabilitiesAnonymousResponse_Capabilities) isGetCapabilitiesAnonymousResponse_Response() {} - -func (*GetCapabilitiesAnonymousResponse_NotFound) isGetCapabilitiesAnonymousResponse_Response() {} - -func (*GetCapabilitiesAnonymousResponse_FailedUnidentifiedAuthorization) isGetCapabilitiesAnonymousResponse_Response() { -} - -type TotpParameters struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The HMAC algorithm (e.g. "HmacSHA256") used by the TOTP generator - Algorithm string `protobuf:"bytes,1,opt,name=algorithm,proto3" json:"algorithm,omitempty"` - // The length of one-time passwords (in decimal digits) produced and expected - // by the TOTP generator - PasswordLength uint32 `protobuf:"varint,2,opt,name=password_length,json=passwordLength,proto3" json:"password_length,omitempty"` - // The time step (in seconds) used by the TOTP generator - TimeStepSeconds uint32 `protobuf:"varint,3,opt,name=time_step_seconds,json=timeStepSeconds,proto3" json:"time_step_seconds,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TotpParameters) Reset() { - *x = TotpParameters{} - mi := &file_org_signal_chat_account_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TotpParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TotpParameters) ProtoMessage() {} - -func (x *TotpParameters) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[47] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TotpParameters.ProtoReflect.Descriptor instead. -func (*TotpParameters) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{47} -} - -func (x *TotpParameters) GetAlgorithm() string { - if x != nil { - return x.Algorithm - } - return "" -} - -func (x *TotpParameters) GetPasswordLength() uint32 { - if x != nil { - return x.PasswordLength - } - return 0 -} - -func (x *TotpParameters) GetTimeStepSeconds() uint32 { - if x != nil { - return x.TimeStepSeconds - } - return 0 -} - -type GenerateTotpKeyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GenerateTotpKeyRequest) Reset() { - *x = GenerateTotpKeyRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GenerateTotpKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenerateTotpKeyRequest) ProtoMessage() {} - -func (x *GenerateTotpKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[48] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenerateTotpKeyRequest.ProtoReflect.Descriptor instead. -func (*GenerateTotpKeyRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{48} -} - -type GenerateTotpKeyResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GenerateTotpKeyResponse_KeyGenerated_ - // *GenerateTotpKeyResponse_TooManyTotpKeys - Response isGenerateTotpKeyResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GenerateTotpKeyResponse) Reset() { - *x = GenerateTotpKeyResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GenerateTotpKeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenerateTotpKeyResponse) ProtoMessage() {} - -func (x *GenerateTotpKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[49] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenerateTotpKeyResponse.ProtoReflect.Descriptor instead. -func (*GenerateTotpKeyResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{49} -} - -func (x *GenerateTotpKeyResponse) GetResponse() isGenerateTotpKeyResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GenerateTotpKeyResponse) GetKeyGenerated() *GenerateTotpKeyResponse_KeyGenerated { - if x != nil { - if x, ok := x.Response.(*GenerateTotpKeyResponse_KeyGenerated_); ok { - return x.KeyGenerated - } - } - return nil -} - -func (x *GenerateTotpKeyResponse) GetTooManyTotpKeys() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*GenerateTotpKeyResponse_TooManyTotpKeys); ok { - return x.TooManyTotpKeys - } - } - return nil -} - -type isGenerateTotpKeyResponse_Response interface { - isGenerateTotpKeyResponse_Response() -} - -type GenerateTotpKeyResponse_KeyGenerated_ struct { - // A new, pending TOTP key has been generated and added to the authenticated - // account - KeyGenerated *GenerateTotpKeyResponse_KeyGenerated `protobuf:"bytes,1,opt,name=key_generated,json=keyGenerated,proto3,oneof"` -} - -type GenerateTotpKeyResponse_TooManyTotpKeys struct { - // The authenticated account already has too many TOTP keys, and the caller - // must remove one before adding more - TooManyTotpKeys *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=too_many_totp_keys,json=tooManyTotpKeys,proto3,oneof"` -} - -func (*GenerateTotpKeyResponse_KeyGenerated_) isGenerateTotpKeyResponse_Response() {} - -func (*GenerateTotpKeyResponse_TooManyTotpKeys) isGenerateTotpKeyResponse_Response() {} - -type ConfirmTotpKeyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A one-time password derived from the current pending TOTP key - OneTimePassword uint32 `protobuf:"varint,1,opt,name=one_time_password,json=oneTimePassword,proto3" json:"one_time_password,omitempty"` - // The ciphertext of user-provided metadata (presumably including a - // human-readable name and creation timestamp) to be attached to the - // newly-confirmed key - MetadataCiphertext []byte `protobuf:"bytes,2,opt,name=metadata_ciphertext,json=metadataCiphertext,proto3" json:"metadata_ciphertext,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ConfirmTotpKeyRequest) Reset() { - *x = ConfirmTotpKeyRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfirmTotpKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmTotpKeyRequest) ProtoMessage() {} - -func (x *ConfirmTotpKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[50] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmTotpKeyRequest.ProtoReflect.Descriptor instead. -func (*ConfirmTotpKeyRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{50} -} - -func (x *ConfirmTotpKeyRequest) GetOneTimePassword() uint32 { - if x != nil { - return x.OneTimePassword - } - return 0 -} - -func (x *ConfirmTotpKeyRequest) GetMetadataCiphertext() []byte { - if x != nil { - return x.MetadataCiphertext - } - return nil -} - -type ConfirmTotpKeyResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *ConfirmTotpKeyResponse_KeyConfirmed_ - // *ConfirmTotpKeyResponse_OneTimePasswordNotVerified - Response isConfirmTotpKeyResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ConfirmTotpKeyResponse) Reset() { - *x = ConfirmTotpKeyResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfirmTotpKeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmTotpKeyResponse) ProtoMessage() {} - -func (x *ConfirmTotpKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[51] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmTotpKeyResponse.ProtoReflect.Descriptor instead. -func (*ConfirmTotpKeyResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{51} -} - -func (x *ConfirmTotpKeyResponse) GetResponse() isConfirmTotpKeyResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *ConfirmTotpKeyResponse) GetKeyConfirmed() *ConfirmTotpKeyResponse_KeyConfirmed { - if x != nil { - if x, ok := x.Response.(*ConfirmTotpKeyResponse_KeyConfirmed_); ok { - return x.KeyConfirmed - } - } - return nil -} - -func (x *ConfirmTotpKeyResponse) GetOneTimePasswordNotVerified() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*ConfirmTotpKeyResponse_OneTimePasswordNotVerified); ok { - return x.OneTimePasswordNotVerified - } - } - return nil -} - -type isConfirmTotpKeyResponse_Response interface { - isConfirmTotpKeyResponse_Response() -} - -type ConfirmTotpKeyResponse_KeyConfirmed_ struct { - // The provided one-time password was accepted and the pending TOTP key was - // stored with the provided name ciphertext - KeyConfirmed *ConfirmTotpKeyResponse_KeyConfirmed `protobuf:"bytes,1,opt,name=key_confirmed,json=keyConfirmed,proto3,oneof"` -} - -type ConfirmTotpKeyResponse_OneTimePasswordNotVerified struct { - // The provided one-time password was not valid for any reason (including - // incorrect passwords, misaligned clocks, or missing account records) - OneTimePasswordNotVerified *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=one_time_password_not_verified,json=oneTimePasswordNotVerified,proto3,oneof"` -} - -func (*ConfirmTotpKeyResponse_KeyConfirmed_) isConfirmTotpKeyResponse_Response() {} - -func (*ConfirmTotpKeyResponse_OneTimePasswordNotVerified) isConfirmTotpKeyResponse_Response() {} - -type ListTotpKeysRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListTotpKeysRequest) Reset() { - *x = ListTotpKeysRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListTotpKeysRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTotpKeysRequest) ProtoMessage() {} - -func (x *ListTotpKeysRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[52] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListTotpKeysRequest.ProtoReflect.Descriptor instead. -func (*ListTotpKeysRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{52} -} - -type ListTotpKeysResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Keys map[int32]*ListTotpKeysResponse_TotpKeyMetadata `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListTotpKeysResponse) Reset() { - *x = ListTotpKeysResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListTotpKeysResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTotpKeysResponse) ProtoMessage() {} - -func (x *ListTotpKeysResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[53] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListTotpKeysResponse.ProtoReflect.Descriptor instead. -func (*ListTotpKeysResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{53} -} - -func (x *ListTotpKeysResponse) GetKeys() map[int32]*ListTotpKeysResponse_TotpKeyMetadata { - if x != nil { - return x.Keys - } - return nil -} - -type SetTotpKeyMetadataRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The account-specific identifier of the TOTP key to modify - KeyId uint32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` - // The ciphertext of the new user-provided metadata to be attached to the - // identified key - MetadataCiphertext []byte `protobuf:"bytes,2,opt,name=metadata_ciphertext,json=metadataCiphertext,proto3" json:"metadata_ciphertext,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetTotpKeyMetadataRequest) Reset() { - *x = SetTotpKeyMetadataRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetTotpKeyMetadataRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetTotpKeyMetadataRequest) ProtoMessage() {} - -func (x *SetTotpKeyMetadataRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[54] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetTotpKeyMetadataRequest.ProtoReflect.Descriptor instead. -func (*SetTotpKeyMetadataRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{54} -} - -func (x *SetTotpKeyMetadataRequest) GetKeyId() uint32 { - if x != nil { - return x.KeyId - } - return 0 -} - -func (x *SetTotpKeyMetadataRequest) GetMetadataCiphertext() []byte { - if x != nil { - return x.MetadataCiphertext - } - return nil -} - -type SetTotpKeyMetadataResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *SetTotpKeyMetadataResponse_MetadataUpdated_ - // *SetTotpKeyMetadataResponse_KeyNotFound - Response isSetTotpKeyMetadataResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetTotpKeyMetadataResponse) Reset() { - *x = SetTotpKeyMetadataResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetTotpKeyMetadataResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetTotpKeyMetadataResponse) ProtoMessage() {} - -func (x *SetTotpKeyMetadataResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[55] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetTotpKeyMetadataResponse.ProtoReflect.Descriptor instead. -func (*SetTotpKeyMetadataResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{55} -} - -func (x *SetTotpKeyMetadataResponse) GetResponse() isSetTotpKeyMetadataResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *SetTotpKeyMetadataResponse) GetMetadataUpdated() *SetTotpKeyMetadataResponse_MetadataUpdated { - if x != nil { - if x, ok := x.Response.(*SetTotpKeyMetadataResponse_MetadataUpdated_); ok { - return x.MetadataUpdated - } - } - return nil -} - -func (x *SetTotpKeyMetadataResponse) GetKeyNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*SetTotpKeyMetadataResponse_KeyNotFound); ok { - return x.KeyNotFound - } - } - return nil -} - -type isSetTotpKeyMetadataResponse_Response interface { - isSetTotpKeyMetadataResponse_Response() -} - -type SetTotpKeyMetadataResponse_MetadataUpdated_ struct { - // New metadata was stored for the identified TOTP key - MetadataUpdated *SetTotpKeyMetadataResponse_MetadataUpdated `protobuf:"bytes,1,opt,name=metadata_updated,json=metadataUpdated,proto3,oneof"` -} - -type SetTotpKeyMetadataResponse_KeyNotFound struct { - // No TOTP was found with the given ID - KeyNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=key_not_found,json=keyNotFound,proto3,oneof"` -} - -func (*SetTotpKeyMetadataResponse_MetadataUpdated_) isSetTotpKeyMetadataResponse_Response() {} - -func (*SetTotpKeyMetadataResponse_KeyNotFound) isSetTotpKeyMetadataResponse_Response() {} - -type RemoveTotpKeyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The account-specific identifier of the TOTP key to remove - KeyId uint32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RemoveTotpKeyRequest) Reset() { - *x = RemoveTotpKeyRequest{} - mi := &file_org_signal_chat_account_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RemoveTotpKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveTotpKeyRequest) ProtoMessage() {} - -func (x *RemoveTotpKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[56] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveTotpKeyRequest.ProtoReflect.Descriptor instead. -func (*RemoveTotpKeyRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{56} -} - -func (x *RemoveTotpKeyRequest) GetKeyId() uint32 { - if x != nil { - return x.KeyId - } - return 0 -} - -type RemoveTotpKeyResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RemoveTotpKeyResponse) Reset() { - *x = RemoveTotpKeyResponse{} - mi := &file_org_signal_chat_account_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RemoveTotpKeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveTotpKeyResponse) ProtoMessage() {} - -func (x *RemoveTotpKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[57] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveTotpKeyResponse.ProtoReflect.Descriptor instead. -func (*RemoveTotpKeyResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{57} -} - -type GetEntitlementsResponse_BadgeEntitlement struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The id of the badge the account is entitled. Metadata to display for - // badges may be obtained by cross-referencing badge ids with - // RemoteConfiguration.GetBadges. - BadgeId string `protobuf:"bytes,1,opt,name=badge_id,json=badgeId,proto3" json:"badge_id,omitempty"` - // When the badge expires, in number of seconds since epoch - ExpirationEpochSeconds uint64 `protobuf:"varint,2,opt,name=expiration_epoch_seconds,json=expirationEpochSeconds,proto3" json:"expiration_epoch_seconds,omitempty"` - // Whether the badge is currently configured to be visible - Visible bool `protobuf:"varint,3,opt,name=visible,proto3" json:"visible,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetEntitlementsResponse_BadgeEntitlement) Reset() { - *x = GetEntitlementsResponse_BadgeEntitlement{} - mi := &file_org_signal_chat_account_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetEntitlementsResponse_BadgeEntitlement) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetEntitlementsResponse_BadgeEntitlement) ProtoMessage() {} - -func (x *GetEntitlementsResponse_BadgeEntitlement) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[58] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetEntitlementsResponse_BadgeEntitlement.ProtoReflect.Descriptor instead. -func (*GetEntitlementsResponse_BadgeEntitlement) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *GetEntitlementsResponse_BadgeEntitlement) GetBadgeId() string { - if x != nil { - return x.BadgeId - } - return "" -} - -func (x *GetEntitlementsResponse_BadgeEntitlement) GetExpirationEpochSeconds() uint64 { - if x != nil { - return x.ExpirationEpochSeconds - } - return 0 -} - -func (x *GetEntitlementsResponse_BadgeEntitlement) GetVisible() bool { - if x != nil { - return x.Visible - } - return false -} - -type GetEntitlementsResponse_BackupEntitlement struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The backup level of the account - Level uint64 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` - // When the backup entitlement expires, in number of seconds since epoch - ExpirationEpochSeconds uint64 `protobuf:"varint,2,opt,name=expiration_epoch_seconds,json=expirationEpochSeconds,proto3" json:"expiration_epoch_seconds,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetEntitlementsResponse_BackupEntitlement) Reset() { - *x = GetEntitlementsResponse_BackupEntitlement{} - mi := &file_org_signal_chat_account_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetEntitlementsResponse_BackupEntitlement) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetEntitlementsResponse_BackupEntitlement) ProtoMessage() {} - -func (x *GetEntitlementsResponse_BackupEntitlement) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[59] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetEntitlementsResponse_BackupEntitlement.ProtoReflect.Descriptor instead. -func (*GetEntitlementsResponse_BackupEntitlement) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{3, 1} -} - -func (x *GetEntitlementsResponse_BackupEntitlement) GetLevel() uint64 { - if x != nil { - return x.Level - } - return 0 -} - -func (x *GetEntitlementsResponse_BackupEntitlement) GetExpirationEpochSeconds() uint64 { - if x != nil { - return x.ExpirationEpochSeconds - } - return 0 -} - -type ConfirmUsernameHashResponse_ConfirmedUsernameHash struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The server-generated username link handle for the newly-confirmed username. - UsernameLinkHandle []byte `protobuf:"bytes,2,opt,name=username_link_handle,json=usernameLinkHandle,proto3" json:"username_link_handle,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ConfirmUsernameHashResponse_ConfirmedUsernameHash) Reset() { - *x = ConfirmUsernameHashResponse_ConfirmedUsernameHash{} - mi := &file_org_signal_chat_account_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfirmUsernameHashResponse_ConfirmedUsernameHash) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmUsernameHashResponse_ConfirmedUsernameHash) ProtoMessage() {} - -func (x *ConfirmUsernameHashResponse_ConfirmedUsernameHash) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[60] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmUsernameHashResponse_ConfirmedUsernameHash.ProtoReflect.Descriptor instead. -func (*ConfirmUsernameHashResponse_ConfirmedUsernameHash) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{14, 0} -} - -func (x *ConfirmUsernameHashResponse_ConfirmedUsernameHash) GetUsernameLinkHandle() []byte { - if x != nil { - return x.UsernameLinkHandle - } - return nil -} - -type GenerateTotpKeyResponse_KeyGenerated struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The raw TOTP key - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // The TOTP parameters associated with the generated key - TotpParameters *TotpParameters `protobuf:"bytes,2,opt,name=totp_parameters,json=totpParameters,proto3" json:"totp_parameters,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GenerateTotpKeyResponse_KeyGenerated) Reset() { - *x = GenerateTotpKeyResponse_KeyGenerated{} - mi := &file_org_signal_chat_account_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GenerateTotpKeyResponse_KeyGenerated) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenerateTotpKeyResponse_KeyGenerated) ProtoMessage() {} - -func (x *GenerateTotpKeyResponse_KeyGenerated) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[64] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GenerateTotpKeyResponse_KeyGenerated.ProtoReflect.Descriptor instead. -func (*GenerateTotpKeyResponse_KeyGenerated) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{49, 0} -} - -func (x *GenerateTotpKeyResponse_KeyGenerated) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *GenerateTotpKeyResponse_KeyGenerated) GetTotpParameters() *TotpParameters { - if x != nil { - return x.TotpParameters - } - return nil -} - -type ConfirmTotpKeyResponse_KeyConfirmed struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The account-specific identifier for the newly-confirmed TOTP key - KeyId uint32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ConfirmTotpKeyResponse_KeyConfirmed) Reset() { - *x = ConfirmTotpKeyResponse_KeyConfirmed{} - mi := &file_org_signal_chat_account_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfirmTotpKeyResponse_KeyConfirmed) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmTotpKeyResponse_KeyConfirmed) ProtoMessage() {} - -func (x *ConfirmTotpKeyResponse_KeyConfirmed) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[65] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmTotpKeyResponse_KeyConfirmed.ProtoReflect.Descriptor instead. -func (*ConfirmTotpKeyResponse_KeyConfirmed) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{51, 0} -} - -func (x *ConfirmTotpKeyResponse_KeyConfirmed) GetKeyId() uint32 { - if x != nil { - return x.KeyId - } - return 0 -} - -type ListTotpKeysResponse_TotpKeyMetadata struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The user-provided ciphertext for metadata associated with this TOTP key - MetadataCiphertext []byte `protobuf:"bytes,1,opt,name=metadata_ciphertext,json=metadataCiphertext,proto3" json:"metadata_ciphertext,omitempty"` - // The TOTP parameters associated with this key - TotpParameters *TotpParameters `protobuf:"bytes,2,opt,name=totp_parameters,json=totpParameters,proto3" json:"totp_parameters,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListTotpKeysResponse_TotpKeyMetadata) Reset() { - *x = ListTotpKeysResponse_TotpKeyMetadata{} - mi := &file_org_signal_chat_account_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListTotpKeysResponse_TotpKeyMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListTotpKeysResponse_TotpKeyMetadata) ProtoMessage() {} - -func (x *ListTotpKeysResponse_TotpKeyMetadata) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[66] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListTotpKeysResponse_TotpKeyMetadata.ProtoReflect.Descriptor instead. -func (*ListTotpKeysResponse_TotpKeyMetadata) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{53, 0} -} - -func (x *ListTotpKeysResponse_TotpKeyMetadata) GetMetadataCiphertext() []byte { - if x != nil { - return x.MetadataCiphertext - } - return nil -} - -func (x *ListTotpKeysResponse_TotpKeyMetadata) GetTotpParameters() *TotpParameters { - if x != nil { - return x.TotpParameters - } - return nil -} - -type SetTotpKeyMetadataResponse_MetadataUpdated struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetTotpKeyMetadataResponse_MetadataUpdated) Reset() { - *x = SetTotpKeyMetadataResponse_MetadataUpdated{} - mi := &file_org_signal_chat_account_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetTotpKeyMetadataResponse_MetadataUpdated) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetTotpKeyMetadataResponse_MetadataUpdated) ProtoMessage() {} - -func (x *SetTotpKeyMetadataResponse_MetadataUpdated) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_account_proto_msgTypes[68] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetTotpKeyMetadataResponse_MetadataUpdated.ProtoReflect.Descriptor instead. -func (*SetTotpKeyMetadataResponse_MetadataUpdated) Descriptor() ([]byte, []int) { - return file_org_signal_chat_account_proto_rawDescGZIP(), []int{55, 0} -} - -var File_org_signal_chat_account_proto protoreflect.FileDescriptor - -const file_org_signal_chat_account_proto_rawDesc = "" + - "\n" + - "\x1dorg/signal/chat/account.proto\x12\x17org.signal.chat.account\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1corg/signal/chat/common.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x1eorg/signal/chat/messages.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x19org/signal/chat/tag.proto\"\x1b\n" + - "\x19GetAccountIdentityRequest\"y\n" + - "\x1aGetAccountIdentityResponse\x12[\n" + - "\x13account_identifiers\x18\x01 \x01(\v2*.org.signal.chat.common.AccountIdentifiersR\x12accountIdentifiers\"\x18\n" + - "\x16GetEntitlementsRequest\"\xb9\x03\n" + - "\x17GetEntitlementsResponse\x12Y\n" + - "\x06badges\x18\x01 \x03(\v2A.org.signal.chat.account.GetEntitlementsResponse.BadgeEntitlementR\x06badges\x12Z\n" + - "\x06backup\x18\x02 \x01(\v2B.org.signal.chat.account.GetEntitlementsResponse.BackupEntitlementR\x06backup\x1a\x81\x01\n" + - "\x10BadgeEntitlement\x12\x19\n" + - "\bbadge_id\x18\x01 \x01(\tR\abadgeId\x128\n" + - "\x18expiration_epoch_seconds\x18\x02 \x01(\x04R\x16expirationEpochSeconds\x12\x18\n" + - "\avisible\x18\x03 \x01(\bR\avisible\x1ac\n" + - "\x11BackupEntitlement\x12\x14\n" + - "\x05level\x18\x01 \x01(\x04R\x05level\x128\n" + - "\x18expiration_epoch_seconds\x18\x02 \x01(\x04R\x16expirationEpochSeconds\"\x16\n" + - "\x14DeleteAccountRequest\"\x17\n" + - "\x15DeleteAccountResponse\"P\n" + - "\x1aSetRegistrationLockRequest\x122\n" + - "\x11registration_lock\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\x10registrationLock\"\x1d\n" + - "\x1bSetRegistrationLockResponse\"\x1e\n" + - "\x1cClearRegistrationLockRequest\"\x1f\n" + - "\x1dClearRegistrationLockResponse\"V\n" + - "\x1aReserveUsernameHashRequest\x128\n" + - "\x0fusername_hashes\x18\x01 \x03(\fB\x0f\x9a\x97\"\x04\b\x01\x10\x14җ\"\x03\x1a\x01 R\x0eusernameHashes\"\x16\n" + - "\x14UsernameNotAvailable\"\xd4\x01\n" + - "\x1bReserveUsernameHashResponse\x12%\n" + - "\rusername_hash\x18\x01 \x01(\fH\x00R\fusernameHash\x12\x81\x01\n" + - "\x16username_not_available\x18\x02 \x01(\v2-.org.signal.chat.account.UsernameNotAvailableB\x1a\xc2\xd5\"\x16username_not_availableH\x00R\x14usernameNotAvailableB\n" + - "\n" + - "\bresponse\"\xa5\x01\n" + - "\x1aConfirmUsernameHashRequest\x12*\n" + - "\rusername_hash\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fusernameHash\x12\x1f\n" + - "\bzk_proof\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\azkProof\x12:\n" + - "\x13username_ciphertext\x18\x03 \x01(\fB\t\x9a\x97\"\x05\b\x01\x10\x80\x01R\x12usernameCiphertext\"\x82\x04\n" + - "\x1bConfirmUsernameHashResponse\x12\x84\x01\n" + - "\x17confirmed_username_hash\x18\x01 \x01(\v2J.org.signal.chat.account.ConfirmUsernameHashResponse.ConfirmedUsernameHashH\x00R\x15confirmedUsernameHash\x12{\n" + - "\x15reservation_not_found\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x19\xc2\xd5\"\x15reservation_not_foundH\x00R\x13reservationNotFound\x12\x81\x01\n" + - "\x16username_not_available\x18\x03 \x01(\v2-.org.signal.chat.account.UsernameNotAvailableB\x1a\xc2\xd5\"\x16username_not_availableH\x00R\x14usernameNotAvailable\x1aO\n" + - "\x15ConfirmedUsernameHash\x120\n" + - "\x14username_link_handle\x18\x02 \x01(\fR\x12usernameLinkHandleJ\x04\b\x01\x10\x02B\n" + - "\n" + - "\bresponse\"\x1b\n" + - "\x19DeleteUsernameHashRequest\"\x1c\n" + - "\x1aDeleteUsernameHashResponse\"~\n" + - "\x16SetUsernameLinkRequest\x12:\n" + - "\x13username_ciphertext\x18\x01 \x01(\fB\t\x9a\x97\"\x05\b\x01\x10\x80\x01R\x12usernameCiphertext\x12(\n" + - "\x10keep_link_handle\x18\x02 \x01(\bR\x0ekeepLinkHandle\"\xc4\x01\n" + - "\x17SetUsernameLinkResponse\x122\n" + - "\x14username_link_handle\x18\x01 \x01(\fH\x00R\x12usernameLinkHandle\x12i\n" + - "\x0fno_username_set\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x13\xc2\xd5\"\x0fno_username_setH\x00R\rnoUsernameSetB\n" + - "\n" + - "\bresponse\"\x1b\n" + - "\x19DeleteUsernameLinkRequest\"\x1c\n" + - "\x1aDeleteUsernameLinkResponse\"\xe5\x01\n" + - "\"ConfigureUnidentifiedAccessRequest\x12?\n" + - "\x17unidentified_access_key\x18\x01 \x01(\fB\x05\xa2\x97\"\x01\x10H\x00R\x15unidentifiedAccessKey\x12m\n" + - "&allow_unrestricted_unidentified_access\x18\x02 \x01(\v2\x16.google.protobuf.EmptyH\x00R#allowUnrestrictedUnidentifiedAccessB\x0f\n" + - "\rconfiguration\"%\n" + - "#ConfigureUnidentifiedAccessResponse\"f\n" + - "#SetDiscoverableByPhoneNumberRequest\x12?\n" + - "\x1cdiscoverable_by_phone_number\x18\x01 \x01(\bR\x19discoverableByPhoneNumber\"&\n" + - "$SetDiscoverableByPhoneNumberResponse\"u\n" + - "&SetRegistrationRecoveryPasswordRequest\x12K\n" + - "\x1eregistration_recovery_password\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\x1cregistrationRecoveryPassword\")\n" + - "'SetRegistrationRecoveryPasswordResponse\"x\n" + - "\x1cCheckAccountExistenceRequest\x12X\n" + - "\x12service_identifier\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\x11serviceIdentifier\"F\n" + - "\x1dCheckAccountExistenceResponse\x12%\n" + - "\x0eaccount_exists\x18\x01 \x01(\bR\raccountExists\"G\n" + - "\x19LookupUsernameHashRequest\x12*\n" + - "\rusername_hash\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fusernameHash\"\xd4\x01\n" + - "\x1aLookupUsernameHashResponse\x12Z\n" + - "\x12service_identifier\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierH\x00R\x11serviceIdentifier\x12N\n" + - "\tnot_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\r\xc2\xd5\"\tnot_foundH\x00R\bnotFoundB\n" + - "\n" + - "\bresponse\"T\n" + - "\x19LookupUsernameLinkRequest\x127\n" + - "\x14username_link_handle\x18\x01 \x01(\fB\x05\xa2\x97\"\x01\x10R\x12usernameLinkHandle\"\xab\x01\n" + - "\x1aLookupUsernameLinkResponse\x121\n" + - "\x13username_ciphertext\x18\x01 \x01(\fH\x00R\x12usernameCiphertext\x12N\n" + - "\tnot_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\r\xc2\xd5\"\tnot_foundH\x00R\bnotFoundB\n" + - "\n" + - "\bresponse\"A\n" + - "\x19SetZkCredentialKeyRequest\x12$\n" + - "\n" + - "public_key\x18\x01 \x01(\fB\x05\xa2\x97\"\x01!R\tpublicKey\"=\n" + - "\x1aSetZkCredentialKeyResponse\x12\x1f\n" + - "\vrotation_id\x18\x01 \x01(\x04R\n" + - "rotationId\"\xb8\b\n" + - "\x13ChangeNumberRequest\x12%\n" + - "\n" + - "session_id\x18\x01 \x01(\fB\x04\x88\x97\"\x01H\x00R\tsessionId\x124\n" + - "\x11recovery_password\x18\x02 \x01(\fB\x05\xa2\x97\"\x01 H\x00R\x10recoveryPassword\x12\x1c\n" + - "\x06number\x18\x03 \x01(\tB\x04\xa8\x97\"\x01R\x06number\x123\n" + - "\x11registration_lock\x18\x04 \x01(\fB\x06\xa2\x97\"\x02\x00 R\x10registrationLock\x12.\n" + - "\x10pni_identity_key\x18\x05 \x01(\fB\x04\x88\x97\"\x01R\x0epniIdentityKey\x12c\n" + - "\x0fdevice_messages\x18\x06 \x01(\v2:.org.signal.chat.messages.IndividualRecipientMessageBundleR\x0edeviceMessages\x12\x84\x01\n" + - "\x1adevice_pni_signed_pre_keys\x18\a \x03(\v2H.org.signal.chat.account.ChangeNumberRequest.DevicePniSignedPreKeysEntryR\x16devicePniSignedPreKeys\x12\x98\x01\n" + - "\"device_pni_pq_last_resort_pre_keys\x18\b \x03(\v2N.org.signal.chat.account.ChangeNumberRequest.DevicePniPqLastResortPreKeysEntryR\x1cdevicePniPqLastResortPreKeys\x12v\n" + - "\x14pni_registration_ids\x18\t \x03(\v2D.org.signal.chat.account.ChangeNumberRequest.PniRegistrationIdsEntryR\x12pniRegistrationIds\x1aq\n" + - "\x1bDevicePniSignedPreKeysEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\rR\x03key\x12<\n" + - "\x05value\x18\x02 \x01(\v2&.org.signal.chat.common.EcSignedPreKeyR\x05value:\x028\x01\x1ax\n" + - "!DevicePniPqLastResortPreKeysEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\rR\x03key\x12=\n" + - "\x05value\x18\x02 \x01(\v2'.org.signal.chat.common.KemSignedPreKeyR\x05value:\x028\x01\x1aE\n" + - "\x17PniRegistrationIdsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\rR\x05value:\x028\x01B\x0e\n" + - "\fverification\"\xb5\b\n" + - "\x14ChangeNumberResponse\x12]\n" + - "\x13account_identifiers\x18\x01 \x01(\v2*.org.signal.chat.common.AccountIdentifiersH\x00R\x12accountIdentifiers\x12t\n" + - "\x12mismatched_devices\x18\x02 \x01(\v2+.org.signal.chat.messages.MismatchedDevicesB\x16\xc2\xd5\"\x12mismatched_devicesH\x00R\x11mismatchedDevices\x12\x8d\x01\n" + - "\x19registration_lock_failure\x18\x03 \x01(\v20.org.signal.chat.account.RegistrationLockFailureB\x1d\xc2\xd5\"\x19registration_lock_failureH\x00R\x17registrationLockFailure\x12_\n" + - "\rstale_devices\x18\x04 \x01(\v2%.org.signal.chat.account.StaleDevicesB\x11\xc2\xd5\"\rstale_devicesH\x00R\fstaleDevices\x12o\n" + - "\x11message_too_large\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x15\xc2\xd5\"\x11message_too_largeH\x00R\x0fmessageTooLarge\x12\x99\x01\n" + - "\x1funverified_registration_session\x18\x06 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1funverified_registration_sessionH\x00R\x1dunverifiedRegistrationSession\x12\x90\x01\n" + - "\x1cinvalid_registration_session\x18\a \x01(\v2*.org.signal.chat.errors.FailedPreconditionB \xc2\xd5\"\x1cinvalid_registration_sessionH\x00R\x1ainvalidRegistrationSession\x12\xaa\x01\n" + - "%recovery_password_verification_failed\x18\b \x01(\v2*.org.signal.chat.errors.FailedPreconditionB)\xc2\xd5\"%recovery_password_verification_failedH\x00R\"recoveryPasswordVerificationFailedB\n" + - "\n" + - "\bresponse\"\xad\x01\n" + - "\x17RegistrationLockFailure\x122\n" + - "\x15time_remaining_millis\x18\x01 \x01(\x04R\x13timeRemainingMillis\x12^\n" + - "\x10svr2_credentials\x18\x02 \x01(\v23.org.signal.chat.account.ExternalServiceCredentialsR\x0fsvr2Credentials\"T\n" + - "\x1aExternalServiceCredentials\x12\x1a\n" + - "\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" + - "\bpassword\x18\x02 \x01(\tR\bpassword\"=\n" + - "\fStaleDevices\x12-\n" + - "\rstale_devices\x18\x01 \x03(\rB\bҗ\"\x042\x02\x10\x7fR\fstaleDevices\"\x1d\n" + - "\x1bGetAccountDataReportRequest\"F\n" + - "\x1cGetAccountDataReportResponse\x12\x12\n" + - "\x04json\x18\x03 \x01(\tR\x04json\x12\x12\n" + - "\x04text\x18\x04 \x01(\tR\x04text\"\x18\n" + - "\x16GetCapabilitiesRequest\"\\\n" + - "\fCapabilities\x12L\n" + - "\fcapabilities\x18\x01 \x03(\x0e2(.org.signal.chat.common.DeviceCapabilityR\fcapabilities\"d\n" + - "\x17GetCapabilitiesResponse\x12I\n" + - "\fcapabilities\x18\x01 \x01(\v2%.org.signal.chat.account.CapabilitiesR\fcapabilities\"\x8a\x02\n" + - "\x1fGetCapabilitiesAnonymousRequest\x12b\n" + - "\x12account_identifier\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierB\b\xb8\x97\"\x01ȗ\"\x01R\x11accountIdentifier\x12?\n" + - "\x17unidentified_access_key\x18\x02 \x01(\fB\x05\xa2\x97\"\x01\x10H\x00R\x15unidentifiedAccessKey\x120\n" + - "\x10group_send_token\x18\x03 \x01(\fB\x04\x88\x97\"\x01H\x00R\x0egroupSendTokenB\x10\n" + - "\x0eauthentication\"\xfa\x02\n" + - " GetCapabilitiesAnonymousResponse\x12K\n" + - "\fcapabilities\x18\x01 \x01(\v2%.org.signal.chat.account.CapabilitiesH\x00R\fcapabilities\x12N\n" + - "\tnot_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\r\xc2\xd5\"\tnot_foundH\x00R\bnotFound\x12\xac\x01\n" + - "!failed_unidentified_authorization\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB%\xc2\xd5\"!failed_unidentified_authorizationH\x00R\x1ffailedUnidentifiedAuthorizationB\n" + - "\n" + - "\bresponse\"\x83\x01\n" + - "\x0eTotpParameters\x12\x1c\n" + - "\talgorithm\x18\x01 \x01(\tR\talgorithm\x12'\n" + - "\x0fpassword_length\x18\x02 \x01(\rR\x0epasswordLength\x12*\n" + - "\x11time_step_seconds\x18\x03 \x01(\rR\x0ftimeStepSeconds\"\x18\n" + - "\x16GenerateTotpKeyRequest\"\xf2\x02\n" + - "\x17GenerateTotpKeyResponse\x12d\n" + - "\rkey_generated\x18\x01 \x01(\v2=.org.signal.chat.account.GenerateTotpKeyResponse.KeyGeneratedH\x00R\fkeyGenerated\x12q\n" + - "\x12too_many_totp_keys\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x16\xc2\xd5\"\x12too_many_totp_keysH\x00R\x0ftooManyTotpKeys\x1ar\n" + - "\fKeyGenerated\x12\x10\n" + - "\x03key\x18\x01 \x01(\fR\x03key\x12P\n" + - "\x0ftotp_parameters\x18\x02 \x01(\v2'.org.signal.chat.account.TotpParametersR\x0etotpParametersB\n" + - "\n" + - "\bresponse\"|\n" + - "\x15ConfirmTotpKeyRequest\x12*\n" + - "\x11one_time_password\x18\x01 \x01(\rR\x0foneTimePassword\x127\n" + - "\x13metadata_ciphertext\x18\x02 \x01(\fB\x06\xa2\x97\"\x02\xa0\x01R\x12metadataCiphertext\"\xc7\x02\n" + - "\x16ConfirmTotpKeyResponse\x12c\n" + - "\rkey_confirmed\x18\x01 \x01(\v2<.org.signal.chat.account.ConfirmTotpKeyResponse.KeyConfirmedH\x00R\fkeyConfirmed\x12\x94\x01\n" + - "\x1eone_time_password_not_verified\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\"\xc2\xd5\"\x1eone_time_password_not_verifiedH\x00R\x1aoneTimePasswordNotVerified\x1a%\n" + - "\fKeyConfirmed\x12\x15\n" + - "\x06key_id\x18\x01 \x01(\rR\x05keyIdB\n" + - "\n" + - "\bresponse\"\x15\n" + - "\x13ListTotpKeysRequest\"\xf2\x02\n" + - "\x14ListTotpKeysResponse\x12K\n" + - "\x04keys\x18\x01 \x03(\v27.org.signal.chat.account.ListTotpKeysResponse.KeysEntryR\x04keys\x1a\x94\x01\n" + - "\x0fTotpKeyMetadata\x12/\n" + - "\x13metadata_ciphertext\x18\x01 \x01(\fR\x12metadataCiphertext\x12P\n" + - "\x0ftotp_parameters\x18\x02 \x01(\v2'.org.signal.chat.account.TotpParametersR\x0etotpParameters\x1av\n" + - "\tKeysEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\x05R\x03key\x12S\n" + - "\x05value\x18\x02 \x01(\v2=.org.signal.chat.account.ListTotpKeysResponse.TotpKeyMetadataR\x05value:\x028\x01\"k\n" + - "\x19SetTotpKeyMetadataRequest\x12\x15\n" + - "\x06key_id\x18\x01 \x01(\rR\x05keyId\x127\n" + - "\x13metadata_ciphertext\x18\x02 \x01(\fB\x06\xa2\x97\"\x02\xa0\x01R\x12metadataCiphertext\"\x88\x02\n" + - "\x1aSetTotpKeyMetadataResponse\x12p\n" + - "\x10metadata_updated\x18\x01 \x01(\v2C.org.signal.chat.account.SetTotpKeyMetadataResponse.MetadataUpdatedH\x00R\x0fmetadataUpdated\x12Y\n" + - "\rkey_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x11\xc2\xd5\"\rkey_not_foundH\x00R\vkeyNotFound\x1a\x11\n" + - "\x0fMetadataUpdatedB\n" + - "\n" + - "\bresponse\"-\n" + - "\x14RemoveTotpKeyRequest\x12\x15\n" + - "\x06key_id\x18\x01 \x01(\rR\x05keyId\"\x17\n" + - "\x15RemoveTotpKeyResponse2\xb4\x16\n" + - "\bAccounts\x12\x7f\n" + - "\x12GetAccountIdentity\x122.org.signal.chat.account.GetAccountIdentityRequest\x1a3.org.signal.chat.account.GetAccountIdentityResponse\"\x00\x12v\n" + - "\x0fGetEntitlements\x12/.org.signal.chat.account.GetEntitlementsRequest\x1a0.org.signal.chat.account.GetEntitlementsResponse\"\x00\x12p\n" + - "\rDeleteAccount\x12-.org.signal.chat.account.DeleteAccountRequest\x1a..org.signal.chat.account.DeleteAccountResponse\"\x00\x12\x82\x01\n" + - "\x13SetRegistrationLock\x123.org.signal.chat.account.SetRegistrationLockRequest\x1a4.org.signal.chat.account.SetRegistrationLockResponse\"\x00\x12\x88\x01\n" + - "\x15ClearRegistrationLock\x125.org.signal.chat.account.ClearRegistrationLockRequest\x1a6.org.signal.chat.account.ClearRegistrationLockResponse\"\x00\x12\x82\x01\n" + - "\x13ReserveUsernameHash\x123.org.signal.chat.account.ReserveUsernameHashRequest\x1a4.org.signal.chat.account.ReserveUsernameHashResponse\"\x00\x12\x82\x01\n" + - "\x13ConfirmUsernameHash\x123.org.signal.chat.account.ConfirmUsernameHashRequest\x1a4.org.signal.chat.account.ConfirmUsernameHashResponse\"\x00\x12\x7f\n" + - "\x12DeleteUsernameHash\x122.org.signal.chat.account.DeleteUsernameHashRequest\x1a3.org.signal.chat.account.DeleteUsernameHashResponse\"\x00\x12v\n" + - "\x0fSetUsernameLink\x12/.org.signal.chat.account.SetUsernameLinkRequest\x1a0.org.signal.chat.account.SetUsernameLinkResponse\"\x00\x12\x7f\n" + - "\x12DeleteUsernameLink\x122.org.signal.chat.account.DeleteUsernameLinkRequest\x1a3.org.signal.chat.account.DeleteUsernameLinkResponse\"\x00\x12\x9a\x01\n" + - "\x1bConfigureUnidentifiedAccess\x12;.org.signal.chat.account.ConfigureUnidentifiedAccessRequest\x1a<.org.signal.chat.account.ConfigureUnidentifiedAccessResponse\"\x00\x12\x9d\x01\n" + - "\x1cSetDiscoverableByPhoneNumber\x12<.org.signal.chat.account.SetDiscoverableByPhoneNumberRequest\x1a=.org.signal.chat.account.SetDiscoverableByPhoneNumberResponse\"\x00\x12\xa6\x01\n" + - "\x1fSetRegistrationRecoveryPassword\x12?.org.signal.chat.account.SetRegistrationRecoveryPasswordRequest\x1a@.org.signal.chat.account.SetRegistrationRecoveryPasswordResponse\"\x00\x12\x7f\n" + - "\x12SetZkCredentialKey\x122.org.signal.chat.account.SetZkCredentialKeyRequest\x1a3.org.signal.chat.account.SetZkCredentialKeyResponse\"\x00\x12m\n" + - "\fChangeNumber\x12,.org.signal.chat.account.ChangeNumberRequest\x1a-.org.signal.chat.account.ChangeNumberResponse\"\x00\x12\x85\x01\n" + - "\x14GetAccountDataReport\x124.org.signal.chat.account.GetAccountDataReportRequest\x1a5.org.signal.chat.account.GetAccountDataReportResponse\"\x00\x12v\n" + - "\x0fGetCapabilities\x12/.org.signal.chat.account.GetCapabilitiesRequest\x1a0.org.signal.chat.account.GetCapabilitiesResponse\"\x00\x12v\n" + - "\x0fGenerateTotpKey\x12/.org.signal.chat.account.GenerateTotpKeyRequest\x1a0.org.signal.chat.account.GenerateTotpKeyResponse\"\x00\x12s\n" + - "\x0eConfirmTotpKey\x12..org.signal.chat.account.ConfirmTotpKeyRequest\x1a/.org.signal.chat.account.ConfirmTotpKeyResponse\"\x00\x12m\n" + - "\fListTotpKeys\x12,.org.signal.chat.account.ListTotpKeysRequest\x1a-.org.signal.chat.account.ListTotpKeysResponse\"\x00\x12\x7f\n" + - "\x12SetTotpKeyMetadata\x122.org.signal.chat.account.SetTotpKeyMetadataRequest\x1a3.org.signal.chat.account.SetTotpKeyMetadataResponse\"\x00\x12p\n" + - "\rRemoveTotpKey\x12-.org.signal.chat.account.RemoveTotpKeyRequest\x1a..org.signal.chat.account.RemoveTotpKeyResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xb1\x04\n" + - "\x11AccountsAnonymous\x12\x88\x01\n" + - "\x15CheckAccountExistence\x125.org.signal.chat.account.CheckAccountExistenceRequest\x1a6.org.signal.chat.account.CheckAccountExistenceResponse\"\x00\x12\x7f\n" + - "\x12LookupUsernameHash\x122.org.signal.chat.account.LookupUsernameHashRequest\x1a3.org.signal.chat.account.LookupUsernameHashResponse\"\x00\x12\x7f\n" + - "\x12LookupUsernameLink\x122.org.signal.chat.account.LookupUsernameLinkRequest\x1a3.org.signal.chat.account.LookupUsernameLinkResponse\"\x00\x12\x88\x01\n" + - "\x0fGetCapabilities\x128.org.signal.chat.account.GetCapabilitiesAnonymousRequest\x1a9.org.signal.chat.account.GetCapabilitiesAnonymousResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_account_proto_rawDescOnce sync.Once - file_org_signal_chat_account_proto_rawDescData []byte -) - -func file_org_signal_chat_account_proto_rawDescGZIP() []byte { - file_org_signal_chat_account_proto_rawDescOnce.Do(func() { - file_org_signal_chat_account_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_account_proto_rawDesc), len(file_org_signal_chat_account_proto_rawDesc))) - }) - return file_org_signal_chat_account_proto_rawDescData -} - -var file_org_signal_chat_account_proto_msgTypes = make([]protoimpl.MessageInfo, 69) -var file_org_signal_chat_account_proto_goTypes = []any{ - (*GetAccountIdentityRequest)(nil), // 0: org.signal.chat.account.GetAccountIdentityRequest - (*GetAccountIdentityResponse)(nil), // 1: org.signal.chat.account.GetAccountIdentityResponse - (*GetEntitlementsRequest)(nil), // 2: org.signal.chat.account.GetEntitlementsRequest - (*GetEntitlementsResponse)(nil), // 3: org.signal.chat.account.GetEntitlementsResponse - (*DeleteAccountRequest)(nil), // 4: org.signal.chat.account.DeleteAccountRequest - (*DeleteAccountResponse)(nil), // 5: org.signal.chat.account.DeleteAccountResponse - (*SetRegistrationLockRequest)(nil), // 6: org.signal.chat.account.SetRegistrationLockRequest - (*SetRegistrationLockResponse)(nil), // 7: org.signal.chat.account.SetRegistrationLockResponse - (*ClearRegistrationLockRequest)(nil), // 8: org.signal.chat.account.ClearRegistrationLockRequest - (*ClearRegistrationLockResponse)(nil), // 9: org.signal.chat.account.ClearRegistrationLockResponse - (*ReserveUsernameHashRequest)(nil), // 10: org.signal.chat.account.ReserveUsernameHashRequest - (*UsernameNotAvailable)(nil), // 11: org.signal.chat.account.UsernameNotAvailable - (*ReserveUsernameHashResponse)(nil), // 12: org.signal.chat.account.ReserveUsernameHashResponse - (*ConfirmUsernameHashRequest)(nil), // 13: org.signal.chat.account.ConfirmUsernameHashRequest - (*ConfirmUsernameHashResponse)(nil), // 14: org.signal.chat.account.ConfirmUsernameHashResponse - (*DeleteUsernameHashRequest)(nil), // 15: org.signal.chat.account.DeleteUsernameHashRequest - (*DeleteUsernameHashResponse)(nil), // 16: org.signal.chat.account.DeleteUsernameHashResponse - (*SetUsernameLinkRequest)(nil), // 17: org.signal.chat.account.SetUsernameLinkRequest - (*SetUsernameLinkResponse)(nil), // 18: org.signal.chat.account.SetUsernameLinkResponse - (*DeleteUsernameLinkRequest)(nil), // 19: org.signal.chat.account.DeleteUsernameLinkRequest - (*DeleteUsernameLinkResponse)(nil), // 20: org.signal.chat.account.DeleteUsernameLinkResponse - (*ConfigureUnidentifiedAccessRequest)(nil), // 21: org.signal.chat.account.ConfigureUnidentifiedAccessRequest - (*ConfigureUnidentifiedAccessResponse)(nil), // 22: org.signal.chat.account.ConfigureUnidentifiedAccessResponse - (*SetDiscoverableByPhoneNumberRequest)(nil), // 23: org.signal.chat.account.SetDiscoverableByPhoneNumberRequest - (*SetDiscoverableByPhoneNumberResponse)(nil), // 24: org.signal.chat.account.SetDiscoverableByPhoneNumberResponse - (*SetRegistrationRecoveryPasswordRequest)(nil), // 25: org.signal.chat.account.SetRegistrationRecoveryPasswordRequest - (*SetRegistrationRecoveryPasswordResponse)(nil), // 26: org.signal.chat.account.SetRegistrationRecoveryPasswordResponse - (*CheckAccountExistenceRequest)(nil), // 27: org.signal.chat.account.CheckAccountExistenceRequest - (*CheckAccountExistenceResponse)(nil), // 28: org.signal.chat.account.CheckAccountExistenceResponse - (*LookupUsernameHashRequest)(nil), // 29: org.signal.chat.account.LookupUsernameHashRequest - (*LookupUsernameHashResponse)(nil), // 30: org.signal.chat.account.LookupUsernameHashResponse - (*LookupUsernameLinkRequest)(nil), // 31: org.signal.chat.account.LookupUsernameLinkRequest - (*LookupUsernameLinkResponse)(nil), // 32: org.signal.chat.account.LookupUsernameLinkResponse - (*SetZkCredentialKeyRequest)(nil), // 33: org.signal.chat.account.SetZkCredentialKeyRequest - (*SetZkCredentialKeyResponse)(nil), // 34: org.signal.chat.account.SetZkCredentialKeyResponse - (*ChangeNumberRequest)(nil), // 35: org.signal.chat.account.ChangeNumberRequest - (*ChangeNumberResponse)(nil), // 36: org.signal.chat.account.ChangeNumberResponse - (*RegistrationLockFailure)(nil), // 37: org.signal.chat.account.RegistrationLockFailure - (*ExternalServiceCredentials)(nil), // 38: org.signal.chat.account.ExternalServiceCredentials - (*StaleDevices)(nil), // 39: org.signal.chat.account.StaleDevices - (*GetAccountDataReportRequest)(nil), // 40: org.signal.chat.account.GetAccountDataReportRequest - (*GetAccountDataReportResponse)(nil), // 41: org.signal.chat.account.GetAccountDataReportResponse - (*GetCapabilitiesRequest)(nil), // 42: org.signal.chat.account.GetCapabilitiesRequest - (*Capabilities)(nil), // 43: org.signal.chat.account.Capabilities - (*GetCapabilitiesResponse)(nil), // 44: org.signal.chat.account.GetCapabilitiesResponse - (*GetCapabilitiesAnonymousRequest)(nil), // 45: org.signal.chat.account.GetCapabilitiesAnonymousRequest - (*GetCapabilitiesAnonymousResponse)(nil), // 46: org.signal.chat.account.GetCapabilitiesAnonymousResponse - (*TotpParameters)(nil), // 47: org.signal.chat.account.TotpParameters - (*GenerateTotpKeyRequest)(nil), // 48: org.signal.chat.account.GenerateTotpKeyRequest - (*GenerateTotpKeyResponse)(nil), // 49: org.signal.chat.account.GenerateTotpKeyResponse - (*ConfirmTotpKeyRequest)(nil), // 50: org.signal.chat.account.ConfirmTotpKeyRequest - (*ConfirmTotpKeyResponse)(nil), // 51: org.signal.chat.account.ConfirmTotpKeyResponse - (*ListTotpKeysRequest)(nil), // 52: org.signal.chat.account.ListTotpKeysRequest - (*ListTotpKeysResponse)(nil), // 53: org.signal.chat.account.ListTotpKeysResponse - (*SetTotpKeyMetadataRequest)(nil), // 54: org.signal.chat.account.SetTotpKeyMetadataRequest - (*SetTotpKeyMetadataResponse)(nil), // 55: org.signal.chat.account.SetTotpKeyMetadataResponse - (*RemoveTotpKeyRequest)(nil), // 56: org.signal.chat.account.RemoveTotpKeyRequest - (*RemoveTotpKeyResponse)(nil), // 57: org.signal.chat.account.RemoveTotpKeyResponse - (*GetEntitlementsResponse_BadgeEntitlement)(nil), // 58: org.signal.chat.account.GetEntitlementsResponse.BadgeEntitlement - (*GetEntitlementsResponse_BackupEntitlement)(nil), // 59: org.signal.chat.account.GetEntitlementsResponse.BackupEntitlement - (*ConfirmUsernameHashResponse_ConfirmedUsernameHash)(nil), // 60: org.signal.chat.account.ConfirmUsernameHashResponse.ConfirmedUsernameHash - nil, // 61: org.signal.chat.account.ChangeNumberRequest.DevicePniSignedPreKeysEntry - nil, // 62: org.signal.chat.account.ChangeNumberRequest.DevicePniPqLastResortPreKeysEntry - nil, // 63: org.signal.chat.account.ChangeNumberRequest.PniRegistrationIdsEntry - (*GenerateTotpKeyResponse_KeyGenerated)(nil), // 64: org.signal.chat.account.GenerateTotpKeyResponse.KeyGenerated - (*ConfirmTotpKeyResponse_KeyConfirmed)(nil), // 65: org.signal.chat.account.ConfirmTotpKeyResponse.KeyConfirmed - (*ListTotpKeysResponse_TotpKeyMetadata)(nil), // 66: org.signal.chat.account.ListTotpKeysResponse.TotpKeyMetadata - nil, // 67: org.signal.chat.account.ListTotpKeysResponse.KeysEntry - (*SetTotpKeyMetadataResponse_MetadataUpdated)(nil), // 68: org.signal.chat.account.SetTotpKeyMetadataResponse.MetadataUpdated - (*common.AccountIdentifiers)(nil), // 69: org.signal.chat.common.AccountIdentifiers - (*errors.FailedPrecondition)(nil), // 70: org.signal.chat.errors.FailedPrecondition - (*emptypb.Empty)(nil), // 71: google.protobuf.Empty - (*common.ServiceIdentifier)(nil), // 72: org.signal.chat.common.ServiceIdentifier - (*errors.NotFound)(nil), // 73: org.signal.chat.errors.NotFound - (*messages.IndividualRecipientMessageBundle)(nil), // 74: org.signal.chat.messages.IndividualRecipientMessageBundle - (*messages.MismatchedDevices)(nil), // 75: org.signal.chat.messages.MismatchedDevices - (common.DeviceCapability)(0), // 76: org.signal.chat.common.DeviceCapability - (*errors.FailedUnidentifiedAuthorization)(nil), // 77: org.signal.chat.errors.FailedUnidentifiedAuthorization - (*common.EcSignedPreKey)(nil), // 78: org.signal.chat.common.EcSignedPreKey - (*common.KemSignedPreKey)(nil), // 79: org.signal.chat.common.KemSignedPreKey -} -var file_org_signal_chat_account_proto_depIdxs = []int32{ - 69, // 0: org.signal.chat.account.GetAccountIdentityResponse.account_identifiers:type_name -> org.signal.chat.common.AccountIdentifiers - 58, // 1: org.signal.chat.account.GetEntitlementsResponse.badges:type_name -> org.signal.chat.account.GetEntitlementsResponse.BadgeEntitlement - 59, // 2: org.signal.chat.account.GetEntitlementsResponse.backup:type_name -> org.signal.chat.account.GetEntitlementsResponse.BackupEntitlement - 11, // 3: org.signal.chat.account.ReserveUsernameHashResponse.username_not_available:type_name -> org.signal.chat.account.UsernameNotAvailable - 60, // 4: org.signal.chat.account.ConfirmUsernameHashResponse.confirmed_username_hash:type_name -> org.signal.chat.account.ConfirmUsernameHashResponse.ConfirmedUsernameHash - 70, // 5: org.signal.chat.account.ConfirmUsernameHashResponse.reservation_not_found:type_name -> org.signal.chat.errors.FailedPrecondition - 11, // 6: org.signal.chat.account.ConfirmUsernameHashResponse.username_not_available:type_name -> org.signal.chat.account.UsernameNotAvailable - 70, // 7: org.signal.chat.account.SetUsernameLinkResponse.no_username_set:type_name -> org.signal.chat.errors.FailedPrecondition - 71, // 8: org.signal.chat.account.ConfigureUnidentifiedAccessRequest.allow_unrestricted_unidentified_access:type_name -> google.protobuf.Empty - 72, // 9: org.signal.chat.account.CheckAccountExistenceRequest.service_identifier:type_name -> org.signal.chat.common.ServiceIdentifier - 72, // 10: org.signal.chat.account.LookupUsernameHashResponse.service_identifier:type_name -> org.signal.chat.common.ServiceIdentifier - 73, // 11: org.signal.chat.account.LookupUsernameHashResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 73, // 12: org.signal.chat.account.LookupUsernameLinkResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 74, // 13: org.signal.chat.account.ChangeNumberRequest.device_messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle - 61, // 14: org.signal.chat.account.ChangeNumberRequest.device_pni_signed_pre_keys:type_name -> org.signal.chat.account.ChangeNumberRequest.DevicePniSignedPreKeysEntry - 62, // 15: org.signal.chat.account.ChangeNumberRequest.device_pni_pq_last_resort_pre_keys:type_name -> org.signal.chat.account.ChangeNumberRequest.DevicePniPqLastResortPreKeysEntry - 63, // 16: org.signal.chat.account.ChangeNumberRequest.pni_registration_ids:type_name -> org.signal.chat.account.ChangeNumberRequest.PniRegistrationIdsEntry - 69, // 17: org.signal.chat.account.ChangeNumberResponse.account_identifiers:type_name -> org.signal.chat.common.AccountIdentifiers - 75, // 18: org.signal.chat.account.ChangeNumberResponse.mismatched_devices:type_name -> org.signal.chat.messages.MismatchedDevices - 37, // 19: org.signal.chat.account.ChangeNumberResponse.registration_lock_failure:type_name -> org.signal.chat.account.RegistrationLockFailure - 39, // 20: org.signal.chat.account.ChangeNumberResponse.stale_devices:type_name -> org.signal.chat.account.StaleDevices - 70, // 21: org.signal.chat.account.ChangeNumberResponse.message_too_large:type_name -> org.signal.chat.errors.FailedPrecondition - 70, // 22: org.signal.chat.account.ChangeNumberResponse.unverified_registration_session:type_name -> org.signal.chat.errors.FailedPrecondition - 70, // 23: org.signal.chat.account.ChangeNumberResponse.invalid_registration_session:type_name -> org.signal.chat.errors.FailedPrecondition - 70, // 24: org.signal.chat.account.ChangeNumberResponse.recovery_password_verification_failed:type_name -> org.signal.chat.errors.FailedPrecondition - 38, // 25: org.signal.chat.account.RegistrationLockFailure.svr2_credentials:type_name -> org.signal.chat.account.ExternalServiceCredentials - 76, // 26: org.signal.chat.account.Capabilities.capabilities:type_name -> org.signal.chat.common.DeviceCapability - 43, // 27: org.signal.chat.account.GetCapabilitiesResponse.capabilities:type_name -> org.signal.chat.account.Capabilities - 72, // 28: org.signal.chat.account.GetCapabilitiesAnonymousRequest.account_identifier:type_name -> org.signal.chat.common.ServiceIdentifier - 43, // 29: org.signal.chat.account.GetCapabilitiesAnonymousResponse.capabilities:type_name -> org.signal.chat.account.Capabilities - 73, // 30: org.signal.chat.account.GetCapabilitiesAnonymousResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 77, // 31: org.signal.chat.account.GetCapabilitiesAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 64, // 32: org.signal.chat.account.GenerateTotpKeyResponse.key_generated:type_name -> org.signal.chat.account.GenerateTotpKeyResponse.KeyGenerated - 70, // 33: org.signal.chat.account.GenerateTotpKeyResponse.too_many_totp_keys:type_name -> org.signal.chat.errors.FailedPrecondition - 65, // 34: org.signal.chat.account.ConfirmTotpKeyResponse.key_confirmed:type_name -> org.signal.chat.account.ConfirmTotpKeyResponse.KeyConfirmed - 70, // 35: org.signal.chat.account.ConfirmTotpKeyResponse.one_time_password_not_verified:type_name -> org.signal.chat.errors.FailedPrecondition - 67, // 36: org.signal.chat.account.ListTotpKeysResponse.keys:type_name -> org.signal.chat.account.ListTotpKeysResponse.KeysEntry - 68, // 37: org.signal.chat.account.SetTotpKeyMetadataResponse.metadata_updated:type_name -> org.signal.chat.account.SetTotpKeyMetadataResponse.MetadataUpdated - 73, // 38: org.signal.chat.account.SetTotpKeyMetadataResponse.key_not_found:type_name -> org.signal.chat.errors.NotFound - 78, // 39: org.signal.chat.account.ChangeNumberRequest.DevicePniSignedPreKeysEntry.value:type_name -> org.signal.chat.common.EcSignedPreKey - 79, // 40: org.signal.chat.account.ChangeNumberRequest.DevicePniPqLastResortPreKeysEntry.value:type_name -> org.signal.chat.common.KemSignedPreKey - 47, // 41: org.signal.chat.account.GenerateTotpKeyResponse.KeyGenerated.totp_parameters:type_name -> org.signal.chat.account.TotpParameters - 47, // 42: org.signal.chat.account.ListTotpKeysResponse.TotpKeyMetadata.totp_parameters:type_name -> org.signal.chat.account.TotpParameters - 66, // 43: org.signal.chat.account.ListTotpKeysResponse.KeysEntry.value:type_name -> org.signal.chat.account.ListTotpKeysResponse.TotpKeyMetadata - 0, // 44: org.signal.chat.account.Accounts.GetAccountIdentity:input_type -> org.signal.chat.account.GetAccountIdentityRequest - 2, // 45: org.signal.chat.account.Accounts.GetEntitlements:input_type -> org.signal.chat.account.GetEntitlementsRequest - 4, // 46: org.signal.chat.account.Accounts.DeleteAccount:input_type -> org.signal.chat.account.DeleteAccountRequest - 6, // 47: org.signal.chat.account.Accounts.SetRegistrationLock:input_type -> org.signal.chat.account.SetRegistrationLockRequest - 8, // 48: org.signal.chat.account.Accounts.ClearRegistrationLock:input_type -> org.signal.chat.account.ClearRegistrationLockRequest - 10, // 49: org.signal.chat.account.Accounts.ReserveUsernameHash:input_type -> org.signal.chat.account.ReserveUsernameHashRequest - 13, // 50: org.signal.chat.account.Accounts.ConfirmUsernameHash:input_type -> org.signal.chat.account.ConfirmUsernameHashRequest - 15, // 51: org.signal.chat.account.Accounts.DeleteUsernameHash:input_type -> org.signal.chat.account.DeleteUsernameHashRequest - 17, // 52: org.signal.chat.account.Accounts.SetUsernameLink:input_type -> org.signal.chat.account.SetUsernameLinkRequest - 19, // 53: org.signal.chat.account.Accounts.DeleteUsernameLink:input_type -> org.signal.chat.account.DeleteUsernameLinkRequest - 21, // 54: org.signal.chat.account.Accounts.ConfigureUnidentifiedAccess:input_type -> org.signal.chat.account.ConfigureUnidentifiedAccessRequest - 23, // 55: org.signal.chat.account.Accounts.SetDiscoverableByPhoneNumber:input_type -> org.signal.chat.account.SetDiscoverableByPhoneNumberRequest - 25, // 56: org.signal.chat.account.Accounts.SetRegistrationRecoveryPassword:input_type -> org.signal.chat.account.SetRegistrationRecoveryPasswordRequest - 33, // 57: org.signal.chat.account.Accounts.SetZkCredentialKey:input_type -> org.signal.chat.account.SetZkCredentialKeyRequest - 35, // 58: org.signal.chat.account.Accounts.ChangeNumber:input_type -> org.signal.chat.account.ChangeNumberRequest - 40, // 59: org.signal.chat.account.Accounts.GetAccountDataReport:input_type -> org.signal.chat.account.GetAccountDataReportRequest - 42, // 60: org.signal.chat.account.Accounts.GetCapabilities:input_type -> org.signal.chat.account.GetCapabilitiesRequest - 48, // 61: org.signal.chat.account.Accounts.GenerateTotpKey:input_type -> org.signal.chat.account.GenerateTotpKeyRequest - 50, // 62: org.signal.chat.account.Accounts.ConfirmTotpKey:input_type -> org.signal.chat.account.ConfirmTotpKeyRequest - 52, // 63: org.signal.chat.account.Accounts.ListTotpKeys:input_type -> org.signal.chat.account.ListTotpKeysRequest - 54, // 64: org.signal.chat.account.Accounts.SetTotpKeyMetadata:input_type -> org.signal.chat.account.SetTotpKeyMetadataRequest - 56, // 65: org.signal.chat.account.Accounts.RemoveTotpKey:input_type -> org.signal.chat.account.RemoveTotpKeyRequest - 27, // 66: org.signal.chat.account.AccountsAnonymous.CheckAccountExistence:input_type -> org.signal.chat.account.CheckAccountExistenceRequest - 29, // 67: org.signal.chat.account.AccountsAnonymous.LookupUsernameHash:input_type -> org.signal.chat.account.LookupUsernameHashRequest - 31, // 68: org.signal.chat.account.AccountsAnonymous.LookupUsernameLink:input_type -> org.signal.chat.account.LookupUsernameLinkRequest - 45, // 69: org.signal.chat.account.AccountsAnonymous.GetCapabilities:input_type -> org.signal.chat.account.GetCapabilitiesAnonymousRequest - 1, // 70: org.signal.chat.account.Accounts.GetAccountIdentity:output_type -> org.signal.chat.account.GetAccountIdentityResponse - 3, // 71: org.signal.chat.account.Accounts.GetEntitlements:output_type -> org.signal.chat.account.GetEntitlementsResponse - 5, // 72: org.signal.chat.account.Accounts.DeleteAccount:output_type -> org.signal.chat.account.DeleteAccountResponse - 7, // 73: org.signal.chat.account.Accounts.SetRegistrationLock:output_type -> org.signal.chat.account.SetRegistrationLockResponse - 9, // 74: org.signal.chat.account.Accounts.ClearRegistrationLock:output_type -> org.signal.chat.account.ClearRegistrationLockResponse - 12, // 75: org.signal.chat.account.Accounts.ReserveUsernameHash:output_type -> org.signal.chat.account.ReserveUsernameHashResponse - 14, // 76: org.signal.chat.account.Accounts.ConfirmUsernameHash:output_type -> org.signal.chat.account.ConfirmUsernameHashResponse - 16, // 77: org.signal.chat.account.Accounts.DeleteUsernameHash:output_type -> org.signal.chat.account.DeleteUsernameHashResponse - 18, // 78: org.signal.chat.account.Accounts.SetUsernameLink:output_type -> org.signal.chat.account.SetUsernameLinkResponse - 20, // 79: org.signal.chat.account.Accounts.DeleteUsernameLink:output_type -> org.signal.chat.account.DeleteUsernameLinkResponse - 22, // 80: org.signal.chat.account.Accounts.ConfigureUnidentifiedAccess:output_type -> org.signal.chat.account.ConfigureUnidentifiedAccessResponse - 24, // 81: org.signal.chat.account.Accounts.SetDiscoverableByPhoneNumber:output_type -> org.signal.chat.account.SetDiscoverableByPhoneNumberResponse - 26, // 82: org.signal.chat.account.Accounts.SetRegistrationRecoveryPassword:output_type -> org.signal.chat.account.SetRegistrationRecoveryPasswordResponse - 34, // 83: org.signal.chat.account.Accounts.SetZkCredentialKey:output_type -> org.signal.chat.account.SetZkCredentialKeyResponse - 36, // 84: org.signal.chat.account.Accounts.ChangeNumber:output_type -> org.signal.chat.account.ChangeNumberResponse - 41, // 85: org.signal.chat.account.Accounts.GetAccountDataReport:output_type -> org.signal.chat.account.GetAccountDataReportResponse - 44, // 86: org.signal.chat.account.Accounts.GetCapabilities:output_type -> org.signal.chat.account.GetCapabilitiesResponse - 49, // 87: org.signal.chat.account.Accounts.GenerateTotpKey:output_type -> org.signal.chat.account.GenerateTotpKeyResponse - 51, // 88: org.signal.chat.account.Accounts.ConfirmTotpKey:output_type -> org.signal.chat.account.ConfirmTotpKeyResponse - 53, // 89: org.signal.chat.account.Accounts.ListTotpKeys:output_type -> org.signal.chat.account.ListTotpKeysResponse - 55, // 90: org.signal.chat.account.Accounts.SetTotpKeyMetadata:output_type -> org.signal.chat.account.SetTotpKeyMetadataResponse - 57, // 91: org.signal.chat.account.Accounts.RemoveTotpKey:output_type -> org.signal.chat.account.RemoveTotpKeyResponse - 28, // 92: org.signal.chat.account.AccountsAnonymous.CheckAccountExistence:output_type -> org.signal.chat.account.CheckAccountExistenceResponse - 30, // 93: org.signal.chat.account.AccountsAnonymous.LookupUsernameHash:output_type -> org.signal.chat.account.LookupUsernameHashResponse - 32, // 94: org.signal.chat.account.AccountsAnonymous.LookupUsernameLink:output_type -> org.signal.chat.account.LookupUsernameLinkResponse - 46, // 95: org.signal.chat.account.AccountsAnonymous.GetCapabilities:output_type -> org.signal.chat.account.GetCapabilitiesAnonymousResponse - 70, // [70:96] is the sub-list for method output_type - 44, // [44:70] is the sub-list for method input_type - 44, // [44:44] is the sub-list for extension type_name - 44, // [44:44] is the sub-list for extension extendee - 0, // [0:44] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_account_proto_init() } -func file_org_signal_chat_account_proto_init() { - if File_org_signal_chat_account_proto != nil { - return - } - file_org_signal_chat_account_proto_msgTypes[12].OneofWrappers = []any{ - (*ReserveUsernameHashResponse_UsernameHash)(nil), - (*ReserveUsernameHashResponse_UsernameNotAvailable)(nil), - } - file_org_signal_chat_account_proto_msgTypes[14].OneofWrappers = []any{ - (*ConfirmUsernameHashResponse_ConfirmedUsernameHash_)(nil), - (*ConfirmUsernameHashResponse_ReservationNotFound)(nil), - (*ConfirmUsernameHashResponse_UsernameNotAvailable)(nil), - } - file_org_signal_chat_account_proto_msgTypes[18].OneofWrappers = []any{ - (*SetUsernameLinkResponse_UsernameLinkHandle)(nil), - (*SetUsernameLinkResponse_NoUsernameSet)(nil), - } - file_org_signal_chat_account_proto_msgTypes[21].OneofWrappers = []any{ - (*ConfigureUnidentifiedAccessRequest_UnidentifiedAccessKey)(nil), - (*ConfigureUnidentifiedAccessRequest_AllowUnrestrictedUnidentifiedAccess)(nil), - } - file_org_signal_chat_account_proto_msgTypes[30].OneofWrappers = []any{ - (*LookupUsernameHashResponse_ServiceIdentifier)(nil), - (*LookupUsernameHashResponse_NotFound)(nil), - } - file_org_signal_chat_account_proto_msgTypes[32].OneofWrappers = []any{ - (*LookupUsernameLinkResponse_UsernameCiphertext)(nil), - (*LookupUsernameLinkResponse_NotFound)(nil), - } - file_org_signal_chat_account_proto_msgTypes[35].OneofWrappers = []any{ - (*ChangeNumberRequest_SessionId)(nil), - (*ChangeNumberRequest_RecoveryPassword)(nil), - } - file_org_signal_chat_account_proto_msgTypes[36].OneofWrappers = []any{ - (*ChangeNumberResponse_AccountIdentifiers)(nil), - (*ChangeNumberResponse_MismatchedDevices)(nil), - (*ChangeNumberResponse_RegistrationLockFailure)(nil), - (*ChangeNumberResponse_StaleDevices)(nil), - (*ChangeNumberResponse_MessageTooLarge)(nil), - (*ChangeNumberResponse_UnverifiedRegistrationSession)(nil), - (*ChangeNumberResponse_InvalidRegistrationSession)(nil), - (*ChangeNumberResponse_RecoveryPasswordVerificationFailed)(nil), - } - file_org_signal_chat_account_proto_msgTypes[45].OneofWrappers = []any{ - (*GetCapabilitiesAnonymousRequest_UnidentifiedAccessKey)(nil), - (*GetCapabilitiesAnonymousRequest_GroupSendToken)(nil), - } - file_org_signal_chat_account_proto_msgTypes[46].OneofWrappers = []any{ - (*GetCapabilitiesAnonymousResponse_Capabilities)(nil), - (*GetCapabilitiesAnonymousResponse_NotFound)(nil), - (*GetCapabilitiesAnonymousResponse_FailedUnidentifiedAuthorization)(nil), - } - file_org_signal_chat_account_proto_msgTypes[49].OneofWrappers = []any{ - (*GenerateTotpKeyResponse_KeyGenerated_)(nil), - (*GenerateTotpKeyResponse_TooManyTotpKeys)(nil), - } - file_org_signal_chat_account_proto_msgTypes[51].OneofWrappers = []any{ - (*ConfirmTotpKeyResponse_KeyConfirmed_)(nil), - (*ConfirmTotpKeyResponse_OneTimePasswordNotVerified)(nil), - } - file_org_signal_chat_account_proto_msgTypes[55].OneofWrappers = []any{ - (*SetTotpKeyMetadataResponse_MetadataUpdated_)(nil), - (*SetTotpKeyMetadataResponse_KeyNotFound)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_account_proto_rawDesc), len(file_org_signal_chat_account_proto_rawDesc)), - NumEnums: 0, - NumMessages: 69, - NumExtensions: 0, - NumServices: 2, - }, - GoTypes: file_org_signal_chat_account_proto_goTypes, - DependencyIndexes: file_org_signal_chat_account_proto_depIdxs, - MessageInfos: file_org_signal_chat_account_proto_msgTypes, - }.Build() - File_org_signal_chat_account_proto = out.File - file_org_signal_chat_account_proto_goTypes = nil - file_org_signal_chat_account_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/account/account_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/account/account_grpc.pb.go deleted file mode 100644 index 609e7d6..0000000 --- a/pkg/signalmeow/protobuf/rpc/account/account_grpc.pb.go +++ /dev/null @@ -1,1231 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/account.proto - -package account - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Accounts_GetAccountIdentity_FullMethodName = "/org.signal.chat.account.Accounts/GetAccountIdentity" - Accounts_GetEntitlements_FullMethodName = "/org.signal.chat.account.Accounts/GetEntitlements" - Accounts_DeleteAccount_FullMethodName = "/org.signal.chat.account.Accounts/DeleteAccount" - Accounts_SetRegistrationLock_FullMethodName = "/org.signal.chat.account.Accounts/SetRegistrationLock" - Accounts_ClearRegistrationLock_FullMethodName = "/org.signal.chat.account.Accounts/ClearRegistrationLock" - Accounts_ReserveUsernameHash_FullMethodName = "/org.signal.chat.account.Accounts/ReserveUsernameHash" - Accounts_ConfirmUsernameHash_FullMethodName = "/org.signal.chat.account.Accounts/ConfirmUsernameHash" - Accounts_DeleteUsernameHash_FullMethodName = "/org.signal.chat.account.Accounts/DeleteUsernameHash" - Accounts_SetUsernameLink_FullMethodName = "/org.signal.chat.account.Accounts/SetUsernameLink" - Accounts_DeleteUsernameLink_FullMethodName = "/org.signal.chat.account.Accounts/DeleteUsernameLink" - Accounts_ConfigureUnidentifiedAccess_FullMethodName = "/org.signal.chat.account.Accounts/ConfigureUnidentifiedAccess" - Accounts_SetDiscoverableByPhoneNumber_FullMethodName = "/org.signal.chat.account.Accounts/SetDiscoverableByPhoneNumber" - Accounts_SetRegistrationRecoveryPassword_FullMethodName = "/org.signal.chat.account.Accounts/SetRegistrationRecoveryPassword" - Accounts_SetZkCredentialKey_FullMethodName = "/org.signal.chat.account.Accounts/SetZkCredentialKey" - Accounts_ChangeNumber_FullMethodName = "/org.signal.chat.account.Accounts/ChangeNumber" - Accounts_GetAccountDataReport_FullMethodName = "/org.signal.chat.account.Accounts/GetAccountDataReport" - Accounts_GetCapabilities_FullMethodName = "/org.signal.chat.account.Accounts/GetCapabilities" - Accounts_GenerateTotpKey_FullMethodName = "/org.signal.chat.account.Accounts/GenerateTotpKey" - Accounts_ConfirmTotpKey_FullMethodName = "/org.signal.chat.account.Accounts/ConfirmTotpKey" - Accounts_ListTotpKeys_FullMethodName = "/org.signal.chat.account.Accounts/ListTotpKeys" - Accounts_SetTotpKeyMetadata_FullMethodName = "/org.signal.chat.account.Accounts/SetTotpKeyMetadata" - Accounts_RemoveTotpKey_FullMethodName = "/org.signal.chat.account.Accounts/RemoveTotpKey" -) - -// AccountsClient is the client API for Accounts service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Provides methods for working with Signal accounts. -type AccountsClient interface { - // Returns basic identifiers for the authenticated account. - GetAccountIdentity(ctx context.Context, in *GetAccountIdentityRequest, opts ...grpc.CallOption) (*GetAccountIdentityResponse, error) - // Returns entitlements for the authenticated account. - GetEntitlements(ctx context.Context, in *GetEntitlementsRequest, opts ...grpc.CallOption) (*GetEntitlementsResponse, error) - // Deletes the authenticated account, purging all associated data in the - // process. - DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*DeleteAccountResponse, error) - // Sets the registration lock secret for the authenticated account. To remove - // a registration lock, please use `ClearRegistrationLock`. - SetRegistrationLock(ctx context.Context, in *SetRegistrationLockRequest, opts ...grpc.CallOption) (*SetRegistrationLockResponse, error) - // Removes any registration lock credentials from the authenticated account. - ClearRegistrationLock(ctx context.Context, in *ClearRegistrationLockRequest, opts ...grpc.CallOption) (*ClearRegistrationLockResponse, error) - // Attempts to reserve one of multiple given username hashes. Reserved - // usernames may be claimed later via `ConfirmUsernameHash`. - ReserveUsernameHash(ctx context.Context, in *ReserveUsernameHashRequest, opts ...grpc.CallOption) (*ReserveUsernameHashResponse, error) - // Sets the username hash/encrypted username to a previously-reserved value - // (see `ReserveUsernameHash`). - ConfirmUsernameHash(ctx context.Context, in *ConfirmUsernameHashRequest, opts ...grpc.CallOption) (*ConfirmUsernameHashResponse, error) - // Clears the current username hash, ciphertext, and link for the - // authenticated user. - DeleteUsernameHash(ctx context.Context, in *DeleteUsernameHashRequest, opts ...grpc.CallOption) (*DeleteUsernameHashResponse, error) - // Associates the given username ciphertext with the account, replacing any - // previously stored ciphertext. A new link handle will optionally be created, - // and the link handle to use will be returned in any event. - SetUsernameLink(ctx context.Context, in *SetUsernameLinkRequest, opts ...grpc.CallOption) (*SetUsernameLinkResponse, error) - // Clears any username link associated with the authenticated account. - DeleteUsernameLink(ctx context.Context, in *DeleteUsernameLinkRequest, opts ...grpc.CallOption) (*DeleteUsernameLinkResponse, error) - // Configures "unidentified access" keys and preferences for the authenticated - // account. Other users permitted to interact with this account anonymously - // may take actions like fetching pre-keys and profiles for this account or - // sending sealed-sender messages without providing identifying credentials. - ConfigureUnidentifiedAccess(ctx context.Context, in *ConfigureUnidentifiedAccessRequest, opts ...grpc.CallOption) (*ConfigureUnidentifiedAccessResponse, error) - // Sets whether the authenticated account may be discovered by phone number - // via the Contact Discovery Service (CDS). - SetDiscoverableByPhoneNumber(ctx context.Context, in *SetDiscoverableByPhoneNumberRequest, opts ...grpc.CallOption) (*SetDiscoverableByPhoneNumberResponse, error) - // Sets the registration recovery password for the authenticated account. - SetRegistrationRecoveryPassword(ctx context.Context, in *SetRegistrationRecoveryPasswordRequest, opts ...grpc.CallOption) (*SetRegistrationRecoveryPasswordResponse, error) - // Store a public key used to issue and verify zero-knowledge (anonymous) credentials for the account. - SetZkCredentialKey(ctx context.Context, in *SetZkCredentialKeyRequest, opts ...grpc.CallOption) (*SetZkCredentialKeyResponse, error) - // Changes the phone number associated with the authenticated account. - ChangeNumber(ctx context.Context, in *ChangeNumberRequest, opts ...grpc.CallOption) (*ChangeNumberResponse, error) - // Produces a report of non-ephemeral account data stored by the service - GetAccountDataReport(ctx context.Context, in *GetAccountDataReportRequest, opts ...grpc.CallOption) (*GetAccountDataReportResponse, error) - // Gets the capabilities for the authenticated account. - GetCapabilities(ctx context.Context, in *GetCapabilitiesRequest, opts ...grpc.CallOption) (*GetCapabilitiesResponse, error) - // Generates and stores a pending TOTP key for the authenticated account. - // To "activate" the key, callers must call the `ConfirmTotpKey` endpoint. - GenerateTotpKey(ctx context.Context, in *GenerateTotpKeyRequest, opts ...grpc.CallOption) (*GenerateTotpKeyResponse, error) - // Confirms that the caller has stored and can derive one-time passwords from - // a pending TOTP key generated via `GenerateTotpKey` and stores/activates the - // key for the caller's account - ConfirmTotpKey(ctx context.Context, in *ConfirmTotpKeyRequest, opts ...grpc.CallOption) (*ConfirmTotpKeyResponse, error) - // Returns a list of confirmed TOTP keys for the authenticated account - ListTotpKeys(ctx context.Context, in *ListTotpKeysRequest, opts ...grpc.CallOption) (*ListTotpKeysResponse, error) - // Updates encrypted, user-supplied metadata (e.g. a human-readable name and - // creation timestamp) for an existing, confirmed TOTP key - SetTotpKeyMetadata(ctx context.Context, in *SetTotpKeyMetadataRequest, opts ...grpc.CallOption) (*SetTotpKeyMetadataResponse, error) - // Removes a TOTP from the authenticated account - RemoveTotpKey(ctx context.Context, in *RemoveTotpKeyRequest, opts ...grpc.CallOption) (*RemoveTotpKeyResponse, error) -} - -type accountsClient struct { - cc grpc.ClientConnInterface -} - -func NewAccountsClient(cc grpc.ClientConnInterface) AccountsClient { - return &accountsClient{cc} -} - -func (c *accountsClient) GetAccountIdentity(ctx context.Context, in *GetAccountIdentityRequest, opts ...grpc.CallOption) (*GetAccountIdentityResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetAccountIdentityResponse) - err := c.cc.Invoke(ctx, Accounts_GetAccountIdentity_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) GetEntitlements(ctx context.Context, in *GetEntitlementsRequest, opts ...grpc.CallOption) (*GetEntitlementsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetEntitlementsResponse) - err := c.cc.Invoke(ctx, Accounts_GetEntitlements_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...grpc.CallOption) (*DeleteAccountResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(DeleteAccountResponse) - err := c.cc.Invoke(ctx, Accounts_DeleteAccount_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) SetRegistrationLock(ctx context.Context, in *SetRegistrationLockRequest, opts ...grpc.CallOption) (*SetRegistrationLockResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetRegistrationLockResponse) - err := c.cc.Invoke(ctx, Accounts_SetRegistrationLock_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) ClearRegistrationLock(ctx context.Context, in *ClearRegistrationLockRequest, opts ...grpc.CallOption) (*ClearRegistrationLockResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ClearRegistrationLockResponse) - err := c.cc.Invoke(ctx, Accounts_ClearRegistrationLock_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) ReserveUsernameHash(ctx context.Context, in *ReserveUsernameHashRequest, opts ...grpc.CallOption) (*ReserveUsernameHashResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ReserveUsernameHashResponse) - err := c.cc.Invoke(ctx, Accounts_ReserveUsernameHash_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) ConfirmUsernameHash(ctx context.Context, in *ConfirmUsernameHashRequest, opts ...grpc.CallOption) (*ConfirmUsernameHashResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ConfirmUsernameHashResponse) - err := c.cc.Invoke(ctx, Accounts_ConfirmUsernameHash_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) DeleteUsernameHash(ctx context.Context, in *DeleteUsernameHashRequest, opts ...grpc.CallOption) (*DeleteUsernameHashResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(DeleteUsernameHashResponse) - err := c.cc.Invoke(ctx, Accounts_DeleteUsernameHash_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) SetUsernameLink(ctx context.Context, in *SetUsernameLinkRequest, opts ...grpc.CallOption) (*SetUsernameLinkResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetUsernameLinkResponse) - err := c.cc.Invoke(ctx, Accounts_SetUsernameLink_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) DeleteUsernameLink(ctx context.Context, in *DeleteUsernameLinkRequest, opts ...grpc.CallOption) (*DeleteUsernameLinkResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(DeleteUsernameLinkResponse) - err := c.cc.Invoke(ctx, Accounts_DeleteUsernameLink_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) ConfigureUnidentifiedAccess(ctx context.Context, in *ConfigureUnidentifiedAccessRequest, opts ...grpc.CallOption) (*ConfigureUnidentifiedAccessResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ConfigureUnidentifiedAccessResponse) - err := c.cc.Invoke(ctx, Accounts_ConfigureUnidentifiedAccess_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) SetDiscoverableByPhoneNumber(ctx context.Context, in *SetDiscoverableByPhoneNumberRequest, opts ...grpc.CallOption) (*SetDiscoverableByPhoneNumberResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetDiscoverableByPhoneNumberResponse) - err := c.cc.Invoke(ctx, Accounts_SetDiscoverableByPhoneNumber_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) SetRegistrationRecoveryPassword(ctx context.Context, in *SetRegistrationRecoveryPasswordRequest, opts ...grpc.CallOption) (*SetRegistrationRecoveryPasswordResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetRegistrationRecoveryPasswordResponse) - err := c.cc.Invoke(ctx, Accounts_SetRegistrationRecoveryPassword_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) SetZkCredentialKey(ctx context.Context, in *SetZkCredentialKeyRequest, opts ...grpc.CallOption) (*SetZkCredentialKeyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetZkCredentialKeyResponse) - err := c.cc.Invoke(ctx, Accounts_SetZkCredentialKey_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) ChangeNumber(ctx context.Context, in *ChangeNumberRequest, opts ...grpc.CallOption) (*ChangeNumberResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ChangeNumberResponse) - err := c.cc.Invoke(ctx, Accounts_ChangeNumber_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) GetAccountDataReport(ctx context.Context, in *GetAccountDataReportRequest, opts ...grpc.CallOption) (*GetAccountDataReportResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetAccountDataReportResponse) - err := c.cc.Invoke(ctx, Accounts_GetAccountDataReport_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) GetCapabilities(ctx context.Context, in *GetCapabilitiesRequest, opts ...grpc.CallOption) (*GetCapabilitiesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetCapabilitiesResponse) - err := c.cc.Invoke(ctx, Accounts_GetCapabilities_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) GenerateTotpKey(ctx context.Context, in *GenerateTotpKeyRequest, opts ...grpc.CallOption) (*GenerateTotpKeyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GenerateTotpKeyResponse) - err := c.cc.Invoke(ctx, Accounts_GenerateTotpKey_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) ConfirmTotpKey(ctx context.Context, in *ConfirmTotpKeyRequest, opts ...grpc.CallOption) (*ConfirmTotpKeyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ConfirmTotpKeyResponse) - err := c.cc.Invoke(ctx, Accounts_ConfirmTotpKey_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) ListTotpKeys(ctx context.Context, in *ListTotpKeysRequest, opts ...grpc.CallOption) (*ListTotpKeysResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListTotpKeysResponse) - err := c.cc.Invoke(ctx, Accounts_ListTotpKeys_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) SetTotpKeyMetadata(ctx context.Context, in *SetTotpKeyMetadataRequest, opts ...grpc.CallOption) (*SetTotpKeyMetadataResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetTotpKeyMetadataResponse) - err := c.cc.Invoke(ctx, Accounts_SetTotpKeyMetadata_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsClient) RemoveTotpKey(ctx context.Context, in *RemoveTotpKeyRequest, opts ...grpc.CallOption) (*RemoveTotpKeyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RemoveTotpKeyResponse) - err := c.cc.Invoke(ctx, Accounts_RemoveTotpKey_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AccountsServer is the server API for Accounts service. -// All implementations must embed UnimplementedAccountsServer -// for forward compatibility. -// -// Provides methods for working with Signal accounts. -type AccountsServer interface { - // Returns basic identifiers for the authenticated account. - GetAccountIdentity(context.Context, *GetAccountIdentityRequest) (*GetAccountIdentityResponse, error) - // Returns entitlements for the authenticated account. - GetEntitlements(context.Context, *GetEntitlementsRequest) (*GetEntitlementsResponse, error) - // Deletes the authenticated account, purging all associated data in the - // process. - DeleteAccount(context.Context, *DeleteAccountRequest) (*DeleteAccountResponse, error) - // Sets the registration lock secret for the authenticated account. To remove - // a registration lock, please use `ClearRegistrationLock`. - SetRegistrationLock(context.Context, *SetRegistrationLockRequest) (*SetRegistrationLockResponse, error) - // Removes any registration lock credentials from the authenticated account. - ClearRegistrationLock(context.Context, *ClearRegistrationLockRequest) (*ClearRegistrationLockResponse, error) - // Attempts to reserve one of multiple given username hashes. Reserved - // usernames may be claimed later via `ConfirmUsernameHash`. - ReserveUsernameHash(context.Context, *ReserveUsernameHashRequest) (*ReserveUsernameHashResponse, error) - // Sets the username hash/encrypted username to a previously-reserved value - // (see `ReserveUsernameHash`). - ConfirmUsernameHash(context.Context, *ConfirmUsernameHashRequest) (*ConfirmUsernameHashResponse, error) - // Clears the current username hash, ciphertext, and link for the - // authenticated user. - DeleteUsernameHash(context.Context, *DeleteUsernameHashRequest) (*DeleteUsernameHashResponse, error) - // Associates the given username ciphertext with the account, replacing any - // previously stored ciphertext. A new link handle will optionally be created, - // and the link handle to use will be returned in any event. - SetUsernameLink(context.Context, *SetUsernameLinkRequest) (*SetUsernameLinkResponse, error) - // Clears any username link associated with the authenticated account. - DeleteUsernameLink(context.Context, *DeleteUsernameLinkRequest) (*DeleteUsernameLinkResponse, error) - // Configures "unidentified access" keys and preferences for the authenticated - // account. Other users permitted to interact with this account anonymously - // may take actions like fetching pre-keys and profiles for this account or - // sending sealed-sender messages without providing identifying credentials. - ConfigureUnidentifiedAccess(context.Context, *ConfigureUnidentifiedAccessRequest) (*ConfigureUnidentifiedAccessResponse, error) - // Sets whether the authenticated account may be discovered by phone number - // via the Contact Discovery Service (CDS). - SetDiscoverableByPhoneNumber(context.Context, *SetDiscoverableByPhoneNumberRequest) (*SetDiscoverableByPhoneNumberResponse, error) - // Sets the registration recovery password for the authenticated account. - SetRegistrationRecoveryPassword(context.Context, *SetRegistrationRecoveryPasswordRequest) (*SetRegistrationRecoveryPasswordResponse, error) - // Store a public key used to issue and verify zero-knowledge (anonymous) credentials for the account. - SetZkCredentialKey(context.Context, *SetZkCredentialKeyRequest) (*SetZkCredentialKeyResponse, error) - // Changes the phone number associated with the authenticated account. - ChangeNumber(context.Context, *ChangeNumberRequest) (*ChangeNumberResponse, error) - // Produces a report of non-ephemeral account data stored by the service - GetAccountDataReport(context.Context, *GetAccountDataReportRequest) (*GetAccountDataReportResponse, error) - // Gets the capabilities for the authenticated account. - GetCapabilities(context.Context, *GetCapabilitiesRequest) (*GetCapabilitiesResponse, error) - // Generates and stores a pending TOTP key for the authenticated account. - // To "activate" the key, callers must call the `ConfirmTotpKey` endpoint. - GenerateTotpKey(context.Context, *GenerateTotpKeyRequest) (*GenerateTotpKeyResponse, error) - // Confirms that the caller has stored and can derive one-time passwords from - // a pending TOTP key generated via `GenerateTotpKey` and stores/activates the - // key for the caller's account - ConfirmTotpKey(context.Context, *ConfirmTotpKeyRequest) (*ConfirmTotpKeyResponse, error) - // Returns a list of confirmed TOTP keys for the authenticated account - ListTotpKeys(context.Context, *ListTotpKeysRequest) (*ListTotpKeysResponse, error) - // Updates encrypted, user-supplied metadata (e.g. a human-readable name and - // creation timestamp) for an existing, confirmed TOTP key - SetTotpKeyMetadata(context.Context, *SetTotpKeyMetadataRequest) (*SetTotpKeyMetadataResponse, error) - // Removes a TOTP from the authenticated account - RemoveTotpKey(context.Context, *RemoveTotpKeyRequest) (*RemoveTotpKeyResponse, error) - mustEmbedUnimplementedAccountsServer() -} - -// UnimplementedAccountsServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedAccountsServer struct{} - -func (UnimplementedAccountsServer) GetAccountIdentity(context.Context, *GetAccountIdentityRequest) (*GetAccountIdentityResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetAccountIdentity not implemented") -} -func (UnimplementedAccountsServer) GetEntitlements(context.Context, *GetEntitlementsRequest) (*GetEntitlementsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetEntitlements not implemented") -} -func (UnimplementedAccountsServer) DeleteAccount(context.Context, *DeleteAccountRequest) (*DeleteAccountResponse, error) { - return nil, status.Error(codes.Unimplemented, "method DeleteAccount not implemented") -} -func (UnimplementedAccountsServer) SetRegistrationLock(context.Context, *SetRegistrationLockRequest) (*SetRegistrationLockResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetRegistrationLock not implemented") -} -func (UnimplementedAccountsServer) ClearRegistrationLock(context.Context, *ClearRegistrationLockRequest) (*ClearRegistrationLockResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ClearRegistrationLock not implemented") -} -func (UnimplementedAccountsServer) ReserveUsernameHash(context.Context, *ReserveUsernameHashRequest) (*ReserveUsernameHashResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ReserveUsernameHash not implemented") -} -func (UnimplementedAccountsServer) ConfirmUsernameHash(context.Context, *ConfirmUsernameHashRequest) (*ConfirmUsernameHashResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ConfirmUsernameHash not implemented") -} -func (UnimplementedAccountsServer) DeleteUsernameHash(context.Context, *DeleteUsernameHashRequest) (*DeleteUsernameHashResponse, error) { - return nil, status.Error(codes.Unimplemented, "method DeleteUsernameHash not implemented") -} -func (UnimplementedAccountsServer) SetUsernameLink(context.Context, *SetUsernameLinkRequest) (*SetUsernameLinkResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetUsernameLink not implemented") -} -func (UnimplementedAccountsServer) DeleteUsernameLink(context.Context, *DeleteUsernameLinkRequest) (*DeleteUsernameLinkResponse, error) { - return nil, status.Error(codes.Unimplemented, "method DeleteUsernameLink not implemented") -} -func (UnimplementedAccountsServer) ConfigureUnidentifiedAccess(context.Context, *ConfigureUnidentifiedAccessRequest) (*ConfigureUnidentifiedAccessResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ConfigureUnidentifiedAccess not implemented") -} -func (UnimplementedAccountsServer) SetDiscoverableByPhoneNumber(context.Context, *SetDiscoverableByPhoneNumberRequest) (*SetDiscoverableByPhoneNumberResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetDiscoverableByPhoneNumber not implemented") -} -func (UnimplementedAccountsServer) SetRegistrationRecoveryPassword(context.Context, *SetRegistrationRecoveryPasswordRequest) (*SetRegistrationRecoveryPasswordResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetRegistrationRecoveryPassword not implemented") -} -func (UnimplementedAccountsServer) SetZkCredentialKey(context.Context, *SetZkCredentialKeyRequest) (*SetZkCredentialKeyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetZkCredentialKey not implemented") -} -func (UnimplementedAccountsServer) ChangeNumber(context.Context, *ChangeNumberRequest) (*ChangeNumberResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ChangeNumber not implemented") -} -func (UnimplementedAccountsServer) GetAccountDataReport(context.Context, *GetAccountDataReportRequest) (*GetAccountDataReportResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetAccountDataReport not implemented") -} -func (UnimplementedAccountsServer) GetCapabilities(context.Context, *GetCapabilitiesRequest) (*GetCapabilitiesResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetCapabilities not implemented") -} -func (UnimplementedAccountsServer) GenerateTotpKey(context.Context, *GenerateTotpKeyRequest) (*GenerateTotpKeyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GenerateTotpKey not implemented") -} -func (UnimplementedAccountsServer) ConfirmTotpKey(context.Context, *ConfirmTotpKeyRequest) (*ConfirmTotpKeyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ConfirmTotpKey not implemented") -} -func (UnimplementedAccountsServer) ListTotpKeys(context.Context, *ListTotpKeysRequest) (*ListTotpKeysResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListTotpKeys not implemented") -} -func (UnimplementedAccountsServer) SetTotpKeyMetadata(context.Context, *SetTotpKeyMetadataRequest) (*SetTotpKeyMetadataResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetTotpKeyMetadata not implemented") -} -func (UnimplementedAccountsServer) RemoveTotpKey(context.Context, *RemoveTotpKeyRequest) (*RemoveTotpKeyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RemoveTotpKey not implemented") -} -func (UnimplementedAccountsServer) mustEmbedUnimplementedAccountsServer() {} -func (UnimplementedAccountsServer) testEmbeddedByValue() {} - -// UnsafeAccountsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to AccountsServer will -// result in compilation errors. -type UnsafeAccountsServer interface { - mustEmbedUnimplementedAccountsServer() -} - -func RegisterAccountsServer(s grpc.ServiceRegistrar, srv AccountsServer) { - // If the following call panics, it indicates UnimplementedAccountsServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Accounts_ServiceDesc, srv) -} - -func _Accounts_GetAccountIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAccountIdentityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).GetAccountIdentity(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_GetAccountIdentity_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).GetAccountIdentity(ctx, req.(*GetAccountIdentityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_GetEntitlements_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetEntitlementsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).GetEntitlements(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_GetEntitlements_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).GetEntitlements(ctx, req.(*GetEntitlementsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_DeleteAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).DeleteAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_DeleteAccount_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).DeleteAccount(ctx, req.(*DeleteAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_SetRegistrationLock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetRegistrationLockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).SetRegistrationLock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_SetRegistrationLock_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).SetRegistrationLock(ctx, req.(*SetRegistrationLockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_ClearRegistrationLock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClearRegistrationLockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).ClearRegistrationLock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_ClearRegistrationLock_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).ClearRegistrationLock(ctx, req.(*ClearRegistrationLockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_ReserveUsernameHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReserveUsernameHashRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).ReserveUsernameHash(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_ReserveUsernameHash_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).ReserveUsernameHash(ctx, req.(*ReserveUsernameHashRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_ConfirmUsernameHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ConfirmUsernameHashRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).ConfirmUsernameHash(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_ConfirmUsernameHash_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).ConfirmUsernameHash(ctx, req.(*ConfirmUsernameHashRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_DeleteUsernameHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteUsernameHashRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).DeleteUsernameHash(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_DeleteUsernameHash_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).DeleteUsernameHash(ctx, req.(*DeleteUsernameHashRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_SetUsernameLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetUsernameLinkRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).SetUsernameLink(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_SetUsernameLink_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).SetUsernameLink(ctx, req.(*SetUsernameLinkRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_DeleteUsernameLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteUsernameLinkRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).DeleteUsernameLink(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_DeleteUsernameLink_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).DeleteUsernameLink(ctx, req.(*DeleteUsernameLinkRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_ConfigureUnidentifiedAccess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ConfigureUnidentifiedAccessRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).ConfigureUnidentifiedAccess(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_ConfigureUnidentifiedAccess_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).ConfigureUnidentifiedAccess(ctx, req.(*ConfigureUnidentifiedAccessRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_SetDiscoverableByPhoneNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetDiscoverableByPhoneNumberRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).SetDiscoverableByPhoneNumber(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_SetDiscoverableByPhoneNumber_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).SetDiscoverableByPhoneNumber(ctx, req.(*SetDiscoverableByPhoneNumberRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_SetRegistrationRecoveryPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetRegistrationRecoveryPasswordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).SetRegistrationRecoveryPassword(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_SetRegistrationRecoveryPassword_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).SetRegistrationRecoveryPassword(ctx, req.(*SetRegistrationRecoveryPasswordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_SetZkCredentialKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetZkCredentialKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).SetZkCredentialKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_SetZkCredentialKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).SetZkCredentialKey(ctx, req.(*SetZkCredentialKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_ChangeNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ChangeNumberRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).ChangeNumber(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_ChangeNumber_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).ChangeNumber(ctx, req.(*ChangeNumberRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_GetAccountDataReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAccountDataReportRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).GetAccountDataReport(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_GetAccountDataReport_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).GetAccountDataReport(ctx, req.(*GetAccountDataReportRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_GetCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCapabilitiesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).GetCapabilities(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_GetCapabilities_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).GetCapabilities(ctx, req.(*GetCapabilitiesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_GenerateTotpKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GenerateTotpKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).GenerateTotpKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_GenerateTotpKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).GenerateTotpKey(ctx, req.(*GenerateTotpKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_ConfirmTotpKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ConfirmTotpKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).ConfirmTotpKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_ConfirmTotpKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).ConfirmTotpKey(ctx, req.(*ConfirmTotpKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_ListTotpKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListTotpKeysRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).ListTotpKeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_ListTotpKeys_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).ListTotpKeys(ctx, req.(*ListTotpKeysRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_SetTotpKeyMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetTotpKeyMetadataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).SetTotpKeyMetadata(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_SetTotpKeyMetadata_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).SetTotpKeyMetadata(ctx, req.(*SetTotpKeyMetadataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Accounts_RemoveTotpKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveTotpKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsServer).RemoveTotpKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Accounts_RemoveTotpKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsServer).RemoveTotpKey(ctx, req.(*RemoveTotpKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Accounts_ServiceDesc is the grpc.ServiceDesc for Accounts service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Accounts_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.account.Accounts", - HandlerType: (*AccountsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetAccountIdentity", - Handler: _Accounts_GetAccountIdentity_Handler, - }, - { - MethodName: "GetEntitlements", - Handler: _Accounts_GetEntitlements_Handler, - }, - { - MethodName: "DeleteAccount", - Handler: _Accounts_DeleteAccount_Handler, - }, - { - MethodName: "SetRegistrationLock", - Handler: _Accounts_SetRegistrationLock_Handler, - }, - { - MethodName: "ClearRegistrationLock", - Handler: _Accounts_ClearRegistrationLock_Handler, - }, - { - MethodName: "ReserveUsernameHash", - Handler: _Accounts_ReserveUsernameHash_Handler, - }, - { - MethodName: "ConfirmUsernameHash", - Handler: _Accounts_ConfirmUsernameHash_Handler, - }, - { - MethodName: "DeleteUsernameHash", - Handler: _Accounts_DeleteUsernameHash_Handler, - }, - { - MethodName: "SetUsernameLink", - Handler: _Accounts_SetUsernameLink_Handler, - }, - { - MethodName: "DeleteUsernameLink", - Handler: _Accounts_DeleteUsernameLink_Handler, - }, - { - MethodName: "ConfigureUnidentifiedAccess", - Handler: _Accounts_ConfigureUnidentifiedAccess_Handler, - }, - { - MethodName: "SetDiscoverableByPhoneNumber", - Handler: _Accounts_SetDiscoverableByPhoneNumber_Handler, - }, - { - MethodName: "SetRegistrationRecoveryPassword", - Handler: _Accounts_SetRegistrationRecoveryPassword_Handler, - }, - { - MethodName: "SetZkCredentialKey", - Handler: _Accounts_SetZkCredentialKey_Handler, - }, - { - MethodName: "ChangeNumber", - Handler: _Accounts_ChangeNumber_Handler, - }, - { - MethodName: "GetAccountDataReport", - Handler: _Accounts_GetAccountDataReport_Handler, - }, - { - MethodName: "GetCapabilities", - Handler: _Accounts_GetCapabilities_Handler, - }, - { - MethodName: "GenerateTotpKey", - Handler: _Accounts_GenerateTotpKey_Handler, - }, - { - MethodName: "ConfirmTotpKey", - Handler: _Accounts_ConfirmTotpKey_Handler, - }, - { - MethodName: "ListTotpKeys", - Handler: _Accounts_ListTotpKeys_Handler, - }, - { - MethodName: "SetTotpKeyMetadata", - Handler: _Accounts_SetTotpKeyMetadata_Handler, - }, - { - MethodName: "RemoveTotpKey", - Handler: _Accounts_RemoveTotpKey_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/account.proto", -} - -const ( - AccountsAnonymous_CheckAccountExistence_FullMethodName = "/org.signal.chat.account.AccountsAnonymous/CheckAccountExistence" - AccountsAnonymous_LookupUsernameHash_FullMethodName = "/org.signal.chat.account.AccountsAnonymous/LookupUsernameHash" - AccountsAnonymous_LookupUsernameLink_FullMethodName = "/org.signal.chat.account.AccountsAnonymous/LookupUsernameLink" - AccountsAnonymous_GetCapabilities_FullMethodName = "/org.signal.chat.account.AccountsAnonymous/GetCapabilities" -) - -// AccountsAnonymousClient is the client API for AccountsAnonymous service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Provides methods for looking up Signal accounts. Callers must not provide -// identifying credentials when calling methods in this service. -type AccountsAnonymousClient interface { - // Checks whether an account with the given service identifier exists. - CheckAccountExistence(ctx context.Context, in *CheckAccountExistenceRequest, opts ...grpc.CallOption) (*CheckAccountExistenceResponse, error) - // Finds the service identifier of the account associated with the given - // username hash. - LookupUsernameHash(ctx context.Context, in *LookupUsernameHashRequest, opts ...grpc.CallOption) (*LookupUsernameHashResponse, error) - // Finds the encrypted username identified by a given username link handle. - LookupUsernameLink(ctx context.Context, in *LookupUsernameLinkRequest, opts ...grpc.CallOption) (*LookupUsernameLinkResponse, error) - // Gets the publicly-visible capabilities enabled on the account identified by - // the provided ACI. - GetCapabilities(ctx context.Context, in *GetCapabilitiesAnonymousRequest, opts ...grpc.CallOption) (*GetCapabilitiesAnonymousResponse, error) -} - -type accountsAnonymousClient struct { - cc grpc.ClientConnInterface -} - -func NewAccountsAnonymousClient(cc grpc.ClientConnInterface) AccountsAnonymousClient { - return &accountsAnonymousClient{cc} -} - -func (c *accountsAnonymousClient) CheckAccountExistence(ctx context.Context, in *CheckAccountExistenceRequest, opts ...grpc.CallOption) (*CheckAccountExistenceResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CheckAccountExistenceResponse) - err := c.cc.Invoke(ctx, AccountsAnonymous_CheckAccountExistence_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsAnonymousClient) LookupUsernameHash(ctx context.Context, in *LookupUsernameHashRequest, opts ...grpc.CallOption) (*LookupUsernameHashResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(LookupUsernameHashResponse) - err := c.cc.Invoke(ctx, AccountsAnonymous_LookupUsernameHash_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsAnonymousClient) LookupUsernameLink(ctx context.Context, in *LookupUsernameLinkRequest, opts ...grpc.CallOption) (*LookupUsernameLinkResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(LookupUsernameLinkResponse) - err := c.cc.Invoke(ctx, AccountsAnonymous_LookupUsernameLink_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsAnonymousClient) GetCapabilities(ctx context.Context, in *GetCapabilitiesAnonymousRequest, opts ...grpc.CallOption) (*GetCapabilitiesAnonymousResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetCapabilitiesAnonymousResponse) - err := c.cc.Invoke(ctx, AccountsAnonymous_GetCapabilities_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AccountsAnonymousServer is the server API for AccountsAnonymous service. -// All implementations must embed UnimplementedAccountsAnonymousServer -// for forward compatibility. -// -// Provides methods for looking up Signal accounts. Callers must not provide -// identifying credentials when calling methods in this service. -type AccountsAnonymousServer interface { - // Checks whether an account with the given service identifier exists. - CheckAccountExistence(context.Context, *CheckAccountExistenceRequest) (*CheckAccountExistenceResponse, error) - // Finds the service identifier of the account associated with the given - // username hash. - LookupUsernameHash(context.Context, *LookupUsernameHashRequest) (*LookupUsernameHashResponse, error) - // Finds the encrypted username identified by a given username link handle. - LookupUsernameLink(context.Context, *LookupUsernameLinkRequest) (*LookupUsernameLinkResponse, error) - // Gets the publicly-visible capabilities enabled on the account identified by - // the provided ACI. - GetCapabilities(context.Context, *GetCapabilitiesAnonymousRequest) (*GetCapabilitiesAnonymousResponse, error) - mustEmbedUnimplementedAccountsAnonymousServer() -} - -// UnimplementedAccountsAnonymousServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedAccountsAnonymousServer struct{} - -func (UnimplementedAccountsAnonymousServer) CheckAccountExistence(context.Context, *CheckAccountExistenceRequest) (*CheckAccountExistenceResponse, error) { - return nil, status.Error(codes.Unimplemented, "method CheckAccountExistence not implemented") -} -func (UnimplementedAccountsAnonymousServer) LookupUsernameHash(context.Context, *LookupUsernameHashRequest) (*LookupUsernameHashResponse, error) { - return nil, status.Error(codes.Unimplemented, "method LookupUsernameHash not implemented") -} -func (UnimplementedAccountsAnonymousServer) LookupUsernameLink(context.Context, *LookupUsernameLinkRequest) (*LookupUsernameLinkResponse, error) { - return nil, status.Error(codes.Unimplemented, "method LookupUsernameLink not implemented") -} -func (UnimplementedAccountsAnonymousServer) GetCapabilities(context.Context, *GetCapabilitiesAnonymousRequest) (*GetCapabilitiesAnonymousResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetCapabilities not implemented") -} -func (UnimplementedAccountsAnonymousServer) mustEmbedUnimplementedAccountsAnonymousServer() {} -func (UnimplementedAccountsAnonymousServer) testEmbeddedByValue() {} - -// UnsafeAccountsAnonymousServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to AccountsAnonymousServer will -// result in compilation errors. -type UnsafeAccountsAnonymousServer interface { - mustEmbedUnimplementedAccountsAnonymousServer() -} - -func RegisterAccountsAnonymousServer(s grpc.ServiceRegistrar, srv AccountsAnonymousServer) { - // If the following call panics, it indicates UnimplementedAccountsAnonymousServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&AccountsAnonymous_ServiceDesc, srv) -} - -func _AccountsAnonymous_CheckAccountExistence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CheckAccountExistenceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsAnonymousServer).CheckAccountExistence(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: AccountsAnonymous_CheckAccountExistence_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsAnonymousServer).CheckAccountExistence(ctx, req.(*CheckAccountExistenceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountsAnonymous_LookupUsernameHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LookupUsernameHashRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsAnonymousServer).LookupUsernameHash(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: AccountsAnonymous_LookupUsernameHash_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsAnonymousServer).LookupUsernameHash(ctx, req.(*LookupUsernameHashRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountsAnonymous_LookupUsernameLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LookupUsernameLinkRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsAnonymousServer).LookupUsernameLink(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: AccountsAnonymous_LookupUsernameLink_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsAnonymousServer).LookupUsernameLink(ctx, req.(*LookupUsernameLinkRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountsAnonymous_GetCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCapabilitiesAnonymousRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountsAnonymousServer).GetCapabilities(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: AccountsAnonymous_GetCapabilities_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountsAnonymousServer).GetCapabilities(ctx, req.(*GetCapabilitiesAnonymousRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// AccountsAnonymous_ServiceDesc is the grpc.ServiceDesc for AccountsAnonymous service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var AccountsAnonymous_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.account.AccountsAnonymous", - HandlerType: (*AccountsAnonymousServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CheckAccountExistence", - Handler: _AccountsAnonymous_CheckAccountExistence_Handler, - }, - { - MethodName: "LookupUsernameHash", - Handler: _AccountsAnonymous_LookupUsernameHash_Handler, - }, - { - MethodName: "LookupUsernameLink", - Handler: _AccountsAnonymous_LookupUsernameLink_Handler, - }, - { - MethodName: "GetCapabilities", - Handler: _AccountsAnonymous_GetCapabilities_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/account.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/attachments/attachments.pb.go b/pkg/signalmeow/protobuf/rpc/attachments/attachments.pb.go deleted file mode 100644 index da9464d..0000000 --- a/pkg/signalmeow/protobuf/rpc/attachments/attachments.pb.go +++ /dev/null @@ -1,357 +0,0 @@ -// -// Copyright 2026 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/attachments.proto - -package attachments - -import ( - common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" - errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetUploadFormRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The length of the attachment for the requested upload form. Uploads - // performed with this form will be limited to the provided length. - UploadLength uint64 `protobuf:"varint,1,opt,name=uploadLength,proto3" json:"uploadLength,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetUploadFormRequest) Reset() { - *x = GetUploadFormRequest{} - mi := &file_org_signal_chat_attachments_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetUploadFormRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUploadFormRequest) ProtoMessage() {} - -func (x *GetUploadFormRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_attachments_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetUploadFormRequest.ProtoReflect.Descriptor instead. -func (*GetUploadFormRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_attachments_proto_rawDescGZIP(), []int{0} -} - -func (x *GetUploadFormRequest) GetUploadLength() uint64 { - if x != nil { - return x.UploadLength - } - return 0 -} - -type GetUploadFormResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Outcome: - // - // *GetUploadFormResponse_UploadForm - // *GetUploadFormResponse_ExceedsMaxUploadLength - Outcome isGetUploadFormResponse_Outcome `protobuf_oneof:"outcome"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetUploadFormResponse) Reset() { - *x = GetUploadFormResponse{} - mi := &file_org_signal_chat_attachments_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetUploadFormResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUploadFormResponse) ProtoMessage() {} - -func (x *GetUploadFormResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_attachments_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetUploadFormResponse.ProtoReflect.Descriptor instead. -func (*GetUploadFormResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_attachments_proto_rawDescGZIP(), []int{1} -} - -func (x *GetUploadFormResponse) GetOutcome() isGetUploadFormResponse_Outcome { - if x != nil { - return x.Outcome - } - return nil -} - -func (x *GetUploadFormResponse) GetUploadForm() *common.UploadForm { - if x != nil { - if x, ok := x.Outcome.(*GetUploadFormResponse_UploadForm); ok { - return x.UploadForm - } - } - return nil -} - -func (x *GetUploadFormResponse) GetExceedsMaxUploadLength() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Outcome.(*GetUploadFormResponse_ExceedsMaxUploadLength); ok { - return x.ExceedsMaxUploadLength - } - } - return nil -} - -type isGetUploadFormResponse_Outcome interface { - isGetUploadFormResponse_Outcome() -} - -type GetUploadFormResponse_UploadForm struct { - UploadForm *common.UploadForm `protobuf:"bytes,1,opt,name=upload_form,json=uploadForm,proto3,oneof"` -} - -type GetUploadFormResponse_ExceedsMaxUploadLength struct { - // The request size was larger than the maximum supported upload size. The - // maximum upload size is subject to change and is governed by - // `global.attachments.maxBytes` - ExceedsMaxUploadLength *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=exceeds_max_upload_length,json=exceedsMaxUploadLength,proto3,oneof"` -} - -func (*GetUploadFormResponse_UploadForm) isGetUploadFormResponse_Outcome() {} - -func (*GetUploadFormResponse_ExceedsMaxUploadLength) isGetUploadFormResponse_Outcome() {} - -type GetStickerUploadFormRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The number of stickers in the sticker pack to upload - StickerCount uint32 `protobuf:"varint,1,opt,name=sticker_count,json=stickerCount,proto3" json:"sticker_count,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetStickerUploadFormRequest) Reset() { - *x = GetStickerUploadFormRequest{} - mi := &file_org_signal_chat_attachments_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetStickerUploadFormRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetStickerUploadFormRequest) ProtoMessage() {} - -func (x *GetStickerUploadFormRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_attachments_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetStickerUploadFormRequest.ProtoReflect.Descriptor instead. -func (*GetStickerUploadFormRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_attachments_proto_rawDescGZIP(), []int{2} -} - -func (x *GetStickerUploadFormRequest) GetStickerCount() uint32 { - if x != nil { - return x.StickerCount - } - return 0 -} - -type GetStickerUploadFormResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A randomly-generated ID for the new sticker pack - PackId string `protobuf:"bytes,1,opt,name=pack_id,json=packId,proto3" json:"pack_id,omitempty"` - // An upload form clients must use to upload a manifest for the sticker pack - ManifestUploadForm *common.S3UploadForm `protobuf:"bytes,2,opt,name=manifest_upload_form,json=manifestUploadForm,proto3" json:"manifest_upload_form,omitempty"` - // Upload forms for individual stickers within the sticker pack - StickerUploadForms []*common.S3UploadForm `protobuf:"bytes,3,rep,name=sticker_upload_forms,json=stickerUploadForms,proto3" json:"sticker_upload_forms,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetStickerUploadFormResponse) Reset() { - *x = GetStickerUploadFormResponse{} - mi := &file_org_signal_chat_attachments_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetStickerUploadFormResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetStickerUploadFormResponse) ProtoMessage() {} - -func (x *GetStickerUploadFormResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_attachments_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetStickerUploadFormResponse.ProtoReflect.Descriptor instead. -func (*GetStickerUploadFormResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_attachments_proto_rawDescGZIP(), []int{3} -} - -func (x *GetStickerUploadFormResponse) GetPackId() string { - if x != nil { - return x.PackId - } - return "" -} - -func (x *GetStickerUploadFormResponse) GetManifestUploadForm() *common.S3UploadForm { - if x != nil { - return x.ManifestUploadForm - } - return nil -} - -func (x *GetStickerUploadFormResponse) GetStickerUploadForms() []*common.S3UploadForm { - if x != nil { - return x.StickerUploadForms - } - return nil -} - -var File_org_signal_chat_attachments_proto protoreflect.FileDescriptor - -const file_org_signal_chat_attachments_proto_rawDesc = "" + - "\n" + - "!org/signal/chat/attachments.proto\x12\x1borg.signal.chat.attachments\x1a\x1corg/signal/chat/common.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x19org/signal/chat/tag.proto\"B\n" + - "\x14GetUploadFormRequest\x12*\n" + - "\fuploadLength\x18\x01 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\fuploadLength\"\xe7\x01\n" + - "\x15GetUploadFormResponse\x12E\n" + - "\vupload_form\x18\x01 \x01(\v2\".org.signal.chat.common.UploadFormH\x00R\n" + - "uploadForm\x12|\n" + - "\x19exceeds_max_upload_length\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x13\xc2\xd5\"\x0foversize_uploadH\x00R\x16exceedsMaxUploadLengthB\t\n" + - "\aoutcome\"M\n" + - "\x1bGetStickerUploadFormRequest\x12.\n" + - "\rsticker_count\x18\x01 \x01(\rB\t\xb2\x97\"\x05\b\x01\x10\xc9\x01R\fstickerCount\"\xe7\x01\n" + - "\x1cGetStickerUploadFormResponse\x12\x17\n" + - "\apack_id\x18\x01 \x01(\tR\x06packId\x12V\n" + - "\x14manifest_upload_form\x18\x02 \x01(\v2$.org.signal.chat.common.S3UploadFormR\x12manifestUploadForm\x12V\n" + - "\x14sticker_upload_forms\x18\x03 \x03(\v2$.org.signal.chat.common.S3UploadFormR\x12stickerUploadForms2\x9d\x02\n" + - "\vAttachments\x12x\n" + - "\rGetUploadForm\x121.org.signal.chat.attachments.GetUploadFormRequest\x1a2.org.signal.chat.attachments.GetUploadFormResponse\"\x00\x12\x8d\x01\n" + - "\x14GetStickerUploadForm\x128.org.signal.chat.attachments.GetStickerUploadFormRequest\x1a9.org.signal.chat.attachments.GetStickerUploadFormResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_attachments_proto_rawDescOnce sync.Once - file_org_signal_chat_attachments_proto_rawDescData []byte -) - -func file_org_signal_chat_attachments_proto_rawDescGZIP() []byte { - file_org_signal_chat_attachments_proto_rawDescOnce.Do(func() { - file_org_signal_chat_attachments_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_attachments_proto_rawDesc), len(file_org_signal_chat_attachments_proto_rawDesc))) - }) - return file_org_signal_chat_attachments_proto_rawDescData -} - -var file_org_signal_chat_attachments_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_org_signal_chat_attachments_proto_goTypes = []any{ - (*GetUploadFormRequest)(nil), // 0: org.signal.chat.attachments.GetUploadFormRequest - (*GetUploadFormResponse)(nil), // 1: org.signal.chat.attachments.GetUploadFormResponse - (*GetStickerUploadFormRequest)(nil), // 2: org.signal.chat.attachments.GetStickerUploadFormRequest - (*GetStickerUploadFormResponse)(nil), // 3: org.signal.chat.attachments.GetStickerUploadFormResponse - (*common.UploadForm)(nil), // 4: org.signal.chat.common.UploadForm - (*errors.FailedPrecondition)(nil), // 5: org.signal.chat.errors.FailedPrecondition - (*common.S3UploadForm)(nil), // 6: org.signal.chat.common.S3UploadForm -} -var file_org_signal_chat_attachments_proto_depIdxs = []int32{ - 4, // 0: org.signal.chat.attachments.GetUploadFormResponse.upload_form:type_name -> org.signal.chat.common.UploadForm - 5, // 1: org.signal.chat.attachments.GetUploadFormResponse.exceeds_max_upload_length:type_name -> org.signal.chat.errors.FailedPrecondition - 6, // 2: org.signal.chat.attachments.GetStickerUploadFormResponse.manifest_upload_form:type_name -> org.signal.chat.common.S3UploadForm - 6, // 3: org.signal.chat.attachments.GetStickerUploadFormResponse.sticker_upload_forms:type_name -> org.signal.chat.common.S3UploadForm - 0, // 4: org.signal.chat.attachments.Attachments.GetUploadForm:input_type -> org.signal.chat.attachments.GetUploadFormRequest - 2, // 5: org.signal.chat.attachments.Attachments.GetStickerUploadForm:input_type -> org.signal.chat.attachments.GetStickerUploadFormRequest - 1, // 6: org.signal.chat.attachments.Attachments.GetUploadForm:output_type -> org.signal.chat.attachments.GetUploadFormResponse - 3, // 7: org.signal.chat.attachments.Attachments.GetStickerUploadForm:output_type -> org.signal.chat.attachments.GetStickerUploadFormResponse - 6, // [6:8] is the sub-list for method output_type - 4, // [4:6] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_attachments_proto_init() } -func file_org_signal_chat_attachments_proto_init() { - if File_org_signal_chat_attachments_proto != nil { - return - } - file_org_signal_chat_attachments_proto_msgTypes[1].OneofWrappers = []any{ - (*GetUploadFormResponse_UploadForm)(nil), - (*GetUploadFormResponse_ExceedsMaxUploadLength)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_attachments_proto_rawDesc), len(file_org_signal_chat_attachments_proto_rawDesc)), - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_org_signal_chat_attachments_proto_goTypes, - DependencyIndexes: file_org_signal_chat_attachments_proto_depIdxs, - MessageInfos: file_org_signal_chat_attachments_proto_msgTypes, - }.Build() - File_org_signal_chat_attachments_proto = out.File - file_org_signal_chat_attachments_proto_goTypes = nil - file_org_signal_chat_attachments_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/attachments/attachments_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/attachments/attachments_grpc.pb.go deleted file mode 100644 index 2452d12..0000000 --- a/pkg/signalmeow/protobuf/rpc/attachments/attachments_grpc.pb.go +++ /dev/null @@ -1,167 +0,0 @@ -// -// Copyright 2026 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/attachments.proto - -package attachments - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Attachments_GetUploadForm_FullMethodName = "/org.signal.chat.attachments.Attachments/GetUploadForm" - Attachments_GetStickerUploadForm_FullMethodName = "/org.signal.chat.attachments.Attachments/GetStickerUploadForm" -) - -// AttachmentsClient is the client API for Attachments service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type AttachmentsClient interface { - // Retrieve an upload form that can be used to perform a resumable upload - GetUploadForm(ctx context.Context, in *GetUploadFormRequest, opts ...grpc.CallOption) (*GetUploadFormResponse, error) - // Retrieve an upload form that can be used to upload a sticker pack - GetStickerUploadForm(ctx context.Context, in *GetStickerUploadFormRequest, opts ...grpc.CallOption) (*GetStickerUploadFormResponse, error) -} - -type attachmentsClient struct { - cc grpc.ClientConnInterface -} - -func NewAttachmentsClient(cc grpc.ClientConnInterface) AttachmentsClient { - return &attachmentsClient{cc} -} - -func (c *attachmentsClient) GetUploadForm(ctx context.Context, in *GetUploadFormRequest, opts ...grpc.CallOption) (*GetUploadFormResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetUploadFormResponse) - err := c.cc.Invoke(ctx, Attachments_GetUploadForm_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *attachmentsClient) GetStickerUploadForm(ctx context.Context, in *GetStickerUploadFormRequest, opts ...grpc.CallOption) (*GetStickerUploadFormResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetStickerUploadFormResponse) - err := c.cc.Invoke(ctx, Attachments_GetStickerUploadForm_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AttachmentsServer is the server API for Attachments service. -// All implementations must embed UnimplementedAttachmentsServer -// for forward compatibility. -type AttachmentsServer interface { - // Retrieve an upload form that can be used to perform a resumable upload - GetUploadForm(context.Context, *GetUploadFormRequest) (*GetUploadFormResponse, error) - // Retrieve an upload form that can be used to upload a sticker pack - GetStickerUploadForm(context.Context, *GetStickerUploadFormRequest) (*GetStickerUploadFormResponse, error) - mustEmbedUnimplementedAttachmentsServer() -} - -// UnimplementedAttachmentsServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedAttachmentsServer struct{} - -func (UnimplementedAttachmentsServer) GetUploadForm(context.Context, *GetUploadFormRequest) (*GetUploadFormResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetUploadForm not implemented") -} -func (UnimplementedAttachmentsServer) GetStickerUploadForm(context.Context, *GetStickerUploadFormRequest) (*GetStickerUploadFormResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetStickerUploadForm not implemented") -} -func (UnimplementedAttachmentsServer) mustEmbedUnimplementedAttachmentsServer() {} -func (UnimplementedAttachmentsServer) testEmbeddedByValue() {} - -// UnsafeAttachmentsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to AttachmentsServer will -// result in compilation errors. -type UnsafeAttachmentsServer interface { - mustEmbedUnimplementedAttachmentsServer() -} - -func RegisterAttachmentsServer(s grpc.ServiceRegistrar, srv AttachmentsServer) { - // If the following call panics, it indicates UnimplementedAttachmentsServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Attachments_ServiceDesc, srv) -} - -func _Attachments_GetUploadForm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUploadFormRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AttachmentsServer).GetUploadForm(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Attachments_GetUploadForm_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttachmentsServer).GetUploadForm(ctx, req.(*GetUploadFormRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Attachments_GetStickerUploadForm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetStickerUploadFormRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AttachmentsServer).GetStickerUploadForm(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Attachments_GetStickerUploadForm_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttachmentsServer).GetStickerUploadForm(ctx, req.(*GetStickerUploadFormRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Attachments_ServiceDesc is the grpc.ServiceDesc for Attachments service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Attachments_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.attachments.Attachments", - HandlerType: (*AttachmentsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetUploadForm", - Handler: _Attachments_GetUploadForm_Handler, - }, - { - MethodName: "GetStickerUploadForm", - Handler: _Attachments_GetStickerUploadForm_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/attachments.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/backups/backups.pb.go b/pkg/signalmeow/protobuf/rpc/backups/backups.pb.go deleted file mode 100644 index 91a3fc7..0000000 --- a/pkg/signalmeow/protobuf/rpc/backups/backups.pb.go +++ /dev/null @@ -1,3268 +0,0 @@ -// -// Copyright 2024 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/backups.proto - -package backups - -import ( - common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" - errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type SetBackupIdRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A BackupAuthCredentialRequest containing a blinded encrypted backup-id, - // encoded in standard padded base64. This backup-id should be used for - // message backups only, and must have the message backup type set on the - // credential. If absent, the message credential request will not be updated. - MessagesBackupAuthCredentialRequest []byte `protobuf:"bytes,1,opt,name=messages_backup_auth_credential_request,json=messagesBackupAuthCredentialRequest,proto3" json:"messages_backup_auth_credential_request,omitempty"` - // A BackupAuthCredentialRequest containing a blinded encrypted backup-id, - // encoded in standard padded base64. This backup-id should be used for - // media only, and must have the media type set on the credential. If absent, - // the media credential request will not be updated. - MediaBackupAuthCredentialRequest []byte `protobuf:"bytes,2,opt,name=media_backup_auth_credential_request,json=mediaBackupAuthCredentialRequest,proto3" json:"media_backup_auth_credential_request,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetBackupIdRequest) Reset() { - *x = SetBackupIdRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetBackupIdRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetBackupIdRequest) ProtoMessage() {} - -func (x *SetBackupIdRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetBackupIdRequest.ProtoReflect.Descriptor instead. -func (*SetBackupIdRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{0} -} - -func (x *SetBackupIdRequest) GetMessagesBackupAuthCredentialRequest() []byte { - if x != nil { - return x.MessagesBackupAuthCredentialRequest - } - return nil -} - -func (x *SetBackupIdRequest) GetMediaBackupAuthCredentialRequest() []byte { - if x != nil { - return x.MediaBackupAuthCredentialRequest - } - return nil -} - -type SetBackupIdResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetBackupIdResponse) Reset() { - *x = SetBackupIdResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetBackupIdResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetBackupIdResponse) ProtoMessage() {} - -func (x *SetBackupIdResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetBackupIdResponse.ProtoReflect.Descriptor instead. -func (*SetBackupIdResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{1} -} - -type RedeemReceiptRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Presentation for a previously acquired receipt, serialized with libsignal - Presentation []byte `protobuf:"bytes,1,opt,name=presentation,proto3" json:"presentation,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RedeemReceiptRequest) Reset() { - *x = RedeemReceiptRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RedeemReceiptRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RedeemReceiptRequest) ProtoMessage() {} - -func (x *RedeemReceiptRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RedeemReceiptRequest.ProtoReflect.Descriptor instead. -func (*RedeemReceiptRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{2} -} - -func (x *RedeemReceiptRequest) GetPresentation() []byte { - if x != nil { - return x.Presentation - } - return nil -} - -type RedeemReceiptResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *RedeemReceiptResponse_Success - // *RedeemReceiptResponse_AccountMissingCommitment - // *RedeemReceiptResponse_InvalidReceipt - Response isRedeemReceiptResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RedeemReceiptResponse) Reset() { - *x = RedeemReceiptResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RedeemReceiptResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RedeemReceiptResponse) ProtoMessage() {} - -func (x *RedeemReceiptResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RedeemReceiptResponse.ProtoReflect.Descriptor instead. -func (*RedeemReceiptResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{3} -} - -func (x *RedeemReceiptResponse) GetResponse() isRedeemReceiptResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *RedeemReceiptResponse) GetSuccess() *emptypb.Empty { - if x != nil { - if x, ok := x.Response.(*RedeemReceiptResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *RedeemReceiptResponse) GetAccountMissingCommitment() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*RedeemReceiptResponse_AccountMissingCommitment); ok { - return x.AccountMissingCommitment - } - } - return nil -} - -func (x *RedeemReceiptResponse) GetInvalidReceipt() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*RedeemReceiptResponse_InvalidReceipt); ok { - return x.InvalidReceipt - } - } - return nil -} - -type isRedeemReceiptResponse_Response interface { - isRedeemReceiptResponse_Response() -} - -type RedeemReceiptResponse_Success struct { - // The receipt was successfully redeemed - Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type RedeemReceiptResponse_AccountMissingCommitment struct { - // The target account does not have a backup-id commitment - AccountMissingCommitment *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=account_missing_commitment,json=accountMissingCommitment,proto3,oneof"` -} - -type RedeemReceiptResponse_InvalidReceipt struct { - // The provided receipt presentation was malformed or expired - InvalidReceipt *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=invalid_receipt,json=invalidReceipt,proto3,oneof"` -} - -func (*RedeemReceiptResponse_Success) isRedeemReceiptResponse_Response() {} - -func (*RedeemReceiptResponse_AccountMissingCommitment) isRedeemReceiptResponse_Response() {} - -func (*RedeemReceiptResponse_InvalidReceipt) isRedeemReceiptResponse_Response() {} - -type GetBackupAuthCredentialsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The redemption time for the first credential. This must be a day-aligned - // seconds since epoch in UTC. - RedemptionStart int64 `protobuf:"varint,1,opt,name=redemption_start,json=redemptionStart,proto3" json:"redemption_start,omitempty"` - // The redemption time for the last credential. This must be a day-aligned - // seconds since epoch in UTC. The span between redemptionStart and - // redemptionEnd must not exceed 7 days. - RedemptionStop int64 `protobuf:"varint,2,opt,name=redemption_stop,json=redemptionStop,proto3" json:"redemption_stop,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetBackupAuthCredentialsRequest) Reset() { - *x = GetBackupAuthCredentialsRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetBackupAuthCredentialsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBackupAuthCredentialsRequest) ProtoMessage() {} - -func (x *GetBackupAuthCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetBackupAuthCredentialsRequest.ProtoReflect.Descriptor instead. -func (*GetBackupAuthCredentialsRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{4} -} - -func (x *GetBackupAuthCredentialsRequest) GetRedemptionStart() int64 { - if x != nil { - return x.RedemptionStart - } - return 0 -} - -func (x *GetBackupAuthCredentialsRequest) GetRedemptionStop() int64 { - if x != nil { - return x.RedemptionStop - } - return 0 -} - -type GetBackupAuthCredentialsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The requested credentials. If absent, there was no existing blinded - // backup id associated with the provided account. - Credentials *GetBackupAuthCredentialsResponse_Credentials `protobuf:"bytes,1,opt,name=credentials,proto3" json:"credentials,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetBackupAuthCredentialsResponse) Reset() { - *x = GetBackupAuthCredentialsResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetBackupAuthCredentialsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBackupAuthCredentialsResponse) ProtoMessage() {} - -func (x *GetBackupAuthCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetBackupAuthCredentialsResponse.ProtoReflect.Descriptor instead. -func (*GetBackupAuthCredentialsResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{5} -} - -func (x *GetBackupAuthCredentialsResponse) GetCredentials() *GetBackupAuthCredentialsResponse_Credentials { - if x != nil { - return x.Credentials - } - return nil -} - -type SignedPresentation struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Presentation of a BackupAuthCredential previously retrieved from - // GetBackupAuthCredentials on the authenticated channel - Presentation []byte `protobuf:"bytes,1,opt,name=presentation,proto3" json:"presentation,omitempty"` - // The presentation signed with the private key corresponding to the public - // key set with SetPublicKey - PresentationSignature []byte `protobuf:"bytes,2,opt,name=presentation_signature,json=presentationSignature,proto3" json:"presentation_signature,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SignedPresentation) Reset() { - *x = SignedPresentation{} - mi := &file_org_signal_chat_backups_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SignedPresentation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignedPresentation) ProtoMessage() {} - -func (x *SignedPresentation) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SignedPresentation.ProtoReflect.Descriptor instead. -func (*SignedPresentation) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{6} -} - -func (x *SignedPresentation) GetPresentation() []byte { - if x != nil { - return x.Presentation - } - return nil -} - -func (x *SignedPresentation) GetPresentationSignature() []byte { - if x != nil { - return x.PresentationSignature - } - return nil -} - -type SetPublicKeyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` - // The public key, serialized in libsignal's elliptic-curve public key format. - PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetPublicKeyRequest) Reset() { - *x = SetPublicKeyRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetPublicKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetPublicKeyRequest) ProtoMessage() {} - -func (x *SetPublicKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetPublicKeyRequest.ProtoReflect.Descriptor instead. -func (*SetPublicKeyRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{7} -} - -func (x *SetPublicKeyRequest) GetSignedPresentation() *SignedPresentation { - if x != nil { - return x.SignedPresentation - } - return nil -} - -func (x *SetPublicKeyRequest) GetPublicKey() []byte { - if x != nil { - return x.PublicKey - } - return nil -} - -type SetPublicKeyResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *SetPublicKeyResponse_Success - // *SetPublicKeyResponse_FailedAuthentication - Response isSetPublicKeyResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetPublicKeyResponse) Reset() { - *x = SetPublicKeyResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetPublicKeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetPublicKeyResponse) ProtoMessage() {} - -func (x *SetPublicKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetPublicKeyResponse.ProtoReflect.Descriptor instead. -func (*SetPublicKeyResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{8} -} - -func (x *SetPublicKeyResponse) GetResponse() isSetPublicKeyResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *SetPublicKeyResponse) GetSuccess() *emptypb.Empty { - if x != nil { - if x, ok := x.Response.(*SetPublicKeyResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *SetPublicKeyResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Response.(*SetPublicKeyResponse_FailedAuthentication); ok { - return x.FailedAuthentication - } - } - return nil -} - -type isSetPublicKeyResponse_Response interface { - isSetPublicKeyResponse_Response() -} - -type SetPublicKeyResponse_Success struct { - // The public key was successfully set - Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type SetPublicKeyResponse_FailedAuthentication struct { - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - // - // This may also be returned if there was an existing public key and the - // provided public key did not match. - FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` -} - -func (*SetPublicKeyResponse_Success) isSetPublicKeyResponse_Response() {} - -func (*SetPublicKeyResponse_FailedAuthentication) isSetPublicKeyResponse_Response() {} - -type GetCdnCredentialsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` - Cdn uint32 `protobuf:"varint,2,opt,name=cdn,proto3" json:"cdn,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCdnCredentialsRequest) Reset() { - *x = GetCdnCredentialsRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCdnCredentialsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCdnCredentialsRequest) ProtoMessage() {} - -func (x *GetCdnCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCdnCredentialsRequest.ProtoReflect.Descriptor instead. -func (*GetCdnCredentialsRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{9} -} - -func (x *GetCdnCredentialsRequest) GetSignedPresentation() *SignedPresentation { - if x != nil { - return x.SignedPresentation - } - return nil -} - -func (x *GetCdnCredentialsRequest) GetCdn() uint32 { - if x != nil { - return x.Cdn - } - return 0 -} - -type GetCdnCredentialsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetCdnCredentialsResponse_CdnCredentials_ - // *GetCdnCredentialsResponse_FailedAuthentication - Response isGetCdnCredentialsResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCdnCredentialsResponse) Reset() { - *x = GetCdnCredentialsResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCdnCredentialsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCdnCredentialsResponse) ProtoMessage() {} - -func (x *GetCdnCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCdnCredentialsResponse.ProtoReflect.Descriptor instead. -func (*GetCdnCredentialsResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{10} -} - -func (x *GetCdnCredentialsResponse) GetResponse() isGetCdnCredentialsResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetCdnCredentialsResponse) GetCdnCredentials() *GetCdnCredentialsResponse_CdnCredentials { - if x != nil { - if x, ok := x.Response.(*GetCdnCredentialsResponse_CdnCredentials_); ok { - return x.CdnCredentials - } - } - return nil -} - -func (x *GetCdnCredentialsResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Response.(*GetCdnCredentialsResponse_FailedAuthentication); ok { - return x.FailedAuthentication - } - } - return nil -} - -type isGetCdnCredentialsResponse_Response interface { - isGetCdnCredentialsResponse_Response() -} - -type GetCdnCredentialsResponse_CdnCredentials_ struct { - // Headers to include with requests to the read from the backup CDN. Includes - // time limited read-only credentials. - CdnCredentials *GetCdnCredentialsResponse_CdnCredentials `protobuf:"bytes,1,opt,name=cdn_credentials,json=cdnCredentials,proto3,oneof"` -} - -type GetCdnCredentialsResponse_FailedAuthentication struct { - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` -} - -func (*GetCdnCredentialsResponse_CdnCredentials_) isGetCdnCredentialsResponse_Response() {} - -func (*GetCdnCredentialsResponse_FailedAuthentication) isGetCdnCredentialsResponse_Response() {} - -type GetSvrBCredentialsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetSvrBCredentialsRequest) Reset() { - *x = GetSvrBCredentialsRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetSvrBCredentialsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSvrBCredentialsRequest) ProtoMessage() {} - -func (x *GetSvrBCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSvrBCredentialsRequest.ProtoReflect.Descriptor instead. -func (*GetSvrBCredentialsRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{11} -} - -func (x *GetSvrBCredentialsRequest) GetSignedPresentation() *SignedPresentation { - if x != nil { - return x.SignedPresentation - } - return nil -} - -type GetSvrBCredentialsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetSvrBCredentialsResponse_SvrbCredentials - // *GetSvrBCredentialsResponse_FailedAuthentication - Response isGetSvrBCredentialsResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetSvrBCredentialsResponse) Reset() { - *x = GetSvrBCredentialsResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetSvrBCredentialsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSvrBCredentialsResponse) ProtoMessage() {} - -func (x *GetSvrBCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSvrBCredentialsResponse.ProtoReflect.Descriptor instead. -func (*GetSvrBCredentialsResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{12} -} - -func (x *GetSvrBCredentialsResponse) GetResponse() isGetSvrBCredentialsResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetSvrBCredentialsResponse) GetSvrbCredentials() *GetSvrBCredentialsResponse_SvrBCredentials { - if x != nil { - if x, ok := x.Response.(*GetSvrBCredentialsResponse_SvrbCredentials); ok { - return x.SvrbCredentials - } - } - return nil -} - -func (x *GetSvrBCredentialsResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Response.(*GetSvrBCredentialsResponse_FailedAuthentication); ok { - return x.FailedAuthentication - } - } - return nil -} - -type isGetSvrBCredentialsResponse_Response interface { - isGetSvrBCredentialsResponse_Response() -} - -type GetSvrBCredentialsResponse_SvrbCredentials struct { - SvrbCredentials *GetSvrBCredentialsResponse_SvrBCredentials `protobuf:"bytes,1,opt,name=svrb_credentials,json=svrbCredentials,proto3,oneof"` -} - -type GetSvrBCredentialsResponse_FailedAuthentication struct { - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` -} - -func (*GetSvrBCredentialsResponse_SvrbCredentials) isGetSvrBCredentialsResponse_Response() {} - -func (*GetSvrBCredentialsResponse_FailedAuthentication) isGetSvrBCredentialsResponse_Response() {} - -type GetBackupInfoRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetBackupInfoRequest) Reset() { - *x = GetBackupInfoRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetBackupInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBackupInfoRequest) ProtoMessage() {} - -func (x *GetBackupInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetBackupInfoRequest.ProtoReflect.Descriptor instead. -func (*GetBackupInfoRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{13} -} - -func (x *GetBackupInfoRequest) GetSignedPresentation() *SignedPresentation { - if x != nil { - return x.SignedPresentation - } - return nil -} - -type GetMessageBackupInfoResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetMessageBackupInfoResponse_BackupInfo - // *GetMessageBackupInfoResponse_FailedAuthentication - Response isGetMessageBackupInfoResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetMessageBackupInfoResponse) Reset() { - *x = GetMessageBackupInfoResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetMessageBackupInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetMessageBackupInfoResponse) ProtoMessage() {} - -func (x *GetMessageBackupInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetMessageBackupInfoResponse.ProtoReflect.Descriptor instead. -func (*GetMessageBackupInfoResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{14} -} - -func (x *GetMessageBackupInfoResponse) GetResponse() isGetMessageBackupInfoResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetMessageBackupInfoResponse) GetBackupInfo() *GetMessageBackupInfoResponse_MessageBackupInfo { - if x != nil { - if x, ok := x.Response.(*GetMessageBackupInfoResponse_BackupInfo); ok { - return x.BackupInfo - } - } - return nil -} - -func (x *GetMessageBackupInfoResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Response.(*GetMessageBackupInfoResponse_FailedAuthentication); ok { - return x.FailedAuthentication - } - } - return nil -} - -type isGetMessageBackupInfoResponse_Response interface { - isGetMessageBackupInfoResponse_Response() -} - -type GetMessageBackupInfoResponse_BackupInfo struct { - BackupInfo *GetMessageBackupInfoResponse_MessageBackupInfo `protobuf:"bytes,1,opt,name=backup_info,json=backupInfo,proto3,oneof"` -} - -type GetMessageBackupInfoResponse_FailedAuthentication struct { - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` -} - -func (*GetMessageBackupInfoResponse_BackupInfo) isGetMessageBackupInfoResponse_Response() {} - -func (*GetMessageBackupInfoResponse_FailedAuthentication) isGetMessageBackupInfoResponse_Response() {} - -type GetMediaBackupInfoResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetMediaBackupInfoResponse_BackupInfo - // *GetMediaBackupInfoResponse_FailedAuthentication - Response isGetMediaBackupInfoResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetMediaBackupInfoResponse) Reset() { - *x = GetMediaBackupInfoResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetMediaBackupInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetMediaBackupInfoResponse) ProtoMessage() {} - -func (x *GetMediaBackupInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[15] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetMediaBackupInfoResponse.ProtoReflect.Descriptor instead. -func (*GetMediaBackupInfoResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{15} -} - -func (x *GetMediaBackupInfoResponse) GetResponse() isGetMediaBackupInfoResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetMediaBackupInfoResponse) GetBackupInfo() *GetMediaBackupInfoResponse_MediaBackupInfo { - if x != nil { - if x, ok := x.Response.(*GetMediaBackupInfoResponse_BackupInfo); ok { - return x.BackupInfo - } - } - return nil -} - -func (x *GetMediaBackupInfoResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Response.(*GetMediaBackupInfoResponse_FailedAuthentication); ok { - return x.FailedAuthentication - } - } - return nil -} - -type isGetMediaBackupInfoResponse_Response interface { - isGetMediaBackupInfoResponse_Response() -} - -type GetMediaBackupInfoResponse_BackupInfo struct { - BackupInfo *GetMediaBackupInfoResponse_MediaBackupInfo `protobuf:"bytes,1,opt,name=backup_info,json=backupInfo,proto3,oneof"` -} - -type GetMediaBackupInfoResponse_FailedAuthentication struct { - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` -} - -func (*GetMediaBackupInfoResponse_BackupInfo) isGetMediaBackupInfoResponse_Response() {} - -func (*GetMediaBackupInfoResponse_FailedAuthentication) isGetMediaBackupInfoResponse_Response() {} - -type RefreshRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RefreshRequest) Reset() { - *x = RefreshRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RefreshRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RefreshRequest) ProtoMessage() {} - -func (x *RefreshRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[16] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RefreshRequest.ProtoReflect.Descriptor instead. -func (*RefreshRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{16} -} - -func (x *RefreshRequest) GetSignedPresentation() *SignedPresentation { - if x != nil { - return x.SignedPresentation - } - return nil -} - -type RefreshResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *RefreshResponse_Success - // *RefreshResponse_FailedAuthentication - Response isRefreshResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RefreshResponse) Reset() { - *x = RefreshResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RefreshResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RefreshResponse) ProtoMessage() {} - -func (x *RefreshResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[17] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RefreshResponse.ProtoReflect.Descriptor instead. -func (*RefreshResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{17} -} - -func (x *RefreshResponse) GetResponse() isRefreshResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *RefreshResponse) GetSuccess() *emptypb.Empty { - if x != nil { - if x, ok := x.Response.(*RefreshResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *RefreshResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Response.(*RefreshResponse_FailedAuthentication); ok { - return x.FailedAuthentication - } - } - return nil -} - -type isRefreshResponse_Response interface { - isRefreshResponse_Response() -} - -type RefreshResponse_Success struct { - // The backup was successfully refreshed - Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type RefreshResponse_FailedAuthentication struct { - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` -} - -func (*RefreshResponse_Success) isRefreshResponse_Response() {} - -func (*RefreshResponse_FailedAuthentication) isRefreshResponse_Response() {} - -type GetUploadFormRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` - // Types that are valid to be assigned to UploadType: - // - // *GetUploadFormRequest_Messages - // *GetUploadFormRequest_Media - UploadType isGetUploadFormRequest_UploadType `protobuf_oneof:"upload_type"` - // The length of the attachment for the requested upload form. Uploads - // performed with this form will be limited to the provided length. - UploadLength uint64 `protobuf:"varint,4,opt,name=uploadLength,proto3" json:"uploadLength,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetUploadFormRequest) Reset() { - *x = GetUploadFormRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetUploadFormRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUploadFormRequest) ProtoMessage() {} - -func (x *GetUploadFormRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[18] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetUploadFormRequest.ProtoReflect.Descriptor instead. -func (*GetUploadFormRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{18} -} - -func (x *GetUploadFormRequest) GetSignedPresentation() *SignedPresentation { - if x != nil { - return x.SignedPresentation - } - return nil -} - -func (x *GetUploadFormRequest) GetUploadType() isGetUploadFormRequest_UploadType { - if x != nil { - return x.UploadType - } - return nil -} - -func (x *GetUploadFormRequest) GetMessages() *GetUploadFormRequest_MessagesUploadType { - if x != nil { - if x, ok := x.UploadType.(*GetUploadFormRequest_Messages); ok { - return x.Messages - } - } - return nil -} - -func (x *GetUploadFormRequest) GetMedia() *GetUploadFormRequest_MediaUploadType { - if x != nil { - if x, ok := x.UploadType.(*GetUploadFormRequest_Media); ok { - return x.Media - } - } - return nil -} - -func (x *GetUploadFormRequest) GetUploadLength() uint64 { - if x != nil { - return x.UploadLength - } - return 0 -} - -type isGetUploadFormRequest_UploadType interface { - isGetUploadFormRequest_UploadType() -} - -type GetUploadFormRequest_Messages struct { - // Retrieve an upload form that can be used to perform a resumable upload of - // a message backup. The finished upload will be available on the backup cdn. - Messages *GetUploadFormRequest_MessagesUploadType `protobuf:"bytes,2,opt,name=messages,proto3,oneof"` -} - -type GetUploadFormRequest_Media struct { - // Retrieve an upload form for a temporary location that can be used to - // perform a resumable upload of an attachment. After uploading, the - // attachment can be copied into the backup via CopyMedia. - // - // Behaves identically to the account authenticated version at /attachments. - Media *GetUploadFormRequest_MediaUploadType `protobuf:"bytes,3,opt,name=media,proto3,oneof"` -} - -func (*GetUploadFormRequest_Messages) isGetUploadFormRequest_UploadType() {} - -func (*GetUploadFormRequest_Media) isGetUploadFormRequest_UploadType() {} - -type GetUploadFormResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetUploadFormResponse_UploadForm - // *GetUploadFormResponse_FailedAuthentication - // *GetUploadFormResponse_ExceedsMaxUploadLength - Response isGetUploadFormResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetUploadFormResponse) Reset() { - *x = GetUploadFormResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetUploadFormResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUploadFormResponse) ProtoMessage() {} - -func (x *GetUploadFormResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[19] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetUploadFormResponse.ProtoReflect.Descriptor instead. -func (*GetUploadFormResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{19} -} - -func (x *GetUploadFormResponse) GetResponse() isGetUploadFormResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetUploadFormResponse) GetUploadForm() *common.UploadForm { - if x != nil { - if x, ok := x.Response.(*GetUploadFormResponse_UploadForm); ok { - return x.UploadForm - } - } - return nil -} - -func (x *GetUploadFormResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Response.(*GetUploadFormResponse_FailedAuthentication); ok { - return x.FailedAuthentication - } - } - return nil -} - -func (x *GetUploadFormResponse) GetExceedsMaxUploadLength() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*GetUploadFormResponse_ExceedsMaxUploadLength); ok { - return x.ExceedsMaxUploadLength - } - } - return nil -} - -type isGetUploadFormResponse_Response interface { - isGetUploadFormResponse_Response() -} - -type GetUploadFormResponse_UploadForm struct { - UploadForm *common.UploadForm `protobuf:"bytes,1,opt,name=upload_form,json=uploadForm,proto3,oneof"` -} - -type GetUploadFormResponse_FailedAuthentication struct { - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` -} - -type GetUploadFormResponse_ExceedsMaxUploadLength struct { - // The request size was larger than the maximum supported upload size. The - // maximum upload size is subject to change and is governed by - // `global.attachments.maxBytes` - ExceedsMaxUploadLength *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=exceeds_max_upload_length,json=exceedsMaxUploadLength,proto3,oneof"` -} - -func (*GetUploadFormResponse_UploadForm) isGetUploadFormResponse_Response() {} - -func (*GetUploadFormResponse_FailedAuthentication) isGetUploadFormResponse_Response() {} - -func (*GetUploadFormResponse_ExceedsMaxUploadLength) isGetUploadFormResponse_Response() {} - -type CopyMediaItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The attachment cdn of the object to copy into the backup - SourceAttachmentCdn uint32 `protobuf:"varint,1,opt,name=source_attachment_cdn,json=sourceAttachmentCdn,proto3" json:"source_attachment_cdn,omitempty"` - // The attachment key of the object to copy into the backup - SourceKey string `protobuf:"bytes,2,opt,name=source_key,json=sourceKey,proto3" json:"source_key,omitempty"` - // The length of the source attachment before the encryption applied by the - // copy operation - ObjectLength uint64 `protobuf:"varint,3,opt,name=object_length,json=objectLength,proto3" json:"object_length,omitempty"` - // media_id to copy on to the backup CDN - MediaId []byte `protobuf:"bytes,4,opt,name=media_id,json=mediaId,proto3" json:"media_id,omitempty"` - // A 32-byte key for the MAC - HmacKey []byte `protobuf:"bytes,5,opt,name=hmac_key,json=hmacKey,proto3" json:"hmac_key,omitempty"` - // A 32-byte encryption key for AES - EncryptionKey []byte `protobuf:"bytes,6,opt,name=encryption_key,json=encryptionKey,proto3" json:"encryption_key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CopyMediaItem) Reset() { - *x = CopyMediaItem{} - mi := &file_org_signal_chat_backups_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CopyMediaItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CopyMediaItem) ProtoMessage() {} - -func (x *CopyMediaItem) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[20] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CopyMediaItem.ProtoReflect.Descriptor instead. -func (*CopyMediaItem) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{20} -} - -func (x *CopyMediaItem) GetSourceAttachmentCdn() uint32 { - if x != nil { - return x.SourceAttachmentCdn - } - return 0 -} - -func (x *CopyMediaItem) GetSourceKey() string { - if x != nil { - return x.SourceKey - } - return "" -} - -func (x *CopyMediaItem) GetObjectLength() uint64 { - if x != nil { - return x.ObjectLength - } - return 0 -} - -func (x *CopyMediaItem) GetMediaId() []byte { - if x != nil { - return x.MediaId - } - return nil -} - -func (x *CopyMediaItem) GetHmacKey() []byte { - if x != nil { - return x.HmacKey - } - return nil -} - -func (x *CopyMediaItem) GetEncryptionKey() []byte { - if x != nil { - return x.EncryptionKey - } - return nil -} - -type CopyMediaRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` - // Items to copy - Items []*CopyMediaItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CopyMediaRequest) Reset() { - *x = CopyMediaRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CopyMediaRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CopyMediaRequest) ProtoMessage() {} - -func (x *CopyMediaRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[21] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CopyMediaRequest.ProtoReflect.Descriptor instead. -func (*CopyMediaRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{21} -} - -func (x *CopyMediaRequest) GetSignedPresentation() *SignedPresentation { - if x != nil { - return x.SignedPresentation - } - return nil -} - -func (x *CopyMediaRequest) GetItems() []*CopyMediaItem { - if x != nil { - return x.Items - } - return nil -} - -type CopyMediaResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The 15-byte media_id from the corresponding CopyMediaItem in the request - MediaId []byte `protobuf:"bytes,1,opt,name=media_id,json=mediaId,proto3" json:"media_id,omitempty"` - // Types that are valid to be assigned to Response: - // - // *CopyMediaResponse_Success - // *CopyMediaResponse_SourceNotFound_ - // *CopyMediaResponse_WrongSourceLength_ - // *CopyMediaResponse_OutOfSpace_ - Response isCopyMediaResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CopyMediaResponse) Reset() { - *x = CopyMediaResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CopyMediaResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CopyMediaResponse) ProtoMessage() {} - -func (x *CopyMediaResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[22] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CopyMediaResponse.ProtoReflect.Descriptor instead. -func (*CopyMediaResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{22} -} - -func (x *CopyMediaResponse) GetMediaId() []byte { - if x != nil { - return x.MediaId - } - return nil -} - -func (x *CopyMediaResponse) GetResponse() isCopyMediaResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *CopyMediaResponse) GetSuccess() *CopyMediaResponse_CopySuccess { - if x != nil { - if x, ok := x.Response.(*CopyMediaResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *CopyMediaResponse) GetSourceNotFound() *CopyMediaResponse_SourceNotFound { - if x != nil { - if x, ok := x.Response.(*CopyMediaResponse_SourceNotFound_); ok { - return x.SourceNotFound - } - } - return nil -} - -func (x *CopyMediaResponse) GetWrongSourceLength() *CopyMediaResponse_WrongSourceLength { - if x != nil { - if x, ok := x.Response.(*CopyMediaResponse_WrongSourceLength_); ok { - return x.WrongSourceLength - } - } - return nil -} - -func (x *CopyMediaResponse) GetOutOfSpace() *CopyMediaResponse_OutOfSpace { - if x != nil { - if x, ok := x.Response.(*CopyMediaResponse_OutOfSpace_); ok { - return x.OutOfSpace - } - } - return nil -} - -type isCopyMediaResponse_Response interface { - isCopyMediaResponse_Response() -} - -type CopyMediaResponse_Success struct { - // The media item was successfully copied into the backup - Success *CopyMediaResponse_CopySuccess `protobuf:"bytes,2,opt,name=success,proto3,oneof"` -} - -type CopyMediaResponse_SourceNotFound_ struct { - // The source object was not found - SourceNotFound *CopyMediaResponse_SourceNotFound `protobuf:"bytes,3,opt,name=source_not_found,json=sourceNotFound,proto3,oneof"` -} - -type CopyMediaResponse_WrongSourceLength_ struct { - // The provided object length was incorrect - WrongSourceLength *CopyMediaResponse_WrongSourceLength `protobuf:"bytes,4,opt,name=wrong_source_length,json=wrongSourceLength,proto3,oneof"` -} - -type CopyMediaResponse_OutOfSpace_ struct { - // All media capacity has been consumed. Free some space to continue. - OutOfSpace *CopyMediaResponse_OutOfSpace `protobuf:"bytes,5,opt,name=out_of_space,json=outOfSpace,proto3,oneof"` -} - -func (*CopyMediaResponse_Success) isCopyMediaResponse_Response() {} - -func (*CopyMediaResponse_SourceNotFound_) isCopyMediaResponse_Response() {} - -func (*CopyMediaResponse_WrongSourceLength_) isCopyMediaResponse_Response() {} - -func (*CopyMediaResponse_OutOfSpace_) isCopyMediaResponse_Response() {} - -// The reason why a media stream RPC is being prematurely closed by the server. -type BackupStreamClosed struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Reason: - // - // *BackupStreamClosed_FailedAuthentication - Reason isBackupStreamClosed_Reason `protobuf_oneof:"reason"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BackupStreamClosed) Reset() { - *x = BackupStreamClosed{} - mi := &file_org_signal_chat_backups_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BackupStreamClosed) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BackupStreamClosed) ProtoMessage() {} - -func (x *BackupStreamClosed) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[23] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BackupStreamClosed.ProtoReflect.Descriptor instead. -func (*BackupStreamClosed) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{23} -} - -func (x *BackupStreamClosed) GetReason() isBackupStreamClosed_Reason { - if x != nil { - return x.Reason - } - return nil -} - -func (x *BackupStreamClosed) GetFailedAuthentication() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Reason.(*BackupStreamClosed_FailedAuthentication); ok { - return x.FailedAuthentication - } - } - return nil -} - -type isBackupStreamClosed_Reason interface { - isBackupStreamClosed_Reason() -} - -type BackupStreamClosed_FailedAuthentication struct { - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,1,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` -} - -func (*BackupStreamClosed_FailedAuthentication) isBackupStreamClosed_Reason() {} - -type ListMediaRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` - // A cursor returned by a previous call to ListMedia, absent on the first call - Cursor *string `protobuf:"bytes,2,opt,name=cursor,proto3,oneof" json:"cursor,omitempty"` - // If provided, the maximum number of entries to return in a page. If absent, - // a server-chosen default is used. - Limit *uint32 `protobuf:"varint,3,opt,name=limit,proto3,oneof" json:"limit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListMediaRequest) Reset() { - *x = ListMediaRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListMediaRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMediaRequest) ProtoMessage() {} - -func (x *ListMediaRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[24] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMediaRequest.ProtoReflect.Descriptor instead. -func (*ListMediaRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{24} -} - -func (x *ListMediaRequest) GetSignedPresentation() *SignedPresentation { - if x != nil { - return x.SignedPresentation - } - return nil -} - -func (x *ListMediaRequest) GetCursor() string { - if x != nil && x.Cursor != nil { - return *x.Cursor - } - return "" -} - -func (x *ListMediaRequest) GetLimit() uint32 { - if x != nil && x.Limit != nil { - return *x.Limit - } - return 0 -} - -type ListMediaResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *ListMediaResponse_ListResult_ - // *ListMediaResponse_FailedAuthentication - Response isListMediaResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListMediaResponse) Reset() { - *x = ListMediaResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListMediaResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMediaResponse) ProtoMessage() {} - -func (x *ListMediaResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[25] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMediaResponse.ProtoReflect.Descriptor instead. -func (*ListMediaResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{25} -} - -func (x *ListMediaResponse) GetResponse() isListMediaResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *ListMediaResponse) GetListResult() *ListMediaResponse_ListResult { - if x != nil { - if x, ok := x.Response.(*ListMediaResponse_ListResult_); ok { - return x.ListResult - } - } - return nil -} - -func (x *ListMediaResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Response.(*ListMediaResponse_FailedAuthentication); ok { - return x.FailedAuthentication - } - } - return nil -} - -type isListMediaResponse_Response interface { - isListMediaResponse_Response() -} - -type ListMediaResponse_ListResult_ struct { - ListResult *ListMediaResponse_ListResult `protobuf:"bytes,1,opt,name=list_result,json=listResult,proto3,oneof"` -} - -type ListMediaResponse_FailedAuthentication struct { - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` -} - -func (*ListMediaResponse_ListResult_) isListMediaResponse_Response() {} - -func (*ListMediaResponse_FailedAuthentication) isListMediaResponse_Response() {} - -type DeleteAllRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteAllRequest) Reset() { - *x = DeleteAllRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteAllRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteAllRequest) ProtoMessage() {} - -func (x *DeleteAllRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[26] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteAllRequest.ProtoReflect.Descriptor instead. -func (*DeleteAllRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{26} -} - -func (x *DeleteAllRequest) GetSignedPresentation() *SignedPresentation { - if x != nil { - return x.SignedPresentation - } - return nil -} - -type DeleteAllResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *DeleteAllResponse_Success - // *DeleteAllResponse_FailedAuthentication - Response isDeleteAllResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteAllResponse) Reset() { - *x = DeleteAllResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteAllResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteAllResponse) ProtoMessage() {} - -func (x *DeleteAllResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[27] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteAllResponse.ProtoReflect.Descriptor instead. -func (*DeleteAllResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{27} -} - -func (x *DeleteAllResponse) GetResponse() isDeleteAllResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *DeleteAllResponse) GetSuccess() *emptypb.Empty { - if x != nil { - if x, ok := x.Response.(*DeleteAllResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *DeleteAllResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Response.(*DeleteAllResponse_FailedAuthentication); ok { - return x.FailedAuthentication - } - } - return nil -} - -type isDeleteAllResponse_Response interface { - isDeleteAllResponse_Response() -} - -type DeleteAllResponse_Success struct { - // The backup was successfully scheduled for deletion - Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type DeleteAllResponse_FailedAuthentication struct { - // The provided backup auth credential presentation could not be - // authenticated. Either, the presentation could not be verified, or - // the public key signature was invalid, or there is no backup associated - // with the backup-id in the presentation. - FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` -} - -func (*DeleteAllResponse_Success) isDeleteAllResponse_Response() {} - -func (*DeleteAllResponse_FailedAuthentication) isDeleteAllResponse_Response() {} - -type DeleteMediaItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The backup cdn where this media object is stored - Cdn uint32 `protobuf:"varint,1,opt,name=cdn,proto3" json:"cdn,omitempty"` - // The media_id of the object to delete - MediaId []byte `protobuf:"bytes,2,opt,name=media_id,json=mediaId,proto3" json:"media_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteMediaItem) Reset() { - *x = DeleteMediaItem{} - mi := &file_org_signal_chat_backups_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteMediaItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteMediaItem) ProtoMessage() {} - -func (x *DeleteMediaItem) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[28] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteMediaItem.ProtoReflect.Descriptor instead. -func (*DeleteMediaItem) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{28} -} - -func (x *DeleteMediaItem) GetCdn() uint32 { - if x != nil { - return x.Cdn - } - return 0 -} - -func (x *DeleteMediaItem) GetMediaId() []byte { - if x != nil { - return x.MediaId - } - return nil -} - -type DeleteMediaRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SignedPresentation *SignedPresentation `protobuf:"bytes,1,opt,name=signed_presentation,json=signedPresentation,proto3" json:"signed_presentation,omitempty"` - Items []*DeleteMediaItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteMediaRequest) Reset() { - *x = DeleteMediaRequest{} - mi := &file_org_signal_chat_backups_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteMediaRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteMediaRequest) ProtoMessage() {} - -func (x *DeleteMediaRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[29] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteMediaRequest.ProtoReflect.Descriptor instead. -func (*DeleteMediaRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{29} -} - -func (x *DeleteMediaRequest) GetSignedPresentation() *SignedPresentation { - if x != nil { - return x.SignedPresentation - } - return nil -} - -func (x *DeleteMediaRequest) GetItems() []*DeleteMediaItem { - if x != nil { - return x.Items - } - return nil -} - -type DeleteMediaResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - DeletedItem *DeleteMediaItem `protobuf:"bytes,1,opt,name=deleted_item,json=deletedItem,proto3" json:"deleted_item,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteMediaResponse) Reset() { - *x = DeleteMediaResponse{} - mi := &file_org_signal_chat_backups_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteMediaResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteMediaResponse) ProtoMessage() {} - -func (x *DeleteMediaResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[30] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteMediaResponse.ProtoReflect.Descriptor instead. -func (*DeleteMediaResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{30} -} - -func (x *DeleteMediaResponse) GetDeletedItem() *DeleteMediaItem { - if x != nil { - return x.DeletedItem - } - return nil -} - -type GetBackupAuthCredentialsResponse_Credentials struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The requested message backup ZkCredentials indexed by the start of their - // validity period. The smallest key should be for the requested - // redemption_start, the largest for the requested redemption_end. - MessageCredentials map[int64]*common.ZkCredential `protobuf:"bytes,1,rep,name=message_credentials,json=messageCredentials,proto3" json:"message_credentials,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // The requested media backup ZkCredentials indexed by the start of their - // validity period. The smallest key should be for the requested - // redemption_start, the largest for the requested redemption_end. - MediaCredentials map[int64]*common.ZkCredential `protobuf:"bytes,2,rep,name=media_credentials,json=mediaCredentials,proto3" json:"media_credentials,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetBackupAuthCredentialsResponse_Credentials) Reset() { - *x = GetBackupAuthCredentialsResponse_Credentials{} - mi := &file_org_signal_chat_backups_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetBackupAuthCredentialsResponse_Credentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBackupAuthCredentialsResponse_Credentials) ProtoMessage() {} - -func (x *GetBackupAuthCredentialsResponse_Credentials) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[31] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetBackupAuthCredentialsResponse_Credentials.ProtoReflect.Descriptor instead. -func (*GetBackupAuthCredentialsResponse_Credentials) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{5, 0} -} - -func (x *GetBackupAuthCredentialsResponse_Credentials) GetMessageCredentials() map[int64]*common.ZkCredential { - if x != nil { - return x.MessageCredentials - } - return nil -} - -func (x *GetBackupAuthCredentialsResponse_Credentials) GetMediaCredentials() map[int64]*common.ZkCredential { - if x != nil { - return x.MediaCredentials - } - return nil -} - -type GetCdnCredentialsResponse_CdnCredentials struct { - state protoimpl.MessageState `protogen:"open.v1"` - Headers map[string]string `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCdnCredentialsResponse_CdnCredentials) Reset() { - *x = GetCdnCredentialsResponse_CdnCredentials{} - mi := &file_org_signal_chat_backups_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCdnCredentialsResponse_CdnCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCdnCredentialsResponse_CdnCredentials) ProtoMessage() {} - -func (x *GetCdnCredentialsResponse_CdnCredentials) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[34] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCdnCredentialsResponse_CdnCredentials.ProtoReflect.Descriptor instead. -func (*GetCdnCredentialsResponse_CdnCredentials) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{10, 0} -} - -func (x *GetCdnCredentialsResponse_CdnCredentials) GetHeaders() map[string]string { - if x != nil { - return x.Headers - } - return nil -} - -type GetSvrBCredentialsResponse_SvrBCredentials struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A username that can be presented to authenticate with SVRB - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - // A password that can be presented to authenticate with SVRB - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetSvrBCredentialsResponse_SvrBCredentials) Reset() { - *x = GetSvrBCredentialsResponse_SvrBCredentials{} - mi := &file_org_signal_chat_backups_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetSvrBCredentialsResponse_SvrBCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSvrBCredentialsResponse_SvrBCredentials) ProtoMessage() {} - -func (x *GetSvrBCredentialsResponse_SvrBCredentials) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[36] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSvrBCredentialsResponse_SvrBCredentials.ProtoReflect.Descriptor instead. -func (*GetSvrBCredentialsResponse_SvrBCredentials) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{12, 0} -} - -func (x *GetSvrBCredentialsResponse_SvrBCredentials) GetUsername() string { - if x != nil { - return x.Username - } - return "" -} - -func (x *GetSvrBCredentialsResponse_SvrBCredentials) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -type GetMessageBackupInfoResponse_MessageBackupInfo struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The base directory of your backup data on the cdn. Always non-empty, even - // if a backup has not actually been stored to the cdn. If a backup was - // previously uploaded and has not expired, it can be found in the returned - // cdn at /backup_dir/backup_name. - BackupDir string `protobuf:"bytes,1,opt,name=backup_dir,json=backupDir,proto3" json:"backup_dir,omitempty"` - // The CDN type where the message backup is stored. Media may be stored - // elsewhere. - Cdn uint32 `protobuf:"varint,2,opt,name=cdn,proto3" json:"cdn,omitempty"` - // The location of the message backup on the cdn. Always non-empty, even - // if a backup has not actually been stored to the cdn. If a backup was - // previously uploaded and has not expired, it can be found in the returned - // cdn at /backup_dir/backup_name. - BackupName string `protobuf:"bytes,3,opt,name=backup_name,json=backupName,proto3" json:"backup_name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetMessageBackupInfoResponse_MessageBackupInfo) Reset() { - *x = GetMessageBackupInfoResponse_MessageBackupInfo{} - mi := &file_org_signal_chat_backups_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetMessageBackupInfoResponse_MessageBackupInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetMessageBackupInfoResponse_MessageBackupInfo) ProtoMessage() {} - -func (x *GetMessageBackupInfoResponse_MessageBackupInfo) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[37] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetMessageBackupInfoResponse_MessageBackupInfo.ProtoReflect.Descriptor instead. -func (*GetMessageBackupInfoResponse_MessageBackupInfo) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{14, 0} -} - -func (x *GetMessageBackupInfoResponse_MessageBackupInfo) GetBackupDir() string { - if x != nil { - return x.BackupDir - } - return "" -} - -func (x *GetMessageBackupInfoResponse_MessageBackupInfo) GetCdn() uint32 { - if x != nil { - return x.Cdn - } - return 0 -} - -func (x *GetMessageBackupInfoResponse_MessageBackupInfo) GetBackupName() string { - if x != nil { - return x.BackupName - } - return "" -} - -type GetMediaBackupInfoResponse_MediaBackupInfo struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The base directory of your backup data on the cdn. Always non-empty, even - // if no media has been stored to the cdn or the credential is for a tier - // that does not support media. - BackupDir string `protobuf:"bytes,1,opt,name=backup_dir,json=backupDir,proto3" json:"backup_dir,omitempty"` - // The prefix path component for media objects on a cdn. Stored media for a - // media_id can be found at /backup_dir/media_dir/media_id, where the - // media_id is encoded in unpadded url-safe base64. Always non-empty, even - // if no media has been stored to the cdn or the credential is for a tier - // that does not support media. - MediaDir string `protobuf:"bytes,2,opt,name=media_dir,json=mediaDir,proto3" json:"media_dir,omitempty"` - // The amount of space used to store media - UsedSpace uint64 `protobuf:"varint,3,opt,name=used_space,json=usedSpace,proto3" json:"used_space,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetMediaBackupInfoResponse_MediaBackupInfo) Reset() { - *x = GetMediaBackupInfoResponse_MediaBackupInfo{} - mi := &file_org_signal_chat_backups_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetMediaBackupInfoResponse_MediaBackupInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetMediaBackupInfoResponse_MediaBackupInfo) ProtoMessage() {} - -func (x *GetMediaBackupInfoResponse_MediaBackupInfo) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[38] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetMediaBackupInfoResponse_MediaBackupInfo.ProtoReflect.Descriptor instead. -func (*GetMediaBackupInfoResponse_MediaBackupInfo) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{15, 0} -} - -func (x *GetMediaBackupInfoResponse_MediaBackupInfo) GetBackupDir() string { - if x != nil { - return x.BackupDir - } - return "" -} - -func (x *GetMediaBackupInfoResponse_MediaBackupInfo) GetMediaDir() string { - if x != nil { - return x.MediaDir - } - return "" -} - -func (x *GetMediaBackupInfoResponse_MediaBackupInfo) GetUsedSpace() uint64 { - if x != nil { - return x.UsedSpace - } - return 0 -} - -type GetUploadFormRequest_MessagesUploadType struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetUploadFormRequest_MessagesUploadType) Reset() { - *x = GetUploadFormRequest_MessagesUploadType{} - mi := &file_org_signal_chat_backups_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetUploadFormRequest_MessagesUploadType) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUploadFormRequest_MessagesUploadType) ProtoMessage() {} - -func (x *GetUploadFormRequest_MessagesUploadType) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[39] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetUploadFormRequest_MessagesUploadType.ProtoReflect.Descriptor instead. -func (*GetUploadFormRequest_MessagesUploadType) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{18, 0} -} - -type GetUploadFormRequest_MediaUploadType struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetUploadFormRequest_MediaUploadType) Reset() { - *x = GetUploadFormRequest_MediaUploadType{} - mi := &file_org_signal_chat_backups_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetUploadFormRequest_MediaUploadType) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUploadFormRequest_MediaUploadType) ProtoMessage() {} - -func (x *GetUploadFormRequest_MediaUploadType) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[40] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetUploadFormRequest_MediaUploadType.ProtoReflect.Descriptor instead. -func (*GetUploadFormRequest_MediaUploadType) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{18, 1} -} - -type CopyMediaResponse_SourceNotFound struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CopyMediaResponse_SourceNotFound) Reset() { - *x = CopyMediaResponse_SourceNotFound{} - mi := &file_org_signal_chat_backups_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CopyMediaResponse_SourceNotFound) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CopyMediaResponse_SourceNotFound) ProtoMessage() {} - -func (x *CopyMediaResponse_SourceNotFound) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[41] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CopyMediaResponse_SourceNotFound.ProtoReflect.Descriptor instead. -func (*CopyMediaResponse_SourceNotFound) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{22, 0} -} - -type CopyMediaResponse_WrongSourceLength struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CopyMediaResponse_WrongSourceLength) Reset() { - *x = CopyMediaResponse_WrongSourceLength{} - mi := &file_org_signal_chat_backups_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CopyMediaResponse_WrongSourceLength) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CopyMediaResponse_WrongSourceLength) ProtoMessage() {} - -func (x *CopyMediaResponse_WrongSourceLength) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[42] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CopyMediaResponse_WrongSourceLength.ProtoReflect.Descriptor instead. -func (*CopyMediaResponse_WrongSourceLength) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{22, 1} -} - -type CopyMediaResponse_OutOfSpace struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CopyMediaResponse_OutOfSpace) Reset() { - *x = CopyMediaResponse_OutOfSpace{} - mi := &file_org_signal_chat_backups_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CopyMediaResponse_OutOfSpace) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CopyMediaResponse_OutOfSpace) ProtoMessage() {} - -func (x *CopyMediaResponse_OutOfSpace) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[43] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CopyMediaResponse_OutOfSpace.ProtoReflect.Descriptor instead. -func (*CopyMediaResponse_OutOfSpace) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{22, 2} -} - -type CopyMediaResponse_CopySuccess struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The backup cdn where this media object is stored - Cdn uint32 `protobuf:"varint,1,opt,name=cdn,proto3" json:"cdn,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CopyMediaResponse_CopySuccess) Reset() { - *x = CopyMediaResponse_CopySuccess{} - mi := &file_org_signal_chat_backups_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CopyMediaResponse_CopySuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CopyMediaResponse_CopySuccess) ProtoMessage() {} - -func (x *CopyMediaResponse_CopySuccess) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[44] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CopyMediaResponse_CopySuccess.ProtoReflect.Descriptor instead. -func (*CopyMediaResponse_CopySuccess) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{22, 3} -} - -func (x *CopyMediaResponse_CopySuccess) GetCdn() uint32 { - if x != nil { - return x.Cdn - } - return 0 -} - -type ListMediaResponse_ListEntry struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The backup cdn where this media object is stored - Cdn uint32 `protobuf:"varint,1,opt,name=cdn,proto3" json:"cdn,omitempty"` - // The media_id of the object - MediaId []byte `protobuf:"bytes,2,opt,name=media_id,json=mediaId,proto3" json:"media_id,omitempty"` - // The length of the object in bytes - Length uint64 `protobuf:"varint,3,opt,name=length,proto3" json:"length,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListMediaResponse_ListEntry) Reset() { - *x = ListMediaResponse_ListEntry{} - mi := &file_org_signal_chat_backups_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListMediaResponse_ListEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMediaResponse_ListEntry) ProtoMessage() {} - -func (x *ListMediaResponse_ListEntry) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[45] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMediaResponse_ListEntry.ProtoReflect.Descriptor instead. -func (*ListMediaResponse_ListEntry) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{25, 0} -} - -func (x *ListMediaResponse_ListEntry) GetCdn() uint32 { - if x != nil { - return x.Cdn - } - return 0 -} - -func (x *ListMediaResponse_ListEntry) GetMediaId() []byte { - if x != nil { - return x.MediaId - } - return nil -} - -func (x *ListMediaResponse_ListEntry) GetLength() uint64 { - if x != nil { - return x.Length - } - return 0 -} - -type ListMediaResponse_ListResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A page of media objects stored for this backup ID - Page []*ListMediaResponse_ListEntry `protobuf:"bytes,1,rep,name=page,proto3" json:"page,omitempty"` - // The base directory of the backup data on the cdn. The stored media can be - // found at /backup_dir/media_dir/media_id, where the media_id is encoded with - // unpadded url-safe base64. - BackupDir string `protobuf:"bytes,2,opt,name=backup_dir,json=backupDir,proto3" json:"backup_dir,omitempty"` - // The prefix path component for the media objects. The stored media for - // media_id can be found at /backup_dir/media_dir/media_id, where the media_id - // is encoded with unpadded url-safe base64. - MediaDir string `protobuf:"bytes,3,opt,name=media_dir,json=mediaDir,proto3" json:"media_dir,omitempty"` - // If set, the cursor value to pass to the next list request to continue - // listing. If absent, all objects have been listed - Cursor *string `protobuf:"bytes,4,opt,name=cursor,proto3,oneof" json:"cursor,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ListMediaResponse_ListResult) Reset() { - *x = ListMediaResponse_ListResult{} - mi := &file_org_signal_chat_backups_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ListMediaResponse_ListResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMediaResponse_ListResult) ProtoMessage() {} - -func (x *ListMediaResponse_ListResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_backups_proto_msgTypes[46] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMediaResponse_ListResult.ProtoReflect.Descriptor instead. -func (*ListMediaResponse_ListResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_backups_proto_rawDescGZIP(), []int{25, 1} -} - -func (x *ListMediaResponse_ListResult) GetPage() []*ListMediaResponse_ListEntry { - if x != nil { - return x.Page - } - return nil -} - -func (x *ListMediaResponse_ListResult) GetBackupDir() string { - if x != nil { - return x.BackupDir - } - return "" -} - -func (x *ListMediaResponse_ListResult) GetMediaDir() string { - if x != nil { - return x.MediaDir - } - return "" -} - -func (x *ListMediaResponse_ListResult) GetCursor() string { - if x != nil && x.Cursor != nil { - return *x.Cursor - } - return "" -} - -var File_org_signal_chat_backups_proto protoreflect.FileDescriptor - -const file_org_signal_chat_backups_proto_rawDesc = "" + - "\n" + - "\x1dorg/signal/chat/backups.proto\x12\x16org.signal.chat.backup\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1corg/signal/chat/common.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x19org/signal/chat/tag.proto\"\xba\x01\n" + - "\x12SetBackupIdRequest\x12T\n" + - "'messages_backup_auth_credential_request\x18\x01 \x01(\fR#messagesBackupAuthCredentialRequest\x12N\n" + - "$media_backup_auth_credential_request\x18\x02 \x01(\fR mediaBackupAuthCredentialRequest\"\x15\n" + - "\x13SetBackupIdResponse\":\n" + - "\x14RedeemReceiptRequest\x12\"\n" + - "\fpresentation\x18\x01 \x01(\fR\fpresentation\"\xd0\x02\n" + - "\x15RedeemReceiptResponse\x122\n" + - "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\x8a\x01\n" + - "\x1aaccount_missing_commitment\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1e\xc2\xd5\"\x1aaccount_missing_commitmentH\x00R\x18accountMissingCommitment\x12j\n" + - "\x0finvalid_receipt\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x13\xc2\xd5\"\x0finvalid_receiptH\x00R\x0einvalidReceiptB\n" + - "\n" + - "\bresponse\"\x85\x01\n" + - "\x1fGetBackupAuthCredentialsRequest\x121\n" + - "\x10redemption_start\x18\x01 \x01(\x03B\x06\xb2\x97\"\x02\b\x01R\x0fredemptionStart\x12/\n" + - "\x0fredemption_stop\x18\x02 \x01(\x03B\x06\xb2\x97\"\x02\b\x01R\x0eredemptionStop\"\x8c\x05\n" + - " GetBackupAuthCredentialsResponse\x12f\n" + - "\vcredentials\x18\x01 \x01(\v2D.org.signal.chat.backup.GetBackupAuthCredentialsResponse.CredentialsR\vcredentials\x1a\xff\x03\n" + - "\vCredentials\x12\x8d\x01\n" + - "\x13message_credentials\x18\x01 \x03(\v2\\.org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MessageCredentialsEntryR\x12messageCredentials\x12\x87\x01\n" + - "\x11media_credentials\x18\x02 \x03(\v2Z.org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MediaCredentialsEntryR\x10mediaCredentials\x1ak\n" + - "\x17MessageCredentialsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\x03R\x03key\x12:\n" + - "\x05value\x18\x02 \x01(\v2$.org.signal.chat.common.ZkCredentialR\x05value:\x028\x01\x1ai\n" + - "\x15MediaCredentialsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\x03R\x03key\x12:\n" + - "\x05value\x18\x02 \x01(\v2$.org.signal.chat.common.ZkCredentialR\x05value:\x028\x01\"{\n" + - "\x12SignedPresentation\x12(\n" + - "\fpresentation\x18\x01 \x01(\fB\x04\x88\x97\"\x01R\fpresentation\x12;\n" + - "\x16presentation_signature\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\x15presentationSignature\"\x97\x01\n" + - "\x13SetPublicKeyRequest\x12[\n" + - "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\x12#\n" + - "\n" + - "public_key\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\tpublicKey\"\xd9\x01\n" + - "\x14SetPublicKeyResponse\x122\n" + - "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\x80\x01\n" + - "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthenticationB\n" + - "\n" + - "\bresponse\"\x89\x01\n" + - "\x18GetCdnCredentialsRequest\x12[\n" + - "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\x12\x10\n" + - "\x03cdn\x18\x02 \x01(\rR\x03cdn\"\xcf\x03\n" + - "\x19GetCdnCredentialsResponse\x12k\n" + - "\x0fcdn_credentials\x18\x01 \x01(\v2@.org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentialsH\x00R\x0ecdnCredentials\x12\x80\x01\n" + - "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthentication\x1a\xb5\x01\n" + - "\x0eCdnCredentials\x12g\n" + - "\aheaders\x18\x01 \x03(\v2M.org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials.HeadersEntryR\aheaders\x1a:\n" + - "\fHeadersEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\n" + - "\n" + - "\bresponse\"x\n" + - "\x19GetSvrBCredentialsRequest\x12[\n" + - "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\"\xe7\x02\n" + - "\x1aGetSvrBCredentialsResponse\x12o\n" + - "\x10svrb_credentials\x18\x01 \x01(\v2B.org.signal.chat.backup.GetSvrBCredentialsResponse.SvrBCredentialsH\x00R\x0fsvrbCredentials\x12\x80\x01\n" + - "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthentication\x1aI\n" + - "\x0fSvrBCredentials\x12\x1a\n" + - "\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" + - "\bpassword\x18\x02 \x01(\tR\bpasswordB\n" + - "\n" + - "\bresponse\"s\n" + - "\x14GetBackupInfoRequest\x12[\n" + - "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\"\xff\x02\n" + - "\x1cGetMessageBackupInfoResponse\x12i\n" + - "\vbackup_info\x18\x01 \x01(\v2F.org.signal.chat.backup.GetMessageBackupInfoResponse.MessageBackupInfoH\x00R\n" + - "backupInfo\x12\x80\x01\n" + - "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthentication\x1ae\n" + - "\x11MessageBackupInfo\x12\x1d\n" + - "\n" + - "backup_dir\x18\x01 \x01(\tR\tbackupDir\x12\x10\n" + - "\x03cdn\x18\x02 \x01(\rR\x03cdn\x12\x1f\n" + - "\vbackup_name\x18\x03 \x01(\tR\n" + - "backupNameB\n" + - "\n" + - "\bresponse\"\x80\x03\n" + - "\x1aGetMediaBackupInfoResponse\x12e\n" + - "\vbackup_info\x18\x01 \x01(\v2B.org.signal.chat.backup.GetMediaBackupInfoResponse.MediaBackupInfoH\x00R\n" + - "backupInfo\x12\x80\x01\n" + - "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthentication\x1al\n" + - "\x0fMediaBackupInfo\x12\x1d\n" + - "\n" + - "backup_dir\x18\x01 \x01(\tR\tbackupDir\x12\x1b\n" + - "\tmedia_dir\x18\x02 \x01(\tR\bmediaDir\x12\x1d\n" + - "\n" + - "used_space\x18\x03 \x01(\x04R\tusedSpaceB\n" + - "\n" + - "\bresponse\"m\n" + - "\x0eRefreshRequest\x12[\n" + - "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\"\xd4\x01\n" + - "\x0fRefreshResponse\x122\n" + - "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\x80\x01\n" + - "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthenticationB\n" + - "\n" + - "\bresponse\"\x8c\x03\n" + - "\x14GetUploadFormRequest\x12[\n" + - "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\x12]\n" + - "\bmessages\x18\x02 \x01(\v2?.org.signal.chat.backup.GetUploadFormRequest.MessagesUploadTypeH\x00R\bmessages\x12T\n" + - "\x05media\x18\x03 \x01(\v2<.org.signal.chat.backup.GetUploadFormRequest.MediaUploadTypeH\x00R\x05media\x12*\n" + - "\fuploadLength\x18\x04 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\fuploadLength\x1a\x14\n" + - "\x12MessagesUploadType\x1a\x11\n" + - "\x0fMediaUploadTypeB\r\n" + - "\vupload_type\"\xeb\x02\n" + - "\x15GetUploadFormResponse\x12E\n" + - "\vupload_form\x18\x01 \x01(\v2\".org.signal.chat.common.UploadFormH\x00R\n" + - "uploadForm\x12\x80\x01\n" + - "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthentication\x12|\n" + - "\x19exceeds_max_upload_length\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x13\xc2\xd5\"\x0foversize_uploadH\x00R\x16exceedsMaxUploadLengthB\n" + - "\n" + - "\bresponse\"\x8d\x02\n" + - "\rCopyMediaItem\x12<\n" + - "\x15source_attachment_cdn\x18\x01 \x01(\rB\b\xb2\x97\"\x04\b\x01\x10\x03R\x13sourceAttachmentCdn\x12'\n" + - "\n" + - "source_key\x18\x02 \x01(\tB\b\x88\x97\"\x01\xc0\x97\"\x01R\tsourceKey\x12#\n" + - "\robject_length\x18\x03 \x01(\x04R\fobjectLength\x12 \n" + - "\bmedia_id\x18\x04 \x01(\fB\x05\xa2\x97\"\x01\x0fR\amediaId\x12 \n" + - "\bhmac_key\x18\x05 \x01(\fB\x05\xa2\x97\"\x01 R\ahmacKey\x12,\n" + - "\x0eencryption_key\x18\x06 \x01(\fB\x05\xa2\x97\"\x01 R\rencryptionKey\"\xb7\x01\n" + - "\x10CopyMediaRequest\x12[\n" + - "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\x12F\n" + - "\x05items\x18\x02 \x03(\v2%.org.signal.chat.backup.CopyMediaItemB\t\x9a\x97\"\x05\b\x01\x10\xe8\aR\x05items\"\xd4\x04\n" + - "\x11CopyMediaResponse\x12\x19\n" + - "\bmedia_id\x18\x01 \x01(\fR\amediaId\x12Q\n" + - "\asuccess\x18\x02 \x01(\v25.org.signal.chat.backup.CopyMediaResponse.CopySuccessH\x00R\asuccess\x12z\n" + - "\x10source_not_found\x18\x03 \x01(\v28.org.signal.chat.backup.CopyMediaResponse.SourceNotFoundB\x14\xc2\xd5\"\x10source_not_foundH\x00R\x0esourceNotFound\x12\x86\x01\n" + - "\x13wrong_source_length\x18\x04 \x01(\v2;.org.signal.chat.backup.CopyMediaResponse.WrongSourceLengthB\x17\xc2\xd5\"\x13wrong_source_lengthH\x00R\x11wrongSourceLength\x12j\n" + - "\fout_of_space\x18\x05 \x01(\v24.org.signal.chat.backup.CopyMediaResponse.OutOfSpaceB\x10\xc2\xd5\"\fout_of_spaceH\x00R\n" + - "outOfSpace\x1a\x10\n" + - "\x0eSourceNotFound\x1a\x13\n" + - "\x11WrongSourceLength\x1a\f\n" + - "\n" + - "OutOfSpace\x1a\x1f\n" + - "\vCopySuccess\x12\x10\n" + - "\x03cdn\x18\x01 \x01(\rR\x03cdnB\n" + - "\n" + - "\bresponse\"\xa1\x01\n" + - "\x12BackupStreamClosed\x12\x80\x01\n" + - "\x15failed_authentication\x18\x01 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthenticationB\b\n" + - "\x06reason\"\xc7\x01\n" + - "\x10ListMediaRequest\x12[\n" + - "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\x12\x1b\n" + - "\x06cursor\x18\x02 \x01(\tH\x00R\x06cursor\x88\x01\x01\x12$\n" + - "\x05limit\x18\x03 \x01(\rB\t\xb2\x97\"\x05\b\x01\x10\x90NH\x01R\x05limit\x88\x01\x01B\t\n" + - "\a_cursorB\b\n" + - "\x06_limit\"\x89\x04\n" + - "\x11ListMediaResponse\x12W\n" + - "\vlist_result\x18\x01 \x01(\v24.org.signal.chat.backup.ListMediaResponse.ListResultH\x00R\n" + - "listResult\x12\x80\x01\n" + - "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthentication\x1aP\n" + - "\tListEntry\x12\x10\n" + - "\x03cdn\x18\x01 \x01(\rR\x03cdn\x12\x19\n" + - "\bmedia_id\x18\x02 \x01(\fR\amediaId\x12\x16\n" + - "\x06length\x18\x03 \x01(\x04R\x06length\x1a\xb9\x01\n" + - "\n" + - "ListResult\x12G\n" + - "\x04page\x18\x01 \x03(\v23.org.signal.chat.backup.ListMediaResponse.ListEntryR\x04page\x12\x1d\n" + - "\n" + - "backup_dir\x18\x02 \x01(\tR\tbackupDir\x12\x1b\n" + - "\tmedia_dir\x18\x03 \x01(\tR\bmediaDir\x12\x1b\n" + - "\x06cursor\x18\x04 \x01(\tH\x00R\x06cursor\x88\x01\x01B\t\n" + - "\a_cursorB\n" + - "\n" + - "\bresponse\"o\n" + - "\x10DeleteAllRequest\x12[\n" + - "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\"\xd6\x01\n" + - "\x11DeleteAllResponse\x122\n" + - "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\x80\x01\n" + - "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthenticationB\n" + - "\n" + - "\bresponse\"E\n" + - "\x0fDeleteMediaItem\x12\x10\n" + - "\x03cdn\x18\x01 \x01(\rR\x03cdn\x12 \n" + - "\bmedia_id\x18\x02 \x01(\fB\x05\xa2\x97\"\x01\x0fR\amediaId\"\xbb\x01\n" + - "\x12DeleteMediaRequest\x12[\n" + - "\x13signed_presentation\x18\x01 \x01(\v2*.org.signal.chat.backup.SignedPresentationR\x12signedPresentation\x12H\n" + - "\x05items\x18\x02 \x03(\v2'.org.signal.chat.backup.DeleteMediaItemB\t\x9a\x97\"\x05\b\x01\x10\xe8\aR\x05items\"a\n" + - "\x13DeleteMediaResponse\x12J\n" + - "\fdeleted_item\x18\x01 \x01(\v2'.org.signal.chat.backup.DeleteMediaItemR\vdeletedItem2\xfb\x02\n" + - "\aBackups\x12h\n" + - "\vSetBackupId\x12*.org.signal.chat.backup.SetBackupIdRequest\x1a+.org.signal.chat.backup.SetBackupIdResponse\"\x00\x12n\n" + - "\rRedeemReceipt\x12,.org.signal.chat.backup.RedeemReceiptRequest\x1a-.org.signal.chat.backup.RedeemReceiptResponse\"\x00\x12\x8f\x01\n" + - "\x18GetBackupAuthCredentials\x127.org.signal.chat.backup.GetBackupAuthCredentialsRequest\x1a8.org.signal.chat.backup.GetBackupAuthCredentialsResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xe0\t\n" + - "\x10BackupsAnonymous\x12z\n" + - "\x11GetCdnCredentials\x120.org.signal.chat.backup.GetCdnCredentialsRequest\x1a1.org.signal.chat.backup.GetCdnCredentialsResponse\"\x00\x12}\n" + - "\x12GetSvrBCredentials\x121.org.signal.chat.backup.GetSvrBCredentialsRequest\x1a2.org.signal.chat.backup.GetSvrBCredentialsResponse\"\x00\x12|\n" + - "\x14GetMessageBackupInfo\x12,.org.signal.chat.backup.GetBackupInfoRequest\x1a4.org.signal.chat.backup.GetMessageBackupInfoResponse\"\x00\x12x\n" + - "\x12GetMediaBackupInfo\x12,.org.signal.chat.backup.GetBackupInfoRequest\x1a2.org.signal.chat.backup.GetMediaBackupInfoResponse\"\x00\x12k\n" + - "\fSetPublicKey\x12+.org.signal.chat.backup.SetPublicKeyRequest\x1a,.org.signal.chat.backup.SetPublicKeyResponse\"\x00\x12\\\n" + - "\aRefresh\x12&.org.signal.chat.backup.RefreshRequest\x1a'.org.signal.chat.backup.RefreshResponse\"\x00\x12n\n" + - "\rGetUploadForm\x12,.org.signal.chat.backup.GetUploadFormRequest\x1a-.org.signal.chat.backup.GetUploadFormResponse\"\x00\x12d\n" + - "\tCopyMedia\x12(.org.signal.chat.backup.CopyMediaRequest\x1a).org.signal.chat.backup.CopyMediaResponse\"\x000\x01\x12b\n" + - "\tListMedia\x12(.org.signal.chat.backup.ListMediaRequest\x1a).org.signal.chat.backup.ListMediaResponse\"\x00\x12j\n" + - "\vDeleteMedia\x12*.org.signal.chat.backup.DeleteMediaRequest\x1a+.org.signal.chat.backup.DeleteMediaResponse\"\x000\x01\x12b\n" + - "\tDeleteAll\x12(.org.signal.chat.backup.DeleteAllRequest\x1a).org.signal.chat.backup.DeleteAllResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_backups_proto_rawDescOnce sync.Once - file_org_signal_chat_backups_proto_rawDescData []byte -) - -func file_org_signal_chat_backups_proto_rawDescGZIP() []byte { - file_org_signal_chat_backups_proto_rawDescOnce.Do(func() { - file_org_signal_chat_backups_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_backups_proto_rawDesc), len(file_org_signal_chat_backups_proto_rawDesc))) - }) - return file_org_signal_chat_backups_proto_rawDescData -} - -var file_org_signal_chat_backups_proto_msgTypes = make([]protoimpl.MessageInfo, 47) -var file_org_signal_chat_backups_proto_goTypes = []any{ - (*SetBackupIdRequest)(nil), // 0: org.signal.chat.backup.SetBackupIdRequest - (*SetBackupIdResponse)(nil), // 1: org.signal.chat.backup.SetBackupIdResponse - (*RedeemReceiptRequest)(nil), // 2: org.signal.chat.backup.RedeemReceiptRequest - (*RedeemReceiptResponse)(nil), // 3: org.signal.chat.backup.RedeemReceiptResponse - (*GetBackupAuthCredentialsRequest)(nil), // 4: org.signal.chat.backup.GetBackupAuthCredentialsRequest - (*GetBackupAuthCredentialsResponse)(nil), // 5: org.signal.chat.backup.GetBackupAuthCredentialsResponse - (*SignedPresentation)(nil), // 6: org.signal.chat.backup.SignedPresentation - (*SetPublicKeyRequest)(nil), // 7: org.signal.chat.backup.SetPublicKeyRequest - (*SetPublicKeyResponse)(nil), // 8: org.signal.chat.backup.SetPublicKeyResponse - (*GetCdnCredentialsRequest)(nil), // 9: org.signal.chat.backup.GetCdnCredentialsRequest - (*GetCdnCredentialsResponse)(nil), // 10: org.signal.chat.backup.GetCdnCredentialsResponse - (*GetSvrBCredentialsRequest)(nil), // 11: org.signal.chat.backup.GetSvrBCredentialsRequest - (*GetSvrBCredentialsResponse)(nil), // 12: org.signal.chat.backup.GetSvrBCredentialsResponse - (*GetBackupInfoRequest)(nil), // 13: org.signal.chat.backup.GetBackupInfoRequest - (*GetMessageBackupInfoResponse)(nil), // 14: org.signal.chat.backup.GetMessageBackupInfoResponse - (*GetMediaBackupInfoResponse)(nil), // 15: org.signal.chat.backup.GetMediaBackupInfoResponse - (*RefreshRequest)(nil), // 16: org.signal.chat.backup.RefreshRequest - (*RefreshResponse)(nil), // 17: org.signal.chat.backup.RefreshResponse - (*GetUploadFormRequest)(nil), // 18: org.signal.chat.backup.GetUploadFormRequest - (*GetUploadFormResponse)(nil), // 19: org.signal.chat.backup.GetUploadFormResponse - (*CopyMediaItem)(nil), // 20: org.signal.chat.backup.CopyMediaItem - (*CopyMediaRequest)(nil), // 21: org.signal.chat.backup.CopyMediaRequest - (*CopyMediaResponse)(nil), // 22: org.signal.chat.backup.CopyMediaResponse - (*BackupStreamClosed)(nil), // 23: org.signal.chat.backup.BackupStreamClosed - (*ListMediaRequest)(nil), // 24: org.signal.chat.backup.ListMediaRequest - (*ListMediaResponse)(nil), // 25: org.signal.chat.backup.ListMediaResponse - (*DeleteAllRequest)(nil), // 26: org.signal.chat.backup.DeleteAllRequest - (*DeleteAllResponse)(nil), // 27: org.signal.chat.backup.DeleteAllResponse - (*DeleteMediaItem)(nil), // 28: org.signal.chat.backup.DeleteMediaItem - (*DeleteMediaRequest)(nil), // 29: org.signal.chat.backup.DeleteMediaRequest - (*DeleteMediaResponse)(nil), // 30: org.signal.chat.backup.DeleteMediaResponse - (*GetBackupAuthCredentialsResponse_Credentials)(nil), // 31: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials - nil, // 32: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MessageCredentialsEntry - nil, // 33: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MediaCredentialsEntry - (*GetCdnCredentialsResponse_CdnCredentials)(nil), // 34: org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials - nil, // 35: org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials.HeadersEntry - (*GetSvrBCredentialsResponse_SvrBCredentials)(nil), // 36: org.signal.chat.backup.GetSvrBCredentialsResponse.SvrBCredentials - (*GetMessageBackupInfoResponse_MessageBackupInfo)(nil), // 37: org.signal.chat.backup.GetMessageBackupInfoResponse.MessageBackupInfo - (*GetMediaBackupInfoResponse_MediaBackupInfo)(nil), // 38: org.signal.chat.backup.GetMediaBackupInfoResponse.MediaBackupInfo - (*GetUploadFormRequest_MessagesUploadType)(nil), // 39: org.signal.chat.backup.GetUploadFormRequest.MessagesUploadType - (*GetUploadFormRequest_MediaUploadType)(nil), // 40: org.signal.chat.backup.GetUploadFormRequest.MediaUploadType - (*CopyMediaResponse_SourceNotFound)(nil), // 41: org.signal.chat.backup.CopyMediaResponse.SourceNotFound - (*CopyMediaResponse_WrongSourceLength)(nil), // 42: org.signal.chat.backup.CopyMediaResponse.WrongSourceLength - (*CopyMediaResponse_OutOfSpace)(nil), // 43: org.signal.chat.backup.CopyMediaResponse.OutOfSpace - (*CopyMediaResponse_CopySuccess)(nil), // 44: org.signal.chat.backup.CopyMediaResponse.CopySuccess - (*ListMediaResponse_ListEntry)(nil), // 45: org.signal.chat.backup.ListMediaResponse.ListEntry - (*ListMediaResponse_ListResult)(nil), // 46: org.signal.chat.backup.ListMediaResponse.ListResult - (*emptypb.Empty)(nil), // 47: google.protobuf.Empty - (*errors.FailedPrecondition)(nil), // 48: org.signal.chat.errors.FailedPrecondition - (*errors.FailedZkAuthentication)(nil), // 49: org.signal.chat.errors.FailedZkAuthentication - (*common.UploadForm)(nil), // 50: org.signal.chat.common.UploadForm - (*common.ZkCredential)(nil), // 51: org.signal.chat.common.ZkCredential -} -var file_org_signal_chat_backups_proto_depIdxs = []int32{ - 47, // 0: org.signal.chat.backup.RedeemReceiptResponse.success:type_name -> google.protobuf.Empty - 48, // 1: org.signal.chat.backup.RedeemReceiptResponse.account_missing_commitment:type_name -> org.signal.chat.errors.FailedPrecondition - 48, // 2: org.signal.chat.backup.RedeemReceiptResponse.invalid_receipt:type_name -> org.signal.chat.errors.FailedPrecondition - 31, // 3: org.signal.chat.backup.GetBackupAuthCredentialsResponse.credentials:type_name -> org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials - 6, // 4: org.signal.chat.backup.SetPublicKeyRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 47, // 5: org.signal.chat.backup.SetPublicKeyResponse.success:type_name -> google.protobuf.Empty - 49, // 6: org.signal.chat.backup.SetPublicKeyResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 7: org.signal.chat.backup.GetCdnCredentialsRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 34, // 8: org.signal.chat.backup.GetCdnCredentialsResponse.cdn_credentials:type_name -> org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials - 49, // 9: org.signal.chat.backup.GetCdnCredentialsResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 10: org.signal.chat.backup.GetSvrBCredentialsRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 36, // 11: org.signal.chat.backup.GetSvrBCredentialsResponse.svrb_credentials:type_name -> org.signal.chat.backup.GetSvrBCredentialsResponse.SvrBCredentials - 49, // 12: org.signal.chat.backup.GetSvrBCredentialsResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 13: org.signal.chat.backup.GetBackupInfoRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 37, // 14: org.signal.chat.backup.GetMessageBackupInfoResponse.backup_info:type_name -> org.signal.chat.backup.GetMessageBackupInfoResponse.MessageBackupInfo - 49, // 15: org.signal.chat.backup.GetMessageBackupInfoResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 38, // 16: org.signal.chat.backup.GetMediaBackupInfoResponse.backup_info:type_name -> org.signal.chat.backup.GetMediaBackupInfoResponse.MediaBackupInfo - 49, // 17: org.signal.chat.backup.GetMediaBackupInfoResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 18: org.signal.chat.backup.RefreshRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 47, // 19: org.signal.chat.backup.RefreshResponse.success:type_name -> google.protobuf.Empty - 49, // 20: org.signal.chat.backup.RefreshResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 21: org.signal.chat.backup.GetUploadFormRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 39, // 22: org.signal.chat.backup.GetUploadFormRequest.messages:type_name -> org.signal.chat.backup.GetUploadFormRequest.MessagesUploadType - 40, // 23: org.signal.chat.backup.GetUploadFormRequest.media:type_name -> org.signal.chat.backup.GetUploadFormRequest.MediaUploadType - 50, // 24: org.signal.chat.backup.GetUploadFormResponse.upload_form:type_name -> org.signal.chat.common.UploadForm - 49, // 25: org.signal.chat.backup.GetUploadFormResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 48, // 26: org.signal.chat.backup.GetUploadFormResponse.exceeds_max_upload_length:type_name -> org.signal.chat.errors.FailedPrecondition - 6, // 27: org.signal.chat.backup.CopyMediaRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 20, // 28: org.signal.chat.backup.CopyMediaRequest.items:type_name -> org.signal.chat.backup.CopyMediaItem - 44, // 29: org.signal.chat.backup.CopyMediaResponse.success:type_name -> org.signal.chat.backup.CopyMediaResponse.CopySuccess - 41, // 30: org.signal.chat.backup.CopyMediaResponse.source_not_found:type_name -> org.signal.chat.backup.CopyMediaResponse.SourceNotFound - 42, // 31: org.signal.chat.backup.CopyMediaResponse.wrong_source_length:type_name -> org.signal.chat.backup.CopyMediaResponse.WrongSourceLength - 43, // 32: org.signal.chat.backup.CopyMediaResponse.out_of_space:type_name -> org.signal.chat.backup.CopyMediaResponse.OutOfSpace - 49, // 33: org.signal.chat.backup.BackupStreamClosed.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 34: org.signal.chat.backup.ListMediaRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 46, // 35: org.signal.chat.backup.ListMediaResponse.list_result:type_name -> org.signal.chat.backup.ListMediaResponse.ListResult - 49, // 36: org.signal.chat.backup.ListMediaResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 37: org.signal.chat.backup.DeleteAllRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 47, // 38: org.signal.chat.backup.DeleteAllResponse.success:type_name -> google.protobuf.Empty - 49, // 39: org.signal.chat.backup.DeleteAllResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 40: org.signal.chat.backup.DeleteMediaRequest.signed_presentation:type_name -> org.signal.chat.backup.SignedPresentation - 28, // 41: org.signal.chat.backup.DeleteMediaRequest.items:type_name -> org.signal.chat.backup.DeleteMediaItem - 28, // 42: org.signal.chat.backup.DeleteMediaResponse.deleted_item:type_name -> org.signal.chat.backup.DeleteMediaItem - 32, // 43: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.message_credentials:type_name -> org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MessageCredentialsEntry - 33, // 44: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.media_credentials:type_name -> org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MediaCredentialsEntry - 51, // 45: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MessageCredentialsEntry.value:type_name -> org.signal.chat.common.ZkCredential - 51, // 46: org.signal.chat.backup.GetBackupAuthCredentialsResponse.Credentials.MediaCredentialsEntry.value:type_name -> org.signal.chat.common.ZkCredential - 35, // 47: org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials.headers:type_name -> org.signal.chat.backup.GetCdnCredentialsResponse.CdnCredentials.HeadersEntry - 45, // 48: org.signal.chat.backup.ListMediaResponse.ListResult.page:type_name -> org.signal.chat.backup.ListMediaResponse.ListEntry - 0, // 49: org.signal.chat.backup.Backups.SetBackupId:input_type -> org.signal.chat.backup.SetBackupIdRequest - 2, // 50: org.signal.chat.backup.Backups.RedeemReceipt:input_type -> org.signal.chat.backup.RedeemReceiptRequest - 4, // 51: org.signal.chat.backup.Backups.GetBackupAuthCredentials:input_type -> org.signal.chat.backup.GetBackupAuthCredentialsRequest - 9, // 52: org.signal.chat.backup.BackupsAnonymous.GetCdnCredentials:input_type -> org.signal.chat.backup.GetCdnCredentialsRequest - 11, // 53: org.signal.chat.backup.BackupsAnonymous.GetSvrBCredentials:input_type -> org.signal.chat.backup.GetSvrBCredentialsRequest - 13, // 54: org.signal.chat.backup.BackupsAnonymous.GetMessageBackupInfo:input_type -> org.signal.chat.backup.GetBackupInfoRequest - 13, // 55: org.signal.chat.backup.BackupsAnonymous.GetMediaBackupInfo:input_type -> org.signal.chat.backup.GetBackupInfoRequest - 7, // 56: org.signal.chat.backup.BackupsAnonymous.SetPublicKey:input_type -> org.signal.chat.backup.SetPublicKeyRequest - 16, // 57: org.signal.chat.backup.BackupsAnonymous.Refresh:input_type -> org.signal.chat.backup.RefreshRequest - 18, // 58: org.signal.chat.backup.BackupsAnonymous.GetUploadForm:input_type -> org.signal.chat.backup.GetUploadFormRequest - 21, // 59: org.signal.chat.backup.BackupsAnonymous.CopyMedia:input_type -> org.signal.chat.backup.CopyMediaRequest - 24, // 60: org.signal.chat.backup.BackupsAnonymous.ListMedia:input_type -> org.signal.chat.backup.ListMediaRequest - 29, // 61: org.signal.chat.backup.BackupsAnonymous.DeleteMedia:input_type -> org.signal.chat.backup.DeleteMediaRequest - 26, // 62: org.signal.chat.backup.BackupsAnonymous.DeleteAll:input_type -> org.signal.chat.backup.DeleteAllRequest - 1, // 63: org.signal.chat.backup.Backups.SetBackupId:output_type -> org.signal.chat.backup.SetBackupIdResponse - 3, // 64: org.signal.chat.backup.Backups.RedeemReceipt:output_type -> org.signal.chat.backup.RedeemReceiptResponse - 5, // 65: org.signal.chat.backup.Backups.GetBackupAuthCredentials:output_type -> org.signal.chat.backup.GetBackupAuthCredentialsResponse - 10, // 66: org.signal.chat.backup.BackupsAnonymous.GetCdnCredentials:output_type -> org.signal.chat.backup.GetCdnCredentialsResponse - 12, // 67: org.signal.chat.backup.BackupsAnonymous.GetSvrBCredentials:output_type -> org.signal.chat.backup.GetSvrBCredentialsResponse - 14, // 68: org.signal.chat.backup.BackupsAnonymous.GetMessageBackupInfo:output_type -> org.signal.chat.backup.GetMessageBackupInfoResponse - 15, // 69: org.signal.chat.backup.BackupsAnonymous.GetMediaBackupInfo:output_type -> org.signal.chat.backup.GetMediaBackupInfoResponse - 8, // 70: org.signal.chat.backup.BackupsAnonymous.SetPublicKey:output_type -> org.signal.chat.backup.SetPublicKeyResponse - 17, // 71: org.signal.chat.backup.BackupsAnonymous.Refresh:output_type -> org.signal.chat.backup.RefreshResponse - 19, // 72: org.signal.chat.backup.BackupsAnonymous.GetUploadForm:output_type -> org.signal.chat.backup.GetUploadFormResponse - 22, // 73: org.signal.chat.backup.BackupsAnonymous.CopyMedia:output_type -> org.signal.chat.backup.CopyMediaResponse - 25, // 74: org.signal.chat.backup.BackupsAnonymous.ListMedia:output_type -> org.signal.chat.backup.ListMediaResponse - 30, // 75: org.signal.chat.backup.BackupsAnonymous.DeleteMedia:output_type -> org.signal.chat.backup.DeleteMediaResponse - 27, // 76: org.signal.chat.backup.BackupsAnonymous.DeleteAll:output_type -> org.signal.chat.backup.DeleteAllResponse - 63, // [63:77] is the sub-list for method output_type - 49, // [49:63] is the sub-list for method input_type - 49, // [49:49] is the sub-list for extension type_name - 49, // [49:49] is the sub-list for extension extendee - 0, // [0:49] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_backups_proto_init() } -func file_org_signal_chat_backups_proto_init() { - if File_org_signal_chat_backups_proto != nil { - return - } - file_org_signal_chat_backups_proto_msgTypes[3].OneofWrappers = []any{ - (*RedeemReceiptResponse_Success)(nil), - (*RedeemReceiptResponse_AccountMissingCommitment)(nil), - (*RedeemReceiptResponse_InvalidReceipt)(nil), - } - file_org_signal_chat_backups_proto_msgTypes[8].OneofWrappers = []any{ - (*SetPublicKeyResponse_Success)(nil), - (*SetPublicKeyResponse_FailedAuthentication)(nil), - } - file_org_signal_chat_backups_proto_msgTypes[10].OneofWrappers = []any{ - (*GetCdnCredentialsResponse_CdnCredentials_)(nil), - (*GetCdnCredentialsResponse_FailedAuthentication)(nil), - } - file_org_signal_chat_backups_proto_msgTypes[12].OneofWrappers = []any{ - (*GetSvrBCredentialsResponse_SvrbCredentials)(nil), - (*GetSvrBCredentialsResponse_FailedAuthentication)(nil), - } - file_org_signal_chat_backups_proto_msgTypes[14].OneofWrappers = []any{ - (*GetMessageBackupInfoResponse_BackupInfo)(nil), - (*GetMessageBackupInfoResponse_FailedAuthentication)(nil), - } - file_org_signal_chat_backups_proto_msgTypes[15].OneofWrappers = []any{ - (*GetMediaBackupInfoResponse_BackupInfo)(nil), - (*GetMediaBackupInfoResponse_FailedAuthentication)(nil), - } - file_org_signal_chat_backups_proto_msgTypes[17].OneofWrappers = []any{ - (*RefreshResponse_Success)(nil), - (*RefreshResponse_FailedAuthentication)(nil), - } - file_org_signal_chat_backups_proto_msgTypes[18].OneofWrappers = []any{ - (*GetUploadFormRequest_Messages)(nil), - (*GetUploadFormRequest_Media)(nil), - } - file_org_signal_chat_backups_proto_msgTypes[19].OneofWrappers = []any{ - (*GetUploadFormResponse_UploadForm)(nil), - (*GetUploadFormResponse_FailedAuthentication)(nil), - (*GetUploadFormResponse_ExceedsMaxUploadLength)(nil), - } - file_org_signal_chat_backups_proto_msgTypes[22].OneofWrappers = []any{ - (*CopyMediaResponse_Success)(nil), - (*CopyMediaResponse_SourceNotFound_)(nil), - (*CopyMediaResponse_WrongSourceLength_)(nil), - (*CopyMediaResponse_OutOfSpace_)(nil), - } - file_org_signal_chat_backups_proto_msgTypes[23].OneofWrappers = []any{ - (*BackupStreamClosed_FailedAuthentication)(nil), - } - file_org_signal_chat_backups_proto_msgTypes[24].OneofWrappers = []any{} - file_org_signal_chat_backups_proto_msgTypes[25].OneofWrappers = []any{ - (*ListMediaResponse_ListResult_)(nil), - (*ListMediaResponse_FailedAuthentication)(nil), - } - file_org_signal_chat_backups_proto_msgTypes[27].OneofWrappers = []any{ - (*DeleteAllResponse_Success)(nil), - (*DeleteAllResponse_FailedAuthentication)(nil), - } - file_org_signal_chat_backups_proto_msgTypes[46].OneofWrappers = []any{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_backups_proto_rawDesc), len(file_org_signal_chat_backups_proto_rawDesc)), - NumEnums: 0, - NumMessages: 47, - NumExtensions: 0, - NumServices: 2, - }, - GoTypes: file_org_signal_chat_backups_proto_goTypes, - DependencyIndexes: file_org_signal_chat_backups_proto_depIdxs, - MessageInfos: file_org_signal_chat_backups_proto_msgTypes, - }.Build() - File_org_signal_chat_backups_proto = out.File - file_org_signal_chat_backups_proto_goTypes = nil - file_org_signal_chat_backups_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/backups/backups_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/backups/backups_grpc.pb.go deleted file mode 100644 index b7079e3..0000000 --- a/pkg/signalmeow/protobuf/rpc/backups/backups_grpc.pb.go +++ /dev/null @@ -1,878 +0,0 @@ -// -// Copyright 2024 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/backups.proto - -package backups - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Backups_SetBackupId_FullMethodName = "/org.signal.chat.backup.Backups/SetBackupId" - Backups_RedeemReceipt_FullMethodName = "/org.signal.chat.backup.Backups/RedeemReceipt" - Backups_GetBackupAuthCredentials_FullMethodName = "/org.signal.chat.backup.Backups/GetBackupAuthCredentials" -) - -// BackupsClient is the client API for Backups service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Service for backup operations that require account authentication. -// -// Most actual backup operations operate on the backup-id and cannot be linked -// to the caller's account, but setting up anonymous credentials and changing -// backup tier requires account authentication. -type BackupsClient interface { - // Set (blinded) backup-id(s) for the account. - // - // Each account may have a single active backup-id for each credential type - // that can be used to store and retrieve backups. Once the backup-id is set, - // BackupAuthCredentials can be generated using GetBackupAuthCredentials. - // - // The blinded backup-id and the key-pair used to blind it must be derived - // from a recoverable secret. - // - // At least one of the credential types must be set on the request. - // Only the primary device can set a blinded backup-id. - SetBackupId(ctx context.Context, in *SetBackupIdRequest, opts ...grpc.CallOption) (*SetBackupIdResponse, error) - // Redeem a receipt acquired from /v1/subscription/{subscriberId}/receipt_credentials - // to mark the account as eligible for the paid backup tier. - // - // After successful redemption, subsequent requests to - // GetBackupAuthCredentials will return credentials with the level on the - // provided receipt until the expiration time on the receipt. - RedeemReceipt(ctx context.Context, in *RedeemReceiptRequest, opts ...grpc.CallOption) (*RedeemReceiptResponse, error) - // After setting a blinded backup-id with PUT /v1/archives/, this fetches - // credentials that can be used to perform operations against that backup-id. - // Clients may (and should) request up to 7 days of credentials at a time. - // - // The redemption_start and redemption_end seconds must be UTC day aligned, and - // must not span more than 7 days. - // - // Each credential contains a receipt level which indicates the backup level - // the credential is good for. If the account has paid backup access that - // expires at some point in the provided redemption window, credentials with - // redemption times after the expiration may be on a lower backup level. - // - // Clients must validate the receipt level on the credential matches a known - // receipt level before using it. - GetBackupAuthCredentials(ctx context.Context, in *GetBackupAuthCredentialsRequest, opts ...grpc.CallOption) (*GetBackupAuthCredentialsResponse, error) -} - -type backupsClient struct { - cc grpc.ClientConnInterface -} - -func NewBackupsClient(cc grpc.ClientConnInterface) BackupsClient { - return &backupsClient{cc} -} - -func (c *backupsClient) SetBackupId(ctx context.Context, in *SetBackupIdRequest, opts ...grpc.CallOption) (*SetBackupIdResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetBackupIdResponse) - err := c.cc.Invoke(ctx, Backups_SetBackupId_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *backupsClient) RedeemReceipt(ctx context.Context, in *RedeemReceiptRequest, opts ...grpc.CallOption) (*RedeemReceiptResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RedeemReceiptResponse) - err := c.cc.Invoke(ctx, Backups_RedeemReceipt_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *backupsClient) GetBackupAuthCredentials(ctx context.Context, in *GetBackupAuthCredentialsRequest, opts ...grpc.CallOption) (*GetBackupAuthCredentialsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetBackupAuthCredentialsResponse) - err := c.cc.Invoke(ctx, Backups_GetBackupAuthCredentials_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// BackupsServer is the server API for Backups service. -// All implementations must embed UnimplementedBackupsServer -// for forward compatibility. -// -// Service for backup operations that require account authentication. -// -// Most actual backup operations operate on the backup-id and cannot be linked -// to the caller's account, but setting up anonymous credentials and changing -// backup tier requires account authentication. -type BackupsServer interface { - // Set (blinded) backup-id(s) for the account. - // - // Each account may have a single active backup-id for each credential type - // that can be used to store and retrieve backups. Once the backup-id is set, - // BackupAuthCredentials can be generated using GetBackupAuthCredentials. - // - // The blinded backup-id and the key-pair used to blind it must be derived - // from a recoverable secret. - // - // At least one of the credential types must be set on the request. - // Only the primary device can set a blinded backup-id. - SetBackupId(context.Context, *SetBackupIdRequest) (*SetBackupIdResponse, error) - // Redeem a receipt acquired from /v1/subscription/{subscriberId}/receipt_credentials - // to mark the account as eligible for the paid backup tier. - // - // After successful redemption, subsequent requests to - // GetBackupAuthCredentials will return credentials with the level on the - // provided receipt until the expiration time on the receipt. - RedeemReceipt(context.Context, *RedeemReceiptRequest) (*RedeemReceiptResponse, error) - // After setting a blinded backup-id with PUT /v1/archives/, this fetches - // credentials that can be used to perform operations against that backup-id. - // Clients may (and should) request up to 7 days of credentials at a time. - // - // The redemption_start and redemption_end seconds must be UTC day aligned, and - // must not span more than 7 days. - // - // Each credential contains a receipt level which indicates the backup level - // the credential is good for. If the account has paid backup access that - // expires at some point in the provided redemption window, credentials with - // redemption times after the expiration may be on a lower backup level. - // - // Clients must validate the receipt level on the credential matches a known - // receipt level before using it. - GetBackupAuthCredentials(context.Context, *GetBackupAuthCredentialsRequest) (*GetBackupAuthCredentialsResponse, error) - mustEmbedUnimplementedBackupsServer() -} - -// UnimplementedBackupsServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedBackupsServer struct{} - -func (UnimplementedBackupsServer) SetBackupId(context.Context, *SetBackupIdRequest) (*SetBackupIdResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetBackupId not implemented") -} -func (UnimplementedBackupsServer) RedeemReceipt(context.Context, *RedeemReceiptRequest) (*RedeemReceiptResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RedeemReceipt not implemented") -} -func (UnimplementedBackupsServer) GetBackupAuthCredentials(context.Context, *GetBackupAuthCredentialsRequest) (*GetBackupAuthCredentialsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetBackupAuthCredentials not implemented") -} -func (UnimplementedBackupsServer) mustEmbedUnimplementedBackupsServer() {} -func (UnimplementedBackupsServer) testEmbeddedByValue() {} - -// UnsafeBackupsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to BackupsServer will -// result in compilation errors. -type UnsafeBackupsServer interface { - mustEmbedUnimplementedBackupsServer() -} - -func RegisterBackupsServer(s grpc.ServiceRegistrar, srv BackupsServer) { - // If the following call panics, it indicates UnimplementedBackupsServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Backups_ServiceDesc, srv) -} - -func _Backups_SetBackupId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetBackupIdRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BackupsServer).SetBackupId(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Backups_SetBackupId_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BackupsServer).SetBackupId(ctx, req.(*SetBackupIdRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Backups_RedeemReceipt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RedeemReceiptRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BackupsServer).RedeemReceipt(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Backups_RedeemReceipt_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BackupsServer).RedeemReceipt(ctx, req.(*RedeemReceiptRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Backups_GetBackupAuthCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBackupAuthCredentialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BackupsServer).GetBackupAuthCredentials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Backups_GetBackupAuthCredentials_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BackupsServer).GetBackupAuthCredentials(ctx, req.(*GetBackupAuthCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Backups_ServiceDesc is the grpc.ServiceDesc for Backups service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Backups_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.backup.Backups", - HandlerType: (*BackupsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SetBackupId", - Handler: _Backups_SetBackupId_Handler, - }, - { - MethodName: "RedeemReceipt", - Handler: _Backups_RedeemReceipt_Handler, - }, - { - MethodName: "GetBackupAuthCredentials", - Handler: _Backups_GetBackupAuthCredentials_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/backups.proto", -} - -const ( - BackupsAnonymous_GetCdnCredentials_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/GetCdnCredentials" - BackupsAnonymous_GetSvrBCredentials_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/GetSvrBCredentials" - BackupsAnonymous_GetMessageBackupInfo_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/GetMessageBackupInfo" - BackupsAnonymous_GetMediaBackupInfo_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/GetMediaBackupInfo" - BackupsAnonymous_SetPublicKey_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/SetPublicKey" - BackupsAnonymous_Refresh_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/Refresh" - BackupsAnonymous_GetUploadForm_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/GetUploadForm" - BackupsAnonymous_CopyMedia_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/CopyMedia" - BackupsAnonymous_ListMedia_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/ListMedia" - BackupsAnonymous_DeleteMedia_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/DeleteMedia" - BackupsAnonymous_DeleteAll_FullMethodName = "/org.signal.chat.backup.BackupsAnonymous/DeleteAll" -) - -// BackupsAnonymousClient is the client API for BackupsAnonymous service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// # Service for backup operations with anonymous credentials -// -// This service never requires account authentication. It instead requires a -// backup-id authenticated with an anonymous credential that cannot be linked -// to the account. -// -// To register an anonymous credential: -// -// 1. Set a backup-id on the authenticated channel via Backups::SetBackupId -// 2. Retrieve BackupAuthCredentials via Backups::GetBackupAuthCredentials -// 3. Generate a key pair and set the public key via -// BackupsAnonymous::SetPublicKey -// -// Unless otherwise noted, requests for this service require a -// SignedPresentation, which includes: -// -// - a presentation generated from a BackupAuthCredential issued by -// GetBackupAuthCredentials -// - a signature of that presentation using the private key of a key pair -// previously set with SetPublicKey. -type BackupsAnonymousClient interface { - // Retrieve credentials used to read objects stored on the backup cdn - GetCdnCredentials(ctx context.Context, in *GetCdnCredentialsRequest, opts ...grpc.CallOption) (*GetCdnCredentialsResponse, error) - // Retrieve credentials used to interact with the SecureValueRecoveryB service - GetSvrBCredentials(ctx context.Context, in *GetSvrBCredentialsRequest, opts ...grpc.CallOption) (*GetSvrBCredentialsResponse, error) - // Retrieve information about the currently stored message backup - GetMessageBackupInfo(ctx context.Context, in *GetBackupInfoRequest, opts ...grpc.CallOption) (*GetMessageBackupInfoResponse, error) - // Retrieve information about the currently stored media backup - GetMediaBackupInfo(ctx context.Context, in *GetBackupInfoRequest, opts ...grpc.CallOption) (*GetMediaBackupInfoResponse, error) - // Permanently set the public key of an ED25519 key-pair for the backup-id. - // All requests (including this one!) must sign their BackupAuthCredential - // presentations with the private key corresponding to the provided public key. - SetPublicKey(ctx context.Context, in *SetPublicKeyRequest, opts ...grpc.CallOption) (*SetPublicKeyResponse, error) - // Refresh the backup, indicating that the backup is still active. Clients - // must periodically upload new backups or perform a refresh. If a backup has - // not been active for 30 days, it may be deleted. - Refresh(ctx context.Context, in *RefreshRequest, opts ...grpc.CallOption) (*RefreshResponse, error) - // Retrieve an upload form that can be used to perform a resumable upload - GetUploadForm(ctx context.Context, in *GetUploadFormRequest, opts ...grpc.CallOption) (*GetUploadFormResponse, error) - // Copy and re-encrypt media from the attachments cdn into the backup cdn. - // The original, already encrypted, attachments will be encrypted with the - // provided key material before being copied. - // - // The copy operation is not atomic and responses will be returned as copy - // operations complete with detailed information about the outcome. If an - // error is encountered, not all requests may be reflected in the responses. - // - // On retries, a particular destination media id must not be reused with a - // different source media id or different encryption parameters. - // - // The response stream may be closed with STREAM_CLOSED error reason. In this - // case, a BackupStreamClosed message will be present in the error details. - CopyMedia(ctx context.Context, in *CopyMediaRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[CopyMediaResponse], error) - // Retrieve a page of media objects stored for this backup-id. A client may - // have previously stored media objects that are no longer referenced in their - // current backup. To reclaim storage space used by these orphaned objects, - // perform a list operation and remove any unreferenced media objects - // via DeleteMedia. - ListMedia(ctx context.Context, in *ListMediaRequest, opts ...grpc.CallOption) (*ListMediaResponse, error) - // Delete media objects stored with this backup-id. Streams the locations of - // media items back when the item has successfully been removed. - // - // The response stream may be closed with STREAM_CLOSED error reason. In this - // case, a BackupStreamClosed message will be present in the error details. - DeleteMedia(ctx context.Context, in *DeleteMediaRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DeleteMediaResponse], error) - // Delete all backup metadata, objects, and stored public key. To use - // backups again, a public key must be resupplied. - DeleteAll(ctx context.Context, in *DeleteAllRequest, opts ...grpc.CallOption) (*DeleteAllResponse, error) -} - -type backupsAnonymousClient struct { - cc grpc.ClientConnInterface -} - -func NewBackupsAnonymousClient(cc grpc.ClientConnInterface) BackupsAnonymousClient { - return &backupsAnonymousClient{cc} -} - -func (c *backupsAnonymousClient) GetCdnCredentials(ctx context.Context, in *GetCdnCredentialsRequest, opts ...grpc.CallOption) (*GetCdnCredentialsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetCdnCredentialsResponse) - err := c.cc.Invoke(ctx, BackupsAnonymous_GetCdnCredentials_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *backupsAnonymousClient) GetSvrBCredentials(ctx context.Context, in *GetSvrBCredentialsRequest, opts ...grpc.CallOption) (*GetSvrBCredentialsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetSvrBCredentialsResponse) - err := c.cc.Invoke(ctx, BackupsAnonymous_GetSvrBCredentials_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *backupsAnonymousClient) GetMessageBackupInfo(ctx context.Context, in *GetBackupInfoRequest, opts ...grpc.CallOption) (*GetMessageBackupInfoResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetMessageBackupInfoResponse) - err := c.cc.Invoke(ctx, BackupsAnonymous_GetMessageBackupInfo_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *backupsAnonymousClient) GetMediaBackupInfo(ctx context.Context, in *GetBackupInfoRequest, opts ...grpc.CallOption) (*GetMediaBackupInfoResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetMediaBackupInfoResponse) - err := c.cc.Invoke(ctx, BackupsAnonymous_GetMediaBackupInfo_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *backupsAnonymousClient) SetPublicKey(ctx context.Context, in *SetPublicKeyRequest, opts ...grpc.CallOption) (*SetPublicKeyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetPublicKeyResponse) - err := c.cc.Invoke(ctx, BackupsAnonymous_SetPublicKey_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *backupsAnonymousClient) Refresh(ctx context.Context, in *RefreshRequest, opts ...grpc.CallOption) (*RefreshResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RefreshResponse) - err := c.cc.Invoke(ctx, BackupsAnonymous_Refresh_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *backupsAnonymousClient) GetUploadForm(ctx context.Context, in *GetUploadFormRequest, opts ...grpc.CallOption) (*GetUploadFormResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetUploadFormResponse) - err := c.cc.Invoke(ctx, BackupsAnonymous_GetUploadForm_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *backupsAnonymousClient) CopyMedia(ctx context.Context, in *CopyMediaRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[CopyMediaResponse], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &BackupsAnonymous_ServiceDesc.Streams[0], BackupsAnonymous_CopyMedia_FullMethodName, cOpts...) - if err != nil { - return nil, err - } - x := &grpc.GenericClientStream[CopyMediaRequest, CopyMediaResponse]{ClientStream: 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 -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type BackupsAnonymous_CopyMediaClient = grpc.ServerStreamingClient[CopyMediaResponse] - -func (c *backupsAnonymousClient) ListMedia(ctx context.Context, in *ListMediaRequest, opts ...grpc.CallOption) (*ListMediaResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ListMediaResponse) - err := c.cc.Invoke(ctx, BackupsAnonymous_ListMedia_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *backupsAnonymousClient) DeleteMedia(ctx context.Context, in *DeleteMediaRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DeleteMediaResponse], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &BackupsAnonymous_ServiceDesc.Streams[1], BackupsAnonymous_DeleteMedia_FullMethodName, cOpts...) - if err != nil { - return nil, err - } - x := &grpc.GenericClientStream[DeleteMediaRequest, DeleteMediaResponse]{ClientStream: 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 -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type BackupsAnonymous_DeleteMediaClient = grpc.ServerStreamingClient[DeleteMediaResponse] - -func (c *backupsAnonymousClient) DeleteAll(ctx context.Context, in *DeleteAllRequest, opts ...grpc.CallOption) (*DeleteAllResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(DeleteAllResponse) - err := c.cc.Invoke(ctx, BackupsAnonymous_DeleteAll_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// BackupsAnonymousServer is the server API for BackupsAnonymous service. -// All implementations must embed UnimplementedBackupsAnonymousServer -// for forward compatibility. -// -// # Service for backup operations with anonymous credentials -// -// This service never requires account authentication. It instead requires a -// backup-id authenticated with an anonymous credential that cannot be linked -// to the account. -// -// To register an anonymous credential: -// -// 1. Set a backup-id on the authenticated channel via Backups::SetBackupId -// 2. Retrieve BackupAuthCredentials via Backups::GetBackupAuthCredentials -// 3. Generate a key pair and set the public key via -// BackupsAnonymous::SetPublicKey -// -// Unless otherwise noted, requests for this service require a -// SignedPresentation, which includes: -// -// - a presentation generated from a BackupAuthCredential issued by -// GetBackupAuthCredentials -// - a signature of that presentation using the private key of a key pair -// previously set with SetPublicKey. -type BackupsAnonymousServer interface { - // Retrieve credentials used to read objects stored on the backup cdn - GetCdnCredentials(context.Context, *GetCdnCredentialsRequest) (*GetCdnCredentialsResponse, error) - // Retrieve credentials used to interact with the SecureValueRecoveryB service - GetSvrBCredentials(context.Context, *GetSvrBCredentialsRequest) (*GetSvrBCredentialsResponse, error) - // Retrieve information about the currently stored message backup - GetMessageBackupInfo(context.Context, *GetBackupInfoRequest) (*GetMessageBackupInfoResponse, error) - // Retrieve information about the currently stored media backup - GetMediaBackupInfo(context.Context, *GetBackupInfoRequest) (*GetMediaBackupInfoResponse, error) - // Permanently set the public key of an ED25519 key-pair for the backup-id. - // All requests (including this one!) must sign their BackupAuthCredential - // presentations with the private key corresponding to the provided public key. - SetPublicKey(context.Context, *SetPublicKeyRequest) (*SetPublicKeyResponse, error) - // Refresh the backup, indicating that the backup is still active. Clients - // must periodically upload new backups or perform a refresh. If a backup has - // not been active for 30 days, it may be deleted. - Refresh(context.Context, *RefreshRequest) (*RefreshResponse, error) - // Retrieve an upload form that can be used to perform a resumable upload - GetUploadForm(context.Context, *GetUploadFormRequest) (*GetUploadFormResponse, error) - // Copy and re-encrypt media from the attachments cdn into the backup cdn. - // The original, already encrypted, attachments will be encrypted with the - // provided key material before being copied. - // - // The copy operation is not atomic and responses will be returned as copy - // operations complete with detailed information about the outcome. If an - // error is encountered, not all requests may be reflected in the responses. - // - // On retries, a particular destination media id must not be reused with a - // different source media id or different encryption parameters. - // - // The response stream may be closed with STREAM_CLOSED error reason. In this - // case, a BackupStreamClosed message will be present in the error details. - CopyMedia(*CopyMediaRequest, grpc.ServerStreamingServer[CopyMediaResponse]) error - // Retrieve a page of media objects stored for this backup-id. A client may - // have previously stored media objects that are no longer referenced in their - // current backup. To reclaim storage space used by these orphaned objects, - // perform a list operation and remove any unreferenced media objects - // via DeleteMedia. - ListMedia(context.Context, *ListMediaRequest) (*ListMediaResponse, error) - // Delete media objects stored with this backup-id. Streams the locations of - // media items back when the item has successfully been removed. - // - // The response stream may be closed with STREAM_CLOSED error reason. In this - // case, a BackupStreamClosed message will be present in the error details. - DeleteMedia(*DeleteMediaRequest, grpc.ServerStreamingServer[DeleteMediaResponse]) error - // Delete all backup metadata, objects, and stored public key. To use - // backups again, a public key must be resupplied. - DeleteAll(context.Context, *DeleteAllRequest) (*DeleteAllResponse, error) - mustEmbedUnimplementedBackupsAnonymousServer() -} - -// UnimplementedBackupsAnonymousServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedBackupsAnonymousServer struct{} - -func (UnimplementedBackupsAnonymousServer) GetCdnCredentials(context.Context, *GetCdnCredentialsRequest) (*GetCdnCredentialsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetCdnCredentials not implemented") -} -func (UnimplementedBackupsAnonymousServer) GetSvrBCredentials(context.Context, *GetSvrBCredentialsRequest) (*GetSvrBCredentialsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetSvrBCredentials not implemented") -} -func (UnimplementedBackupsAnonymousServer) GetMessageBackupInfo(context.Context, *GetBackupInfoRequest) (*GetMessageBackupInfoResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetMessageBackupInfo not implemented") -} -func (UnimplementedBackupsAnonymousServer) GetMediaBackupInfo(context.Context, *GetBackupInfoRequest) (*GetMediaBackupInfoResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetMediaBackupInfo not implemented") -} -func (UnimplementedBackupsAnonymousServer) SetPublicKey(context.Context, *SetPublicKeyRequest) (*SetPublicKeyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetPublicKey not implemented") -} -func (UnimplementedBackupsAnonymousServer) Refresh(context.Context, *RefreshRequest) (*RefreshResponse, error) { - return nil, status.Error(codes.Unimplemented, "method Refresh not implemented") -} -func (UnimplementedBackupsAnonymousServer) GetUploadForm(context.Context, *GetUploadFormRequest) (*GetUploadFormResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetUploadForm not implemented") -} -func (UnimplementedBackupsAnonymousServer) CopyMedia(*CopyMediaRequest, grpc.ServerStreamingServer[CopyMediaResponse]) error { - return status.Error(codes.Unimplemented, "method CopyMedia not implemented") -} -func (UnimplementedBackupsAnonymousServer) ListMedia(context.Context, *ListMediaRequest) (*ListMediaResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ListMedia not implemented") -} -func (UnimplementedBackupsAnonymousServer) DeleteMedia(*DeleteMediaRequest, grpc.ServerStreamingServer[DeleteMediaResponse]) error { - return status.Error(codes.Unimplemented, "method DeleteMedia not implemented") -} -func (UnimplementedBackupsAnonymousServer) DeleteAll(context.Context, *DeleteAllRequest) (*DeleteAllResponse, error) { - return nil, status.Error(codes.Unimplemented, "method DeleteAll not implemented") -} -func (UnimplementedBackupsAnonymousServer) mustEmbedUnimplementedBackupsAnonymousServer() {} -func (UnimplementedBackupsAnonymousServer) testEmbeddedByValue() {} - -// UnsafeBackupsAnonymousServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to BackupsAnonymousServer will -// result in compilation errors. -type UnsafeBackupsAnonymousServer interface { - mustEmbedUnimplementedBackupsAnonymousServer() -} - -func RegisterBackupsAnonymousServer(s grpc.ServiceRegistrar, srv BackupsAnonymousServer) { - // If the following call panics, it indicates UnimplementedBackupsAnonymousServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&BackupsAnonymous_ServiceDesc, srv) -} - -func _BackupsAnonymous_GetCdnCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCdnCredentialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BackupsAnonymousServer).GetCdnCredentials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: BackupsAnonymous_GetCdnCredentials_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BackupsAnonymousServer).GetCdnCredentials(ctx, req.(*GetCdnCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BackupsAnonymous_GetSvrBCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSvrBCredentialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BackupsAnonymousServer).GetSvrBCredentials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: BackupsAnonymous_GetSvrBCredentials_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BackupsAnonymousServer).GetSvrBCredentials(ctx, req.(*GetSvrBCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BackupsAnonymous_GetMessageBackupInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBackupInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BackupsAnonymousServer).GetMessageBackupInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: BackupsAnonymous_GetMessageBackupInfo_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BackupsAnonymousServer).GetMessageBackupInfo(ctx, req.(*GetBackupInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BackupsAnonymous_GetMediaBackupInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBackupInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BackupsAnonymousServer).GetMediaBackupInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: BackupsAnonymous_GetMediaBackupInfo_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BackupsAnonymousServer).GetMediaBackupInfo(ctx, req.(*GetBackupInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BackupsAnonymous_SetPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetPublicKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BackupsAnonymousServer).SetPublicKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: BackupsAnonymous_SetPublicKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BackupsAnonymousServer).SetPublicKey(ctx, req.(*SetPublicKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BackupsAnonymous_Refresh_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RefreshRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BackupsAnonymousServer).Refresh(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: BackupsAnonymous_Refresh_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BackupsAnonymousServer).Refresh(ctx, req.(*RefreshRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BackupsAnonymous_GetUploadForm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUploadFormRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BackupsAnonymousServer).GetUploadForm(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: BackupsAnonymous_GetUploadForm_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BackupsAnonymousServer).GetUploadForm(ctx, req.(*GetUploadFormRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BackupsAnonymous_CopyMedia_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(CopyMediaRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(BackupsAnonymousServer).CopyMedia(m, &grpc.GenericServerStream[CopyMediaRequest, CopyMediaResponse]{ServerStream: stream}) -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type BackupsAnonymous_CopyMediaServer = grpc.ServerStreamingServer[CopyMediaResponse] - -func _BackupsAnonymous_ListMedia_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListMediaRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BackupsAnonymousServer).ListMedia(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: BackupsAnonymous_ListMedia_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BackupsAnonymousServer).ListMedia(ctx, req.(*ListMediaRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BackupsAnonymous_DeleteMedia_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(DeleteMediaRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(BackupsAnonymousServer).DeleteMedia(m, &grpc.GenericServerStream[DeleteMediaRequest, DeleteMediaResponse]{ServerStream: stream}) -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type BackupsAnonymous_DeleteMediaServer = grpc.ServerStreamingServer[DeleteMediaResponse] - -func _BackupsAnonymous_DeleteAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteAllRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BackupsAnonymousServer).DeleteAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: BackupsAnonymous_DeleteAll_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BackupsAnonymousServer).DeleteAll(ctx, req.(*DeleteAllRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// BackupsAnonymous_ServiceDesc is the grpc.ServiceDesc for BackupsAnonymous service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var BackupsAnonymous_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.backup.BackupsAnonymous", - HandlerType: (*BackupsAnonymousServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetCdnCredentials", - Handler: _BackupsAnonymous_GetCdnCredentials_Handler, - }, - { - MethodName: "GetSvrBCredentials", - Handler: _BackupsAnonymous_GetSvrBCredentials_Handler, - }, - { - MethodName: "GetMessageBackupInfo", - Handler: _BackupsAnonymous_GetMessageBackupInfo_Handler, - }, - { - MethodName: "GetMediaBackupInfo", - Handler: _BackupsAnonymous_GetMediaBackupInfo_Handler, - }, - { - MethodName: "SetPublicKey", - Handler: _BackupsAnonymous_SetPublicKey_Handler, - }, - { - MethodName: "Refresh", - Handler: _BackupsAnonymous_Refresh_Handler, - }, - { - MethodName: "GetUploadForm", - Handler: _BackupsAnonymous_GetUploadForm_Handler, - }, - { - MethodName: "ListMedia", - Handler: _BackupsAnonymous_ListMedia_Handler, - }, - { - MethodName: "DeleteAll", - Handler: _BackupsAnonymous_DeleteAll_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "CopyMedia", - Handler: _BackupsAnonymous_CopyMedia_Handler, - ServerStreams: true, - }, - { - StreamName: "DeleteMedia", - Handler: _BackupsAnonymous_DeleteMedia_Handler, - ServerStreams: true, - }, - }, - Metadata: "org/signal/chat/backups.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/call_quality/call_quality.pb.go b/pkg/signalmeow/protobuf/rpc/call_quality/call_quality.pb.go deleted file mode 100644 index 9e023d8..0000000 --- a/pkg/signalmeow/protobuf/rpc/call_quality/call_quality.pb.go +++ /dev/null @@ -1,426 +0,0 @@ -// -// Copyright 2025 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/call_quality.proto - -package call_quality - -import ( - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type SubmitCallQualitySurveyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Indicates whether the caller was generally satisfied with the quality of - // the call - UserSatisfied bool `protobuf:"varint,1,opt,name=user_satisfied,json=userSatisfied,proto3" json:"user_satisfied,omitempty"` - // A list of call quality issues selected by the caller - CallQualityIssues []string `protobuf:"bytes,2,rep,name=call_quality_issues,json=callQualityIssues,proto3" json:"call_quality_issues,omitempty"` - // A free-form description of any additional issues as written by the caller - AdditionalIssuesDescription *string `protobuf:"bytes,3,opt,name=additional_issues_description,json=additionalIssuesDescription,proto3,oneof" json:"additional_issues_description,omitempty"` - // A URL for a set of debug logs associated with the call if the caller chose - // to submit debug logs - DebugLogUrl *string `protobuf:"bytes,4,opt,name=debug_log_url,json=debugLogUrl,proto3,oneof" json:"debug_log_url,omitempty"` - // The time at which the call started in milliseconds since the epoch - StartTimestamp int64 `protobuf:"varint,5,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"` - // The time at which the call ended in milliseconds since the epoch - EndTimestamp int64 `protobuf:"varint,6,opt,name=end_timestamp,json=endTimestamp,proto3" json:"end_timestamp,omitempty"` - // The type of call; note that direct voice calls can become video calls and - // vice versa, and this field indicates which mode was selected at call - // initiation time. At the time of writing, expected call types are - // "direct_voice", "direct_video", "group", and "call_link". - CallType string `protobuf:"bytes,7,opt,name=call_type,json=callType,proto3" json:"call_type,omitempty"` - // Indicates whether the call completed without error or if it terminated - // abnormally - Success bool `protobuf:"varint,8,opt,name=success,proto3" json:"success,omitempty"` - // A client-defined, but human-readable reason for call termination - CallEndReason string `protobuf:"bytes,9,opt,name=call_end_reason,json=callEndReason,proto3" json:"call_end_reason,omitempty"` - // The median round-trip time, measured in milliseconds, for STUN/ICE packets - // (i.e. connection maintenance and establishment) - ConnectionRttMedian *float32 `protobuf:"fixed32,10,opt,name=connection_rtt_median,json=connectionRttMedian,proto3,oneof" json:"connection_rtt_median,omitempty"` - // The median round-trip time, measured in milliseconds, for RTP/RTCP packets - // for audio streams - AudioRttMedian *float32 `protobuf:"fixed32,11,opt,name=audio_rtt_median,json=audioRttMedian,proto3,oneof" json:"audio_rtt_median,omitempty"` - // The median round-trip time, measured in milliseconds, for RTP/RTCP packets - // for video streams - VideoRttMedian *float32 `protobuf:"fixed32,12,opt,name=video_rtt_median,json=videoRttMedian,proto3,oneof" json:"video_rtt_median,omitempty"` - // The median jitter for audio streams, measured in milliseconds, for the - // duration of the call as measured by the client submitting the survey - AudioRecvJitterMedian *float32 `protobuf:"fixed32,13,opt,name=audio_recv_jitter_median,json=audioRecvJitterMedian,proto3,oneof" json:"audio_recv_jitter_median,omitempty"` - // The median jitter for video streams, measured in milliseconds, for the - // duration of the call as measured by the client submitting the survey - VideoRecvJitterMedian *float32 `protobuf:"fixed32,14,opt,name=video_recv_jitter_median,json=videoRecvJitterMedian,proto3,oneof" json:"video_recv_jitter_median,omitempty"` - // The median jitter for audio streams, measured in milliseconds, for the - // duration of the call as measured by the remote endpoint in the call (either - // the peer of the client submitting the survey in a direct call or the SFU in - // a group call) - AudioSendJitterMedian *float32 `protobuf:"fixed32,15,opt,name=audio_send_jitter_median,json=audioSendJitterMedian,proto3,oneof" json:"audio_send_jitter_median,omitempty"` - // The median jitter for video streams, measured in milliseconds, for the - // duration of the call as measured by the remote endpoint in the call (either - // the peer of the client submitting the survey in a direct call or the SFU in - // a group call) - VideoSendJitterMedian *float32 `protobuf:"fixed32,16,opt,name=video_send_jitter_median,json=videoSendJitterMedian,proto3,oneof" json:"video_send_jitter_median,omitempty"` - // The fraction of audio packets lost over the duration of the call as - // measured by the client submitting the survey - AudioRecvPacketLossFraction *float32 `protobuf:"fixed32,17,opt,name=audio_recv_packet_loss_fraction,json=audioRecvPacketLossFraction,proto3,oneof" json:"audio_recv_packet_loss_fraction,omitempty"` - // The fraction of video packets lost over the duration of the call as - // measured by the client submitting the survey - VideoRecvPacketLossFraction *float32 `protobuf:"fixed32,18,opt,name=video_recv_packet_loss_fraction,json=videoRecvPacketLossFraction,proto3,oneof" json:"video_recv_packet_loss_fraction,omitempty"` - // The fraction of audio packets lost over the duration of the call as - // measured by the remote endpoint in the call (either the peer of the client - // submitting the survey in a direct call or the SFU in a group call) - AudioSendPacketLossFraction *float32 `protobuf:"fixed32,19,opt,name=audio_send_packet_loss_fraction,json=audioSendPacketLossFraction,proto3,oneof" json:"audio_send_packet_loss_fraction,omitempty"` - // The fraction of video packets lost over the duration of the call as - // measured by the remote endpoint in the call (either the peer of the client - // submitting the survey in a direct call or the SFU in a group call) - VideoSendPacketLossFraction *float32 `protobuf:"fixed32,20,opt,name=video_send_packet_loss_fraction,json=videoSendPacketLossFraction,proto3,oneof" json:"video_send_packet_loss_fraction,omitempty"` - // Machine-generated telemetry from the call; this is a serialized protobuf - // entity generated (and, critically, explained to the user!) by the calling - // library - CallTelemetry []byte `protobuf:"bytes,21,opt,name=call_telemetry,json=callTelemetry,proto3,oneof" json:"call_telemetry,omitempty"` - // A hash of a call ID (shared between clients and never sent to the calling - // server) that can be used to correlate survey responses from multiple - // participants in a call - CallIdHash []byte `protobuf:"bytes,22,opt,name=call_id_hash,json=callIdHash,proto3,oneof" json:"call_id_hash,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SubmitCallQualitySurveyRequest) Reset() { - *x = SubmitCallQualitySurveyRequest{} - mi := &file_org_signal_chat_call_quality_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SubmitCallQualitySurveyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubmitCallQualitySurveyRequest) ProtoMessage() {} - -func (x *SubmitCallQualitySurveyRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_call_quality_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubmitCallQualitySurveyRequest.ProtoReflect.Descriptor instead. -func (*SubmitCallQualitySurveyRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_call_quality_proto_rawDescGZIP(), []int{0} -} - -func (x *SubmitCallQualitySurveyRequest) GetUserSatisfied() bool { - if x != nil { - return x.UserSatisfied - } - return false -} - -func (x *SubmitCallQualitySurveyRequest) GetCallQualityIssues() []string { - if x != nil { - return x.CallQualityIssues - } - return nil -} - -func (x *SubmitCallQualitySurveyRequest) GetAdditionalIssuesDescription() string { - if x != nil && x.AdditionalIssuesDescription != nil { - return *x.AdditionalIssuesDescription - } - return "" -} - -func (x *SubmitCallQualitySurveyRequest) GetDebugLogUrl() string { - if x != nil && x.DebugLogUrl != nil { - return *x.DebugLogUrl - } - return "" -} - -func (x *SubmitCallQualitySurveyRequest) GetStartTimestamp() int64 { - if x != nil { - return x.StartTimestamp - } - return 0 -} - -func (x *SubmitCallQualitySurveyRequest) GetEndTimestamp() int64 { - if x != nil { - return x.EndTimestamp - } - return 0 -} - -func (x *SubmitCallQualitySurveyRequest) GetCallType() string { - if x != nil { - return x.CallType - } - return "" -} - -func (x *SubmitCallQualitySurveyRequest) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *SubmitCallQualitySurveyRequest) GetCallEndReason() string { - if x != nil { - return x.CallEndReason - } - return "" -} - -func (x *SubmitCallQualitySurveyRequest) GetConnectionRttMedian() float32 { - if x != nil && x.ConnectionRttMedian != nil { - return *x.ConnectionRttMedian - } - return 0 -} - -func (x *SubmitCallQualitySurveyRequest) GetAudioRttMedian() float32 { - if x != nil && x.AudioRttMedian != nil { - return *x.AudioRttMedian - } - return 0 -} - -func (x *SubmitCallQualitySurveyRequest) GetVideoRttMedian() float32 { - if x != nil && x.VideoRttMedian != nil { - return *x.VideoRttMedian - } - return 0 -} - -func (x *SubmitCallQualitySurveyRequest) GetAudioRecvJitterMedian() float32 { - if x != nil && x.AudioRecvJitterMedian != nil { - return *x.AudioRecvJitterMedian - } - return 0 -} - -func (x *SubmitCallQualitySurveyRequest) GetVideoRecvJitterMedian() float32 { - if x != nil && x.VideoRecvJitterMedian != nil { - return *x.VideoRecvJitterMedian - } - return 0 -} - -func (x *SubmitCallQualitySurveyRequest) GetAudioSendJitterMedian() float32 { - if x != nil && x.AudioSendJitterMedian != nil { - return *x.AudioSendJitterMedian - } - return 0 -} - -func (x *SubmitCallQualitySurveyRequest) GetVideoSendJitterMedian() float32 { - if x != nil && x.VideoSendJitterMedian != nil { - return *x.VideoSendJitterMedian - } - return 0 -} - -func (x *SubmitCallQualitySurveyRequest) GetAudioRecvPacketLossFraction() float32 { - if x != nil && x.AudioRecvPacketLossFraction != nil { - return *x.AudioRecvPacketLossFraction - } - return 0 -} - -func (x *SubmitCallQualitySurveyRequest) GetVideoRecvPacketLossFraction() float32 { - if x != nil && x.VideoRecvPacketLossFraction != nil { - return *x.VideoRecvPacketLossFraction - } - return 0 -} - -func (x *SubmitCallQualitySurveyRequest) GetAudioSendPacketLossFraction() float32 { - if x != nil && x.AudioSendPacketLossFraction != nil { - return *x.AudioSendPacketLossFraction - } - return 0 -} - -func (x *SubmitCallQualitySurveyRequest) GetVideoSendPacketLossFraction() float32 { - if x != nil && x.VideoSendPacketLossFraction != nil { - return *x.VideoSendPacketLossFraction - } - return 0 -} - -func (x *SubmitCallQualitySurveyRequest) GetCallTelemetry() []byte { - if x != nil { - return x.CallTelemetry - } - return nil -} - -func (x *SubmitCallQualitySurveyRequest) GetCallIdHash() []byte { - if x != nil { - return x.CallIdHash - } - return nil -} - -type SubmitCallQualitySurveyResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SubmitCallQualitySurveyResponse) Reset() { - *x = SubmitCallQualitySurveyResponse{} - mi := &file_org_signal_chat_call_quality_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SubmitCallQualitySurveyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubmitCallQualitySurveyResponse) ProtoMessage() {} - -func (x *SubmitCallQualitySurveyResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_call_quality_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubmitCallQualitySurveyResponse.ProtoReflect.Descriptor instead. -func (*SubmitCallQualitySurveyResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_call_quality_proto_rawDescGZIP(), []int{1} -} - -var File_org_signal_chat_call_quality_proto protoreflect.FileDescriptor - -const file_org_signal_chat_call_quality_proto_rawDesc = "" + - "\n" + - "\"org/signal/chat/call_quality.proto\x12\x1forg.signal.chat.calling.quality\x1a\x1dorg/signal/chat/require.proto\"\xc4\f\n" + - "\x1eSubmitCallQualitySurveyRequest\x12%\n" + - "\x0euser_satisfied\x18\x01 \x01(\bR\ruserSatisfied\x12.\n" + - "\x13call_quality_issues\x18\x02 \x03(\tR\x11callQualityIssues\x12G\n" + - "\x1dadditional_issues_description\x18\x03 \x01(\tH\x00R\x1badditionalIssuesDescription\x88\x01\x01\x12'\n" + - "\rdebug_log_url\x18\x04 \x01(\tH\x01R\vdebugLogUrl\x88\x01\x01\x12'\n" + - "\x0fstart_timestamp\x18\x05 \x01(\x03R\x0estartTimestamp\x12#\n" + - "\rend_timestamp\x18\x06 \x01(\x03R\fendTimestamp\x12\x1b\n" + - "\tcall_type\x18\a \x01(\tR\bcallType\x12\x18\n" + - "\asuccess\x18\b \x01(\bR\asuccess\x12&\n" + - "\x0fcall_end_reason\x18\t \x01(\tR\rcallEndReason\x127\n" + - "\x15connection_rtt_median\x18\n" + - " \x01(\x02H\x02R\x13connectionRttMedian\x88\x01\x01\x12-\n" + - "\x10audio_rtt_median\x18\v \x01(\x02H\x03R\x0eaudioRttMedian\x88\x01\x01\x12-\n" + - "\x10video_rtt_median\x18\f \x01(\x02H\x04R\x0evideoRttMedian\x88\x01\x01\x12<\n" + - "\x18audio_recv_jitter_median\x18\r \x01(\x02H\x05R\x15audioRecvJitterMedian\x88\x01\x01\x12<\n" + - "\x18video_recv_jitter_median\x18\x0e \x01(\x02H\x06R\x15videoRecvJitterMedian\x88\x01\x01\x12<\n" + - "\x18audio_send_jitter_median\x18\x0f \x01(\x02H\aR\x15audioSendJitterMedian\x88\x01\x01\x12<\n" + - "\x18video_send_jitter_median\x18\x10 \x01(\x02H\bR\x15videoSendJitterMedian\x88\x01\x01\x12I\n" + - "\x1faudio_recv_packet_loss_fraction\x18\x11 \x01(\x02H\tR\x1baudioRecvPacketLossFraction\x88\x01\x01\x12I\n" + - "\x1fvideo_recv_packet_loss_fraction\x18\x12 \x01(\x02H\n" + - "R\x1bvideoRecvPacketLossFraction\x88\x01\x01\x12I\n" + - "\x1faudio_send_packet_loss_fraction\x18\x13 \x01(\x02H\vR\x1baudioSendPacketLossFraction\x88\x01\x01\x12I\n" + - "\x1fvideo_send_packet_loss_fraction\x18\x14 \x01(\x02H\fR\x1bvideoSendPacketLossFraction\x88\x01\x01\x12*\n" + - "\x0ecall_telemetry\x18\x15 \x01(\fH\rR\rcallTelemetry\x88\x01\x01\x12%\n" + - "\fcall_id_hash\x18\x16 \x01(\fH\x0eR\n" + - "callIdHash\x88\x01\x01B \n" + - "\x1e_additional_issues_descriptionB\x10\n" + - "\x0e_debug_log_urlB\x18\n" + - "\x16_connection_rtt_medianB\x13\n" + - "\x11_audio_rtt_medianB\x13\n" + - "\x11_video_rtt_medianB\x1b\n" + - "\x19_audio_recv_jitter_medianB\x1b\n" + - "\x19_video_recv_jitter_medianB\x1b\n" + - "\x19_audio_send_jitter_medianB\x1b\n" + - "\x19_video_send_jitter_medianB\"\n" + - " _audio_recv_packet_loss_fractionB\"\n" + - " _video_recv_packet_loss_fractionB\"\n" + - " _audio_send_packet_loss_fractionB\"\n" + - " _video_send_packet_loss_fractionB\x11\n" + - "\x0f_call_telemetryB\x0f\n" + - "\r_call_id_hash\"!\n" + - "\x1fSubmitCallQualitySurveyResponse2\xb4\x01\n" + - "\vCallQuality\x12\x9e\x01\n" + - "\x17SubmitCallQualitySurvey\x12?.org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest\x1a@.org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_call_quality_proto_rawDescOnce sync.Once - file_org_signal_chat_call_quality_proto_rawDescData []byte -) - -func file_org_signal_chat_call_quality_proto_rawDescGZIP() []byte { - file_org_signal_chat_call_quality_proto_rawDescOnce.Do(func() { - file_org_signal_chat_call_quality_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_call_quality_proto_rawDesc), len(file_org_signal_chat_call_quality_proto_rawDesc))) - }) - return file_org_signal_chat_call_quality_proto_rawDescData -} - -var file_org_signal_chat_call_quality_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_org_signal_chat_call_quality_proto_goTypes = []any{ - (*SubmitCallQualitySurveyRequest)(nil), // 0: org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest - (*SubmitCallQualitySurveyResponse)(nil), // 1: org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse -} -var file_org_signal_chat_call_quality_proto_depIdxs = []int32{ - 0, // 0: org.signal.chat.calling.quality.CallQuality.SubmitCallQualitySurvey:input_type -> org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest - 1, // 1: org.signal.chat.calling.quality.CallQuality.SubmitCallQualitySurvey:output_type -> org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_call_quality_proto_init() } -func file_org_signal_chat_call_quality_proto_init() { - if File_org_signal_chat_call_quality_proto != nil { - return - } - file_org_signal_chat_call_quality_proto_msgTypes[0].OneofWrappers = []any{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_call_quality_proto_rawDesc), len(file_org_signal_chat_call_quality_proto_rawDesc)), - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_org_signal_chat_call_quality_proto_goTypes, - DependencyIndexes: file_org_signal_chat_call_quality_proto_depIdxs, - MessageInfos: file_org_signal_chat_call_quality_proto_msgTypes, - }.Build() - File_org_signal_chat_call_quality_proto = out.File - file_org_signal_chat_call_quality_proto_goTypes = nil - file_org_signal_chat_call_quality_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/call_quality/call_quality_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/call_quality/call_quality_grpc.pb.go deleted file mode 100644 index da99137..0000000 --- a/pkg/signalmeow/protobuf/rpc/call_quality/call_quality_grpc.pb.go +++ /dev/null @@ -1,131 +0,0 @@ -// -// Copyright 2025 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/call_quality.proto - -package call_quality - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - CallQuality_SubmitCallQualitySurvey_FullMethodName = "/org.signal.chat.calling.quality.CallQuality/SubmitCallQualitySurvey" -) - -// CallQualityClient is the client API for CallQuality service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Provides methods for submitting call quality surveys -type CallQualityClient interface { - // Submits a call quality survey response. - SubmitCallQualitySurvey(ctx context.Context, in *SubmitCallQualitySurveyRequest, opts ...grpc.CallOption) (*SubmitCallQualitySurveyResponse, error) -} - -type callQualityClient struct { - cc grpc.ClientConnInterface -} - -func NewCallQualityClient(cc grpc.ClientConnInterface) CallQualityClient { - return &callQualityClient{cc} -} - -func (c *callQualityClient) SubmitCallQualitySurvey(ctx context.Context, in *SubmitCallQualitySurveyRequest, opts ...grpc.CallOption) (*SubmitCallQualitySurveyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SubmitCallQualitySurveyResponse) - err := c.cc.Invoke(ctx, CallQuality_SubmitCallQualitySurvey_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// CallQualityServer is the server API for CallQuality service. -// All implementations must embed UnimplementedCallQualityServer -// for forward compatibility. -// -// Provides methods for submitting call quality surveys -type CallQualityServer interface { - // Submits a call quality survey response. - SubmitCallQualitySurvey(context.Context, *SubmitCallQualitySurveyRequest) (*SubmitCallQualitySurveyResponse, error) - mustEmbedUnimplementedCallQualityServer() -} - -// UnimplementedCallQualityServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedCallQualityServer struct{} - -func (UnimplementedCallQualityServer) SubmitCallQualitySurvey(context.Context, *SubmitCallQualitySurveyRequest) (*SubmitCallQualitySurveyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SubmitCallQualitySurvey not implemented") -} -func (UnimplementedCallQualityServer) mustEmbedUnimplementedCallQualityServer() {} -func (UnimplementedCallQualityServer) testEmbeddedByValue() {} - -// UnsafeCallQualityServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to CallQualityServer will -// result in compilation errors. -type UnsafeCallQualityServer interface { - mustEmbedUnimplementedCallQualityServer() -} - -func RegisterCallQualityServer(s grpc.ServiceRegistrar, srv CallQualityServer) { - // If the following call panics, it indicates UnimplementedCallQualityServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&CallQuality_ServiceDesc, srv) -} - -func _CallQuality_SubmitCallQualitySurvey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SubmitCallQualitySurveyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CallQualityServer).SubmitCallQualitySurvey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CallQuality_SubmitCallQualitySurvey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CallQualityServer).SubmitCallQualitySurvey(ctx, req.(*SubmitCallQualitySurveyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// CallQuality_ServiceDesc is the grpc.ServiceDesc for CallQuality service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var CallQuality_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.calling.quality.CallQuality", - HandlerType: (*CallQualityServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SubmitCallQualitySurvey", - Handler: _CallQuality_SubmitCallQualitySurvey_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/call_quality.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/calling/calling.pb.go b/pkg/signalmeow/protobuf/rpc/calling/calling.pb.go deleted file mode 100644 index 7b68f1a..0000000 --- a/pkg/signalmeow/protobuf/rpc/calling/calling.pb.go +++ /dev/null @@ -1,379 +0,0 @@ -// -// Copyright 2023 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/calling.proto - -package calling - -import ( - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetCallingRelaysRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCallingRelaysRequest) Reset() { - *x = GetCallingRelaysRequest{} - mi := &file_org_signal_chat_calling_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCallingRelaysRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCallingRelaysRequest) ProtoMessage() {} - -func (x *GetCallingRelaysRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_calling_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCallingRelaysRequest.ProtoReflect.Descriptor instead. -func (*GetCallingRelaysRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_calling_proto_rawDescGZIP(), []int{0} -} - -type GetCallingRelaysResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A collection of calling relays a client may use for one-on-one calls. - Relays []*GetCallingRelaysResponse_Relay `protobuf:"bytes,1,rep,name=relays,proto3" json:"relays,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCallingRelaysResponse) Reset() { - *x = GetCallingRelaysResponse{} - mi := &file_org_signal_chat_calling_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCallingRelaysResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCallingRelaysResponse) ProtoMessage() {} - -func (x *GetCallingRelaysResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_calling_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCallingRelaysResponse.ProtoReflect.Descriptor instead. -func (*GetCallingRelaysResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_calling_proto_rawDescGZIP(), []int{1} -} - -func (x *GetCallingRelaysResponse) GetRelays() []*GetCallingRelaysResponse_Relay { - if x != nil { - return x.Relays - } - return nil -} - -type GetCallingRelaysResponse_HostnameUrlList struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A collection of hostname-based TURN, TURNS, or STUN URLs a client can use - // to connect to a relay. - Urls []string `protobuf:"bytes,1,rep,name=urls,proto3" json:"urls,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCallingRelaysResponse_HostnameUrlList) Reset() { - *x = GetCallingRelaysResponse_HostnameUrlList{} - mi := &file_org_signal_chat_calling_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCallingRelaysResponse_HostnameUrlList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCallingRelaysResponse_HostnameUrlList) ProtoMessage() {} - -func (x *GetCallingRelaysResponse_HostnameUrlList) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_calling_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCallingRelaysResponse_HostnameUrlList.ProtoReflect.Descriptor instead. -func (*GetCallingRelaysResponse_HostnameUrlList) Descriptor() ([]byte, []int) { - return file_org_signal_chat_calling_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *GetCallingRelaysResponse_HostnameUrlList) GetUrls() []string { - if x != nil { - return x.Urls - } - return nil -} - -type GetCallingRelaysResponse_IpUrlList struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A collection of IP-based TURN, TURNS, or STUN URLs a client can use to - // connect to a relay. - Urls []string `protobuf:"bytes,1,rep,name=urls,proto3" json:"urls,omitempty"` - // A hostname clients must use to validate the relay's TLS certificate when - // connecting via an IP-based TURNS URL. May not be specified if `urls` - // contains no TURNS URLs. - Hostname *string `protobuf:"bytes,2,opt,name=hostname,proto3,oneof" json:"hostname,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCallingRelaysResponse_IpUrlList) Reset() { - *x = GetCallingRelaysResponse_IpUrlList{} - mi := &file_org_signal_chat_calling_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCallingRelaysResponse_IpUrlList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCallingRelaysResponse_IpUrlList) ProtoMessage() {} - -func (x *GetCallingRelaysResponse_IpUrlList) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_calling_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCallingRelaysResponse_IpUrlList.ProtoReflect.Descriptor instead. -func (*GetCallingRelaysResponse_IpUrlList) Descriptor() ([]byte, []int) { - return file_org_signal_chat_calling_proto_rawDescGZIP(), []int{1, 1} -} - -func (x *GetCallingRelaysResponse_IpUrlList) GetUrls() []string { - if x != nil { - return x.Urls - } - return nil -} - -func (x *GetCallingRelaysResponse_IpUrlList) GetHostname() string { - if x != nil && x.Hostname != nil { - return *x.Hostname - } - return "" -} - -type GetCallingRelaysResponse_Relay struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A username that can be presented to authenticate with a TURN server. - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - // A password that can be presented to authenticate with a TURN server. - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - // The duration, in seconds, after which the included username and password - // will no longer be valid. - CredentialTtlSeconds uint64 `protobuf:"varint,3,opt,name=credential_ttl_seconds,json=credentialTtlSeconds,proto3" json:"credential_ttl_seconds,omitempty"` - // A collection of hostname-based URLs clients may use to connect to this - // relay. - HostnameUrls *GetCallingRelaysResponse_HostnameUrlList `protobuf:"bytes,4,opt,name=hostname_urls,json=hostnameUrls,proto3,oneof" json:"hostname_urls,omitempty"` - // A collection of IP-based URLs clients may use to connect to this relay. - IpUrls *GetCallingRelaysResponse_IpUrlList `protobuf:"bytes,5,opt,name=ip_urls,json=ipUrls,proto3,oneof" json:"ip_urls,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCallingRelaysResponse_Relay) Reset() { - *x = GetCallingRelaysResponse_Relay{} - mi := &file_org_signal_chat_calling_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCallingRelaysResponse_Relay) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCallingRelaysResponse_Relay) ProtoMessage() {} - -func (x *GetCallingRelaysResponse_Relay) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_calling_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCallingRelaysResponse_Relay.ProtoReflect.Descriptor instead. -func (*GetCallingRelaysResponse_Relay) Descriptor() ([]byte, []int) { - return file_org_signal_chat_calling_proto_rawDescGZIP(), []int{1, 2} -} - -func (x *GetCallingRelaysResponse_Relay) GetUsername() string { - if x != nil { - return x.Username - } - return "" -} - -func (x *GetCallingRelaysResponse_Relay) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -func (x *GetCallingRelaysResponse_Relay) GetCredentialTtlSeconds() uint64 { - if x != nil { - return x.CredentialTtlSeconds - } - return 0 -} - -func (x *GetCallingRelaysResponse_Relay) GetHostnameUrls() *GetCallingRelaysResponse_HostnameUrlList { - if x != nil { - return x.HostnameUrls - } - return nil -} - -func (x *GetCallingRelaysResponse_Relay) GetIpUrls() *GetCallingRelaysResponse_IpUrlList { - if x != nil { - return x.IpUrls - } - return nil -} - -var File_org_signal_chat_calling_proto protoreflect.FileDescriptor - -const file_org_signal_chat_calling_proto_rawDesc = "" + - "\n" + - "\x1dorg/signal/chat/calling.proto\x12\x17org.signal.chat.calling\x1a\x1dorg/signal/chat/require.proto\"\x19\n" + - "\x17GetCallingRelaysRequest\"\xbf\x04\n" + - "\x18GetCallingRelaysResponse\x12O\n" + - "\x06relays\x18\x01 \x03(\v27.org.signal.chat.calling.GetCallingRelaysResponse.RelayR\x06relays\x1a%\n" + - "\x0fHostnameUrlList\x12\x12\n" + - "\x04urls\x18\x01 \x03(\tR\x04urls\x1aM\n" + - "\tIpUrlList\x12\x12\n" + - "\x04urls\x18\x01 \x03(\tR\x04urls\x12\x1f\n" + - "\bhostname\x18\x02 \x01(\tH\x00R\bhostname\x88\x01\x01B\v\n" + - "\t_hostname\x1a\xdb\x02\n" + - "\x05Relay\x12\x1a\n" + - "\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" + - "\bpassword\x18\x02 \x01(\tR\bpassword\x124\n" + - "\x16credential_ttl_seconds\x18\x03 \x01(\x04R\x14credentialTtlSeconds\x12k\n" + - "\rhostname_urls\x18\x04 \x01(\v2A.org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlListH\x00R\fhostnameUrls\x88\x01\x01\x12Y\n" + - "\aip_urls\x18\x05 \x01(\v2;.org.signal.chat.calling.GetCallingRelaysResponse.IpUrlListH\x01R\x06ipUrls\x88\x01\x01B\x10\n" + - "\x0e_hostname_urlsB\n" + - "\n" + - "\b_ip_urls2\x8a\x01\n" + - "\aCalling\x12y\n" + - "\x10GetCallingRelays\x120.org.signal.chat.calling.GetCallingRelaysRequest\x1a1.org.signal.chat.calling.GetCallingRelaysResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_calling_proto_rawDescOnce sync.Once - file_org_signal_chat_calling_proto_rawDescData []byte -) - -func file_org_signal_chat_calling_proto_rawDescGZIP() []byte { - file_org_signal_chat_calling_proto_rawDescOnce.Do(func() { - file_org_signal_chat_calling_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_calling_proto_rawDesc), len(file_org_signal_chat_calling_proto_rawDesc))) - }) - return file_org_signal_chat_calling_proto_rawDescData -} - -var file_org_signal_chat_calling_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_org_signal_chat_calling_proto_goTypes = []any{ - (*GetCallingRelaysRequest)(nil), // 0: org.signal.chat.calling.GetCallingRelaysRequest - (*GetCallingRelaysResponse)(nil), // 1: org.signal.chat.calling.GetCallingRelaysResponse - (*GetCallingRelaysResponse_HostnameUrlList)(nil), // 2: org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList - (*GetCallingRelaysResponse_IpUrlList)(nil), // 3: org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList - (*GetCallingRelaysResponse_Relay)(nil), // 4: org.signal.chat.calling.GetCallingRelaysResponse.Relay -} -var file_org_signal_chat_calling_proto_depIdxs = []int32{ - 4, // 0: org.signal.chat.calling.GetCallingRelaysResponse.relays:type_name -> org.signal.chat.calling.GetCallingRelaysResponse.Relay - 2, // 1: org.signal.chat.calling.GetCallingRelaysResponse.Relay.hostname_urls:type_name -> org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList - 3, // 2: org.signal.chat.calling.GetCallingRelaysResponse.Relay.ip_urls:type_name -> org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList - 0, // 3: org.signal.chat.calling.Calling.GetCallingRelays:input_type -> org.signal.chat.calling.GetCallingRelaysRequest - 1, // 4: org.signal.chat.calling.Calling.GetCallingRelays:output_type -> org.signal.chat.calling.GetCallingRelaysResponse - 4, // [4:5] is the sub-list for method output_type - 3, // [3:4] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_calling_proto_init() } -func file_org_signal_chat_calling_proto_init() { - if File_org_signal_chat_calling_proto != nil { - return - } - file_org_signal_chat_calling_proto_msgTypes[3].OneofWrappers = []any{} - file_org_signal_chat_calling_proto_msgTypes[4].OneofWrappers = []any{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_calling_proto_rawDesc), len(file_org_signal_chat_calling_proto_rawDesc)), - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_org_signal_chat_calling_proto_goTypes, - DependencyIndexes: file_org_signal_chat_calling_proto_depIdxs, - MessageInfos: file_org_signal_chat_calling_proto_msgTypes, - }.Build() - File_org_signal_chat_calling_proto = out.File - file_org_signal_chat_calling_proto_goTypes = nil - file_org_signal_chat_calling_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/calling/calling_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/calling/calling_grpc.pb.go deleted file mode 100644 index 87ec6d7..0000000 --- a/pkg/signalmeow/protobuf/rpc/calling/calling_grpc.pb.go +++ /dev/null @@ -1,133 +0,0 @@ -// -// Copyright 2023 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/calling.proto - -package calling - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Calling_GetCallingRelays_FullMethodName = "/org.signal.chat.calling.Calling/GetCallingRelays" -) - -// CallingClient is the client API for Calling service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Provides methods for getting credentials and relay options for one-on-one -// calls. -type CallingClient interface { - // Retrieves TURN credentials and relay options for one-on-one calls. - GetCallingRelays(ctx context.Context, in *GetCallingRelaysRequest, opts ...grpc.CallOption) (*GetCallingRelaysResponse, error) -} - -type callingClient struct { - cc grpc.ClientConnInterface -} - -func NewCallingClient(cc grpc.ClientConnInterface) CallingClient { - return &callingClient{cc} -} - -func (c *callingClient) GetCallingRelays(ctx context.Context, in *GetCallingRelaysRequest, opts ...grpc.CallOption) (*GetCallingRelaysResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetCallingRelaysResponse) - err := c.cc.Invoke(ctx, Calling_GetCallingRelays_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// CallingServer is the server API for Calling service. -// All implementations must embed UnimplementedCallingServer -// for forward compatibility. -// -// Provides methods for getting credentials and relay options for one-on-one -// calls. -type CallingServer interface { - // Retrieves TURN credentials and relay options for one-on-one calls. - GetCallingRelays(context.Context, *GetCallingRelaysRequest) (*GetCallingRelaysResponse, error) - mustEmbedUnimplementedCallingServer() -} - -// UnimplementedCallingServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedCallingServer struct{} - -func (UnimplementedCallingServer) GetCallingRelays(context.Context, *GetCallingRelaysRequest) (*GetCallingRelaysResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetCallingRelays not implemented") -} -func (UnimplementedCallingServer) mustEmbedUnimplementedCallingServer() {} -func (UnimplementedCallingServer) testEmbeddedByValue() {} - -// UnsafeCallingServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to CallingServer will -// result in compilation errors. -type UnsafeCallingServer interface { - mustEmbedUnimplementedCallingServer() -} - -func RegisterCallingServer(s grpc.ServiceRegistrar, srv CallingServer) { - // If the following call panics, it indicates UnimplementedCallingServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Calling_ServiceDesc, srv) -} - -func _Calling_GetCallingRelays_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCallingRelaysRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CallingServer).GetCallingRelays(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Calling_GetCallingRelays_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CallingServer).GetCallingRelays(ctx, req.(*GetCallingRelaysRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Calling_ServiceDesc is the grpc.ServiceDesc for Calling service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Calling_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.calling.Calling", - HandlerType: (*CallingServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetCallingRelays", - Handler: _Calling_GetCallingRelays_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/calling.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/challenge/challenge.pb.go b/pkg/signalmeow/protobuf/rpc/challenge/challenge.pb.go deleted file mode 100644 index 3643365..0000000 --- a/pkg/signalmeow/protobuf/rpc/challenge/challenge.pb.go +++ /dev/null @@ -1,333 +0,0 @@ -// -// Copyright 2026 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/challenge.proto - -package challenge - -import ( - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type AnswerChallengeRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The opaque token id from the ChallengeRequired response returned by the - // server endpoint that requested the challenge - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - // Types that are valid to be assigned to Request: - // - // *AnswerChallengeRequest_Push - // *AnswerChallengeRequest_Captcha - Request isAnswerChallengeRequest_Request `protobuf_oneof:"request"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AnswerChallengeRequest) Reset() { - *x = AnswerChallengeRequest{} - mi := &file_org_signal_chat_challenge_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AnswerChallengeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AnswerChallengeRequest) ProtoMessage() {} - -func (x *AnswerChallengeRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_challenge_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AnswerChallengeRequest.ProtoReflect.Descriptor instead. -func (*AnswerChallengeRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_challenge_proto_rawDescGZIP(), []int{0} -} - -func (x *AnswerChallengeRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *AnswerChallengeRequest) GetRequest() isAnswerChallengeRequest_Request { - if x != nil { - return x.Request - } - return nil -} - -func (x *AnswerChallengeRequest) GetPush() *AnswerChallengeRequest_AnswerPushChallengeRequest { - if x != nil { - if x, ok := x.Request.(*AnswerChallengeRequest_Push); ok { - return x.Push - } - } - return nil -} - -func (x *AnswerChallengeRequest) GetCaptcha() *AnswerChallengeRequest_AnswerCaptchaChallengeRequest { - if x != nil { - if x, ok := x.Request.(*AnswerChallengeRequest_Captcha); ok { - return x.Captcha - } - } - return nil -} - -type isAnswerChallengeRequest_Request interface { - isAnswerChallengeRequest_Request() -} - -type AnswerChallengeRequest_Push struct { - Push *AnswerChallengeRequest_AnswerPushChallengeRequest `protobuf:"bytes,2,opt,name=push,proto3,oneof"` -} - -type AnswerChallengeRequest_Captcha struct { - Captcha *AnswerChallengeRequest_AnswerCaptchaChallengeRequest `protobuf:"bytes,3,opt,name=captcha,proto3,oneof"` -} - -func (*AnswerChallengeRequest_Push) isAnswerChallengeRequest_Request() {} - -func (*AnswerChallengeRequest_Captcha) isAnswerChallengeRequest_Request() {} - -type AnswerChallengeResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Whether the challenge proof was accepted - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AnswerChallengeResponse) Reset() { - *x = AnswerChallengeResponse{} - mi := &file_org_signal_chat_challenge_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AnswerChallengeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AnswerChallengeResponse) ProtoMessage() {} - -func (x *AnswerChallengeResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_challenge_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AnswerChallengeResponse.ProtoReflect.Descriptor instead. -func (*AnswerChallengeResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_challenge_proto_rawDescGZIP(), []int{1} -} - -func (x *AnswerChallengeResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -type AnswerChallengeRequest_AnswerPushChallengeRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The challenge string provided to the client via a push payload - Challenge string `protobuf:"bytes,1,opt,name=challenge,proto3" json:"challenge,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AnswerChallengeRequest_AnswerPushChallengeRequest) Reset() { - *x = AnswerChallengeRequest_AnswerPushChallengeRequest{} - mi := &file_org_signal_chat_challenge_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AnswerChallengeRequest_AnswerPushChallengeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AnswerChallengeRequest_AnswerPushChallengeRequest) ProtoMessage() {} - -func (x *AnswerChallengeRequest_AnswerPushChallengeRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_challenge_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AnswerChallengeRequest_AnswerPushChallengeRequest.ProtoReflect.Descriptor instead. -func (*AnswerChallengeRequest_AnswerPushChallengeRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_challenge_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *AnswerChallengeRequest_AnswerPushChallengeRequest) GetChallenge() string { - if x != nil { - return x.Challenge - } - return "" -} - -type AnswerChallengeRequest_AnswerCaptchaChallengeRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A string representing a solved captcha - // Example: signal-hcaptcha.30b01b46-d8c9-4c30-bbd7-9719acfe0c10.challenge.abcdefg1345 - Captcha string `protobuf:"bytes,1,opt,name=captcha,proto3" json:"captcha,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AnswerChallengeRequest_AnswerCaptchaChallengeRequest) Reset() { - *x = AnswerChallengeRequest_AnswerCaptchaChallengeRequest{} - mi := &file_org_signal_chat_challenge_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AnswerChallengeRequest_AnswerCaptchaChallengeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AnswerChallengeRequest_AnswerCaptchaChallengeRequest) ProtoMessage() {} - -func (x *AnswerChallengeRequest_AnswerCaptchaChallengeRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_challenge_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AnswerChallengeRequest_AnswerCaptchaChallengeRequest.ProtoReflect.Descriptor instead. -func (*AnswerChallengeRequest_AnswerCaptchaChallengeRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_challenge_proto_rawDescGZIP(), []int{0, 1} -} - -func (x *AnswerChallengeRequest_AnswerCaptchaChallengeRequest) GetCaptcha() string { - if x != nil { - return x.Captcha - } - return "" -} - -var File_org_signal_chat_challenge_proto protoreflect.FileDescriptor - -const file_org_signal_chat_challenge_proto_rawDesc = "" + - "\n" + - "\x1forg/signal/chat/challenge.proto\x12\x19org.signal.chat.challenge\x1a\x1dorg/signal/chat/require.proto\"\x93\x03\n" + - "\x16AnswerChallengeRequest\x12\x1a\n" + - "\x05token\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\x05token\x12b\n" + - "\x04push\x18\x02 \x01(\v2L.org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequestH\x00R\x04push\x12k\n" + - "\acaptcha\x18\x03 \x01(\v2O.org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequestH\x00R\acaptcha\x1a@\n" + - "\x1aAnswerPushChallengeRequest\x12\"\n" + - "\tchallenge\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\tchallenge\x1a?\n" + - "\x1dAnswerCaptchaChallengeRequest\x12\x1e\n" + - "\acaptcha\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\acaptchaB\t\n" + - "\arequest\"3\n" + - "\x17AnswerChallengeResponse\x12\x18\n" + - "\asuccess\x18\x01 \x01(\bR\asuccess2\x96\x01\n" + - "\tChallenge\x12\x82\x01\n" + - "\x17HandleChallengeResponse\x121.org.signal.chat.challenge.AnswerChallengeRequest\x1a2.org.signal.chat.challenge.AnswerChallengeResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_challenge_proto_rawDescOnce sync.Once - file_org_signal_chat_challenge_proto_rawDescData []byte -) - -func file_org_signal_chat_challenge_proto_rawDescGZIP() []byte { - file_org_signal_chat_challenge_proto_rawDescOnce.Do(func() { - file_org_signal_chat_challenge_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_challenge_proto_rawDesc), len(file_org_signal_chat_challenge_proto_rawDesc))) - }) - return file_org_signal_chat_challenge_proto_rawDescData -} - -var file_org_signal_chat_challenge_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_org_signal_chat_challenge_proto_goTypes = []any{ - (*AnswerChallengeRequest)(nil), // 0: org.signal.chat.challenge.AnswerChallengeRequest - (*AnswerChallengeResponse)(nil), // 1: org.signal.chat.challenge.AnswerChallengeResponse - (*AnswerChallengeRequest_AnswerPushChallengeRequest)(nil), // 2: org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest - (*AnswerChallengeRequest_AnswerCaptchaChallengeRequest)(nil), // 3: org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest -} -var file_org_signal_chat_challenge_proto_depIdxs = []int32{ - 2, // 0: org.signal.chat.challenge.AnswerChallengeRequest.push:type_name -> org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest - 3, // 1: org.signal.chat.challenge.AnswerChallengeRequest.captcha:type_name -> org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest - 0, // 2: org.signal.chat.challenge.Challenge.HandleChallengeResponse:input_type -> org.signal.chat.challenge.AnswerChallengeRequest - 1, // 3: org.signal.chat.challenge.Challenge.HandleChallengeResponse:output_type -> org.signal.chat.challenge.AnswerChallengeResponse - 3, // [3:4] is the sub-list for method output_type - 2, // [2:3] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_challenge_proto_init() } -func file_org_signal_chat_challenge_proto_init() { - if File_org_signal_chat_challenge_proto != nil { - return - } - file_org_signal_chat_challenge_proto_msgTypes[0].OneofWrappers = []any{ - (*AnswerChallengeRequest_Push)(nil), - (*AnswerChallengeRequest_Captcha)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_challenge_proto_rawDesc), len(file_org_signal_chat_challenge_proto_rawDesc)), - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_org_signal_chat_challenge_proto_goTypes, - DependencyIndexes: file_org_signal_chat_challenge_proto_depIdxs, - MessageInfos: file_org_signal_chat_challenge_proto_msgTypes, - }.Build() - File_org_signal_chat_challenge_proto = out.File - file_org_signal_chat_challenge_proto_goTypes = nil - file_org_signal_chat_challenge_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/challenge/challenge_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/challenge/challenge_grpc.pb.go deleted file mode 100644 index e242637..0000000 --- a/pkg/signalmeow/protobuf/rpc/challenge/challenge_grpc.pb.go +++ /dev/null @@ -1,133 +0,0 @@ -// -// Copyright 2026 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/challenge.proto - -package challenge - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Challenge_HandleChallengeResponse_FullMethodName = "/org.signal.chat.challenge.Challenge/HandleChallengeResponse" -) - -// ChallengeClient is the client API for Challenge service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ChallengeClient interface { - // Some server endpoints (the "send message" endpoint, for example) may return - // a response indicating the client must complete a challenge before continuing. - // Clients may use this endpoint to provide proof of a completed challenge. - // If successful, the client may then continue their original operation. - HandleChallengeResponse(ctx context.Context, in *AnswerChallengeRequest, opts ...grpc.CallOption) (*AnswerChallengeResponse, error) -} - -type challengeClient struct { - cc grpc.ClientConnInterface -} - -func NewChallengeClient(cc grpc.ClientConnInterface) ChallengeClient { - return &challengeClient{cc} -} - -func (c *challengeClient) HandleChallengeResponse(ctx context.Context, in *AnswerChallengeRequest, opts ...grpc.CallOption) (*AnswerChallengeResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(AnswerChallengeResponse) - err := c.cc.Invoke(ctx, Challenge_HandleChallengeResponse_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ChallengeServer is the server API for Challenge service. -// All implementations must embed UnimplementedChallengeServer -// for forward compatibility. -type ChallengeServer interface { - // Some server endpoints (the "send message" endpoint, for example) may return - // a response indicating the client must complete a challenge before continuing. - // Clients may use this endpoint to provide proof of a completed challenge. - // If successful, the client may then continue their original operation. - HandleChallengeResponse(context.Context, *AnswerChallengeRequest) (*AnswerChallengeResponse, error) - mustEmbedUnimplementedChallengeServer() -} - -// UnimplementedChallengeServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedChallengeServer struct{} - -func (UnimplementedChallengeServer) HandleChallengeResponse(context.Context, *AnswerChallengeRequest) (*AnswerChallengeResponse, error) { - return nil, status.Error(codes.Unimplemented, "method HandleChallengeResponse not implemented") -} -func (UnimplementedChallengeServer) mustEmbedUnimplementedChallengeServer() {} -func (UnimplementedChallengeServer) testEmbeddedByValue() {} - -// UnsafeChallengeServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ChallengeServer will -// result in compilation errors. -type UnsafeChallengeServer interface { - mustEmbedUnimplementedChallengeServer() -} - -func RegisterChallengeServer(s grpc.ServiceRegistrar, srv ChallengeServer) { - // If the following call panics, it indicates UnimplementedChallengeServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Challenge_ServiceDesc, srv) -} - -func _Challenge_HandleChallengeResponse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AnswerChallengeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChallengeServer).HandleChallengeResponse(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Challenge_HandleChallengeResponse_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChallengeServer).HandleChallengeResponse(ctx, req.(*AnswerChallengeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Challenge_ServiceDesc is the grpc.ServiceDesc for Challenge service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Challenge_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.challenge.Challenge", - HandlerType: (*ChallengeServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "HandleChallengeResponse", - Handler: _Challenge_HandleChallengeResponse_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/challenge.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/common/common.pb.go b/pkg/signalmeow/protobuf/rpc/common/common.pb.go deleted file mode 100644 index 551d115..0000000 --- a/pkg/signalmeow/protobuf/rpc/common/common.pb.go +++ /dev/null @@ -1,986 +0,0 @@ -// -// Copyright 2023 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/common.proto - -package common - -import ( - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type IdentityType int32 - -const ( - IdentityType_IDENTITY_TYPE_UNSPECIFIED IdentityType = 0 - IdentityType_IDENTITY_TYPE_ACI IdentityType = 1 - IdentityType_IDENTITY_TYPE_PNI IdentityType = 2 -) - -// Enum value maps for IdentityType. -var ( - IdentityType_name = map[int32]string{ - 0: "IDENTITY_TYPE_UNSPECIFIED", - 1: "IDENTITY_TYPE_ACI", - 2: "IDENTITY_TYPE_PNI", - } - IdentityType_value = map[string]int32{ - "IDENTITY_TYPE_UNSPECIFIED": 0, - "IDENTITY_TYPE_ACI": 1, - "IDENTITY_TYPE_PNI": 2, - } -) - -func (x IdentityType) Enum() *IdentityType { - p := new(IdentityType) - *p = x - return p -} - -func (x IdentityType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (IdentityType) Descriptor() protoreflect.EnumDescriptor { - return file_org_signal_chat_common_proto_enumTypes[0].Descriptor() -} - -func (IdentityType) Type() protoreflect.EnumType { - return &file_org_signal_chat_common_proto_enumTypes[0] -} - -func (x IdentityType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use IdentityType.Descriptor instead. -func (IdentityType) EnumDescriptor() ([]byte, []int) { - return file_org_signal_chat_common_proto_rawDescGZIP(), []int{0} -} - -type DeviceCapability int32 - -const ( - DeviceCapability_DEVICE_CAPABILITY_UNSPECIFIED DeviceCapability = 0 - DeviceCapability_DEVICE_CAPABILITY_STORAGE DeviceCapability = 1 - DeviceCapability_DEVICE_CAPABILITY_TRANSFER DeviceCapability = 2 - DeviceCapability_DEVICE_CAPABILITY_ATTACHMENT_BACKFILL DeviceCapability = 6 - DeviceCapability_DEVICE_CAPABILITY_SPARSE_POST_QUANTUM_RATCHET DeviceCapability = 7 - DeviceCapability_DEVICE_CAPABILITY_PROFILES_V2 DeviceCapability = 8 - DeviceCapability_DEVICE_CAPABILITY_USERNAME_CHANGE_SYNC_MESSAGE DeviceCapability = 9 - DeviceCapability_DEVICE_CAPABILITY_OPTIONAL_PHONE_NUMBER DeviceCapability = 10 -) - -// Enum value maps for DeviceCapability. -var ( - DeviceCapability_name = map[int32]string{ - 0: "DEVICE_CAPABILITY_UNSPECIFIED", - 1: "DEVICE_CAPABILITY_STORAGE", - 2: "DEVICE_CAPABILITY_TRANSFER", - 6: "DEVICE_CAPABILITY_ATTACHMENT_BACKFILL", - 7: "DEVICE_CAPABILITY_SPARSE_POST_QUANTUM_RATCHET", - 8: "DEVICE_CAPABILITY_PROFILES_V2", - 9: "DEVICE_CAPABILITY_USERNAME_CHANGE_SYNC_MESSAGE", - 10: "DEVICE_CAPABILITY_OPTIONAL_PHONE_NUMBER", - } - DeviceCapability_value = map[string]int32{ - "DEVICE_CAPABILITY_UNSPECIFIED": 0, - "DEVICE_CAPABILITY_STORAGE": 1, - "DEVICE_CAPABILITY_TRANSFER": 2, - "DEVICE_CAPABILITY_ATTACHMENT_BACKFILL": 6, - "DEVICE_CAPABILITY_SPARSE_POST_QUANTUM_RATCHET": 7, - "DEVICE_CAPABILITY_PROFILES_V2": 8, - "DEVICE_CAPABILITY_USERNAME_CHANGE_SYNC_MESSAGE": 9, - "DEVICE_CAPABILITY_OPTIONAL_PHONE_NUMBER": 10, - } -) - -func (x DeviceCapability) Enum() *DeviceCapability { - p := new(DeviceCapability) - *p = x - return p -} - -func (x DeviceCapability) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DeviceCapability) Descriptor() protoreflect.EnumDescriptor { - return file_org_signal_chat_common_proto_enumTypes[1].Descriptor() -} - -func (DeviceCapability) Type() protoreflect.EnumType { - return &file_org_signal_chat_common_proto_enumTypes[1] -} - -func (x DeviceCapability) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DeviceCapability.Descriptor instead. -func (DeviceCapability) EnumDescriptor() ([]byte, []int) { - return file_org_signal_chat_common_proto_rawDescGZIP(), []int{1} -} - -type ServiceIdentifier struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The type of identity represented by this service identifier. - IdentityType IdentityType `protobuf:"varint,1,opt,name=identity_type,json=identityType,proto3,enum=org.signal.chat.common.IdentityType" json:"identity_type,omitempty"` - // The UUID of the identity represented by this service identifier. - Uuid []byte `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ServiceIdentifier) Reset() { - *x = ServiceIdentifier{} - mi := &file_org_signal_chat_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ServiceIdentifier) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServiceIdentifier) ProtoMessage() {} - -func (x *ServiceIdentifier) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_common_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServiceIdentifier.ProtoReflect.Descriptor instead. -func (*ServiceIdentifier) Descriptor() ([]byte, []int) { - return file_org_signal_chat_common_proto_rawDescGZIP(), []int{0} -} - -func (x *ServiceIdentifier) GetIdentityType() IdentityType { - if x != nil { - return x.IdentityType - } - return IdentityType_IDENTITY_TYPE_UNSPECIFIED -} - -func (x *ServiceIdentifier) GetUuid() []byte { - if x != nil { - return x.Uuid - } - return nil -} - -// All identifiers associated with an account. -type AccountIdentifiers struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A list of service identifiers for the identified account. Always includes - // exactly one ACI service identifier and at most one PNI service identifier. - ServiceIdentifiers []*ServiceIdentifier `protobuf:"bytes,1,rep,name=service_identifiers,json=serviceIdentifiers,proto3" json:"service_identifiers,omitempty"` - // The phone number associated with the identified account. May be empty if - // the given account does not have a phone number. - E164 string `protobuf:"bytes,2,opt,name=e164,proto3" json:"e164,omitempty"` - // The username hash (if any) associated with the identified account. May be - // empty if no username is associated with the identified account. - UsernameHash []byte `protobuf:"bytes,3,opt,name=username_hash,json=usernameHash,proto3" json:"username_hash,omitempty"` - // The username link handle UUID associated with the identified account. - // May be empty if no username is associated with the identified account. - UsernameLinkHandle []byte `protobuf:"bytes,4,opt,name=username_link_handle,json=usernameLinkHandle,proto3" json:"username_link_handle,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AccountIdentifiers) Reset() { - *x = AccountIdentifiers{} - mi := &file_org_signal_chat_common_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AccountIdentifiers) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccountIdentifiers) ProtoMessage() {} - -func (x *AccountIdentifiers) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_common_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccountIdentifiers.ProtoReflect.Descriptor instead. -func (*AccountIdentifiers) Descriptor() ([]byte, []int) { - return file_org_signal_chat_common_proto_rawDescGZIP(), []int{1} -} - -func (x *AccountIdentifiers) GetServiceIdentifiers() []*ServiceIdentifier { - if x != nil { - return x.ServiceIdentifiers - } - return nil -} - -func (x *AccountIdentifiers) GetE164() string { - if x != nil { - return x.E164 - } - return "" -} - -func (x *AccountIdentifiers) GetUsernameHash() []byte { - if x != nil { - return x.UsernameHash - } - return nil -} - -func (x *AccountIdentifiers) GetUsernameLinkHandle() []byte { - if x != nil { - return x.UsernameLinkHandle - } - return nil -} - -type EcPreKey struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A locally-unique identifier for this key, which will be provided by - // peers using this key to encrypt messages so the private key can be looked - // up. - KeyId int32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` - // The public key, serialized in libsignal's elliptic-curve public key format. - PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EcPreKey) Reset() { - *x = EcPreKey{} - mi := &file_org_signal_chat_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EcPreKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EcPreKey) ProtoMessage() {} - -func (x *EcPreKey) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_common_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EcPreKey.ProtoReflect.Descriptor instead. -func (*EcPreKey) Descriptor() ([]byte, []int) { - return file_org_signal_chat_common_proto_rawDescGZIP(), []int{2} -} - -func (x *EcPreKey) GetKeyId() int32 { - if x != nil { - return x.KeyId - } - return 0 -} - -func (x *EcPreKey) GetPublicKey() []byte { - if x != nil { - return x.PublicKey - } - return nil -} - -type EcSignedPreKey struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A locally-unique identifier for this key, which will be provided by - // peers using this key to encrypt messages so the private key can be looked - // up. - KeyId int32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` - // The public key, serialized in libsignal's elliptic-curve public key format. - PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // A signature of the public key, verifiable with the identity key for the - // account/identity associated with this pre-key. - Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EcSignedPreKey) Reset() { - *x = EcSignedPreKey{} - mi := &file_org_signal_chat_common_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EcSignedPreKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EcSignedPreKey) ProtoMessage() {} - -func (x *EcSignedPreKey) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_common_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EcSignedPreKey.ProtoReflect.Descriptor instead. -func (*EcSignedPreKey) Descriptor() ([]byte, []int) { - return file_org_signal_chat_common_proto_rawDescGZIP(), []int{3} -} - -func (x *EcSignedPreKey) GetKeyId() int32 { - if x != nil { - return x.KeyId - } - return 0 -} - -func (x *EcSignedPreKey) GetPublicKey() []byte { - if x != nil { - return x.PublicKey - } - return nil -} - -func (x *EcSignedPreKey) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - -type KemSignedPreKey struct { - state protoimpl.MessageState `protogen:"open.v1"` - // An locally-unique identifier for this key, which will be provided by peers - // using this key to encrypt messages so the private key can be looked up. - KeyId int32 `protobuf:"varint,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` - // The public key, serialized in libsignal's Kyber1024 public key format. - PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // A signature of the public key, verifiable with the identity key for the - // account/identity associated with this pre-key. - Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *KemSignedPreKey) Reset() { - *x = KemSignedPreKey{} - mi := &file_org_signal_chat_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *KemSignedPreKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KemSignedPreKey) ProtoMessage() {} - -func (x *KemSignedPreKey) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_common_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KemSignedPreKey.ProtoReflect.Descriptor instead. -func (*KemSignedPreKey) Descriptor() ([]byte, []int) { - return file_org_signal_chat_common_proto_rawDescGZIP(), []int{4} -} - -func (x *KemSignedPreKey) GetKeyId() int32 { - if x != nil { - return x.KeyId - } - return 0 -} - -func (x *KemSignedPreKey) GetPublicKey() []byte { - if x != nil { - return x.PublicKey - } - return nil -} - -func (x *KemSignedPreKey) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - -type ZkCredential struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Day on which this credential can be redeemed, in UTC seconds since epoch - RedemptionTime int64 `protobuf:"varint,1,opt,name=redemption_time,json=redemptionTime,proto3" json:"redemption_time,omitempty"` - // The ZK credential, using libsignal's serialization - Credential []byte `protobuf:"bytes,2,opt,name=credential,proto3" json:"credential,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ZkCredential) Reset() { - *x = ZkCredential{} - mi := &file_org_signal_chat_common_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ZkCredential) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ZkCredential) ProtoMessage() {} - -func (x *ZkCredential) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_common_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ZkCredential.ProtoReflect.Descriptor instead. -func (*ZkCredential) Descriptor() ([]byte, []int) { - return file_org_signal_chat_common_proto_rawDescGZIP(), []int{5} -} - -func (x *ZkCredential) GetRedemptionTime() int64 { - if x != nil { - return x.RedemptionTime - } - return 0 -} - -func (x *ZkCredential) GetCredential() []byte { - if x != nil { - return x.Credential - } - return nil -} - -// An upload location and credentials which may be used to upload an object -// to an external CDN -type UploadForm struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Indicates the CDN type. 3 indicates resumable uploads using TUS - Cdn uint32 `protobuf:"varint,1,opt,name=cdn,proto3" json:"cdn,omitempty"` - // The location within the specified cdn where the finished upload can be found - Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - // A map of headers to include with all upload requests. Potentially contains - // time-limited upload credentials - Headers map[string]string `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // The URL to upload to with the appropriate protocol - SignedUploadLocation string `protobuf:"bytes,4,opt,name=signed_upload_location,json=signedUploadLocation,proto3" json:"signed_upload_location,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UploadForm) Reset() { - *x = UploadForm{} - mi := &file_org_signal_chat_common_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UploadForm) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UploadForm) ProtoMessage() {} - -func (x *UploadForm) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_common_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UploadForm.ProtoReflect.Descriptor instead. -func (*UploadForm) Descriptor() ([]byte, []int) { - return file_org_signal_chat_common_proto_rawDescGZIP(), []int{6} -} - -func (x *UploadForm) GetCdn() uint32 { - if x != nil { - return x.Cdn - } - return 0 -} - -func (x *UploadForm) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *UploadForm) GetHeaders() map[string]string { - if x != nil { - return x.Headers - } - return nil -} - -func (x *UploadForm) GetSignedUploadLocation() string { - if x != nil { - return x.SignedUploadLocation - } - return "" -} - -// An upload location, credentials, and metadata which may be used to upload an -// object to AWS S3 -type S3UploadForm struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The S3 key (i.e. path and filename) for the uploaded file. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // A scoped credential. Includes the AWS access key, date, region targeted, - // and AWS service. - Credential string `protobuf:"bytes,2,opt,name=credential,proto3" json:"credential,omitempty"` - // The type of access control for the uploaded file. - Acl string `protobuf:"bytes,3,opt,name=acl,proto3" json:"acl,omitempty"` - // The algorithm used to calculate a signature on the S3 policy. - Algorithm string `protobuf:"bytes,4,opt,name=algorithm,proto3" json:"algorithm,omitempty"` - // The timestamp (formatted as "yyyyMMdd'T'HHmmssX") at which the S3 policy - // and signature were generated. - Date string `protobuf:"bytes,5,opt,name=date,proto3" json:"date,omitempty"` - // The S3 policy (as a base64-encoded JSON string) used to upload the file. - Policy string `protobuf:"bytes,6,opt,name=policy,proto3" json:"policy,omitempty"` - // A digital signature (formatted as a hex string) on the S3 policy. - Signature string `protobuf:"bytes,7,opt,name=signature,proto3" json:"signature,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *S3UploadForm) Reset() { - *x = S3UploadForm{} - mi := &file_org_signal_chat_common_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *S3UploadForm) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*S3UploadForm) ProtoMessage() {} - -func (x *S3UploadForm) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_common_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use S3UploadForm.ProtoReflect.Descriptor instead. -func (*S3UploadForm) Descriptor() ([]byte, []int) { - return file_org_signal_chat_common_proto_rawDescGZIP(), []int{7} -} - -func (x *S3UploadForm) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *S3UploadForm) GetCredential() string { - if x != nil { - return x.Credential - } - return "" -} - -func (x *S3UploadForm) GetAcl() string { - if x != nil { - return x.Acl - } - return "" -} - -func (x *S3UploadForm) GetAlgorithm() string { - if x != nil { - return x.Algorithm - } - return "" -} - -func (x *S3UploadForm) GetDate() string { - if x != nil { - return x.Date - } - return "" -} - -func (x *S3UploadForm) GetPolicy() string { - if x != nil { - return x.Policy - } - return "" -} - -func (x *S3UploadForm) GetSignature() string { - if x != nil { - return x.Signature - } - return "" -} - -type BadgeSvg struct { - state protoimpl.MessageState `protogen:"open.v1"` - // File name of the scalable vector graphic for light mode. - Light string `protobuf:"bytes,1,opt,name=light,proto3" json:"light,omitempty"` - // File name of the scalable vector graphic for dark mode. - Dark string `protobuf:"bytes,2,opt,name=dark,proto3" json:"dark,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BadgeSvg) Reset() { - *x = BadgeSvg{} - mi := &file_org_signal_chat_common_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BadgeSvg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BadgeSvg) ProtoMessage() {} - -func (x *BadgeSvg) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_common_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BadgeSvg.ProtoReflect.Descriptor instead. -func (*BadgeSvg) Descriptor() ([]byte, []int) { - return file_org_signal_chat_common_proto_rawDescGZIP(), []int{8} -} - -func (x *BadgeSvg) GetLight() string { - if x != nil { - return x.Light - } - return "" -} - -func (x *BadgeSvg) GetDark() string { - if x != nil { - return x.Dark - } - return "" -} - -type Badge struct { - state protoimpl.MessageState `protogen:"open.v1"` - // An ID that uniquely identifies the badge. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The category the badge falls in ("donor" or "other"). - Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"` - // The badge name. - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // The badge description. - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - // Different size badge SVG files. - Sprites6 []string `protobuf:"bytes,5,rep,name=sprites6,proto3" json:"sprites6,omitempty"` - // File name of the scalable vector graphic representing this badge. - Svg string `protobuf:"bytes,6,opt,name=svg,proto3" json:"svg,omitempty"` - // Pairs of light/dark SVG files designed for display at different sizes. - Svgs []*BadgeSvg `protobuf:"bytes,7,rep,name=svgs,proto3" json:"svgs,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Badge) Reset() { - *x = Badge{} - mi := &file_org_signal_chat_common_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Badge) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Badge) ProtoMessage() {} - -func (x *Badge) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_common_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Badge.ProtoReflect.Descriptor instead. -func (*Badge) Descriptor() ([]byte, []int) { - return file_org_signal_chat_common_proto_rawDescGZIP(), []int{9} -} - -func (x *Badge) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Badge) GetCategory() string { - if x != nil { - return x.Category - } - return "" -} - -func (x *Badge) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Badge) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Badge) GetSprites6() []string { - if x != nil { - return x.Sprites6 - } - return nil -} - -func (x *Badge) GetSvg() string { - if x != nil { - return x.Svg - } - return "" -} - -func (x *Badge) GetSvgs() []*BadgeSvg { - if x != nil { - return x.Svgs - } - return nil -} - -var File_org_signal_chat_common_proto protoreflect.FileDescriptor - -const file_org_signal_chat_common_proto_rawDesc = "" + - "\n" + - "\x1corg/signal/chat/common.proto\x12\x16org.signal.chat.common\x1a\x1dorg/signal/chat/require.proto\"\x7f\n" + - "\x11ServiceIdentifier\x12O\n" + - "\ridentity_type\x18\x01 \x01(\x0e2$.org.signal.chat.common.IdentityTypeB\x04\x90\x97\"\x01R\fidentityType\x12\x19\n" + - "\x04uuid\x18\x02 \x01(\fB\x05\xa2\x97\"\x01\x10R\x04uuid\"\xf1\x01\n" + - "\x12AccountIdentifiers\x12Z\n" + - "\x13service_identifiers\x18\x01 \x03(\v2).org.signal.chat.common.ServiceIdentifierR\x12serviceIdentifiers\x12\x18\n" + - "\x04e164\x18\x02 \x01(\tB\x04\xa8\x97\"\x01R\x04e164\x12+\n" + - "\rusername_hash\x18\x03 \x01(\fB\x06\xa2\x97\"\x02\x00 R\fusernameHash\x128\n" + - "\x14username_link_handle\x18\x04 \x01(\fB\x06\xa2\x97\"\x02\x00\x10R\x12usernameLinkHandle\"N\n" + - "\bEcPreKey\x12\x1d\n" + - "\x06key_id\x18\x01 \x01(\x05B\x06\xb2\x97\"\x02\b\x00R\x05keyId\x12#\n" + - "\n" + - "public_key\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\tpublicKey\"x\n" + - "\x0eEcSignedPreKey\x12\x1d\n" + - "\x06key_id\x18\x01 \x01(\x05B\x06\xb2\x97\"\x02\b\x00R\x05keyId\x12#\n" + - "\n" + - "public_key\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\tpublicKey\x12\"\n" + - "\tsignature\x18\x03 \x01(\fB\x04\x88\x97\"\x01R\tsignature\"y\n" + - "\x0fKemSignedPreKey\x12\x1d\n" + - "\x06key_id\x18\x01 \x01(\x05B\x06\xb2\x97\"\x02\b\x00R\x05keyId\x12#\n" + - "\n" + - "public_key\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\tpublicKey\x12\"\n" + - "\tsignature\x18\x03 \x01(\fB\x04\x88\x97\"\x01R\tsignature\"]\n" + - "\fZkCredential\x12'\n" + - "\x0fredemption_time\x18\x01 \x01(\x03R\x0eredemptionTime\x12$\n" + - "\n" + - "credential\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\n" + - "credential\"\xed\x01\n" + - "\n" + - "UploadForm\x12\x10\n" + - "\x03cdn\x18\x01 \x01(\rR\x03cdn\x12\x10\n" + - "\x03key\x18\x02 \x01(\tR\x03key\x12I\n" + - "\aheaders\x18\x03 \x03(\v2/.org.signal.chat.common.UploadForm.HeadersEntryR\aheaders\x124\n" + - "\x16signed_upload_location\x18\x04 \x01(\tR\x14signedUploadLocation\x1a:\n" + - "\fHeadersEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xba\x01\n" + - "\fS3UploadForm\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x1e\n" + - "\n" + - "credential\x18\x02 \x01(\tR\n" + - "credential\x12\x10\n" + - "\x03acl\x18\x03 \x01(\tR\x03acl\x12\x1c\n" + - "\talgorithm\x18\x04 \x01(\tR\talgorithm\x12\x12\n" + - "\x04date\x18\x05 \x01(\tR\x04date\x12\x16\n" + - "\x06policy\x18\x06 \x01(\tR\x06policy\x12\x1c\n" + - "\tsignature\x18\a \x01(\tR\tsignature\"4\n" + - "\bBadgeSvg\x12\x14\n" + - "\x05light\x18\x01 \x01(\tR\x05light\x12\x12\n" + - "\x04dark\x18\x02 \x01(\tR\x04dark\"\xcd\x01\n" + - "\x05Badge\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" + - "\bcategory\x18\x02 \x01(\tR\bcategory\x12\x12\n" + - "\x04name\x18\x03 \x01(\tR\x04name\x12 \n" + - "\vdescription\x18\x04 \x01(\tR\vdescription\x12\x1a\n" + - "\bsprites6\x18\x05 \x03(\tR\bsprites6\x12\x10\n" + - "\x03svg\x18\x06 \x01(\tR\x03svg\x124\n" + - "\x04svgs\x18\a \x03(\v2 .org.signal.chat.common.BadgeSvgR\x04svgs*[\n" + - "\fIdentityType\x12\x1d\n" + - "\x19IDENTITY_TYPE_UNSPECIFIED\x10\x00\x12\x15\n" + - "\x11IDENTITY_TYPE_ACI\x10\x01\x12\x15\n" + - "\x11IDENTITY_TYPE_PNI\x10\x02*\xe8\x02\n" + - "\x10DeviceCapability\x12!\n" + - "\x1dDEVICE_CAPABILITY_UNSPECIFIED\x10\x00\x12\x1d\n" + - "\x19DEVICE_CAPABILITY_STORAGE\x10\x01\x12\x1e\n" + - "\x1aDEVICE_CAPABILITY_TRANSFER\x10\x02\x12)\n" + - "%DEVICE_CAPABILITY_ATTACHMENT_BACKFILL\x10\x06\x121\n" + - "-DEVICE_CAPABILITY_SPARSE_POST_QUANTUM_RATCHET\x10\a\x12!\n" + - "\x1dDEVICE_CAPABILITY_PROFILES_V2\x10\b\x122\n" + - ".DEVICE_CAPABILITY_USERNAME_CHANGE_SYNC_MESSAGE\x10\t\x12+\n" + - "'DEVICE_CAPABILITY_OPTIONAL_PHONE_NUMBER\x10\n" + - "\"\x04\b\x03\x10\x03\"\x04\b\x04\x10\x04\"\x04\b\x05\x10\x05B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_common_proto_rawDescOnce sync.Once - file_org_signal_chat_common_proto_rawDescData []byte -) - -func file_org_signal_chat_common_proto_rawDescGZIP() []byte { - file_org_signal_chat_common_proto_rawDescOnce.Do(func() { - file_org_signal_chat_common_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_common_proto_rawDesc), len(file_org_signal_chat_common_proto_rawDesc))) - }) - return file_org_signal_chat_common_proto_rawDescData -} - -var file_org_signal_chat_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_org_signal_chat_common_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_org_signal_chat_common_proto_goTypes = []any{ - (IdentityType)(0), // 0: org.signal.chat.common.IdentityType - (DeviceCapability)(0), // 1: org.signal.chat.common.DeviceCapability - (*ServiceIdentifier)(nil), // 2: org.signal.chat.common.ServiceIdentifier - (*AccountIdentifiers)(nil), // 3: org.signal.chat.common.AccountIdentifiers - (*EcPreKey)(nil), // 4: org.signal.chat.common.EcPreKey - (*EcSignedPreKey)(nil), // 5: org.signal.chat.common.EcSignedPreKey - (*KemSignedPreKey)(nil), // 6: org.signal.chat.common.KemSignedPreKey - (*ZkCredential)(nil), // 7: org.signal.chat.common.ZkCredential - (*UploadForm)(nil), // 8: org.signal.chat.common.UploadForm - (*S3UploadForm)(nil), // 9: org.signal.chat.common.S3UploadForm - (*BadgeSvg)(nil), // 10: org.signal.chat.common.BadgeSvg - (*Badge)(nil), // 11: org.signal.chat.common.Badge - nil, // 12: org.signal.chat.common.UploadForm.HeadersEntry -} -var file_org_signal_chat_common_proto_depIdxs = []int32{ - 0, // 0: org.signal.chat.common.ServiceIdentifier.identity_type:type_name -> org.signal.chat.common.IdentityType - 2, // 1: org.signal.chat.common.AccountIdentifiers.service_identifiers:type_name -> org.signal.chat.common.ServiceIdentifier - 12, // 2: org.signal.chat.common.UploadForm.headers:type_name -> org.signal.chat.common.UploadForm.HeadersEntry - 10, // 3: org.signal.chat.common.Badge.svgs:type_name -> org.signal.chat.common.BadgeSvg - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_common_proto_init() } -func file_org_signal_chat_common_proto_init() { - if File_org_signal_chat_common_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_common_proto_rawDesc), len(file_org_signal_chat_common_proto_rawDesc)), - NumEnums: 2, - NumMessages: 11, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_org_signal_chat_common_proto_goTypes, - DependencyIndexes: file_org_signal_chat_common_proto_depIdxs, - EnumInfos: file_org_signal_chat_common_proto_enumTypes, - MessageInfos: file_org_signal_chat_common_proto_msgTypes, - }.Build() - File_org_signal_chat_common_proto = out.File - file_org_signal_chat_common_proto_goTypes = nil - file_org_signal_chat_common_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/credentials/credentials.pb.go b/pkg/signalmeow/protobuf/rpc/credentials/credentials.pb.go deleted file mode 100644 index 569347f..0000000 --- a/pkg/signalmeow/protobuf/rpc/credentials/credentials.pb.go +++ /dev/null @@ -1,855 +0,0 @@ -// -// Copyright 2023 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/credentials.proto - -package credentials - -import ( - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ExternalServiceType int32 - -const ( - ExternalServiceType_EXTERNAL_SERVICE_TYPE_UNSPECIFIED ExternalServiceType = 0 - ExternalServiceType_EXTERNAL_SERVICE_TYPE_DIRECTORY ExternalServiceType = 1 - ExternalServiceType_EXTERNAL_SERVICE_TYPE_PAYMENTS ExternalServiceType = 2 - ExternalServiceType_EXTERNAL_SERVICE_TYPE_STORAGE ExternalServiceType = 3 - ExternalServiceType_EXTERNAL_SERVICE_TYPE_SVR ExternalServiceType = 4 -) - -// Enum value maps for ExternalServiceType. -var ( - ExternalServiceType_name = map[int32]string{ - 0: "EXTERNAL_SERVICE_TYPE_UNSPECIFIED", - 1: "EXTERNAL_SERVICE_TYPE_DIRECTORY", - 2: "EXTERNAL_SERVICE_TYPE_PAYMENTS", - 3: "EXTERNAL_SERVICE_TYPE_STORAGE", - 4: "EXTERNAL_SERVICE_TYPE_SVR", - } - ExternalServiceType_value = map[string]int32{ - "EXTERNAL_SERVICE_TYPE_UNSPECIFIED": 0, - "EXTERNAL_SERVICE_TYPE_DIRECTORY": 1, - "EXTERNAL_SERVICE_TYPE_PAYMENTS": 2, - "EXTERNAL_SERVICE_TYPE_STORAGE": 3, - "EXTERNAL_SERVICE_TYPE_SVR": 4, - } -) - -func (x ExternalServiceType) Enum() *ExternalServiceType { - p := new(ExternalServiceType) - *p = x - return p -} - -func (x ExternalServiceType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ExternalServiceType) Descriptor() protoreflect.EnumDescriptor { - return file_org_signal_chat_credentials_proto_enumTypes[0].Descriptor() -} - -func (ExternalServiceType) Type() protoreflect.EnumType { - return &file_org_signal_chat_credentials_proto_enumTypes[0] -} - -func (x ExternalServiceType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ExternalServiceType.Descriptor instead. -func (ExternalServiceType) EnumDescriptor() ([]byte, []int) { - return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{0} -} - -type AuthCheckResult int32 - -const ( - AuthCheckResult_AUTH_CHECK_RESULT_UNSPECIFIED AuthCheckResult = 0 - // The credentials could be used to make a call to SVR service by the user - // associated with the `CheckSvrCredentialsRequest.number` phone number. - AuthCheckResult_AUTH_CHECK_RESULT_MATCH AuthCheckResult = 1 - // The credentials were generated by a different user. - AuthCheckResult_AUTH_CHECK_RESULT_NO_MATCH AuthCheckResult = 2 - // This status indicates that the corresponding credentials token should no longer be used. - // This may be because it has expired or invalid, but it can also mean that there is a more - // recent token in the request which should be used instead. - AuthCheckResult_AUTH_CHECK_RESULT_INVALID AuthCheckResult = 3 -) - -// Enum value maps for AuthCheckResult. -var ( - AuthCheckResult_name = map[int32]string{ - 0: "AUTH_CHECK_RESULT_UNSPECIFIED", - 1: "AUTH_CHECK_RESULT_MATCH", - 2: "AUTH_CHECK_RESULT_NO_MATCH", - 3: "AUTH_CHECK_RESULT_INVALID", - } - AuthCheckResult_value = map[string]int32{ - "AUTH_CHECK_RESULT_UNSPECIFIED": 0, - "AUTH_CHECK_RESULT_MATCH": 1, - "AUTH_CHECK_RESULT_NO_MATCH": 2, - "AUTH_CHECK_RESULT_INVALID": 3, - } -) - -func (x AuthCheckResult) Enum() *AuthCheckResult { - p := new(AuthCheckResult) - *p = x - return p -} - -func (x AuthCheckResult) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AuthCheckResult) Descriptor() protoreflect.EnumDescriptor { - return file_org_signal_chat_credentials_proto_enumTypes[1].Descriptor() -} - -func (AuthCheckResult) Type() protoreflect.EnumType { - return &file_org_signal_chat_credentials_proto_enumTypes[1] -} - -func (x AuthCheckResult) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AuthCheckResult.Descriptor instead. -func (AuthCheckResult) EnumDescriptor() ([]byte, []int) { - return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{1} -} - -type GetExternalServiceCredentialsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A service to request credentials for. - ExternalService ExternalServiceType `protobuf:"varint,1,opt,name=externalService,proto3,enum=org.signal.chat.credentials.ExternalServiceType" json:"externalService,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetExternalServiceCredentialsRequest) Reset() { - *x = GetExternalServiceCredentialsRequest{} - mi := &file_org_signal_chat_credentials_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetExternalServiceCredentialsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetExternalServiceCredentialsRequest) ProtoMessage() {} - -func (x *GetExternalServiceCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_credentials_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetExternalServiceCredentialsRequest.ProtoReflect.Descriptor instead. -func (*GetExternalServiceCredentialsRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{0} -} - -func (x *GetExternalServiceCredentialsRequest) GetExternalService() ExternalServiceType { - if x != nil { - return x.ExternalService - } - return ExternalServiceType_EXTERNAL_SERVICE_TYPE_UNSPECIFIED -} - -type GetExternalServiceCredentialsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A username that can be presented to authenticate with the external service. - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - // A password that can be presented to authenticate with the external service. - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetExternalServiceCredentialsResponse) Reset() { - *x = GetExternalServiceCredentialsResponse{} - mi := &file_org_signal_chat_credentials_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetExternalServiceCredentialsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetExternalServiceCredentialsResponse) ProtoMessage() {} - -func (x *GetExternalServiceCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_credentials_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetExternalServiceCredentialsResponse.ProtoReflect.Descriptor instead. -func (*GetExternalServiceCredentialsResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{1} -} - -func (x *GetExternalServiceCredentialsResponse) GetUsername() string { - if x != nil { - return x.Username - } - return "" -} - -func (x *GetExternalServiceCredentialsResponse) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -type CheckSvrCredentialsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A phone number in the E164 format to check the passwords against. - // Only passwords generated for the user associated with the given number will be marked as `AUTH_CHECK_RESULT_MATCH`. - Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"` - // A list of credentials from previously made calls to `ExternalServiceCredentials.GetExternalServiceCredentials()` - // for `EXTERNAL_SERVICE_TYPE_SVR`. This list may contain credentials generated by different users. Up to 10 credentials - // can be checked. - Passwords []string `protobuf:"bytes,2,rep,name=passwords,proto3" json:"passwords,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CheckSvrCredentialsRequest) Reset() { - *x = CheckSvrCredentialsRequest{} - mi := &file_org_signal_chat_credentials_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CheckSvrCredentialsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckSvrCredentialsRequest) ProtoMessage() {} - -func (x *CheckSvrCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_credentials_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckSvrCredentialsRequest.ProtoReflect.Descriptor instead. -func (*CheckSvrCredentialsRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{2} -} - -func (x *CheckSvrCredentialsRequest) GetNumber() string { - if x != nil { - return x.Number - } - return "" -} - -func (x *CheckSvrCredentialsRequest) GetPasswords() []string { - if x != nil { - return x.Passwords - } - return nil -} - -// For each of the credentials tokens in the `CheckSvrCredentialsRequest` contains the result of the check. -type CheckSvrCredentialsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Matches map[string]AuthCheckResult `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=org.signal.chat.credentials.AuthCheckResult"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CheckSvrCredentialsResponse) Reset() { - *x = CheckSvrCredentialsResponse{} - mi := &file_org_signal_chat_credentials_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CheckSvrCredentialsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckSvrCredentialsResponse) ProtoMessage() {} - -func (x *CheckSvrCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_credentials_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckSvrCredentialsResponse.ProtoReflect.Descriptor instead. -func (*CheckSvrCredentialsResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{3} -} - -func (x *CheckSvrCredentialsResponse) GetMatches() map[string]AuthCheckResult { - if x != nil { - return x.Matches - } - return nil -} - -type GetDeliveryCertificateRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetDeliveryCertificateRequest) Reset() { - *x = GetDeliveryCertificateRequest{} - mi := &file_org_signal_chat_credentials_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetDeliveryCertificateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDeliveryCertificateRequest) ProtoMessage() {} - -func (x *GetDeliveryCertificateRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_credentials_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetDeliveryCertificateRequest.ProtoReflect.Descriptor instead. -func (*GetDeliveryCertificateRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{4} -} - -// A pair of message delivery certificates. The response unconditionally -// includes certificates with and without the caller's phone number so the -// server never learns anything about the caller's intent to share their phone -// number with their contacts. -type GetDeliveryCertificateResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A delivery receipt that includes the caller's phone number; may be empty if - // the authenticated account does not have a phone number - CertificateWithE164 []byte `protobuf:"bytes,1,opt,name=certificate_with_e164,json=certificateWithE164,proto3" json:"certificate_with_e164,omitempty"` - // A delivery receipt that does not include the caller's phone number - CertificateWithoutE164 []byte `protobuf:"bytes,2,opt,name=certificate_without_e164,json=certificateWithoutE164,proto3" json:"certificate_without_e164,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetDeliveryCertificateResponse) Reset() { - *x = GetDeliveryCertificateResponse{} - mi := &file_org_signal_chat_credentials_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetDeliveryCertificateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDeliveryCertificateResponse) ProtoMessage() {} - -func (x *GetDeliveryCertificateResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_credentials_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetDeliveryCertificateResponse.ProtoReflect.Descriptor instead. -func (*GetDeliveryCertificateResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{5} -} - -func (x *GetDeliveryCertificateResponse) GetCertificateWithE164() []byte { - if x != nil { - return x.CertificateWithE164 - } - return nil -} - -func (x *GetDeliveryCertificateResponse) GetCertificateWithoutE164() []byte { - if x != nil { - return x.CertificateWithoutE164 - } - return nil -} - -type GetGroupCredentialsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The earliest time for which to issue group credentials; must be aligned to - // a UTC day boundary and may be no more than one day in the past at the time - // of the call. - RedemptionStartSeconds uint64 `protobuf:"varint,1,opt,name=redemption_start_seconds,json=redemptionStartSeconds,proto3" json:"redemption_start_seconds,omitempty"` - // The latest time for which to issue group credentials; must be aligned to a - // UTC day boundary and no more than seven days in the future at the time of - // the call. - RedemptionEndSeconds uint64 `protobuf:"varint,2,opt,name=redemption_end_seconds,json=redemptionEndSeconds,proto3" json:"redemption_end_seconds,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetGroupCredentialsRequest) Reset() { - *x = GetGroupCredentialsRequest{} - mi := &file_org_signal_chat_credentials_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetGroupCredentialsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupCredentialsRequest) ProtoMessage() {} - -func (x *GetGroupCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_credentials_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetGroupCredentialsRequest.ProtoReflect.Descriptor instead. -func (*GetGroupCredentialsRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{6} -} - -func (x *GetGroupCredentialsRequest) GetRedemptionStartSeconds() uint64 { - if x != nil { - return x.RedemptionStartSeconds - } - return 0 -} - -func (x *GetGroupCredentialsRequest) GetRedemptionEndSeconds() uint64 { - if x != nil { - return x.RedemptionEndSeconds - } - return 0 -} - -type GetGroupCredentialsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A collection of credentials allowing the holder to anonymously - // authenticate themselves for group-related actions - GroupCredentials []*GetGroupCredentialsResponse_CredentialAndRedemptionTime `protobuf:"bytes,1,rep,name=group_credentials,json=groupCredentials,proto3" json:"group_credentials,omitempty"` - // A collection of credentials allowing the holder to read, update, and delete - // group call links - CallLinkAuthCredentials []*GetGroupCredentialsResponse_CredentialAndRedemptionTime `protobuf:"bytes,2,rep,name=call_link_auth_credentials,json=callLinkAuthCredentials,proto3" json:"call_link_auth_credentials,omitempty"` - // The phone number identifier for which the included credentials were - // generated. Empty if the account does not have a phone number. - Pni []byte `protobuf:"bytes,3,opt,name=pni,proto3" json:"pni,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetGroupCredentialsResponse) Reset() { - *x = GetGroupCredentialsResponse{} - mi := &file_org_signal_chat_credentials_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetGroupCredentialsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupCredentialsResponse) ProtoMessage() {} - -func (x *GetGroupCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_credentials_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetGroupCredentialsResponse.ProtoReflect.Descriptor instead. -func (*GetGroupCredentialsResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{7} -} - -func (x *GetGroupCredentialsResponse) GetGroupCredentials() []*GetGroupCredentialsResponse_CredentialAndRedemptionTime { - if x != nil { - return x.GroupCredentials - } - return nil -} - -func (x *GetGroupCredentialsResponse) GetCallLinkAuthCredentials() []*GetGroupCredentialsResponse_CredentialAndRedemptionTime { - if x != nil { - return x.CallLinkAuthCredentials - } - return nil -} - -func (x *GetGroupCredentialsResponse) GetPni() []byte { - if x != nil { - return x.Pni - } - return nil -} - -type GetCreateCallLinkCredentialsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A zero-knowledge credential request - CredentialRequest []byte `protobuf:"bytes,1,opt,name=credential_request,json=credentialRequest,proto3" json:"credential_request,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCreateCallLinkCredentialsRequest) Reset() { - *x = GetCreateCallLinkCredentialsRequest{} - mi := &file_org_signal_chat_credentials_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCreateCallLinkCredentialsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCreateCallLinkCredentialsRequest) ProtoMessage() {} - -func (x *GetCreateCallLinkCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_credentials_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCreateCallLinkCredentialsRequest.ProtoReflect.Descriptor instead. -func (*GetCreateCallLinkCredentialsRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{8} -} - -func (x *GetCreateCallLinkCredentialsRequest) GetCredentialRequest() []byte { - if x != nil { - return x.CredentialRequest - } - return nil -} - -type GetCreateCallLinkCredentialsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A zero-knowledge credential that may be redeemed at or up to one day after - // the given redemption time - Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` - // The earliest time, in seconds since the epoch, at which the associated - // credential may be redeemed - RedemptionTimeSeconds uint64 `protobuf:"varint,2,opt,name=redemption_time_seconds,json=redemptionTimeSeconds,proto3" json:"redemption_time_seconds,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCreateCallLinkCredentialsResponse) Reset() { - *x = GetCreateCallLinkCredentialsResponse{} - mi := &file_org_signal_chat_credentials_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCreateCallLinkCredentialsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCreateCallLinkCredentialsResponse) ProtoMessage() {} - -func (x *GetCreateCallLinkCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_credentials_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCreateCallLinkCredentialsResponse.ProtoReflect.Descriptor instead. -func (*GetCreateCallLinkCredentialsResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{9} -} - -func (x *GetCreateCallLinkCredentialsResponse) GetCredential() []byte { - if x != nil { - return x.Credential - } - return nil -} - -func (x *GetCreateCallLinkCredentialsResponse) GetRedemptionTimeSeconds() uint64 { - if x != nil { - return x.RedemptionTimeSeconds - } - return 0 -} - -// A zero-knowledge credential that may be redeemed at or up to one day after -// the given redemption time -type GetGroupCredentialsResponse_CredentialAndRedemptionTime struct { - state protoimpl.MessageState `protogen:"open.v1"` - Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` - RedemptionTimeSeconds uint64 `protobuf:"varint,2,opt,name=redemption_time_seconds,json=redemptionTimeSeconds,proto3" json:"redemption_time_seconds,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetGroupCredentialsResponse_CredentialAndRedemptionTime) Reset() { - *x = GetGroupCredentialsResponse_CredentialAndRedemptionTime{} - mi := &file_org_signal_chat_credentials_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetGroupCredentialsResponse_CredentialAndRedemptionTime) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupCredentialsResponse_CredentialAndRedemptionTime) ProtoMessage() {} - -func (x *GetGroupCredentialsResponse_CredentialAndRedemptionTime) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_credentials_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetGroupCredentialsResponse_CredentialAndRedemptionTime.ProtoReflect.Descriptor instead. -func (*GetGroupCredentialsResponse_CredentialAndRedemptionTime) Descriptor() ([]byte, []int) { - return file_org_signal_chat_credentials_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *GetGroupCredentialsResponse_CredentialAndRedemptionTime) GetCredential() []byte { - if x != nil { - return x.Credential - } - return nil -} - -func (x *GetGroupCredentialsResponse_CredentialAndRedemptionTime) GetRedemptionTimeSeconds() uint64 { - if x != nil { - return x.RedemptionTimeSeconds - } - return 0 -} - -var File_org_signal_chat_credentials_proto protoreflect.FileDescriptor - -const file_org_signal_chat_credentials_proto_rawDesc = "" + - "\n" + - "!org/signal/chat/credentials.proto\x12\x1borg.signal.chat.credentials\x1a\x1dorg/signal/chat/require.proto\"\x82\x01\n" + - "$GetExternalServiceCredentialsRequest\x12Z\n" + - "\x0fexternalService\x18\x01 \x01(\x0e20.org.signal.chat.credentials.ExternalServiceTypeR\x0fexternalService\"_\n" + - "%GetExternalServiceCredentialsResponse\x12\x1a\n" + - "\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" + - "\bpassword\x18\x02 \x01(\tR\bpassword\"^\n" + - "\x1aCheckSvrCredentialsRequest\x12\x16\n" + - "\x06number\x18\x01 \x01(\tR\x06number\x12(\n" + - "\tpasswords\x18\x02 \x03(\tB\n" + - "\x88\x97\"\x01\x9a\x97\"\x02\x10\n" + - "R\tpasswords\"\xe8\x01\n" + - "\x1bCheckSvrCredentialsResponse\x12_\n" + - "\amatches\x18\x01 \x03(\v2E.org.signal.chat.credentials.CheckSvrCredentialsResponse.MatchesEntryR\amatches\x1ah\n" + - "\fMatchesEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12B\n" + - "\x05value\x18\x02 \x01(\x0e2,.org.signal.chat.credentials.AuthCheckResultR\x05value:\x028\x01\"\x1f\n" + - "\x1dGetDeliveryCertificateRequest\"\x8e\x01\n" + - "\x1eGetDeliveryCertificateResponse\x122\n" + - "\x15certificate_with_e164\x18\x01 \x01(\fR\x13certificateWithE164\x128\n" + - "\x18certificate_without_e164\x18\x02 \x01(\fR\x16certificateWithoutE164\"\x8c\x01\n" + - "\x1aGetGroupCredentialsRequest\x128\n" + - "\x18redemption_start_seconds\x18\x01 \x01(\x04R\x16redemptionStartSeconds\x124\n" + - "\x16redemption_end_seconds\x18\x02 \x01(\x04R\x14redemptionEndSeconds\"\xbe\x03\n" + - "\x1bGetGroupCredentialsResponse\x12\x81\x01\n" + - "\x11group_credentials\x18\x01 \x03(\v2T.org.signal.chat.credentials.GetGroupCredentialsResponse.CredentialAndRedemptionTimeR\x10groupCredentials\x12\x91\x01\n" + - "\x1acall_link_auth_credentials\x18\x02 \x03(\v2T.org.signal.chat.credentials.GetGroupCredentialsResponse.CredentialAndRedemptionTimeR\x17callLinkAuthCredentials\x12\x10\n" + - "\x03pni\x18\x03 \x01(\fR\x03pni\x1au\n" + - "\x1bCredentialAndRedemptionTime\x12\x1e\n" + - "\n" + - "credential\x18\x01 \x01(\fR\n" + - "credential\x126\n" + - "\x17redemption_time_seconds\x18\x02 \x01(\x04R\x15redemptionTimeSeconds\"T\n" + - "#GetCreateCallLinkCredentialsRequest\x12-\n" + - "\x12credential_request\x18\x01 \x01(\fR\x11credentialRequest\"~\n" + - "$GetCreateCallLinkCredentialsResponse\x12\x1e\n" + - "\n" + - "credential\x18\x01 \x01(\fR\n" + - "credential\x126\n" + - "\x17redemption_time_seconds\x18\x02 \x01(\x04R\x15redemptionTimeSeconds*\xc7\x01\n" + - "\x13ExternalServiceType\x12%\n" + - "!EXTERNAL_SERVICE_TYPE_UNSPECIFIED\x10\x00\x12#\n" + - "\x1fEXTERNAL_SERVICE_TYPE_DIRECTORY\x10\x01\x12\"\n" + - "\x1eEXTERNAL_SERVICE_TYPE_PAYMENTS\x10\x02\x12!\n" + - "\x1dEXTERNAL_SERVICE_TYPE_STORAGE\x10\x03\x12\x1d\n" + - "\x19EXTERNAL_SERVICE_TYPE_SVR\x10\x04*\x90\x01\n" + - "\x0fAuthCheckResult\x12!\n" + - "\x1dAUTH_CHECK_RESULT_UNSPECIFIED\x10\x00\x12\x1b\n" + - "\x17AUTH_CHECK_RESULT_MATCH\x10\x01\x12\x1e\n" + - "\x1aAUTH_CHECK_RESULT_NO_MATCH\x10\x02\x12\x1d\n" + - "\x19AUTH_CHECK_RESULT_INVALID\x10\x032\x89\x05\n" + - "\vCredentials\x12\xa8\x01\n" + - "\x1dGetExternalServiceCredentials\x12A.org.signal.chat.credentials.GetExternalServiceCredentialsRequest\x1aB.org.signal.chat.credentials.GetExternalServiceCredentialsResponse\"\x00\x12\x93\x01\n" + - "\x16GetDeliveryCertificate\x12:.org.signal.chat.credentials.GetDeliveryCertificateRequest\x1a;.org.signal.chat.credentials.GetDeliveryCertificateResponse\"\x00\x12\x8a\x01\n" + - "\x13GetGroupCredentials\x127.org.signal.chat.credentials.GetGroupCredentialsRequest\x1a8.org.signal.chat.credentials.GetGroupCredentialsResponse\"\x00\x12\xa5\x01\n" + - "\x1cGetCreateCallLinkCredentials\x12@.org.signal.chat.credentials.GetCreateCallLinkCredentialsRequest\x1aA.org.signal.chat.credentials.GetCreateCallLinkCredentialsResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xa9\x01\n" + - "\x14CredentialsAnonymous\x12\x8a\x01\n" + - "\x13CheckSvrCredentials\x127.org.signal.chat.credentials.CheckSvrCredentialsRequest\x1a8.org.signal.chat.credentials.CheckSvrCredentialsResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_credentials_proto_rawDescOnce sync.Once - file_org_signal_chat_credentials_proto_rawDescData []byte -) - -func file_org_signal_chat_credentials_proto_rawDescGZIP() []byte { - file_org_signal_chat_credentials_proto_rawDescOnce.Do(func() { - file_org_signal_chat_credentials_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_credentials_proto_rawDesc), len(file_org_signal_chat_credentials_proto_rawDesc))) - }) - return file_org_signal_chat_credentials_proto_rawDescData -} - -var file_org_signal_chat_credentials_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_org_signal_chat_credentials_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_org_signal_chat_credentials_proto_goTypes = []any{ - (ExternalServiceType)(0), // 0: org.signal.chat.credentials.ExternalServiceType - (AuthCheckResult)(0), // 1: org.signal.chat.credentials.AuthCheckResult - (*GetExternalServiceCredentialsRequest)(nil), // 2: org.signal.chat.credentials.GetExternalServiceCredentialsRequest - (*GetExternalServiceCredentialsResponse)(nil), // 3: org.signal.chat.credentials.GetExternalServiceCredentialsResponse - (*CheckSvrCredentialsRequest)(nil), // 4: org.signal.chat.credentials.CheckSvrCredentialsRequest - (*CheckSvrCredentialsResponse)(nil), // 5: org.signal.chat.credentials.CheckSvrCredentialsResponse - (*GetDeliveryCertificateRequest)(nil), // 6: org.signal.chat.credentials.GetDeliveryCertificateRequest - (*GetDeliveryCertificateResponse)(nil), // 7: org.signal.chat.credentials.GetDeliveryCertificateResponse - (*GetGroupCredentialsRequest)(nil), // 8: org.signal.chat.credentials.GetGroupCredentialsRequest - (*GetGroupCredentialsResponse)(nil), // 9: org.signal.chat.credentials.GetGroupCredentialsResponse - (*GetCreateCallLinkCredentialsRequest)(nil), // 10: org.signal.chat.credentials.GetCreateCallLinkCredentialsRequest - (*GetCreateCallLinkCredentialsResponse)(nil), // 11: org.signal.chat.credentials.GetCreateCallLinkCredentialsResponse - nil, // 12: org.signal.chat.credentials.CheckSvrCredentialsResponse.MatchesEntry - (*GetGroupCredentialsResponse_CredentialAndRedemptionTime)(nil), // 13: org.signal.chat.credentials.GetGroupCredentialsResponse.CredentialAndRedemptionTime -} -var file_org_signal_chat_credentials_proto_depIdxs = []int32{ - 0, // 0: org.signal.chat.credentials.GetExternalServiceCredentialsRequest.externalService:type_name -> org.signal.chat.credentials.ExternalServiceType - 12, // 1: org.signal.chat.credentials.CheckSvrCredentialsResponse.matches:type_name -> org.signal.chat.credentials.CheckSvrCredentialsResponse.MatchesEntry - 13, // 2: org.signal.chat.credentials.GetGroupCredentialsResponse.group_credentials:type_name -> org.signal.chat.credentials.GetGroupCredentialsResponse.CredentialAndRedemptionTime - 13, // 3: org.signal.chat.credentials.GetGroupCredentialsResponse.call_link_auth_credentials:type_name -> org.signal.chat.credentials.GetGroupCredentialsResponse.CredentialAndRedemptionTime - 1, // 4: org.signal.chat.credentials.CheckSvrCredentialsResponse.MatchesEntry.value:type_name -> org.signal.chat.credentials.AuthCheckResult - 2, // 5: org.signal.chat.credentials.Credentials.GetExternalServiceCredentials:input_type -> org.signal.chat.credentials.GetExternalServiceCredentialsRequest - 6, // 6: org.signal.chat.credentials.Credentials.GetDeliveryCertificate:input_type -> org.signal.chat.credentials.GetDeliveryCertificateRequest - 8, // 7: org.signal.chat.credentials.Credentials.GetGroupCredentials:input_type -> org.signal.chat.credentials.GetGroupCredentialsRequest - 10, // 8: org.signal.chat.credentials.Credentials.GetCreateCallLinkCredentials:input_type -> org.signal.chat.credentials.GetCreateCallLinkCredentialsRequest - 4, // 9: org.signal.chat.credentials.CredentialsAnonymous.CheckSvrCredentials:input_type -> org.signal.chat.credentials.CheckSvrCredentialsRequest - 3, // 10: org.signal.chat.credentials.Credentials.GetExternalServiceCredentials:output_type -> org.signal.chat.credentials.GetExternalServiceCredentialsResponse - 7, // 11: org.signal.chat.credentials.Credentials.GetDeliveryCertificate:output_type -> org.signal.chat.credentials.GetDeliveryCertificateResponse - 9, // 12: org.signal.chat.credentials.Credentials.GetGroupCredentials:output_type -> org.signal.chat.credentials.GetGroupCredentialsResponse - 11, // 13: org.signal.chat.credentials.Credentials.GetCreateCallLinkCredentials:output_type -> org.signal.chat.credentials.GetCreateCallLinkCredentialsResponse - 5, // 14: org.signal.chat.credentials.CredentialsAnonymous.CheckSvrCredentials:output_type -> org.signal.chat.credentials.CheckSvrCredentialsResponse - 10, // [10:15] is the sub-list for method output_type - 5, // [5:10] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_credentials_proto_init() } -func file_org_signal_chat_credentials_proto_init() { - if File_org_signal_chat_credentials_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_credentials_proto_rawDesc), len(file_org_signal_chat_credentials_proto_rawDesc)), - NumEnums: 2, - NumMessages: 12, - NumExtensions: 0, - NumServices: 2, - }, - GoTypes: file_org_signal_chat_credentials_proto_goTypes, - DependencyIndexes: file_org_signal_chat_credentials_proto_depIdxs, - EnumInfos: file_org_signal_chat_credentials_proto_enumTypes, - MessageInfos: file_org_signal_chat_credentials_proto_msgTypes, - }.Build() - File_org_signal_chat_credentials_proto = out.File - file_org_signal_chat_credentials_proto_goTypes = nil - file_org_signal_chat_credentials_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/credentials/credentials_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/credentials/credentials_grpc.pb.go deleted file mode 100644 index c7934c0..0000000 --- a/pkg/signalmeow/protobuf/rpc/credentials/credentials_grpc.pb.go +++ /dev/null @@ -1,377 +0,0 @@ -// -// Copyright 2023 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/credentials.proto - -package credentials - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Credentials_GetExternalServiceCredentials_FullMethodName = "/org.signal.chat.credentials.Credentials/GetExternalServiceCredentials" - Credentials_GetDeliveryCertificate_FullMethodName = "/org.signal.chat.credentials.Credentials/GetDeliveryCertificate" - Credentials_GetGroupCredentials_FullMethodName = "/org.signal.chat.credentials.Credentials/GetGroupCredentials" - Credentials_GetCreateCallLinkCredentials_FullMethodName = "/org.signal.chat.credentials.Credentials/GetCreateCallLinkCredentials" -) - -// CredentialsClient is the client API for Credentials service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Provides methods for obtaining and verifying credentials that allow an -// authenticated user to authenticate in another service or context without -// revealing their identity. -type CredentialsClient interface { - // Generates and returns an external service credentials for the caller. - GetExternalServiceCredentials(ctx context.Context, in *GetExternalServiceCredentialsRequest, opts ...grpc.CallOption) (*GetExternalServiceCredentialsResponse, error) - // Generates a pair of delivery certificates that the holder can include to - // identify themselves to a message recipient (but not the server) in a - // sealed-sender message. - GetDeliveryCertificate(ctx context.Context, in *GetDeliveryCertificateRequest, opts ...grpc.CallOption) (*GetDeliveryCertificateResponse, error) - // Generates a set of zero-knowledge credentials for various group-related - // actions. - GetGroupCredentials(ctx context.Context, in *GetGroupCredentialsRequest, opts ...grpc.CallOption) (*GetGroupCredentialsResponse, error) - // Generates zero-knowledge credentials for creating call links. - GetCreateCallLinkCredentials(ctx context.Context, in *GetCreateCallLinkCredentialsRequest, opts ...grpc.CallOption) (*GetCreateCallLinkCredentialsResponse, error) -} - -type credentialsClient struct { - cc grpc.ClientConnInterface -} - -func NewCredentialsClient(cc grpc.ClientConnInterface) CredentialsClient { - return &credentialsClient{cc} -} - -func (c *credentialsClient) GetExternalServiceCredentials(ctx context.Context, in *GetExternalServiceCredentialsRequest, opts ...grpc.CallOption) (*GetExternalServiceCredentialsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetExternalServiceCredentialsResponse) - err := c.cc.Invoke(ctx, Credentials_GetExternalServiceCredentials_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *credentialsClient) GetDeliveryCertificate(ctx context.Context, in *GetDeliveryCertificateRequest, opts ...grpc.CallOption) (*GetDeliveryCertificateResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetDeliveryCertificateResponse) - err := c.cc.Invoke(ctx, Credentials_GetDeliveryCertificate_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *credentialsClient) GetGroupCredentials(ctx context.Context, in *GetGroupCredentialsRequest, opts ...grpc.CallOption) (*GetGroupCredentialsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetGroupCredentialsResponse) - err := c.cc.Invoke(ctx, Credentials_GetGroupCredentials_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *credentialsClient) GetCreateCallLinkCredentials(ctx context.Context, in *GetCreateCallLinkCredentialsRequest, opts ...grpc.CallOption) (*GetCreateCallLinkCredentialsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetCreateCallLinkCredentialsResponse) - err := c.cc.Invoke(ctx, Credentials_GetCreateCallLinkCredentials_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// CredentialsServer is the server API for Credentials service. -// All implementations must embed UnimplementedCredentialsServer -// for forward compatibility. -// -// Provides methods for obtaining and verifying credentials that allow an -// authenticated user to authenticate in another service or context without -// revealing their identity. -type CredentialsServer interface { - // Generates and returns an external service credentials for the caller. - GetExternalServiceCredentials(context.Context, *GetExternalServiceCredentialsRequest) (*GetExternalServiceCredentialsResponse, error) - // Generates a pair of delivery certificates that the holder can include to - // identify themselves to a message recipient (but not the server) in a - // sealed-sender message. - GetDeliveryCertificate(context.Context, *GetDeliveryCertificateRequest) (*GetDeliveryCertificateResponse, error) - // Generates a set of zero-knowledge credentials for various group-related - // actions. - GetGroupCredentials(context.Context, *GetGroupCredentialsRequest) (*GetGroupCredentialsResponse, error) - // Generates zero-knowledge credentials for creating call links. - GetCreateCallLinkCredentials(context.Context, *GetCreateCallLinkCredentialsRequest) (*GetCreateCallLinkCredentialsResponse, error) - mustEmbedUnimplementedCredentialsServer() -} - -// UnimplementedCredentialsServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedCredentialsServer struct{} - -func (UnimplementedCredentialsServer) GetExternalServiceCredentials(context.Context, *GetExternalServiceCredentialsRequest) (*GetExternalServiceCredentialsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetExternalServiceCredentials not implemented") -} -func (UnimplementedCredentialsServer) GetDeliveryCertificate(context.Context, *GetDeliveryCertificateRequest) (*GetDeliveryCertificateResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetDeliveryCertificate not implemented") -} -func (UnimplementedCredentialsServer) GetGroupCredentials(context.Context, *GetGroupCredentialsRequest) (*GetGroupCredentialsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetGroupCredentials not implemented") -} -func (UnimplementedCredentialsServer) GetCreateCallLinkCredentials(context.Context, *GetCreateCallLinkCredentialsRequest) (*GetCreateCallLinkCredentialsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetCreateCallLinkCredentials not implemented") -} -func (UnimplementedCredentialsServer) mustEmbedUnimplementedCredentialsServer() {} -func (UnimplementedCredentialsServer) testEmbeddedByValue() {} - -// UnsafeCredentialsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to CredentialsServer will -// result in compilation errors. -type UnsafeCredentialsServer interface { - mustEmbedUnimplementedCredentialsServer() -} - -func RegisterCredentialsServer(s grpc.ServiceRegistrar, srv CredentialsServer) { - // If the following call panics, it indicates UnimplementedCredentialsServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Credentials_ServiceDesc, srv) -} - -func _Credentials_GetExternalServiceCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetExternalServiceCredentialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CredentialsServer).GetExternalServiceCredentials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Credentials_GetExternalServiceCredentials_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CredentialsServer).GetExternalServiceCredentials(ctx, req.(*GetExternalServiceCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Credentials_GetDeliveryCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDeliveryCertificateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CredentialsServer).GetDeliveryCertificate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Credentials_GetDeliveryCertificate_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CredentialsServer).GetDeliveryCertificate(ctx, req.(*GetDeliveryCertificateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Credentials_GetGroupCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGroupCredentialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CredentialsServer).GetGroupCredentials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Credentials_GetGroupCredentials_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CredentialsServer).GetGroupCredentials(ctx, req.(*GetGroupCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Credentials_GetCreateCallLinkCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCreateCallLinkCredentialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CredentialsServer).GetCreateCallLinkCredentials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Credentials_GetCreateCallLinkCredentials_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CredentialsServer).GetCreateCallLinkCredentials(ctx, req.(*GetCreateCallLinkCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Credentials_ServiceDesc is the grpc.ServiceDesc for Credentials service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Credentials_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.credentials.Credentials", - HandlerType: (*CredentialsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetExternalServiceCredentials", - Handler: _Credentials_GetExternalServiceCredentials_Handler, - }, - { - MethodName: "GetDeliveryCertificate", - Handler: _Credentials_GetDeliveryCertificate_Handler, - }, - { - MethodName: "GetGroupCredentials", - Handler: _Credentials_GetGroupCredentials_Handler, - }, - { - MethodName: "GetCreateCallLinkCredentials", - Handler: _Credentials_GetCreateCallLinkCredentials_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/credentials.proto", -} - -const ( - CredentialsAnonymous_CheckSvrCredentials_FullMethodName = "/org.signal.chat.credentials.CredentialsAnonymous/CheckSvrCredentials" -) - -// CredentialsAnonymousClient is the client API for CredentialsAnonymous service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Provides methods for working with previously-generated credentials without -// revealing an association between the credentials and the caller's identity to -// the server. -type CredentialsAnonymousClient interface { - // Given a list of secure value recovery (SVR) service credentials and a phone - // number, checks and returns which of the provided credentials were generated - // by the user with the given phone number and have not yet expired. - CheckSvrCredentials(ctx context.Context, in *CheckSvrCredentialsRequest, opts ...grpc.CallOption) (*CheckSvrCredentialsResponse, error) -} - -type credentialsAnonymousClient struct { - cc grpc.ClientConnInterface -} - -func NewCredentialsAnonymousClient(cc grpc.ClientConnInterface) CredentialsAnonymousClient { - return &credentialsAnonymousClient{cc} -} - -func (c *credentialsAnonymousClient) CheckSvrCredentials(ctx context.Context, in *CheckSvrCredentialsRequest, opts ...grpc.CallOption) (*CheckSvrCredentialsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CheckSvrCredentialsResponse) - err := c.cc.Invoke(ctx, CredentialsAnonymous_CheckSvrCredentials_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// CredentialsAnonymousServer is the server API for CredentialsAnonymous service. -// All implementations must embed UnimplementedCredentialsAnonymousServer -// for forward compatibility. -// -// Provides methods for working with previously-generated credentials without -// revealing an association between the credentials and the caller's identity to -// the server. -type CredentialsAnonymousServer interface { - // Given a list of secure value recovery (SVR) service credentials and a phone - // number, checks and returns which of the provided credentials were generated - // by the user with the given phone number and have not yet expired. - CheckSvrCredentials(context.Context, *CheckSvrCredentialsRequest) (*CheckSvrCredentialsResponse, error) - mustEmbedUnimplementedCredentialsAnonymousServer() -} - -// UnimplementedCredentialsAnonymousServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedCredentialsAnonymousServer struct{} - -func (UnimplementedCredentialsAnonymousServer) CheckSvrCredentials(context.Context, *CheckSvrCredentialsRequest) (*CheckSvrCredentialsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method CheckSvrCredentials not implemented") -} -func (UnimplementedCredentialsAnonymousServer) mustEmbedUnimplementedCredentialsAnonymousServer() {} -func (UnimplementedCredentialsAnonymousServer) testEmbeddedByValue() {} - -// UnsafeCredentialsAnonymousServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to CredentialsAnonymousServer will -// result in compilation errors. -type UnsafeCredentialsAnonymousServer interface { - mustEmbedUnimplementedCredentialsAnonymousServer() -} - -func RegisterCredentialsAnonymousServer(s grpc.ServiceRegistrar, srv CredentialsAnonymousServer) { - // If the following call panics, it indicates UnimplementedCredentialsAnonymousServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&CredentialsAnonymous_ServiceDesc, srv) -} - -func _CredentialsAnonymous_CheckSvrCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CheckSvrCredentialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CredentialsAnonymousServer).CheckSvrCredentials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: CredentialsAnonymous_CheckSvrCredentials_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CredentialsAnonymousServer).CheckSvrCredentials(ctx, req.(*CheckSvrCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// CredentialsAnonymous_ServiceDesc is the grpc.ServiceDesc for CredentialsAnonymous service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var CredentialsAnonymous_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.credentials.CredentialsAnonymous", - HandlerType: (*CredentialsAnonymousServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CheckSvrCredentials", - Handler: _CredentialsAnonymous_CheckSvrCredentials_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/credentials.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/device/device.pb.go b/pkg/signalmeow/protobuf/rpc/device/device.pb.go deleted file mode 100644 index c9881f6..0000000 --- a/pkg/signalmeow/protobuf/rpc/device/device.pb.go +++ /dev/null @@ -1,922 +0,0 @@ -// -// Copyright 2023 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/device.proto - -package device - -import ( - common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" - errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetDevicesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetDevicesRequest) Reset() { - *x = GetDevicesRequest{} - mi := &file_org_signal_chat_device_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetDevicesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDevicesRequest) ProtoMessage() {} - -func (x *GetDevicesRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_device_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetDevicesRequest.ProtoReflect.Descriptor instead. -func (*GetDevicesRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_device_proto_rawDescGZIP(), []int{0} -} - -type GetDevicesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A list of devices linked to the authenticated account. - Devices []*GetDevicesResponse_LinkedDevice `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetDevicesResponse) Reset() { - *x = GetDevicesResponse{} - mi := &file_org_signal_chat_device_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetDevicesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDevicesResponse) ProtoMessage() {} - -func (x *GetDevicesResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_device_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetDevicesResponse.ProtoReflect.Descriptor instead. -func (*GetDevicesResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_device_proto_rawDescGZIP(), []int{1} -} - -func (x *GetDevicesResponse) GetDevices() []*GetDevicesResponse_LinkedDevice { - if x != nil { - return x.Devices - } - return nil -} - -type RemoveDeviceRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The identifier for the device to remove from the authenticated account. The - // identifier must not be for the primary device. - Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RemoveDeviceRequest) Reset() { - *x = RemoveDeviceRequest{} - mi := &file_org_signal_chat_device_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RemoveDeviceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveDeviceRequest) ProtoMessage() {} - -func (x *RemoveDeviceRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_device_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveDeviceRequest.ProtoReflect.Descriptor instead. -func (*RemoveDeviceRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_device_proto_rawDescGZIP(), []int{2} -} - -func (x *RemoveDeviceRequest) GetId() uint32 { - if x != nil { - return x.Id - } - return 0 -} - -type SetDeviceNameRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A sequence of bytes that encodes an encrypted human-readable name for this - // device. - Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The identifier for the device for which to set a name. - Id uint32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetDeviceNameRequest) Reset() { - *x = SetDeviceNameRequest{} - mi := &file_org_signal_chat_device_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetDeviceNameRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetDeviceNameRequest) ProtoMessage() {} - -func (x *SetDeviceNameRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_device_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetDeviceNameRequest.ProtoReflect.Descriptor instead. -func (*SetDeviceNameRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_device_proto_rawDescGZIP(), []int{3} -} - -func (x *SetDeviceNameRequest) GetName() []byte { - if x != nil { - return x.Name - } - return nil -} - -func (x *SetDeviceNameRequest) GetId() uint32 { - if x != nil { - return x.Id - } - return 0 -} - -type SetDeviceNameResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *SetDeviceNameResponse_Success - // *SetDeviceNameResponse_TargetDeviceNotFound - Response isSetDeviceNameResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetDeviceNameResponse) Reset() { - *x = SetDeviceNameResponse{} - mi := &file_org_signal_chat_device_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetDeviceNameResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetDeviceNameResponse) ProtoMessage() {} - -func (x *SetDeviceNameResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_device_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetDeviceNameResponse.ProtoReflect.Descriptor instead. -func (*SetDeviceNameResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_device_proto_rawDescGZIP(), []int{4} -} - -func (x *SetDeviceNameResponse) GetResponse() isSetDeviceNameResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *SetDeviceNameResponse) GetSuccess() *emptypb.Empty { - if x != nil { - if x, ok := x.Response.(*SetDeviceNameResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *SetDeviceNameResponse) GetTargetDeviceNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*SetDeviceNameResponse_TargetDeviceNotFound); ok { - return x.TargetDeviceNotFound - } - } - return nil -} - -type isSetDeviceNameResponse_Response interface { - isSetDeviceNameResponse_Response() -} - -type SetDeviceNameResponse_Success struct { - // The device name was successfully set - Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type SetDeviceNameResponse_TargetDeviceNotFound struct { - // No device with the provided identifier was found on the account - TargetDeviceNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=target_device_not_found,json=targetDeviceNotFound,proto3,oneof"` -} - -func (*SetDeviceNameResponse_Success) isSetDeviceNameResponse_Response() {} - -func (*SetDeviceNameResponse_TargetDeviceNotFound) isSetDeviceNameResponse_Response() {} - -type RemoveDeviceResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RemoveDeviceResponse) Reset() { - *x = RemoveDeviceResponse{} - mi := &file_org_signal_chat_device_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RemoveDeviceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveDeviceResponse) ProtoMessage() {} - -func (x *RemoveDeviceResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_device_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveDeviceResponse.ProtoReflect.Descriptor instead. -func (*RemoveDeviceResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_device_proto_rawDescGZIP(), []int{5} -} - -type SetPushTokenRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to TokenRequest: - // - // *SetPushTokenRequest_ApnsTokenRequest_ - // *SetPushTokenRequest_FcmTokenRequest_ - TokenRequest isSetPushTokenRequest_TokenRequest `protobuf_oneof:"token_request"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetPushTokenRequest) Reset() { - *x = SetPushTokenRequest{} - mi := &file_org_signal_chat_device_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetPushTokenRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetPushTokenRequest) ProtoMessage() {} - -func (x *SetPushTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_device_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetPushTokenRequest.ProtoReflect.Descriptor instead. -func (*SetPushTokenRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_device_proto_rawDescGZIP(), []int{6} -} - -func (x *SetPushTokenRequest) GetTokenRequest() isSetPushTokenRequest_TokenRequest { - if x != nil { - return x.TokenRequest - } - return nil -} - -func (x *SetPushTokenRequest) GetApnsTokenRequest() *SetPushTokenRequest_ApnsTokenRequest { - if x != nil { - if x, ok := x.TokenRequest.(*SetPushTokenRequest_ApnsTokenRequest_); ok { - return x.ApnsTokenRequest - } - } - return nil -} - -func (x *SetPushTokenRequest) GetFcmTokenRequest() *SetPushTokenRequest_FcmTokenRequest { - if x != nil { - if x, ok := x.TokenRequest.(*SetPushTokenRequest_FcmTokenRequest_); ok { - return x.FcmTokenRequest - } - } - return nil -} - -type isSetPushTokenRequest_TokenRequest interface { - isSetPushTokenRequest_TokenRequest() -} - -type SetPushTokenRequest_ApnsTokenRequest_ struct { - // If present, specifies the APNs device token(s) the server will use to - // send new message notifications to the authenticated device. - ApnsTokenRequest *SetPushTokenRequest_ApnsTokenRequest `protobuf:"bytes,1,opt,name=apns_token_request,json=apnsTokenRequest,proto3,oneof"` -} - -type SetPushTokenRequest_FcmTokenRequest_ struct { - // If present, specifies the FCM push token the server will use to send new - // message notifications to the authenticated device. - FcmTokenRequest *SetPushTokenRequest_FcmTokenRequest `protobuf:"bytes,2,opt,name=fcm_token_request,json=fcmTokenRequest,proto3,oneof"` -} - -func (*SetPushTokenRequest_ApnsTokenRequest_) isSetPushTokenRequest_TokenRequest() {} - -func (*SetPushTokenRequest_FcmTokenRequest_) isSetPushTokenRequest_TokenRequest() {} - -type SetPushTokenResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetPushTokenResponse) Reset() { - *x = SetPushTokenResponse{} - mi := &file_org_signal_chat_device_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetPushTokenResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetPushTokenResponse) ProtoMessage() {} - -func (x *SetPushTokenResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_device_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetPushTokenResponse.ProtoReflect.Descriptor instead. -func (*SetPushTokenResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_device_proto_rawDescGZIP(), []int{7} -} - -type ClearPushTokenRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClearPushTokenRequest) Reset() { - *x = ClearPushTokenRequest{} - mi := &file_org_signal_chat_device_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClearPushTokenRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClearPushTokenRequest) ProtoMessage() {} - -func (x *ClearPushTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_device_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClearPushTokenRequest.ProtoReflect.Descriptor instead. -func (*ClearPushTokenRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_device_proto_rawDescGZIP(), []int{8} -} - -type ClearPushTokenResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClearPushTokenResponse) Reset() { - *x = ClearPushTokenResponse{} - mi := &file_org_signal_chat_device_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClearPushTokenResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClearPushTokenResponse) ProtoMessage() {} - -func (x *ClearPushTokenResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_device_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClearPushTokenResponse.ProtoReflect.Descriptor instead. -func (*ClearPushTokenResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_device_proto_rawDescGZIP(), []int{9} -} - -type SetCapabilitiesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Capabilities []common.DeviceCapability `protobuf:"varint,1,rep,packed,name=capabilities,proto3,enum=org.signal.chat.common.DeviceCapability" json:"capabilities,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetCapabilitiesRequest) Reset() { - *x = SetCapabilitiesRequest{} - mi := &file_org_signal_chat_device_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetCapabilitiesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetCapabilitiesRequest) ProtoMessage() {} - -func (x *SetCapabilitiesRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_device_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetCapabilitiesRequest.ProtoReflect.Descriptor instead. -func (*SetCapabilitiesRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_device_proto_rawDescGZIP(), []int{10} -} - -func (x *SetCapabilitiesRequest) GetCapabilities() []common.DeviceCapability { - if x != nil { - return x.Capabilities - } - return nil -} - -type SetCapabilitiesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetCapabilitiesResponse) Reset() { - *x = SetCapabilitiesResponse{} - mi := &file_org_signal_chat_device_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetCapabilitiesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetCapabilitiesResponse) ProtoMessage() {} - -func (x *SetCapabilitiesResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_device_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetCapabilitiesResponse.ProtoReflect.Descriptor instead. -func (*SetCapabilitiesResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_device_proto_rawDescGZIP(), []int{11} -} - -type GetDevicesResponse_LinkedDevice struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The identifier for the device within an account. - Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // A sequence of bytes that encodes an encrypted human-readable name for - // this device. - Name []byte `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // The approximate time, in milliseconds since the epoch, at which this - // device last connected to the server. - LastSeen uint64 `protobuf:"varint,3,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen,omitempty"` - // The registration ID of the given device. - RegistrationId uint32 `protobuf:"varint,4,opt,name=registration_id,json=registrationId,proto3" json:"registration_id,omitempty"` - // A sequence of bytes that encodes the time, - // in milliseconds since the epoch, at which this device was - // attached to its parent account. - CreatedAtCiphertext []byte `protobuf:"bytes,5,opt,name=created_at_ciphertext,json=createdAtCiphertext,proto3" json:"created_at_ciphertext,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetDevicesResponse_LinkedDevice) Reset() { - *x = GetDevicesResponse_LinkedDevice{} - mi := &file_org_signal_chat_device_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetDevicesResponse_LinkedDevice) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDevicesResponse_LinkedDevice) ProtoMessage() {} - -func (x *GetDevicesResponse_LinkedDevice) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_device_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetDevicesResponse_LinkedDevice.ProtoReflect.Descriptor instead. -func (*GetDevicesResponse_LinkedDevice) Descriptor() ([]byte, []int) { - return file_org_signal_chat_device_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *GetDevicesResponse_LinkedDevice) GetId() uint32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *GetDevicesResponse_LinkedDevice) GetName() []byte { - if x != nil { - return x.Name - } - return nil -} - -func (x *GetDevicesResponse_LinkedDevice) GetLastSeen() uint64 { - if x != nil { - return x.LastSeen - } - return 0 -} - -func (x *GetDevicesResponse_LinkedDevice) GetRegistrationId() uint32 { - if x != nil { - return x.RegistrationId - } - return 0 -} - -func (x *GetDevicesResponse_LinkedDevice) GetCreatedAtCiphertext() []byte { - if x != nil { - return x.CreatedAtCiphertext - } - return nil -} - -type SetPushTokenRequest_ApnsTokenRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A "standard" APNs device token. - ApnsToken string `protobuf:"bytes,1,opt,name=apns_token,json=apnsToken,proto3" json:"apns_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetPushTokenRequest_ApnsTokenRequest) Reset() { - *x = SetPushTokenRequest_ApnsTokenRequest{} - mi := &file_org_signal_chat_device_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetPushTokenRequest_ApnsTokenRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetPushTokenRequest_ApnsTokenRequest) ProtoMessage() {} - -func (x *SetPushTokenRequest_ApnsTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_device_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetPushTokenRequest_ApnsTokenRequest.ProtoReflect.Descriptor instead. -func (*SetPushTokenRequest_ApnsTokenRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_device_proto_rawDescGZIP(), []int{6, 0} -} - -func (x *SetPushTokenRequest_ApnsTokenRequest) GetApnsToken() string { - if x != nil { - return x.ApnsToken - } - return "" -} - -type SetPushTokenRequest_FcmTokenRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // An FCM push token. - FcmToken string `protobuf:"bytes,1,opt,name=fcm_token,json=fcmToken,proto3" json:"fcm_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetPushTokenRequest_FcmTokenRequest) Reset() { - *x = SetPushTokenRequest_FcmTokenRequest{} - mi := &file_org_signal_chat_device_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetPushTokenRequest_FcmTokenRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetPushTokenRequest_FcmTokenRequest) ProtoMessage() {} - -func (x *SetPushTokenRequest_FcmTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_device_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetPushTokenRequest_FcmTokenRequest.ProtoReflect.Descriptor instead. -func (*SetPushTokenRequest_FcmTokenRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_device_proto_rawDescGZIP(), []int{6, 1} -} - -func (x *SetPushTokenRequest_FcmTokenRequest) GetFcmToken() string { - if x != nil { - return x.FcmToken - } - return "" -} - -var File_org_signal_chat_device_proto protoreflect.FileDescriptor - -const file_org_signal_chat_device_proto_rawDesc = "" + - "\n" + - "\x1corg/signal/chat/device.proto\x12\x16org.signal.chat.device\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1corg/signal/chat/common.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x19org/signal/chat/tag.proto\"\x13\n" + - "\x11GetDevicesRequest\"\x9f\x02\n" + - "\x12GetDevicesResponse\x12Q\n" + - "\adevices\x18\x01 \x03(\v27.org.signal.chat.device.GetDevicesResponse.LinkedDeviceR\adevices\x1a\xb5\x01\n" + - "\fLinkedDevice\x12\x0e\n" + - "\x02id\x18\x01 \x01(\rR\x02id\x12\x12\n" + - "\x04name\x18\x02 \x01(\fR\x04name\x12\x1b\n" + - "\tlast_seen\x18\x03 \x01(\x04R\blastSeen\x120\n" + - "\x0fregistration_id\x18\x04 \x01(\rB\a\xb2\x97\"\x03\x10\xff\x7fR\x0eregistrationId\x122\n" + - "\x15created_at_ciphertext\x18\x05 \x01(\fR\x13createdAtCiphertext\"%\n" + - "\x13RemoveDeviceRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\rR\x02id\"E\n" + - "\x14SetDeviceNameRequest\x12\x1d\n" + - "\x04name\x18\x01 \x01(\fB\t\x9a\x97\"\x05\b\x01\x10\xe1\x01R\x04name\x12\x0e\n" + - "\x02id\x18\x02 \x01(\rR\x02id\"\xc1\x01\n" + - "\x15SetDeviceNameResponse\x122\n" + - "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12h\n" + - "\x17target_device_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\r\xc2\xd5\"\tnot_foundH\x00R\x14targetDeviceNotFoundB\n" + - "\n" + - "\bresponse\"\x16\n" + - "\x14RemoveDeviceResponse\"\xee\x02\n" + - "\x13SetPushTokenRequest\x12l\n" + - "\x12apns_token_request\x18\x01 \x01(\v2<.org.signal.chat.device.SetPushTokenRequest.ApnsTokenRequestH\x00R\x10apnsTokenRequest\x12i\n" + - "\x11fcm_token_request\x18\x02 \x01(\v2;.org.signal.chat.device.SetPushTokenRequest.FcmTokenRequestH\x00R\x0ffcmTokenRequest\x1a7\n" + - "\x10ApnsTokenRequest\x12#\n" + - "\n" + - "apns_token\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\tapnsToken\x1a4\n" + - "\x0fFcmTokenRequest\x12!\n" + - "\tfcm_token\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\bfcmTokenB\x0f\n" + - "\rtoken_request\"\x16\n" + - "\x14SetPushTokenResponse\"\x17\n" + - "\x15ClearPushTokenRequest\"\x18\n" + - "\x16ClearPushTokenResponse\"f\n" + - "\x16SetCapabilitiesRequest\x12L\n" + - "\fcapabilities\x18\x01 \x03(\x0e2(.org.signal.chat.common.DeviceCapabilityR\fcapabilities\"\x19\n" + - "\x17SetCapabilitiesResponse2\xa9\x05\n" + - "\aDevices\x12e\n" + - "\n" + - "GetDevices\x12).org.signal.chat.device.GetDevicesRequest\x1a*.org.signal.chat.device.GetDevicesResponse\"\x00\x12k\n" + - "\fRemoveDevice\x12+.org.signal.chat.device.RemoveDeviceRequest\x1a,.org.signal.chat.device.RemoveDeviceResponse\"\x00\x12n\n" + - "\rSetDeviceName\x12,.org.signal.chat.device.SetDeviceNameRequest\x1a-.org.signal.chat.device.SetDeviceNameResponse\"\x00\x12k\n" + - "\fSetPushToken\x12+.org.signal.chat.device.SetPushTokenRequest\x1a,.org.signal.chat.device.SetPushTokenResponse\"\x00\x12q\n" + - "\x0eClearPushToken\x12-.org.signal.chat.device.ClearPushTokenRequest\x1a..org.signal.chat.device.ClearPushTokenResponse\"\x00\x12t\n" + - "\x0fSetCapabilities\x12..org.signal.chat.device.SetCapabilitiesRequest\x1a/.org.signal.chat.device.SetCapabilitiesResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_device_proto_rawDescOnce sync.Once - file_org_signal_chat_device_proto_rawDescData []byte -) - -func file_org_signal_chat_device_proto_rawDescGZIP() []byte { - file_org_signal_chat_device_proto_rawDescOnce.Do(func() { - file_org_signal_chat_device_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_device_proto_rawDesc), len(file_org_signal_chat_device_proto_rawDesc))) - }) - return file_org_signal_chat_device_proto_rawDescData -} - -var file_org_signal_chat_device_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_org_signal_chat_device_proto_goTypes = []any{ - (*GetDevicesRequest)(nil), // 0: org.signal.chat.device.GetDevicesRequest - (*GetDevicesResponse)(nil), // 1: org.signal.chat.device.GetDevicesResponse - (*RemoveDeviceRequest)(nil), // 2: org.signal.chat.device.RemoveDeviceRequest - (*SetDeviceNameRequest)(nil), // 3: org.signal.chat.device.SetDeviceNameRequest - (*SetDeviceNameResponse)(nil), // 4: org.signal.chat.device.SetDeviceNameResponse - (*RemoveDeviceResponse)(nil), // 5: org.signal.chat.device.RemoveDeviceResponse - (*SetPushTokenRequest)(nil), // 6: org.signal.chat.device.SetPushTokenRequest - (*SetPushTokenResponse)(nil), // 7: org.signal.chat.device.SetPushTokenResponse - (*ClearPushTokenRequest)(nil), // 8: org.signal.chat.device.ClearPushTokenRequest - (*ClearPushTokenResponse)(nil), // 9: org.signal.chat.device.ClearPushTokenResponse - (*SetCapabilitiesRequest)(nil), // 10: org.signal.chat.device.SetCapabilitiesRequest - (*SetCapabilitiesResponse)(nil), // 11: org.signal.chat.device.SetCapabilitiesResponse - (*GetDevicesResponse_LinkedDevice)(nil), // 12: org.signal.chat.device.GetDevicesResponse.LinkedDevice - (*SetPushTokenRequest_ApnsTokenRequest)(nil), // 13: org.signal.chat.device.SetPushTokenRequest.ApnsTokenRequest - (*SetPushTokenRequest_FcmTokenRequest)(nil), // 14: org.signal.chat.device.SetPushTokenRequest.FcmTokenRequest - (*emptypb.Empty)(nil), // 15: google.protobuf.Empty - (*errors.NotFound)(nil), // 16: org.signal.chat.errors.NotFound - (common.DeviceCapability)(0), // 17: org.signal.chat.common.DeviceCapability -} -var file_org_signal_chat_device_proto_depIdxs = []int32{ - 12, // 0: org.signal.chat.device.GetDevicesResponse.devices:type_name -> org.signal.chat.device.GetDevicesResponse.LinkedDevice - 15, // 1: org.signal.chat.device.SetDeviceNameResponse.success:type_name -> google.protobuf.Empty - 16, // 2: org.signal.chat.device.SetDeviceNameResponse.target_device_not_found:type_name -> org.signal.chat.errors.NotFound - 13, // 3: org.signal.chat.device.SetPushTokenRequest.apns_token_request:type_name -> org.signal.chat.device.SetPushTokenRequest.ApnsTokenRequest - 14, // 4: org.signal.chat.device.SetPushTokenRequest.fcm_token_request:type_name -> org.signal.chat.device.SetPushTokenRequest.FcmTokenRequest - 17, // 5: org.signal.chat.device.SetCapabilitiesRequest.capabilities:type_name -> org.signal.chat.common.DeviceCapability - 0, // 6: org.signal.chat.device.Devices.GetDevices:input_type -> org.signal.chat.device.GetDevicesRequest - 2, // 7: org.signal.chat.device.Devices.RemoveDevice:input_type -> org.signal.chat.device.RemoveDeviceRequest - 3, // 8: org.signal.chat.device.Devices.SetDeviceName:input_type -> org.signal.chat.device.SetDeviceNameRequest - 6, // 9: org.signal.chat.device.Devices.SetPushToken:input_type -> org.signal.chat.device.SetPushTokenRequest - 8, // 10: org.signal.chat.device.Devices.ClearPushToken:input_type -> org.signal.chat.device.ClearPushTokenRequest - 10, // 11: org.signal.chat.device.Devices.SetCapabilities:input_type -> org.signal.chat.device.SetCapabilitiesRequest - 1, // 12: org.signal.chat.device.Devices.GetDevices:output_type -> org.signal.chat.device.GetDevicesResponse - 5, // 13: org.signal.chat.device.Devices.RemoveDevice:output_type -> org.signal.chat.device.RemoveDeviceResponse - 4, // 14: org.signal.chat.device.Devices.SetDeviceName:output_type -> org.signal.chat.device.SetDeviceNameResponse - 7, // 15: org.signal.chat.device.Devices.SetPushToken:output_type -> org.signal.chat.device.SetPushTokenResponse - 9, // 16: org.signal.chat.device.Devices.ClearPushToken:output_type -> org.signal.chat.device.ClearPushTokenResponse - 11, // 17: org.signal.chat.device.Devices.SetCapabilities:output_type -> org.signal.chat.device.SetCapabilitiesResponse - 12, // [12:18] is the sub-list for method output_type - 6, // [6:12] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_device_proto_init() } -func file_org_signal_chat_device_proto_init() { - if File_org_signal_chat_device_proto != nil { - return - } - file_org_signal_chat_device_proto_msgTypes[4].OneofWrappers = []any{ - (*SetDeviceNameResponse_Success)(nil), - (*SetDeviceNameResponse_TargetDeviceNotFound)(nil), - } - file_org_signal_chat_device_proto_msgTypes[6].OneofWrappers = []any{ - (*SetPushTokenRequest_ApnsTokenRequest_)(nil), - (*SetPushTokenRequest_FcmTokenRequest_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_device_proto_rawDesc), len(file_org_signal_chat_device_proto_rawDesc)), - NumEnums: 0, - NumMessages: 15, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_org_signal_chat_device_proto_goTypes, - DependencyIndexes: file_org_signal_chat_device_proto_depIdxs, - MessageInfos: file_org_signal_chat_device_proto_msgTypes, - }.Build() - File_org_signal_chat_device_proto = out.File - file_org_signal_chat_device_proto_goTypes = nil - file_org_signal_chat_device_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/device/device_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/device/device_grpc.pb.go deleted file mode 100644 index fb11aa6..0000000 --- a/pkg/signalmeow/protobuf/rpc/device/device_grpc.pb.go +++ /dev/null @@ -1,349 +0,0 @@ -// -// Copyright 2023 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/device.proto - -package device - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Devices_GetDevices_FullMethodName = "/org.signal.chat.device.Devices/GetDevices" - Devices_RemoveDevice_FullMethodName = "/org.signal.chat.device.Devices/RemoveDevice" - Devices_SetDeviceName_FullMethodName = "/org.signal.chat.device.Devices/SetDeviceName" - Devices_SetPushToken_FullMethodName = "/org.signal.chat.device.Devices/SetPushToken" - Devices_ClearPushToken_FullMethodName = "/org.signal.chat.device.Devices/ClearPushToken" - Devices_SetCapabilities_FullMethodName = "/org.signal.chat.device.Devices/SetCapabilities" -) - -// DevicesClient is the client API for Devices service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Provides methods for working with devices attached to a Signal account. -type DevicesClient interface { - // Returns a list of devices associated with the caller's account. - GetDevices(ctx context.Context, in *GetDevicesRequest, opts ...grpc.CallOption) (*GetDevicesResponse, error) - // Removes a linked device from the caller's account. - // - // Linked devices may only remove themselves. Primary devices may remove - // any device other than themselves. - RemoveDevice(ctx context.Context, in *RemoveDeviceRequest, opts ...grpc.CallOption) (*RemoveDeviceResponse, error) - // Sets the encrypted human-readable name for a specific devices. Primary - // devices may change the name of any device associated with their account, - // but linked devices may only change their own name. The response will - // indicate if the target device was not found. - SetDeviceName(ctx context.Context, in *SetDeviceNameRequest, opts ...grpc.CallOption) (*SetDeviceNameResponse, error) - // Sets the token(s) the server should use to send new message notifications - // to the authenticated device. - SetPushToken(ctx context.Context, in *SetPushTokenRequest, opts ...grpc.CallOption) (*SetPushTokenResponse, error) - // Removes any push tokens associated with the authenticated device. After - // calling this method, the server will assume that the authenticated device - // will periodically poll for new messages. - ClearPushToken(ctx context.Context, in *ClearPushTokenRequest, opts ...grpc.CallOption) (*ClearPushTokenResponse, error) - // Declares that the authenticated device supports certain features. - SetCapabilities(ctx context.Context, in *SetCapabilitiesRequest, opts ...grpc.CallOption) (*SetCapabilitiesResponse, error) -} - -type devicesClient struct { - cc grpc.ClientConnInterface -} - -func NewDevicesClient(cc grpc.ClientConnInterface) DevicesClient { - return &devicesClient{cc} -} - -func (c *devicesClient) GetDevices(ctx context.Context, in *GetDevicesRequest, opts ...grpc.CallOption) (*GetDevicesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetDevicesResponse) - err := c.cc.Invoke(ctx, Devices_GetDevices_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *devicesClient) RemoveDevice(ctx context.Context, in *RemoveDeviceRequest, opts ...grpc.CallOption) (*RemoveDeviceResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RemoveDeviceResponse) - err := c.cc.Invoke(ctx, Devices_RemoveDevice_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *devicesClient) SetDeviceName(ctx context.Context, in *SetDeviceNameRequest, opts ...grpc.CallOption) (*SetDeviceNameResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetDeviceNameResponse) - err := c.cc.Invoke(ctx, Devices_SetDeviceName_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *devicesClient) SetPushToken(ctx context.Context, in *SetPushTokenRequest, opts ...grpc.CallOption) (*SetPushTokenResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetPushTokenResponse) - err := c.cc.Invoke(ctx, Devices_SetPushToken_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *devicesClient) ClearPushToken(ctx context.Context, in *ClearPushTokenRequest, opts ...grpc.CallOption) (*ClearPushTokenResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ClearPushTokenResponse) - err := c.cc.Invoke(ctx, Devices_ClearPushToken_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *devicesClient) SetCapabilities(ctx context.Context, in *SetCapabilitiesRequest, opts ...grpc.CallOption) (*SetCapabilitiesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetCapabilitiesResponse) - err := c.cc.Invoke(ctx, Devices_SetCapabilities_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// DevicesServer is the server API for Devices service. -// All implementations must embed UnimplementedDevicesServer -// for forward compatibility. -// -// Provides methods for working with devices attached to a Signal account. -type DevicesServer interface { - // Returns a list of devices associated with the caller's account. - GetDevices(context.Context, *GetDevicesRequest) (*GetDevicesResponse, error) - // Removes a linked device from the caller's account. - // - // Linked devices may only remove themselves. Primary devices may remove - // any device other than themselves. - RemoveDevice(context.Context, *RemoveDeviceRequest) (*RemoveDeviceResponse, error) - // Sets the encrypted human-readable name for a specific devices. Primary - // devices may change the name of any device associated with their account, - // but linked devices may only change their own name. The response will - // indicate if the target device was not found. - SetDeviceName(context.Context, *SetDeviceNameRequest) (*SetDeviceNameResponse, error) - // Sets the token(s) the server should use to send new message notifications - // to the authenticated device. - SetPushToken(context.Context, *SetPushTokenRequest) (*SetPushTokenResponse, error) - // Removes any push tokens associated with the authenticated device. After - // calling this method, the server will assume that the authenticated device - // will periodically poll for new messages. - ClearPushToken(context.Context, *ClearPushTokenRequest) (*ClearPushTokenResponse, error) - // Declares that the authenticated device supports certain features. - SetCapabilities(context.Context, *SetCapabilitiesRequest) (*SetCapabilitiesResponse, error) - mustEmbedUnimplementedDevicesServer() -} - -// UnimplementedDevicesServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedDevicesServer struct{} - -func (UnimplementedDevicesServer) GetDevices(context.Context, *GetDevicesRequest) (*GetDevicesResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetDevices not implemented") -} -func (UnimplementedDevicesServer) RemoveDevice(context.Context, *RemoveDeviceRequest) (*RemoveDeviceResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RemoveDevice not implemented") -} -func (UnimplementedDevicesServer) SetDeviceName(context.Context, *SetDeviceNameRequest) (*SetDeviceNameResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetDeviceName not implemented") -} -func (UnimplementedDevicesServer) SetPushToken(context.Context, *SetPushTokenRequest) (*SetPushTokenResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetPushToken not implemented") -} -func (UnimplementedDevicesServer) ClearPushToken(context.Context, *ClearPushTokenRequest) (*ClearPushTokenResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ClearPushToken not implemented") -} -func (UnimplementedDevicesServer) SetCapabilities(context.Context, *SetCapabilitiesRequest) (*SetCapabilitiesResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetCapabilities not implemented") -} -func (UnimplementedDevicesServer) mustEmbedUnimplementedDevicesServer() {} -func (UnimplementedDevicesServer) testEmbeddedByValue() {} - -// UnsafeDevicesServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to DevicesServer will -// result in compilation errors. -type UnsafeDevicesServer interface { - mustEmbedUnimplementedDevicesServer() -} - -func RegisterDevicesServer(s grpc.ServiceRegistrar, srv DevicesServer) { - // If the following call panics, it indicates UnimplementedDevicesServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Devices_ServiceDesc, srv) -} - -func _Devices_GetDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDevicesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DevicesServer).GetDevices(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Devices_GetDevices_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DevicesServer).GetDevices(ctx, req.(*GetDevicesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Devices_RemoveDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveDeviceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DevicesServer).RemoveDevice(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Devices_RemoveDevice_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DevicesServer).RemoveDevice(ctx, req.(*RemoveDeviceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Devices_SetDeviceName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetDeviceNameRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DevicesServer).SetDeviceName(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Devices_SetDeviceName_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DevicesServer).SetDeviceName(ctx, req.(*SetDeviceNameRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Devices_SetPushToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetPushTokenRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DevicesServer).SetPushToken(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Devices_SetPushToken_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DevicesServer).SetPushToken(ctx, req.(*SetPushTokenRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Devices_ClearPushToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClearPushTokenRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DevicesServer).ClearPushToken(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Devices_ClearPushToken_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DevicesServer).ClearPushToken(ctx, req.(*ClearPushTokenRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Devices_SetCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetCapabilitiesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DevicesServer).SetCapabilities(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Devices_SetCapabilities_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DevicesServer).SetCapabilities(ctx, req.(*SetCapabilitiesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Devices_ServiceDesc is the grpc.ServiceDesc for Devices service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Devices_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.device.Devices", - HandlerType: (*DevicesServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetDevices", - Handler: _Devices_GetDevices_Handler, - }, - { - MethodName: "RemoveDevice", - Handler: _Devices_RemoveDevice_Handler, - }, - { - MethodName: "SetDeviceName", - Handler: _Devices_SetDeviceName_Handler, - }, - { - MethodName: "SetPushToken", - Handler: _Devices_SetPushToken_Handler, - }, - { - MethodName: "ClearPushToken", - Handler: _Devices_ClearPushToken_Handler, - }, - { - MethodName: "SetCapabilities", - Handler: _Devices_SetCapabilities_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/device.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/donations/donations.pb.go b/pkg/signalmeow/protobuf/rpc/donations/donations.pb.go deleted file mode 100644 index df63597..0000000 --- a/pkg/signalmeow/protobuf/rpc/donations/donations.pb.go +++ /dev/null @@ -1,373 +0,0 @@ -// -// Copyright 2026 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/donations.proto - -package donations - -import ( - errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type RedeemReceiptRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Presentation of the ZK receipt acquired when the subscription was created - ReceiptCredentialPresentation []byte `protobuf:"bytes,1,opt,name=receiptCredentialPresentation,proto3" json:"receiptCredentialPresentation,omitempty"` - // If true, the corresponding badge should be visible on the profile - Visible bool `protobuf:"varint,2,opt,name=visible,proto3" json:"visible,omitempty"` - // If true, and the new badge is visible, it should be the primary badge on the profile - Primary bool `protobuf:"varint,3,opt,name=primary,proto3" json:"primary,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RedeemReceiptRequest) Reset() { - *x = RedeemReceiptRequest{} - mi := &file_org_signal_chat_donations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RedeemReceiptRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RedeemReceiptRequest) ProtoMessage() {} - -func (x *RedeemReceiptRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_donations_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RedeemReceiptRequest.ProtoReflect.Descriptor instead. -func (*RedeemReceiptRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_donations_proto_rawDescGZIP(), []int{0} -} - -func (x *RedeemReceiptRequest) GetReceiptCredentialPresentation() []byte { - if x != nil { - return x.ReceiptCredentialPresentation - } - return nil -} - -func (x *RedeemReceiptRequest) GetVisible() bool { - if x != nil { - return x.Visible - } - return false -} - -func (x *RedeemReceiptRequest) GetPrimary() bool { - if x != nil { - return x.Primary - } - return false -} - -type RedeemReceiptResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *RedeemReceiptResponse_Success - // *RedeemReceiptResponse_FailedAuthentication - // *RedeemReceiptResponse_AlreadyRedeemed - Response isRedeemReceiptResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RedeemReceiptResponse) Reset() { - *x = RedeemReceiptResponse{} - mi := &file_org_signal_chat_donations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RedeemReceiptResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RedeemReceiptResponse) ProtoMessage() {} - -func (x *RedeemReceiptResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_donations_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RedeemReceiptResponse.ProtoReflect.Descriptor instead. -func (*RedeemReceiptResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_donations_proto_rawDescGZIP(), []int{1} -} - -func (x *RedeemReceiptResponse) GetResponse() isRedeemReceiptResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *RedeemReceiptResponse) GetSuccess() *emptypb.Empty { - if x != nil { - if x, ok := x.Response.(*RedeemReceiptResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *RedeemReceiptResponse) GetFailedAuthentication() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Response.(*RedeemReceiptResponse_FailedAuthentication); ok { - return x.FailedAuthentication - } - } - return nil -} - -func (x *RedeemReceiptResponse) GetAlreadyRedeemed() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*RedeemReceiptResponse_AlreadyRedeemed); ok { - return x.AlreadyRedeemed - } - } - return nil -} - -type isRedeemReceiptResponse_Response interface { - isRedeemReceiptResponse_Response() -} - -type RedeemReceiptResponse_Success struct { - // The receipt was successfully redeemed - Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type RedeemReceiptResponse_FailedAuthentication struct { - // The provided presentation is invalid - FailedAuthentication *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=failed_authentication,json=failedAuthentication,proto3,oneof"` -} - -type RedeemReceiptResponse_AlreadyRedeemed struct { - // The receipt was already redeemed for a different account - AlreadyRedeemed *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=already_redeemed,json=alreadyRedeemed,proto3,oneof"` -} - -func (*RedeemReceiptResponse_Success) isRedeemReceiptResponse_Response() {} - -func (*RedeemReceiptResponse_FailedAuthentication) isRedeemReceiptResponse_Response() {} - -func (*RedeemReceiptResponse_AlreadyRedeemed) isRedeemReceiptResponse_Response() {} - -type CreateDonationPermitRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // a serialized libsignal DonationPermitRequest - DonationPermitRequest []byte `protobuf:"bytes,1,opt,name=donation_permit_request,json=donationPermitRequest,proto3" json:"donation_permit_request,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateDonationPermitRequest) Reset() { - *x = CreateDonationPermitRequest{} - mi := &file_org_signal_chat_donations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateDonationPermitRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateDonationPermitRequest) ProtoMessage() {} - -func (x *CreateDonationPermitRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_donations_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateDonationPermitRequest.ProtoReflect.Descriptor instead. -func (*CreateDonationPermitRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_donations_proto_rawDescGZIP(), []int{2} -} - -func (x *CreateDonationPermitRequest) GetDonationPermitRequest() []byte { - if x != nil { - return x.DonationPermitRequest - } - return nil -} - -type CreateDonationPermitResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // a serialized libsignal DonationPermitResponse - DonationPermitResponse []byte `protobuf:"bytes,1,opt,name=donation_permit_response,json=donationPermitResponse,proto3" json:"donation_permit_response,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateDonationPermitResponse) Reset() { - *x = CreateDonationPermitResponse{} - mi := &file_org_signal_chat_donations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateDonationPermitResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateDonationPermitResponse) ProtoMessage() {} - -func (x *CreateDonationPermitResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_donations_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateDonationPermitResponse.ProtoReflect.Descriptor instead. -func (*CreateDonationPermitResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_donations_proto_rawDescGZIP(), []int{3} -} - -func (x *CreateDonationPermitResponse) GetDonationPermitResponse() []byte { - if x != nil { - return x.DonationPermitResponse - } - return nil -} - -var File_org_signal_chat_donations_proto protoreflect.FileDescriptor - -const file_org_signal_chat_donations_proto_rawDesc = "" + - "\n" + - "\x1forg/signal/chat/donations.proto\x12\x19org.signal.chat.donations\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x19org/signal/chat/tag.proto\"\x98\x01\n" + - "\x14RedeemReceiptRequest\x12L\n" + - "\x1dreceiptCredentialPresentation\x18\x01 \x01(\fB\x06\xa2\x97\"\x02\xc9\x02R\x1dreceiptCredentialPresentation\x12\x18\n" + - "\avisible\x18\x02 \x01(\bR\avisible\x12\x18\n" + - "\aprimary\x18\x03 \x01(\bR\aprimary\"\xc9\x02\n" + - "\x15RedeemReceiptResponse\x122\n" + - "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\x80\x01\n" + - "\x15failed_authentication\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x19\xc2\xd5\"\x15failed_authenticationH\x00R\x14failedAuthentication\x12m\n" + - "\x10already_redeemed\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x14\xc2\xd5\"\x10already_redeemedH\x00R\x0falreadyRedeemedB\n" + - "\n" + - "\bresponse\"[\n" + - "\x1bCreateDonationPermitRequest\x12<\n" + - "\x17donation_permit_request\x18\x01 \x01(\fB\x04\x88\x97\"\x01R\x15donationPermitRequest\"X\n" + - "\x1cCreateDonationPermitResponse\x128\n" + - "\x18donation_permit_response\x18\x01 \x01(\fR\x16donationPermitResponse2\x93\x02\n" + - "\tDonations\x12t\n" + - "\rRedeemReceipt\x12/.org.signal.chat.donations.RedeemReceiptRequest\x1a0.org.signal.chat.donations.RedeemReceiptResponse\"\x00\x12\x89\x01\n" + - "\x14CreateDonationPermit\x126.org.signal.chat.donations.CreateDonationPermitRequest\x1a7.org.signal.chat.donations.CreateDonationPermitResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_donations_proto_rawDescOnce sync.Once - file_org_signal_chat_donations_proto_rawDescData []byte -) - -func file_org_signal_chat_donations_proto_rawDescGZIP() []byte { - file_org_signal_chat_donations_proto_rawDescOnce.Do(func() { - file_org_signal_chat_donations_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_donations_proto_rawDesc), len(file_org_signal_chat_donations_proto_rawDesc))) - }) - return file_org_signal_chat_donations_proto_rawDescData -} - -var file_org_signal_chat_donations_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_org_signal_chat_donations_proto_goTypes = []any{ - (*RedeemReceiptRequest)(nil), // 0: org.signal.chat.donations.RedeemReceiptRequest - (*RedeemReceiptResponse)(nil), // 1: org.signal.chat.donations.RedeemReceiptResponse - (*CreateDonationPermitRequest)(nil), // 2: org.signal.chat.donations.CreateDonationPermitRequest - (*CreateDonationPermitResponse)(nil), // 3: org.signal.chat.donations.CreateDonationPermitResponse - (*emptypb.Empty)(nil), // 4: google.protobuf.Empty - (*errors.FailedZkAuthentication)(nil), // 5: org.signal.chat.errors.FailedZkAuthentication - (*errors.FailedPrecondition)(nil), // 6: org.signal.chat.errors.FailedPrecondition -} -var file_org_signal_chat_donations_proto_depIdxs = []int32{ - 4, // 0: org.signal.chat.donations.RedeemReceiptResponse.success:type_name -> google.protobuf.Empty - 5, // 1: org.signal.chat.donations.RedeemReceiptResponse.failed_authentication:type_name -> org.signal.chat.errors.FailedZkAuthentication - 6, // 2: org.signal.chat.donations.RedeemReceiptResponse.already_redeemed:type_name -> org.signal.chat.errors.FailedPrecondition - 0, // 3: org.signal.chat.donations.Donations.RedeemReceipt:input_type -> org.signal.chat.donations.RedeemReceiptRequest - 2, // 4: org.signal.chat.donations.Donations.CreateDonationPermit:input_type -> org.signal.chat.donations.CreateDonationPermitRequest - 1, // 5: org.signal.chat.donations.Donations.RedeemReceipt:output_type -> org.signal.chat.donations.RedeemReceiptResponse - 3, // 6: org.signal.chat.donations.Donations.CreateDonationPermit:output_type -> org.signal.chat.donations.CreateDonationPermitResponse - 5, // [5:7] is the sub-list for method output_type - 3, // [3:5] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_donations_proto_init() } -func file_org_signal_chat_donations_proto_init() { - if File_org_signal_chat_donations_proto != nil { - return - } - file_org_signal_chat_donations_proto_msgTypes[1].OneofWrappers = []any{ - (*RedeemReceiptResponse_Success)(nil), - (*RedeemReceiptResponse_FailedAuthentication)(nil), - (*RedeemReceiptResponse_AlreadyRedeemed)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_donations_proto_rawDesc), len(file_org_signal_chat_donations_proto_rawDesc)), - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_org_signal_chat_donations_proto_goTypes, - DependencyIndexes: file_org_signal_chat_donations_proto_depIdxs, - MessageInfos: file_org_signal_chat_donations_proto_msgTypes, - }.Build() - File_org_signal_chat_donations_proto = out.File - file_org_signal_chat_donations_proto_goTypes = nil - file_org_signal_chat_donations_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/donations/donations_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/donations/donations_grpc.pb.go deleted file mode 100644 index 7868dd8..0000000 --- a/pkg/signalmeow/protobuf/rpc/donations/donations_grpc.pb.go +++ /dev/null @@ -1,177 +0,0 @@ -// -// Copyright 2026 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/donations.proto - -package donations - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Donations_RedeemReceipt_FullMethodName = "/org.signal.chat.donations.Donations/RedeemReceipt" - Donations_CreateDonationPermit_FullMethodName = "/org.signal.chat.donations.Donations/CreateDonationPermit" -) - -// DonationsClient is the client API for Donations service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type DonationsClient interface { - // Redeem a receipt acquired from Subscriptions.CreateSubscriptionReceiptCredentials - // to add a badge to the account. After successful redemption, profile - // responses will include the corresponding badge (if configured as visible) - // until the expiration time on the receipt. - RedeemReceipt(ctx context.Context, in *RedeemReceiptRequest, opts ...grpc.CallOption) (*RedeemReceiptResponse, error) - // Generate a set of anonymous, single-use, permits for use with /v1/subscription endpoints. - // - // If rate limited, reduce requested permit count and/or try again after the prescribed delay. - CreateDonationPermit(ctx context.Context, in *CreateDonationPermitRequest, opts ...grpc.CallOption) (*CreateDonationPermitResponse, error) -} - -type donationsClient struct { - cc grpc.ClientConnInterface -} - -func NewDonationsClient(cc grpc.ClientConnInterface) DonationsClient { - return &donationsClient{cc} -} - -func (c *donationsClient) RedeemReceipt(ctx context.Context, in *RedeemReceiptRequest, opts ...grpc.CallOption) (*RedeemReceiptResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RedeemReceiptResponse) - err := c.cc.Invoke(ctx, Donations_RedeemReceipt_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *donationsClient) CreateDonationPermit(ctx context.Context, in *CreateDonationPermitRequest, opts ...grpc.CallOption) (*CreateDonationPermitResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateDonationPermitResponse) - err := c.cc.Invoke(ctx, Donations_CreateDonationPermit_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// DonationsServer is the server API for Donations service. -// All implementations must embed UnimplementedDonationsServer -// for forward compatibility. -type DonationsServer interface { - // Redeem a receipt acquired from Subscriptions.CreateSubscriptionReceiptCredentials - // to add a badge to the account. After successful redemption, profile - // responses will include the corresponding badge (if configured as visible) - // until the expiration time on the receipt. - RedeemReceipt(context.Context, *RedeemReceiptRequest) (*RedeemReceiptResponse, error) - // Generate a set of anonymous, single-use, permits for use with /v1/subscription endpoints. - // - // If rate limited, reduce requested permit count and/or try again after the prescribed delay. - CreateDonationPermit(context.Context, *CreateDonationPermitRequest) (*CreateDonationPermitResponse, error) - mustEmbedUnimplementedDonationsServer() -} - -// UnimplementedDonationsServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedDonationsServer struct{} - -func (UnimplementedDonationsServer) RedeemReceipt(context.Context, *RedeemReceiptRequest) (*RedeemReceiptResponse, error) { - return nil, status.Error(codes.Unimplemented, "method RedeemReceipt not implemented") -} -func (UnimplementedDonationsServer) CreateDonationPermit(context.Context, *CreateDonationPermitRequest) (*CreateDonationPermitResponse, error) { - return nil, status.Error(codes.Unimplemented, "method CreateDonationPermit not implemented") -} -func (UnimplementedDonationsServer) mustEmbedUnimplementedDonationsServer() {} -func (UnimplementedDonationsServer) testEmbeddedByValue() {} - -// UnsafeDonationsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to DonationsServer will -// result in compilation errors. -type UnsafeDonationsServer interface { - mustEmbedUnimplementedDonationsServer() -} - -func RegisterDonationsServer(s grpc.ServiceRegistrar, srv DonationsServer) { - // If the following call panics, it indicates UnimplementedDonationsServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Donations_ServiceDesc, srv) -} - -func _Donations_RedeemReceipt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RedeemReceiptRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DonationsServer).RedeemReceipt(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Donations_RedeemReceipt_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DonationsServer).RedeemReceipt(ctx, req.(*RedeemReceiptRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Donations_CreateDonationPermit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateDonationPermitRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DonationsServer).CreateDonationPermit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Donations_CreateDonationPermit_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DonationsServer).CreateDonationPermit(ctx, req.(*CreateDonationPermitRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Donations_ServiceDesc is the grpc.ServiceDesc for Donations service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Donations_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.donations.Donations", - HandlerType: (*DonationsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "RedeemReceipt", - Handler: _Donations_RedeemReceipt_Handler, - }, - { - MethodName: "CreateDonationPermit", - Handler: _Donations_CreateDonationPermit_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/donations.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/errors/errors.pb.go b/pkg/signalmeow/protobuf/rpc/errors/errors.pb.go deleted file mode 100644 index ba862bd..0000000 --- a/pkg/signalmeow/protobuf/rpc/errors/errors.pb.go +++ /dev/null @@ -1,269 +0,0 @@ -// -// Copyright 2025 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/errors.proto - -package errors - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Response message that indicates a particular resource was not found. -type NotFound struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NotFound) Reset() { - *x = NotFound{} - mi := &file_org_signal_chat_errors_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NotFound) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NotFound) ProtoMessage() {} - -func (x *NotFound) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_errors_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NotFound.ProtoReflect.Descriptor instead. -func (*NotFound) Descriptor() ([]byte, []int) { - return file_org_signal_chat_errors_proto_rawDescGZIP(), []int{0} -} - -// Response message that indicates that some precondition of the request was not -// met. For example, if there was a request to update foo, but foo had not been -// set, this would be an appropriate error. -type FailedPrecondition struct { - state protoimpl.MessageState `protogen:"open.v1"` - // An optional description indicating what precondition failed. - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FailedPrecondition) Reset() { - *x = FailedPrecondition{} - mi := &file_org_signal_chat_errors_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FailedPrecondition) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FailedPrecondition) ProtoMessage() {} - -func (x *FailedPrecondition) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_errors_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FailedPrecondition.ProtoReflect.Descriptor instead. -func (*FailedPrecondition) Descriptor() ([]byte, []int) { - return file_org_signal_chat_errors_proto_rawDescGZIP(), []int{1} -} - -func (x *FailedPrecondition) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -// Response message that authentication via an anonymous credential failed. -type FailedZkAuthentication struct { - state protoimpl.MessageState `protogen:"open.v1"` - // An optional description with additional information about the failure. - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FailedZkAuthentication) Reset() { - *x = FailedZkAuthentication{} - mi := &file_org_signal_chat_errors_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FailedZkAuthentication) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FailedZkAuthentication) ProtoMessage() {} - -func (x *FailedZkAuthentication) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_errors_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FailedZkAuthentication.ProtoReflect.Descriptor instead. -func (*FailedZkAuthentication) Descriptor() ([]byte, []int) { - return file_org_signal_chat_errors_proto_rawDescGZIP(), []int{2} -} - -func (x *FailedZkAuthentication) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -// Response message that indicates authorization to perform an unidentified -// operation via an endorsement or access key failed -type FailedUnidentifiedAuthorization struct { - state protoimpl.MessageState `protogen:"open.v1"` - // An optional description with additional information about the failure. - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FailedUnidentifiedAuthorization) Reset() { - *x = FailedUnidentifiedAuthorization{} - mi := &file_org_signal_chat_errors_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FailedUnidentifiedAuthorization) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FailedUnidentifiedAuthorization) ProtoMessage() {} - -func (x *FailedUnidentifiedAuthorization) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_errors_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FailedUnidentifiedAuthorization.ProtoReflect.Descriptor instead. -func (*FailedUnidentifiedAuthorization) Descriptor() ([]byte, []int) { - return file_org_signal_chat_errors_proto_rawDescGZIP(), []int{3} -} - -func (x *FailedUnidentifiedAuthorization) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -var File_org_signal_chat_errors_proto protoreflect.FileDescriptor - -const file_org_signal_chat_errors_proto_rawDesc = "" + - "\n" + - "\x1corg/signal/chat/errors.proto\x12\x16org.signal.chat.errors\"\n" + - "\n" + - "\bNotFound\"6\n" + - "\x12FailedPrecondition\x12 \n" + - "\vdescription\x18\x01 \x01(\tR\vdescription\":\n" + - "\x16FailedZkAuthentication\x12 \n" + - "\vdescription\x18\x01 \x01(\tR\vdescription\"C\n" + - "\x1fFailedUnidentifiedAuthorization\x12 \n" + - "\vdescription\x18\x01 \x01(\tR\vdescriptionB\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_errors_proto_rawDescOnce sync.Once - file_org_signal_chat_errors_proto_rawDescData []byte -) - -func file_org_signal_chat_errors_proto_rawDescGZIP() []byte { - file_org_signal_chat_errors_proto_rawDescOnce.Do(func() { - file_org_signal_chat_errors_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_errors_proto_rawDesc), len(file_org_signal_chat_errors_proto_rawDesc))) - }) - return file_org_signal_chat_errors_proto_rawDescData -} - -var file_org_signal_chat_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_org_signal_chat_errors_proto_goTypes = []any{ - (*NotFound)(nil), // 0: org.signal.chat.errors.NotFound - (*FailedPrecondition)(nil), // 1: org.signal.chat.errors.FailedPrecondition - (*FailedZkAuthentication)(nil), // 2: org.signal.chat.errors.FailedZkAuthentication - (*FailedUnidentifiedAuthorization)(nil), // 3: org.signal.chat.errors.FailedUnidentifiedAuthorization -} -var file_org_signal_chat_errors_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_errors_proto_init() } -func file_org_signal_chat_errors_proto_init() { - if File_org_signal_chat_errors_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_errors_proto_rawDesc), len(file_org_signal_chat_errors_proto_rawDesc)), - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_org_signal_chat_errors_proto_goTypes, - DependencyIndexes: file_org_signal_chat_errors_proto_depIdxs, - MessageInfos: file_org_signal_chat_errors_proto_msgTypes, - }.Build() - File_org_signal_chat_errors_proto = out.File - file_org_signal_chat_errors_proto_goTypes = nil - file_org_signal_chat_errors_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/keys/keys.pb.go b/pkg/signalmeow/protobuf/rpc/keys/keys.pb.go deleted file mode 100644 index 89be3b3..0000000 --- a/pkg/signalmeow/protobuf/rpc/keys/keys.pb.go +++ /dev/null @@ -1,1217 +0,0 @@ -// -// Copyright 2023 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/keys.proto - -package keys - -import ( - common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" - errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetPreKeyCountRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetPreKeyCountRequest) Reset() { - *x = GetPreKeyCountRequest{} - mi := &file_org_signal_chat_keys_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetPreKeyCountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPreKeyCountRequest) ProtoMessage() {} - -func (x *GetPreKeyCountRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_keys_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPreKeyCountRequest.ProtoReflect.Descriptor instead. -func (*GetPreKeyCountRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{0} -} - -type GetPreKeyCountResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The approximate number of one-time EC pre-keys stored for the - // authenticated device and associated with the caller's ACI. - AciEcPreKeyCount uint32 `protobuf:"varint,1,opt,name=aci_ec_pre_key_count,json=aciEcPreKeyCount,proto3" json:"aci_ec_pre_key_count,omitempty"` - // The approximate number of one-time Kyber pre-keys stored for the - // authenticated device and associated with the caller's ACI. - AciKemPreKeyCount uint32 `protobuf:"varint,2,opt,name=aci_kem_pre_key_count,json=aciKemPreKeyCount,proto3" json:"aci_kem_pre_key_count,omitempty"` - // The approximate number of one-time EC pre-keys stored for the - // authenticated device and associated with the caller's PNI. 0 if - // the account does not possess a phone number. - PniEcPreKeyCount uint32 `protobuf:"varint,3,opt,name=pni_ec_pre_key_count,json=pniEcPreKeyCount,proto3" json:"pni_ec_pre_key_count,omitempty"` - // The approximate number of one-time KEM pre-keys stored for the - // authenticated device and associated with the caller's PNI. 0 if - // the account does not possess a phone number. - PniKemPreKeyCount uint32 `protobuf:"varint,4,opt,name=pni_kem_pre_key_count,json=pniKemPreKeyCount,proto3" json:"pni_kem_pre_key_count,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetPreKeyCountResponse) Reset() { - *x = GetPreKeyCountResponse{} - mi := &file_org_signal_chat_keys_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetPreKeyCountResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPreKeyCountResponse) ProtoMessage() {} - -func (x *GetPreKeyCountResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_keys_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPreKeyCountResponse.ProtoReflect.Descriptor instead. -func (*GetPreKeyCountResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{1} -} - -func (x *GetPreKeyCountResponse) GetAciEcPreKeyCount() uint32 { - if x != nil { - return x.AciEcPreKeyCount - } - return 0 -} - -func (x *GetPreKeyCountResponse) GetAciKemPreKeyCount() uint32 { - if x != nil { - return x.AciKemPreKeyCount - } - return 0 -} - -func (x *GetPreKeyCountResponse) GetPniEcPreKeyCount() uint32 { - if x != nil { - return x.PniEcPreKeyCount - } - return 0 -} - -func (x *GetPreKeyCountResponse) GetPniKemPreKeyCount() uint32 { - if x != nil { - return x.PniKemPreKeyCount - } - return 0 -} - -type GetPreKeysRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The service identifier of the account for which to retrieve pre-keys. - TargetIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=target_identifier,json=targetIdentifier,proto3" json:"target_identifier,omitempty"` - // The ID of the device associated with the targeted account for which to - // retrieve pre-keys. If not set, pre-keys are returned for all devices - // associated with the targeted account. - DeviceId *uint32 `protobuf:"varint,2,opt,name=device_id,json=deviceId,proto3,oneof" json:"device_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetPreKeysRequest) Reset() { - *x = GetPreKeysRequest{} - mi := &file_org_signal_chat_keys_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetPreKeysRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPreKeysRequest) ProtoMessage() {} - -func (x *GetPreKeysRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_keys_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPreKeysRequest.ProtoReflect.Descriptor instead. -func (*GetPreKeysRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{2} -} - -func (x *GetPreKeysRequest) GetTargetIdentifier() *common.ServiceIdentifier { - if x != nil { - return x.TargetIdentifier - } - return nil -} - -func (x *GetPreKeysRequest) GetDeviceId() uint32 { - if x != nil && x.DeviceId != nil { - return *x.DeviceId - } - return 0 -} - -type GetPreKeysAnonymousRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The request to retrieve pre-keys for a specific account/device(s). - Request *GetPreKeysRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` - // A means to authorize the request. - // - // Types that are valid to be assigned to Authorization: - // - // *GetPreKeysAnonymousRequest_UnidentifiedAccessKey - // *GetPreKeysAnonymousRequest_GroupSendToken - // *GetPreKeysAnonymousRequest_UnrestrictedAccess - Authorization isGetPreKeysAnonymousRequest_Authorization `protobuf_oneof:"authorization"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetPreKeysAnonymousRequest) Reset() { - *x = GetPreKeysAnonymousRequest{} - mi := &file_org_signal_chat_keys_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetPreKeysAnonymousRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPreKeysAnonymousRequest) ProtoMessage() {} - -func (x *GetPreKeysAnonymousRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_keys_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPreKeysAnonymousRequest.ProtoReflect.Descriptor instead. -func (*GetPreKeysAnonymousRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{3} -} - -func (x *GetPreKeysAnonymousRequest) GetRequest() *GetPreKeysRequest { - if x != nil { - return x.Request - } - return nil -} - -func (x *GetPreKeysAnonymousRequest) GetAuthorization() isGetPreKeysAnonymousRequest_Authorization { - if x != nil { - return x.Authorization - } - return nil -} - -func (x *GetPreKeysAnonymousRequest) GetUnidentifiedAccessKey() []byte { - if x != nil { - if x, ok := x.Authorization.(*GetPreKeysAnonymousRequest_UnidentifiedAccessKey); ok { - return x.UnidentifiedAccessKey - } - } - return nil -} - -func (x *GetPreKeysAnonymousRequest) GetGroupSendToken() []byte { - if x != nil { - if x, ok := x.Authorization.(*GetPreKeysAnonymousRequest_GroupSendToken); ok { - return x.GroupSendToken - } - } - return nil -} - -func (x *GetPreKeysAnonymousRequest) GetUnrestrictedAccess() *emptypb.Empty { - if x != nil { - if x, ok := x.Authorization.(*GetPreKeysAnonymousRequest_UnrestrictedAccess); ok { - return x.UnrestrictedAccess - } - } - return nil -} - -type isGetPreKeysAnonymousRequest_Authorization interface { - isGetPreKeysAnonymousRequest_Authorization() -} - -type GetPreKeysAnonymousRequest_UnidentifiedAccessKey struct { - // The unidentified access key (UAK) for the targeted account. - UnidentifiedAccessKey []byte `protobuf:"bytes,2,opt,name=unidentified_access_key,json=unidentifiedAccessKey,proto3,oneof"` -} - -type GetPreKeysAnonymousRequest_GroupSendToken struct { - // A group send endorsement token for the targeted account. - GroupSendToken []byte `protobuf:"bytes,3,opt,name=group_send_token,json=groupSendToken,proto3,oneof"` -} - -type GetPreKeysAnonymousRequest_UnrestrictedAccess struct { - // The destination account allows unrestricted unidentified access - UnrestrictedAccess *emptypb.Empty `protobuf:"bytes,4,opt,name=unrestricted_access,json=unrestrictedAccess,proto3,oneof"` -} - -func (*GetPreKeysAnonymousRequest_UnidentifiedAccessKey) isGetPreKeysAnonymousRequest_Authorization() { -} - -func (*GetPreKeysAnonymousRequest_GroupSendToken) isGetPreKeysAnonymousRequest_Authorization() {} - -func (*GetPreKeysAnonymousRequest_UnrestrictedAccess) isGetPreKeysAnonymousRequest_Authorization() {} - -type DevicePreKeyBundle struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The EC signed pre-key associated with the targeted - // account/device/identity. - EcSignedPreKey *common.EcSignedPreKey `protobuf:"bytes,1,opt,name=ec_signed_pre_key,json=ecSignedPreKey,proto3" json:"ec_signed_pre_key,omitempty"` - // A one-time EC pre-key for the targeted account/device/identity. May not - // be set if no one-time EC pre-keys are available. - EcOneTimePreKey *common.EcPreKey `protobuf:"bytes,2,opt,name=ec_one_time_pre_key,json=ecOneTimePreKey,proto3" json:"ec_one_time_pre_key,omitempty"` - // A one-time KEM pre-key (or a last-resort KEM pre-key) for the targeted - // account/device/identity. - KemOneTimePreKey *common.KemSignedPreKey `protobuf:"bytes,3,opt,name=kem_one_time_pre_key,json=kemOneTimePreKey,proto3" json:"kem_one_time_pre_key,omitempty"` - // The registration ID for the targeted account/device/identity. - RegistrationId uint32 `protobuf:"varint,4,opt,name=registration_id,json=registrationId,proto3" json:"registration_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DevicePreKeyBundle) Reset() { - *x = DevicePreKeyBundle{} - mi := &file_org_signal_chat_keys_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DevicePreKeyBundle) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DevicePreKeyBundle) ProtoMessage() {} - -func (x *DevicePreKeyBundle) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_keys_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DevicePreKeyBundle.ProtoReflect.Descriptor instead. -func (*DevicePreKeyBundle) Descriptor() ([]byte, []int) { - return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{4} -} - -func (x *DevicePreKeyBundle) GetEcSignedPreKey() *common.EcSignedPreKey { - if x != nil { - return x.EcSignedPreKey - } - return nil -} - -func (x *DevicePreKeyBundle) GetEcOneTimePreKey() *common.EcPreKey { - if x != nil { - return x.EcOneTimePreKey - } - return nil -} - -func (x *DevicePreKeyBundle) GetKemOneTimePreKey() *common.KemSignedPreKey { - if x != nil { - return x.KemOneTimePreKey - } - return nil -} - -func (x *DevicePreKeyBundle) GetRegistrationId() uint32 { - if x != nil { - return x.RegistrationId - } - return 0 -} - -type AccountPreKeyBundles struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The identity key associated with the targeted account/identity. - IdentityKey []byte `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - // A map of device IDs to pre-key "bundles" for the targeted account. - DevicePreKeys map[uint32]*DevicePreKeyBundle `protobuf:"bytes,2,rep,name=device_pre_keys,json=devicePreKeys,proto3" json:"device_pre_keys,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // Whether the account has enabled sealed sender from anyone. Always false - // if the request was for a PNI, which does not allow any unidentified access. - UnrestrictedUnidentifiedAccess bool `protobuf:"varint,3,opt,name=unrestricted_unidentified_access,json=unrestrictedUnidentifiedAccess,proto3" json:"unrestricted_unidentified_access,omitempty"` - // If the target supports unidentified access and has an unidentified access - // key, a fingerprint of the target's UAK. This may be used to detect a change - // in the UAK that the sender has for the target before actually sending a message. Otherwise, empty. - UnidentifiedAccessKeyFingerprint []byte `protobuf:"bytes,4,opt,name=unidentified_access_key_fingerprint,json=unidentifiedAccessKeyFingerprint,proto3" json:"unidentified_access_key_fingerprint,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AccountPreKeyBundles) Reset() { - *x = AccountPreKeyBundles{} - mi := &file_org_signal_chat_keys_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AccountPreKeyBundles) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccountPreKeyBundles) ProtoMessage() {} - -func (x *AccountPreKeyBundles) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_keys_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccountPreKeyBundles.ProtoReflect.Descriptor instead. -func (*AccountPreKeyBundles) Descriptor() ([]byte, []int) { - return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{5} -} - -func (x *AccountPreKeyBundles) GetIdentityKey() []byte { - if x != nil { - return x.IdentityKey - } - return nil -} - -func (x *AccountPreKeyBundles) GetDevicePreKeys() map[uint32]*DevicePreKeyBundle { - if x != nil { - return x.DevicePreKeys - } - return nil -} - -func (x *AccountPreKeyBundles) GetUnrestrictedUnidentifiedAccess() bool { - if x != nil { - return x.UnrestrictedUnidentifiedAccess - } - return false -} - -func (x *AccountPreKeyBundles) GetUnidentifiedAccessKeyFingerprint() []byte { - if x != nil { - return x.UnidentifiedAccessKeyFingerprint - } - return nil -} - -type GetPreKeysResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetPreKeysResponse_PreKeys - // *GetPreKeysResponse_TargetNotFound - Response isGetPreKeysResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetPreKeysResponse) Reset() { - *x = GetPreKeysResponse{} - mi := &file_org_signal_chat_keys_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetPreKeysResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPreKeysResponse) ProtoMessage() {} - -func (x *GetPreKeysResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_keys_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPreKeysResponse.ProtoReflect.Descriptor instead. -func (*GetPreKeysResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{6} -} - -func (x *GetPreKeysResponse) GetResponse() isGetPreKeysResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetPreKeysResponse) GetPreKeys() *AccountPreKeyBundles { - if x != nil { - if x, ok := x.Response.(*GetPreKeysResponse_PreKeys); ok { - return x.PreKeys - } - } - return nil -} - -func (x *GetPreKeysResponse) GetTargetNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*GetPreKeysResponse_TargetNotFound); ok { - return x.TargetNotFound - } - } - return nil -} - -type isGetPreKeysResponse_Response interface { - isGetPreKeysResponse_Response() -} - -type GetPreKeysResponse_PreKeys struct { - // The requested pre-key bundles - PreKeys *AccountPreKeyBundles `protobuf:"bytes,1,opt,name=pre_keys,json=preKeys,proto3,oneof"` -} - -type GetPreKeysResponse_TargetNotFound struct { - // Either the target account was not found, no active device with the given - // ID (if specified) was found on the target account. - TargetNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=target_not_found,json=targetNotFound,proto3,oneof"` -} - -func (*GetPreKeysResponse_PreKeys) isGetPreKeysResponse_Response() {} - -func (*GetPreKeysResponse_TargetNotFound) isGetPreKeysResponse_Response() {} - -type GetPreKeysAnonymousResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetPreKeysAnonymousResponse_PreKeys - // *GetPreKeysAnonymousResponse_TargetNotFound - // *GetPreKeysAnonymousResponse_FailedUnidentifiedAuthorization - Response isGetPreKeysAnonymousResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetPreKeysAnonymousResponse) Reset() { - *x = GetPreKeysAnonymousResponse{} - mi := &file_org_signal_chat_keys_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetPreKeysAnonymousResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPreKeysAnonymousResponse) ProtoMessage() {} - -func (x *GetPreKeysAnonymousResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_keys_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPreKeysAnonymousResponse.ProtoReflect.Descriptor instead. -func (*GetPreKeysAnonymousResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{7} -} - -func (x *GetPreKeysAnonymousResponse) GetResponse() isGetPreKeysAnonymousResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetPreKeysAnonymousResponse) GetPreKeys() *AccountPreKeyBundles { - if x != nil { - if x, ok := x.Response.(*GetPreKeysAnonymousResponse_PreKeys); ok { - return x.PreKeys - } - } - return nil -} - -func (x *GetPreKeysAnonymousResponse) GetTargetNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*GetPreKeysAnonymousResponse_TargetNotFound); ok { - return x.TargetNotFound - } - } - return nil -} - -func (x *GetPreKeysAnonymousResponse) GetFailedUnidentifiedAuthorization() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*GetPreKeysAnonymousResponse_FailedUnidentifiedAuthorization); ok { - return x.FailedUnidentifiedAuthorization - } - } - return nil -} - -type isGetPreKeysAnonymousResponse_Response interface { - isGetPreKeysAnonymousResponse_Response() -} - -type GetPreKeysAnonymousResponse_PreKeys struct { - // The requested pre-key bundles - PreKeys *AccountPreKeyBundles `protobuf:"bytes,1,opt,name=pre_keys,json=preKeys,proto3,oneof"` -} - -type GetPreKeysAnonymousResponse_TargetNotFound struct { - // Either the target account was not found, no active device with the given - // ID (if specified) was found on the target account. - TargetNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=target_not_found,json=targetNotFound,proto3,oneof"` -} - -type GetPreKeysAnonymousResponse_FailedUnidentifiedAuthorization struct { - // The provided unidentified authorization credential was invalid - FailedUnidentifiedAuthorization *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=failed_unidentified_authorization,json=failedUnidentifiedAuthorization,proto3,oneof"` -} - -func (*GetPreKeysAnonymousResponse_PreKeys) isGetPreKeysAnonymousResponse_Response() {} - -func (*GetPreKeysAnonymousResponse_TargetNotFound) isGetPreKeysAnonymousResponse_Response() {} - -func (*GetPreKeysAnonymousResponse_FailedUnidentifiedAuthorization) isGetPreKeysAnonymousResponse_Response() { -} - -type SetOneTimeEcPreKeysRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The identity type (i.e. ACI/PNI) with which the keys in this request are - // associated. - IdentityType common.IdentityType `protobuf:"varint,1,opt,name=identity_type,json=identityType,proto3,enum=org.signal.chat.common.IdentityType" json:"identity_type,omitempty"` - // The unsigned EC pre-keys to be stored. - PreKeys []*common.EcPreKey `protobuf:"bytes,2,rep,name=pre_keys,json=preKeys,proto3" json:"pre_keys,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetOneTimeEcPreKeysRequest) Reset() { - *x = SetOneTimeEcPreKeysRequest{} - mi := &file_org_signal_chat_keys_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetOneTimeEcPreKeysRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetOneTimeEcPreKeysRequest) ProtoMessage() {} - -func (x *SetOneTimeEcPreKeysRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_keys_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetOneTimeEcPreKeysRequest.ProtoReflect.Descriptor instead. -func (*SetOneTimeEcPreKeysRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{8} -} - -func (x *SetOneTimeEcPreKeysRequest) GetIdentityType() common.IdentityType { - if x != nil { - return x.IdentityType - } - return common.IdentityType(0) -} - -func (x *SetOneTimeEcPreKeysRequest) GetPreKeys() []*common.EcPreKey { - if x != nil { - return x.PreKeys - } - return nil -} - -type SetOneTimeKemSignedPreKeysRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The identity type (i.e. ACI/PNI) with which the keys in this request are - // associated. - IdentityType common.IdentityType `protobuf:"varint,1,opt,name=identity_type,json=identityType,proto3,enum=org.signal.chat.common.IdentityType" json:"identity_type,omitempty"` - // The KEM pre-keys to be stored. - PreKeys []*common.KemSignedPreKey `protobuf:"bytes,2,rep,name=pre_keys,json=preKeys,proto3" json:"pre_keys,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetOneTimeKemSignedPreKeysRequest) Reset() { - *x = SetOneTimeKemSignedPreKeysRequest{} - mi := &file_org_signal_chat_keys_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetOneTimeKemSignedPreKeysRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetOneTimeKemSignedPreKeysRequest) ProtoMessage() {} - -func (x *SetOneTimeKemSignedPreKeysRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_keys_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetOneTimeKemSignedPreKeysRequest.ProtoReflect.Descriptor instead. -func (*SetOneTimeKemSignedPreKeysRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{9} -} - -func (x *SetOneTimeKemSignedPreKeysRequest) GetIdentityType() common.IdentityType { - if x != nil { - return x.IdentityType - } - return common.IdentityType(0) -} - -func (x *SetOneTimeKemSignedPreKeysRequest) GetPreKeys() []*common.KemSignedPreKey { - if x != nil { - return x.PreKeys - } - return nil -} - -type SetEcSignedPreKeyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The identity type (i.e. ACI/PNI) with which this key is associated. - IdentityType common.IdentityType `protobuf:"varint,1,opt,name=identity_type,json=identityType,proto3,enum=org.signal.chat.common.IdentityType" json:"identity_type,omitempty"` - // The signed EC pre-key itself. - SignedPreKey *common.EcSignedPreKey `protobuf:"bytes,2,opt,name=signed_pre_key,json=signedPreKey,proto3" json:"signed_pre_key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetEcSignedPreKeyRequest) Reset() { - *x = SetEcSignedPreKeyRequest{} - mi := &file_org_signal_chat_keys_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetEcSignedPreKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetEcSignedPreKeyRequest) ProtoMessage() {} - -func (x *SetEcSignedPreKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_keys_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetEcSignedPreKeyRequest.ProtoReflect.Descriptor instead. -func (*SetEcSignedPreKeyRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{10} -} - -func (x *SetEcSignedPreKeyRequest) GetIdentityType() common.IdentityType { - if x != nil { - return x.IdentityType - } - return common.IdentityType(0) -} - -func (x *SetEcSignedPreKeyRequest) GetSignedPreKey() *common.EcSignedPreKey { - if x != nil { - return x.SignedPreKey - } - return nil -} - -type SetKemLastResortPreKeyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The identity type (i.e. ACI/PNI) with which this key is associated. - IdentityType common.IdentityType `protobuf:"varint,1,opt,name=identity_type,json=identityType,proto3,enum=org.signal.chat.common.IdentityType" json:"identity_type,omitempty"` - // The signed KEM pre-key itself. - SignedPreKey *common.KemSignedPreKey `protobuf:"bytes,2,opt,name=signed_pre_key,json=signedPreKey,proto3" json:"signed_pre_key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetKemLastResortPreKeyRequest) Reset() { - *x = SetKemLastResortPreKeyRequest{} - mi := &file_org_signal_chat_keys_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetKemLastResortPreKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetKemLastResortPreKeyRequest) ProtoMessage() {} - -func (x *SetKemLastResortPreKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_keys_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetKemLastResortPreKeyRequest.ProtoReflect.Descriptor instead. -func (*SetKemLastResortPreKeyRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{11} -} - -func (x *SetKemLastResortPreKeyRequest) GetIdentityType() common.IdentityType { - if x != nil { - return x.IdentityType - } - return common.IdentityType(0) -} - -func (x *SetKemLastResortPreKeyRequest) GetSignedPreKey() *common.KemSignedPreKey { - if x != nil { - return x.SignedPreKey - } - return nil -} - -type SetPreKeyResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetPreKeyResponse) Reset() { - *x = SetPreKeyResponse{} - mi := &file_org_signal_chat_keys_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetPreKeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetPreKeyResponse) ProtoMessage() {} - -func (x *SetPreKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_keys_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetPreKeyResponse.ProtoReflect.Descriptor instead. -func (*SetPreKeyResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{12} -} - -type CheckIdentityKeyRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The service identifier of the account for which we want to check the associated identity key fingerprint. - TargetIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=target_identifier,json=targetIdentifier,proto3" json:"target_identifier,omitempty"` - // The most significant 4 bytes of the SHA-256 hash of the identity key associated with the target account/identity type. - Fingerprint []byte `protobuf:"bytes,2,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CheckIdentityKeyRequest) Reset() { - *x = CheckIdentityKeyRequest{} - mi := &file_org_signal_chat_keys_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CheckIdentityKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckIdentityKeyRequest) ProtoMessage() {} - -func (x *CheckIdentityKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_keys_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckIdentityKeyRequest.ProtoReflect.Descriptor instead. -func (*CheckIdentityKeyRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{13} -} - -func (x *CheckIdentityKeyRequest) GetTargetIdentifier() *common.ServiceIdentifier { - if x != nil { - return x.TargetIdentifier - } - return nil -} - -func (x *CheckIdentityKeyRequest) GetFingerprint() []byte { - if x != nil { - return x.Fingerprint - } - return nil -} - -type CheckIdentityKeyResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The service identifier of the account for which there is a mismatch between the client and server identity key fingerprints. - TargetIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=target_identifier,json=targetIdentifier,proto3" json:"target_identifier,omitempty"` - // The identity key that is stored by the server for the target account/identity type. - IdentityKey []byte `protobuf:"bytes,2,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CheckIdentityKeyResponse) Reset() { - *x = CheckIdentityKeyResponse{} - mi := &file_org_signal_chat_keys_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CheckIdentityKeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckIdentityKeyResponse) ProtoMessage() {} - -func (x *CheckIdentityKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_keys_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckIdentityKeyResponse.ProtoReflect.Descriptor instead. -func (*CheckIdentityKeyResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_keys_proto_rawDescGZIP(), []int{14} -} - -func (x *CheckIdentityKeyResponse) GetTargetIdentifier() *common.ServiceIdentifier { - if x != nil { - return x.TargetIdentifier - } - return nil -} - -func (x *CheckIdentityKeyResponse) GetIdentityKey() []byte { - if x != nil { - return x.IdentityKey - } - return nil -} - -var File_org_signal_chat_keys_proto protoreflect.FileDescriptor - -const file_org_signal_chat_keys_proto_rawDesc = "" + - "\n" + - "\x1aorg/signal/chat/keys.proto\x12\x14org.signal.chat.keys\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1corg/signal/chat/common.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x19org/signal/chat/tag.proto\"\x17\n" + - "\x15GetPreKeyCountRequest\"\xdc\x01\n" + - "\x16GetPreKeyCountResponse\x12.\n" + - "\x14aci_ec_pre_key_count\x18\x01 \x01(\rR\x10aciEcPreKeyCount\x120\n" + - "\x15aci_kem_pre_key_count\x18\x02 \x01(\rR\x11aciKemPreKeyCount\x12.\n" + - "\x14pni_ec_pre_key_count\x18\x03 \x01(\rR\x10pniEcPreKeyCount\x120\n" + - "\x15pni_kem_pre_key_count\x18\x04 \x01(\rR\x11pniKemPreKeyCount\"\x9b\x01\n" + - "\x11GetPreKeysRequest\x12V\n" + - "\x11target_identifier\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\x10targetIdentifier\x12 \n" + - "\tdevice_id\x18\x02 \x01(\rH\x00R\bdeviceId\x88\x01\x01B\f\n" + - "\n" + - "_device_id\"\xa1\x02\n" + - "\x1aGetPreKeysAnonymousRequest\x12A\n" + - "\arequest\x18\x01 \x01(\v2'.org.signal.chat.keys.GetPreKeysRequestR\arequest\x128\n" + - "\x17unidentified_access_key\x18\x02 \x01(\fH\x00R\x15unidentifiedAccessKey\x12*\n" + - "\x10group_send_token\x18\x03 \x01(\fH\x00R\x0egroupSendToken\x12I\n" + - "\x13unrestricted_access\x18\x04 \x01(\v2\x16.google.protobuf.EmptyH\x00R\x12unrestrictedAccessB\x0f\n" + - "\rauthorization\"\xb9\x02\n" + - "\x12DevicePreKeyBundle\x12Q\n" + - "\x11ec_signed_pre_key\x18\x01 \x01(\v2&.org.signal.chat.common.EcSignedPreKeyR\x0eecSignedPreKey\x12N\n" + - "\x13ec_one_time_pre_key\x18\x02 \x01(\v2 .org.signal.chat.common.EcPreKeyR\x0fecOneTimePreKey\x12W\n" + - "\x14kem_one_time_pre_key\x18\x03 \x01(\v2'.org.signal.chat.common.KemSignedPreKeyR\x10kemOneTimePreKey\x12'\n" + - "\x0fregistration_id\x18\x04 \x01(\rR\x0eregistrationId\"\xa5\x03\n" + - "\x14AccountPreKeyBundles\x12!\n" + - "\fidentity_key\x18\x01 \x01(\fR\videntityKey\x12e\n" + - "\x0fdevice_pre_keys\x18\x02 \x03(\v2=.org.signal.chat.keys.AccountPreKeyBundles.DevicePreKeysEntryR\rdevicePreKeys\x12H\n" + - " unrestricted_unidentified_access\x18\x03 \x01(\bR\x1eunrestrictedUnidentifiedAccess\x12M\n" + - "#unidentified_access_key_fingerprint\x18\x04 \x01(\fR unidentifiedAccessKeyFingerprint\x1aj\n" + - "\x12DevicePreKeysEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\rR\x03key\x12>\n" + - "\x05value\x18\x02 \x01(\v2(.org.signal.chat.keys.DevicePreKeyBundleR\x05value:\x028\x01\"\xc6\x01\n" + - "\x12GetPreKeysResponse\x12G\n" + - "\bpre_keys\x18\x01 \x01(\v2*.org.signal.chat.keys.AccountPreKeyBundlesH\x00R\apreKeys\x12[\n" + - "\x10target_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\r\xc2\xd5\"\tnot_foundH\x00R\x0etargetNotFoundB\n" + - "\n" + - "\bresponse\"\xfe\x02\n" + - "\x1bGetPreKeysAnonymousResponse\x12G\n" + - "\bpre_keys\x18\x01 \x01(\v2*.org.signal.chat.keys.AccountPreKeyBundlesH\x00R\apreKeys\x12[\n" + - "\x10target_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\r\xc2\xd5\"\tnot_foundH\x00R\x0etargetNotFound\x12\xac\x01\n" + - "!failed_unidentified_authorization\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB%\xc2\xd5\"!failed_unidentified_authorizationH\x00R\x1ffailedUnidentifiedAuthorizationB\n" + - "\n" + - "\bresponse\"\xae\x01\n" + - "\x1aSetOneTimeEcPreKeysRequest\x12I\n" + - "\ridentity_type\x18\x01 \x01(\x0e2$.org.signal.chat.common.IdentityTypeR\fidentityType\x12E\n" + - "\bpre_keys\x18\x02 \x03(\v2 .org.signal.chat.common.EcPreKeyB\b\x9a\x97\"\x04\b\x01\x10dR\apreKeys\"\xbc\x01\n" + - "!SetOneTimeKemSignedPreKeysRequest\x12I\n" + - "\ridentity_type\x18\x01 \x01(\x0e2$.org.signal.chat.common.IdentityTypeR\fidentityType\x12L\n" + - "\bpre_keys\x18\x02 \x03(\v2'.org.signal.chat.common.KemSignedPreKeyB\b\x9a\x97\"\x04\b\x01\x10dR\apreKeys\"\xb9\x01\n" + - "\x18SetEcSignedPreKeyRequest\x12I\n" + - "\ridentity_type\x18\x01 \x01(\x0e2$.org.signal.chat.common.IdentityTypeR\fidentityType\x12R\n" + - "\x0esigned_pre_key\x18\x02 \x01(\v2&.org.signal.chat.common.EcSignedPreKeyB\x04\xb8\x97\"\x01R\fsignedPreKey\"\xbf\x01\n" + - "\x1dSetKemLastResortPreKeyRequest\x12I\n" + - "\ridentity_type\x18\x01 \x01(\x0e2$.org.signal.chat.common.IdentityTypeR\fidentityType\x12S\n" + - "\x0esigned_pre_key\x18\x02 \x01(\v2'.org.signal.chat.common.KemSignedPreKeyB\x04\xb8\x97\"\x01R\fsignedPreKey\"\x13\n" + - "\x11SetPreKeyResponse\"\x9a\x01\n" + - "\x17CheckIdentityKeyRequest\x12V\n" + - "\x11target_identifier\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\x10targetIdentifier\x12'\n" + - "\vfingerprint\x18\x02 \x01(\fB\x05\xa2\x97\"\x01\x04R\vfingerprint\"\x95\x01\n" + - "\x18CheckIdentityKeyResponse\x12V\n" + - "\x11target_identifier\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\x10targetIdentifier\x12!\n" + - "\fidentity_key\x18\x02 \x01(\fR\videntityKey2\xbf\x05\n" + - "\x04Keys\x12m\n" + - "\x0eGetPreKeyCount\x12+.org.signal.chat.keys.GetPreKeyCountRequest\x1a,.org.signal.chat.keys.GetPreKeyCountResponse\"\x00\x12a\n" + - "\n" + - "GetPreKeys\x12'.org.signal.chat.keys.GetPreKeysRequest\x1a(.org.signal.chat.keys.GetPreKeysResponse\"\x00\x12r\n" + - "\x13SetOneTimeEcPreKeys\x120.org.signal.chat.keys.SetOneTimeEcPreKeysRequest\x1a'.org.signal.chat.keys.SetPreKeyResponse\"\x00\x12\x80\x01\n" + - "\x1aSetOneTimeKemSignedPreKeys\x127.org.signal.chat.keys.SetOneTimeKemSignedPreKeysRequest\x1a'.org.signal.chat.keys.SetPreKeyResponse\"\x00\x12n\n" + - "\x11SetEcSignedPreKey\x12..org.signal.chat.keys.SetEcSignedPreKeyRequest\x1a'.org.signal.chat.keys.SetPreKeyResponse\"\x00\x12x\n" + - "\x16SetKemLastResortPreKey\x123.org.signal.chat.keys.SetKemLastResortPreKeyRequest\x1a'.org.signal.chat.keys.SetPreKeyResponse\"\x00\x1a\x04\xc8\xd5\"\x012\x84\x02\n" + - "\rKeysAnonymous\x12s\n" + - "\n" + - "GetPreKeys\x120.org.signal.chat.keys.GetPreKeysAnonymousRequest\x1a1.org.signal.chat.keys.GetPreKeysAnonymousResponse\"\x00\x12x\n" + - "\x11CheckIdentityKeys\x12-.org.signal.chat.keys.CheckIdentityKeyRequest\x1a..org.signal.chat.keys.CheckIdentityKeyResponse\"\x00(\x010\x01\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_keys_proto_rawDescOnce sync.Once - file_org_signal_chat_keys_proto_rawDescData []byte -) - -func file_org_signal_chat_keys_proto_rawDescGZIP() []byte { - file_org_signal_chat_keys_proto_rawDescOnce.Do(func() { - file_org_signal_chat_keys_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_keys_proto_rawDesc), len(file_org_signal_chat_keys_proto_rawDesc))) - }) - return file_org_signal_chat_keys_proto_rawDescData -} - -var file_org_signal_chat_keys_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_org_signal_chat_keys_proto_goTypes = []any{ - (*GetPreKeyCountRequest)(nil), // 0: org.signal.chat.keys.GetPreKeyCountRequest - (*GetPreKeyCountResponse)(nil), // 1: org.signal.chat.keys.GetPreKeyCountResponse - (*GetPreKeysRequest)(nil), // 2: org.signal.chat.keys.GetPreKeysRequest - (*GetPreKeysAnonymousRequest)(nil), // 3: org.signal.chat.keys.GetPreKeysAnonymousRequest - (*DevicePreKeyBundle)(nil), // 4: org.signal.chat.keys.DevicePreKeyBundle - (*AccountPreKeyBundles)(nil), // 5: org.signal.chat.keys.AccountPreKeyBundles - (*GetPreKeysResponse)(nil), // 6: org.signal.chat.keys.GetPreKeysResponse - (*GetPreKeysAnonymousResponse)(nil), // 7: org.signal.chat.keys.GetPreKeysAnonymousResponse - (*SetOneTimeEcPreKeysRequest)(nil), // 8: org.signal.chat.keys.SetOneTimeEcPreKeysRequest - (*SetOneTimeKemSignedPreKeysRequest)(nil), // 9: org.signal.chat.keys.SetOneTimeKemSignedPreKeysRequest - (*SetEcSignedPreKeyRequest)(nil), // 10: org.signal.chat.keys.SetEcSignedPreKeyRequest - (*SetKemLastResortPreKeyRequest)(nil), // 11: org.signal.chat.keys.SetKemLastResortPreKeyRequest - (*SetPreKeyResponse)(nil), // 12: org.signal.chat.keys.SetPreKeyResponse - (*CheckIdentityKeyRequest)(nil), // 13: org.signal.chat.keys.CheckIdentityKeyRequest - (*CheckIdentityKeyResponse)(nil), // 14: org.signal.chat.keys.CheckIdentityKeyResponse - nil, // 15: org.signal.chat.keys.AccountPreKeyBundles.DevicePreKeysEntry - (*common.ServiceIdentifier)(nil), // 16: org.signal.chat.common.ServiceIdentifier - (*emptypb.Empty)(nil), // 17: google.protobuf.Empty - (*common.EcSignedPreKey)(nil), // 18: org.signal.chat.common.EcSignedPreKey - (*common.EcPreKey)(nil), // 19: org.signal.chat.common.EcPreKey - (*common.KemSignedPreKey)(nil), // 20: org.signal.chat.common.KemSignedPreKey - (*errors.NotFound)(nil), // 21: org.signal.chat.errors.NotFound - (*errors.FailedUnidentifiedAuthorization)(nil), // 22: org.signal.chat.errors.FailedUnidentifiedAuthorization - (common.IdentityType)(0), // 23: org.signal.chat.common.IdentityType -} -var file_org_signal_chat_keys_proto_depIdxs = []int32{ - 16, // 0: org.signal.chat.keys.GetPreKeysRequest.target_identifier:type_name -> org.signal.chat.common.ServiceIdentifier - 2, // 1: org.signal.chat.keys.GetPreKeysAnonymousRequest.request:type_name -> org.signal.chat.keys.GetPreKeysRequest - 17, // 2: org.signal.chat.keys.GetPreKeysAnonymousRequest.unrestricted_access:type_name -> google.protobuf.Empty - 18, // 3: org.signal.chat.keys.DevicePreKeyBundle.ec_signed_pre_key:type_name -> org.signal.chat.common.EcSignedPreKey - 19, // 4: org.signal.chat.keys.DevicePreKeyBundle.ec_one_time_pre_key:type_name -> org.signal.chat.common.EcPreKey - 20, // 5: org.signal.chat.keys.DevicePreKeyBundle.kem_one_time_pre_key:type_name -> org.signal.chat.common.KemSignedPreKey - 15, // 6: org.signal.chat.keys.AccountPreKeyBundles.device_pre_keys:type_name -> org.signal.chat.keys.AccountPreKeyBundles.DevicePreKeysEntry - 5, // 7: org.signal.chat.keys.GetPreKeysResponse.pre_keys:type_name -> org.signal.chat.keys.AccountPreKeyBundles - 21, // 8: org.signal.chat.keys.GetPreKeysResponse.target_not_found:type_name -> org.signal.chat.errors.NotFound - 5, // 9: org.signal.chat.keys.GetPreKeysAnonymousResponse.pre_keys:type_name -> org.signal.chat.keys.AccountPreKeyBundles - 21, // 10: org.signal.chat.keys.GetPreKeysAnonymousResponse.target_not_found:type_name -> org.signal.chat.errors.NotFound - 22, // 11: org.signal.chat.keys.GetPreKeysAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 23, // 12: org.signal.chat.keys.SetOneTimeEcPreKeysRequest.identity_type:type_name -> org.signal.chat.common.IdentityType - 19, // 13: org.signal.chat.keys.SetOneTimeEcPreKeysRequest.pre_keys:type_name -> org.signal.chat.common.EcPreKey - 23, // 14: org.signal.chat.keys.SetOneTimeKemSignedPreKeysRequest.identity_type:type_name -> org.signal.chat.common.IdentityType - 20, // 15: org.signal.chat.keys.SetOneTimeKemSignedPreKeysRequest.pre_keys:type_name -> org.signal.chat.common.KemSignedPreKey - 23, // 16: org.signal.chat.keys.SetEcSignedPreKeyRequest.identity_type:type_name -> org.signal.chat.common.IdentityType - 18, // 17: org.signal.chat.keys.SetEcSignedPreKeyRequest.signed_pre_key:type_name -> org.signal.chat.common.EcSignedPreKey - 23, // 18: org.signal.chat.keys.SetKemLastResortPreKeyRequest.identity_type:type_name -> org.signal.chat.common.IdentityType - 20, // 19: org.signal.chat.keys.SetKemLastResortPreKeyRequest.signed_pre_key:type_name -> org.signal.chat.common.KemSignedPreKey - 16, // 20: org.signal.chat.keys.CheckIdentityKeyRequest.target_identifier:type_name -> org.signal.chat.common.ServiceIdentifier - 16, // 21: org.signal.chat.keys.CheckIdentityKeyResponse.target_identifier:type_name -> org.signal.chat.common.ServiceIdentifier - 4, // 22: org.signal.chat.keys.AccountPreKeyBundles.DevicePreKeysEntry.value:type_name -> org.signal.chat.keys.DevicePreKeyBundle - 0, // 23: org.signal.chat.keys.Keys.GetPreKeyCount:input_type -> org.signal.chat.keys.GetPreKeyCountRequest - 2, // 24: org.signal.chat.keys.Keys.GetPreKeys:input_type -> org.signal.chat.keys.GetPreKeysRequest - 8, // 25: org.signal.chat.keys.Keys.SetOneTimeEcPreKeys:input_type -> org.signal.chat.keys.SetOneTimeEcPreKeysRequest - 9, // 26: org.signal.chat.keys.Keys.SetOneTimeKemSignedPreKeys:input_type -> org.signal.chat.keys.SetOneTimeKemSignedPreKeysRequest - 10, // 27: org.signal.chat.keys.Keys.SetEcSignedPreKey:input_type -> org.signal.chat.keys.SetEcSignedPreKeyRequest - 11, // 28: org.signal.chat.keys.Keys.SetKemLastResortPreKey:input_type -> org.signal.chat.keys.SetKemLastResortPreKeyRequest - 3, // 29: org.signal.chat.keys.KeysAnonymous.GetPreKeys:input_type -> org.signal.chat.keys.GetPreKeysAnonymousRequest - 13, // 30: org.signal.chat.keys.KeysAnonymous.CheckIdentityKeys:input_type -> org.signal.chat.keys.CheckIdentityKeyRequest - 1, // 31: org.signal.chat.keys.Keys.GetPreKeyCount:output_type -> org.signal.chat.keys.GetPreKeyCountResponse - 6, // 32: org.signal.chat.keys.Keys.GetPreKeys:output_type -> org.signal.chat.keys.GetPreKeysResponse - 12, // 33: org.signal.chat.keys.Keys.SetOneTimeEcPreKeys:output_type -> org.signal.chat.keys.SetPreKeyResponse - 12, // 34: org.signal.chat.keys.Keys.SetOneTimeKemSignedPreKeys:output_type -> org.signal.chat.keys.SetPreKeyResponse - 12, // 35: org.signal.chat.keys.Keys.SetEcSignedPreKey:output_type -> org.signal.chat.keys.SetPreKeyResponse - 12, // 36: org.signal.chat.keys.Keys.SetKemLastResortPreKey:output_type -> org.signal.chat.keys.SetPreKeyResponse - 7, // 37: org.signal.chat.keys.KeysAnonymous.GetPreKeys:output_type -> org.signal.chat.keys.GetPreKeysAnonymousResponse - 14, // 38: org.signal.chat.keys.KeysAnonymous.CheckIdentityKeys:output_type -> org.signal.chat.keys.CheckIdentityKeyResponse - 31, // [31:39] is the sub-list for method output_type - 23, // [23:31] is the sub-list for method input_type - 23, // [23:23] is the sub-list for extension type_name - 23, // [23:23] is the sub-list for extension extendee - 0, // [0:23] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_keys_proto_init() } -func file_org_signal_chat_keys_proto_init() { - if File_org_signal_chat_keys_proto != nil { - return - } - file_org_signal_chat_keys_proto_msgTypes[2].OneofWrappers = []any{} - file_org_signal_chat_keys_proto_msgTypes[3].OneofWrappers = []any{ - (*GetPreKeysAnonymousRequest_UnidentifiedAccessKey)(nil), - (*GetPreKeysAnonymousRequest_GroupSendToken)(nil), - (*GetPreKeysAnonymousRequest_UnrestrictedAccess)(nil), - } - file_org_signal_chat_keys_proto_msgTypes[6].OneofWrappers = []any{ - (*GetPreKeysResponse_PreKeys)(nil), - (*GetPreKeysResponse_TargetNotFound)(nil), - } - file_org_signal_chat_keys_proto_msgTypes[7].OneofWrappers = []any{ - (*GetPreKeysAnonymousResponse_PreKeys)(nil), - (*GetPreKeysAnonymousResponse_TargetNotFound)(nil), - (*GetPreKeysAnonymousResponse_FailedUnidentifiedAuthorization)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_keys_proto_rawDesc), len(file_org_signal_chat_keys_proto_rawDesc)), - NumEnums: 0, - NumMessages: 16, - NumExtensions: 0, - NumServices: 2, - }, - GoTypes: file_org_signal_chat_keys_proto_goTypes, - DependencyIndexes: file_org_signal_chat_keys_proto_depIdxs, - MessageInfos: file_org_signal_chat_keys_proto_msgTypes, - }.Build() - File_org_signal_chat_keys_proto = out.File - file_org_signal_chat_keys_proto_goTypes = nil - file_org_signal_chat_keys_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/keys/keys_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/keys/keys_grpc.pb.go deleted file mode 100644 index c2a20c4..0000000 --- a/pkg/signalmeow/protobuf/rpc/keys/keys_grpc.pb.go +++ /dev/null @@ -1,524 +0,0 @@ -// -// Copyright 2023 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/keys.proto - -package keys - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Keys_GetPreKeyCount_FullMethodName = "/org.signal.chat.keys.Keys/GetPreKeyCount" - Keys_GetPreKeys_FullMethodName = "/org.signal.chat.keys.Keys/GetPreKeys" - Keys_SetOneTimeEcPreKeys_FullMethodName = "/org.signal.chat.keys.Keys/SetOneTimeEcPreKeys" - Keys_SetOneTimeKemSignedPreKeys_FullMethodName = "/org.signal.chat.keys.Keys/SetOneTimeKemSignedPreKeys" - Keys_SetEcSignedPreKey_FullMethodName = "/org.signal.chat.keys.Keys/SetEcSignedPreKey" - Keys_SetKemLastResortPreKey_FullMethodName = "/org.signal.chat.keys.Keys/SetKemLastResortPreKey" -) - -// KeysClient is the client API for Keys service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Provides methods for working with pre-keys. -type KeysClient interface { - // Retrieves an approximate count of the number of the various kinds of - // pre-keys stored for the authenticated device. - GetPreKeyCount(ctx context.Context, in *GetPreKeyCountRequest, opts ...grpc.CallOption) (*GetPreKeyCountResponse, error) - // Retrieves a set of pre-keys for establishing a session with the targeted - // device or devices. Note that callers with an unidentified access key for - // the targeted account should use the version of this method in - // `KeysAnonymous` instead. - GetPreKeys(ctx context.Context, in *GetPreKeysRequest, opts ...grpc.CallOption) (*GetPreKeysResponse, error) - // Uploads a new set of one-time EC pre-keys for the authenticated device, - // clearing any previously-stored pre-keys. Note that all keys submitted via - // a single call to this method _must_ have the same identity type (i.e. if - // the first key has an ACI identity type, then all other keys in the same - // stream must also have an ACI identity type). The provided list of pre-keys - // must be non-empty. - SetOneTimeEcPreKeys(ctx context.Context, in *SetOneTimeEcPreKeysRequest, opts ...grpc.CallOption) (*SetPreKeyResponse, error) - // Uploads a new set of one-time KEM pre-keys for the authenticated device, - // clearing any previously-stored pre-keys. Note that all keys submitted via - // a single call to this method _must_ have the same identity type (i.e. if - // the first key has an ACI identity type, then all other keys in the same - // stream must also have an ACI identity type). The provided list of pre-keys - // must be non-empty. - SetOneTimeKemSignedPreKeys(ctx context.Context, in *SetOneTimeKemSignedPreKeysRequest, opts ...grpc.CallOption) (*SetPreKeyResponse, error) - // Sets the signed EC pre-key for one identity (i.e. ACI or PNI) associated - // with the authenticated device. - SetEcSignedPreKey(ctx context.Context, in *SetEcSignedPreKeyRequest, opts ...grpc.CallOption) (*SetPreKeyResponse, error) - // Sets the last-resort KEM pre-key for one identity (i.e. ACI or PNI) - // associated with the authenticated device. - SetKemLastResortPreKey(ctx context.Context, in *SetKemLastResortPreKeyRequest, opts ...grpc.CallOption) (*SetPreKeyResponse, error) -} - -type keysClient struct { - cc grpc.ClientConnInterface -} - -func NewKeysClient(cc grpc.ClientConnInterface) KeysClient { - return &keysClient{cc} -} - -func (c *keysClient) GetPreKeyCount(ctx context.Context, in *GetPreKeyCountRequest, opts ...grpc.CallOption) (*GetPreKeyCountResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetPreKeyCountResponse) - err := c.cc.Invoke(ctx, Keys_GetPreKeyCount_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keysClient) GetPreKeys(ctx context.Context, in *GetPreKeysRequest, opts ...grpc.CallOption) (*GetPreKeysResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetPreKeysResponse) - err := c.cc.Invoke(ctx, Keys_GetPreKeys_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keysClient) SetOneTimeEcPreKeys(ctx context.Context, in *SetOneTimeEcPreKeysRequest, opts ...grpc.CallOption) (*SetPreKeyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetPreKeyResponse) - err := c.cc.Invoke(ctx, Keys_SetOneTimeEcPreKeys_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keysClient) SetOneTimeKemSignedPreKeys(ctx context.Context, in *SetOneTimeKemSignedPreKeysRequest, opts ...grpc.CallOption) (*SetPreKeyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetPreKeyResponse) - err := c.cc.Invoke(ctx, Keys_SetOneTimeKemSignedPreKeys_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keysClient) SetEcSignedPreKey(ctx context.Context, in *SetEcSignedPreKeyRequest, opts ...grpc.CallOption) (*SetPreKeyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetPreKeyResponse) - err := c.cc.Invoke(ctx, Keys_SetEcSignedPreKey_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keysClient) SetKemLastResortPreKey(ctx context.Context, in *SetKemLastResortPreKeyRequest, opts ...grpc.CallOption) (*SetPreKeyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetPreKeyResponse) - err := c.cc.Invoke(ctx, Keys_SetKemLastResortPreKey_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// KeysServer is the server API for Keys service. -// All implementations must embed UnimplementedKeysServer -// for forward compatibility. -// -// Provides methods for working with pre-keys. -type KeysServer interface { - // Retrieves an approximate count of the number of the various kinds of - // pre-keys stored for the authenticated device. - GetPreKeyCount(context.Context, *GetPreKeyCountRequest) (*GetPreKeyCountResponse, error) - // Retrieves a set of pre-keys for establishing a session with the targeted - // device or devices. Note that callers with an unidentified access key for - // the targeted account should use the version of this method in - // `KeysAnonymous` instead. - GetPreKeys(context.Context, *GetPreKeysRequest) (*GetPreKeysResponse, error) - // Uploads a new set of one-time EC pre-keys for the authenticated device, - // clearing any previously-stored pre-keys. Note that all keys submitted via - // a single call to this method _must_ have the same identity type (i.e. if - // the first key has an ACI identity type, then all other keys in the same - // stream must also have an ACI identity type). The provided list of pre-keys - // must be non-empty. - SetOneTimeEcPreKeys(context.Context, *SetOneTimeEcPreKeysRequest) (*SetPreKeyResponse, error) - // Uploads a new set of one-time KEM pre-keys for the authenticated device, - // clearing any previously-stored pre-keys. Note that all keys submitted via - // a single call to this method _must_ have the same identity type (i.e. if - // the first key has an ACI identity type, then all other keys in the same - // stream must also have an ACI identity type). The provided list of pre-keys - // must be non-empty. - SetOneTimeKemSignedPreKeys(context.Context, *SetOneTimeKemSignedPreKeysRequest) (*SetPreKeyResponse, error) - // Sets the signed EC pre-key for one identity (i.e. ACI or PNI) associated - // with the authenticated device. - SetEcSignedPreKey(context.Context, *SetEcSignedPreKeyRequest) (*SetPreKeyResponse, error) - // Sets the last-resort KEM pre-key for one identity (i.e. ACI or PNI) - // associated with the authenticated device. - SetKemLastResortPreKey(context.Context, *SetKemLastResortPreKeyRequest) (*SetPreKeyResponse, error) - mustEmbedUnimplementedKeysServer() -} - -// UnimplementedKeysServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedKeysServer struct{} - -func (UnimplementedKeysServer) GetPreKeyCount(context.Context, *GetPreKeyCountRequest) (*GetPreKeyCountResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetPreKeyCount not implemented") -} -func (UnimplementedKeysServer) GetPreKeys(context.Context, *GetPreKeysRequest) (*GetPreKeysResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetPreKeys not implemented") -} -func (UnimplementedKeysServer) SetOneTimeEcPreKeys(context.Context, *SetOneTimeEcPreKeysRequest) (*SetPreKeyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetOneTimeEcPreKeys not implemented") -} -func (UnimplementedKeysServer) SetOneTimeKemSignedPreKeys(context.Context, *SetOneTimeKemSignedPreKeysRequest) (*SetPreKeyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetOneTimeKemSignedPreKeys not implemented") -} -func (UnimplementedKeysServer) SetEcSignedPreKey(context.Context, *SetEcSignedPreKeyRequest) (*SetPreKeyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetEcSignedPreKey not implemented") -} -func (UnimplementedKeysServer) SetKemLastResortPreKey(context.Context, *SetKemLastResortPreKeyRequest) (*SetPreKeyResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetKemLastResortPreKey not implemented") -} -func (UnimplementedKeysServer) mustEmbedUnimplementedKeysServer() {} -func (UnimplementedKeysServer) testEmbeddedByValue() {} - -// UnsafeKeysServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to KeysServer will -// result in compilation errors. -type UnsafeKeysServer interface { - mustEmbedUnimplementedKeysServer() -} - -func RegisterKeysServer(s grpc.ServiceRegistrar, srv KeysServer) { - // If the following call panics, it indicates UnimplementedKeysServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Keys_ServiceDesc, srv) -} - -func _Keys_GetPreKeyCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPreKeyCountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeysServer).GetPreKeyCount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Keys_GetPreKeyCount_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).GetPreKeyCount(ctx, req.(*GetPreKeyCountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Keys_GetPreKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPreKeysRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeysServer).GetPreKeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Keys_GetPreKeys_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).GetPreKeys(ctx, req.(*GetPreKeysRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Keys_SetOneTimeEcPreKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetOneTimeEcPreKeysRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeysServer).SetOneTimeEcPreKeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Keys_SetOneTimeEcPreKeys_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).SetOneTimeEcPreKeys(ctx, req.(*SetOneTimeEcPreKeysRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Keys_SetOneTimeKemSignedPreKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetOneTimeKemSignedPreKeysRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeysServer).SetOneTimeKemSignedPreKeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Keys_SetOneTimeKemSignedPreKeys_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).SetOneTimeKemSignedPreKeys(ctx, req.(*SetOneTimeKemSignedPreKeysRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Keys_SetEcSignedPreKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetEcSignedPreKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeysServer).SetEcSignedPreKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Keys_SetEcSignedPreKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).SetEcSignedPreKey(ctx, req.(*SetEcSignedPreKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Keys_SetKemLastResortPreKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetKemLastResortPreKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeysServer).SetKemLastResortPreKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Keys_SetKemLastResortPreKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysServer).SetKemLastResortPreKey(ctx, req.(*SetKemLastResortPreKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Keys_ServiceDesc is the grpc.ServiceDesc for Keys service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Keys_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.keys.Keys", - HandlerType: (*KeysServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetPreKeyCount", - Handler: _Keys_GetPreKeyCount_Handler, - }, - { - MethodName: "GetPreKeys", - Handler: _Keys_GetPreKeys_Handler, - }, - { - MethodName: "SetOneTimeEcPreKeys", - Handler: _Keys_SetOneTimeEcPreKeys_Handler, - }, - { - MethodName: "SetOneTimeKemSignedPreKeys", - Handler: _Keys_SetOneTimeKemSignedPreKeys_Handler, - }, - { - MethodName: "SetEcSignedPreKey", - Handler: _Keys_SetEcSignedPreKey_Handler, - }, - { - MethodName: "SetKemLastResortPreKey", - Handler: _Keys_SetKemLastResortPreKey_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/keys.proto", -} - -const ( - KeysAnonymous_GetPreKeys_FullMethodName = "/org.signal.chat.keys.KeysAnonymous/GetPreKeys" - KeysAnonymous_CheckIdentityKeys_FullMethodName = "/org.signal.chat.keys.KeysAnonymous/CheckIdentityKeys" -) - -// KeysAnonymousClient is the client API for KeysAnonymous service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Provides methods for working with pre-keys using "unidentified access" -// credentials. -type KeysAnonymousClient interface { - // Retrieves a set of pre-keys for establishing a session with the targeted - // device or devices. Callers must not submit any self-identifying credentials - // when calling this method and must instead present the targeted account's - // unidentified access key as an anonymous authentication mechanism. Callers - // without an unidentified access key should use the equivalent, authenticated - // method in `Keys` instead. - GetPreKeys(ctx context.Context, in *GetPreKeysAnonymousRequest, opts ...grpc.CallOption) (*GetPreKeysAnonymousResponse, error) - // Checks identity key fingerprints of the target accounts. - // - // Returns a stream of elements, each one representing an account that had a mismatched - // identity key fingerprint with the server and the corresponding identity key stored by the server. - CheckIdentityKeys(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[CheckIdentityKeyRequest, CheckIdentityKeyResponse], error) -} - -type keysAnonymousClient struct { - cc grpc.ClientConnInterface -} - -func NewKeysAnonymousClient(cc grpc.ClientConnInterface) KeysAnonymousClient { - return &keysAnonymousClient{cc} -} - -func (c *keysAnonymousClient) GetPreKeys(ctx context.Context, in *GetPreKeysAnonymousRequest, opts ...grpc.CallOption) (*GetPreKeysAnonymousResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetPreKeysAnonymousResponse) - err := c.cc.Invoke(ctx, KeysAnonymous_GetPreKeys_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keysAnonymousClient) CheckIdentityKeys(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[CheckIdentityKeyRequest, CheckIdentityKeyResponse], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &KeysAnonymous_ServiceDesc.Streams[0], KeysAnonymous_CheckIdentityKeys_FullMethodName, cOpts...) - if err != nil { - return nil, err - } - x := &grpc.GenericClientStream[CheckIdentityKeyRequest, CheckIdentityKeyResponse]{ClientStream: stream} - return x, nil -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type KeysAnonymous_CheckIdentityKeysClient = grpc.BidiStreamingClient[CheckIdentityKeyRequest, CheckIdentityKeyResponse] - -// KeysAnonymousServer is the server API for KeysAnonymous service. -// All implementations must embed UnimplementedKeysAnonymousServer -// for forward compatibility. -// -// Provides methods for working with pre-keys using "unidentified access" -// credentials. -type KeysAnonymousServer interface { - // Retrieves a set of pre-keys for establishing a session with the targeted - // device or devices. Callers must not submit any self-identifying credentials - // when calling this method and must instead present the targeted account's - // unidentified access key as an anonymous authentication mechanism. Callers - // without an unidentified access key should use the equivalent, authenticated - // method in `Keys` instead. - GetPreKeys(context.Context, *GetPreKeysAnonymousRequest) (*GetPreKeysAnonymousResponse, error) - // Checks identity key fingerprints of the target accounts. - // - // Returns a stream of elements, each one representing an account that had a mismatched - // identity key fingerprint with the server and the corresponding identity key stored by the server. - CheckIdentityKeys(grpc.BidiStreamingServer[CheckIdentityKeyRequest, CheckIdentityKeyResponse]) error - mustEmbedUnimplementedKeysAnonymousServer() -} - -// UnimplementedKeysAnonymousServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedKeysAnonymousServer struct{} - -func (UnimplementedKeysAnonymousServer) GetPreKeys(context.Context, *GetPreKeysAnonymousRequest) (*GetPreKeysAnonymousResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetPreKeys not implemented") -} -func (UnimplementedKeysAnonymousServer) CheckIdentityKeys(grpc.BidiStreamingServer[CheckIdentityKeyRequest, CheckIdentityKeyResponse]) error { - return status.Error(codes.Unimplemented, "method CheckIdentityKeys not implemented") -} -func (UnimplementedKeysAnonymousServer) mustEmbedUnimplementedKeysAnonymousServer() {} -func (UnimplementedKeysAnonymousServer) testEmbeddedByValue() {} - -// UnsafeKeysAnonymousServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to KeysAnonymousServer will -// result in compilation errors. -type UnsafeKeysAnonymousServer interface { - mustEmbedUnimplementedKeysAnonymousServer() -} - -func RegisterKeysAnonymousServer(s grpc.ServiceRegistrar, srv KeysAnonymousServer) { - // If the following call panics, it indicates UnimplementedKeysAnonymousServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&KeysAnonymous_ServiceDesc, srv) -} - -func _KeysAnonymous_GetPreKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPreKeysAnonymousRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeysAnonymousServer).GetPreKeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: KeysAnonymous_GetPreKeys_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeysAnonymousServer).GetPreKeys(ctx, req.(*GetPreKeysAnonymousRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeysAnonymous_CheckIdentityKeys_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(KeysAnonymousServer).CheckIdentityKeys(&grpc.GenericServerStream[CheckIdentityKeyRequest, CheckIdentityKeyResponse]{ServerStream: stream}) -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type KeysAnonymous_CheckIdentityKeysServer = grpc.BidiStreamingServer[CheckIdentityKeyRequest, CheckIdentityKeyResponse] - -// KeysAnonymous_ServiceDesc is the grpc.ServiceDesc for KeysAnonymous service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var KeysAnonymous_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.keys.KeysAnonymous", - HandlerType: (*KeysAnonymousServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetPreKeys", - Handler: _KeysAnonymous_GetPreKeys_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "CheckIdentityKeys", - Handler: _KeysAnonymous_CheckIdentityKeys_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "org/signal/chat/keys.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/login_purchase/login_purchase.pb.go b/pkg/signalmeow/protobuf/rpc/login_purchase/login_purchase.pb.go deleted file mode 100644 index 7a75a86..0000000 --- a/pkg/signalmeow/protobuf/rpc/login_purchase/login_purchase.pb.go +++ /dev/null @@ -1,378 +0,0 @@ -// -// Copyright 2026 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/login_purchase.proto - -package login_purchase - -import ( - errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - subscriptions "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/subscriptions" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CreateLoginReceiptCredentialRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The payment processor. Currently, only GOOGLE_PLAY_BILLING and - // APPLE_APP_STORE are supported. - Processor subscriptions.PaymentProvider `protobuf:"varint,1,opt,name=processor,proto3,enum=org.signal.chat.purchase.PaymentProvider" json:"processor,omitempty"` - // The identifier of a completed purchase for a signal login within the - // payment provider - PurchaseIdentifier string `protobuf:"bytes,2,opt,name=purchase_identifier,json=purchaseIdentifier,proto3" json:"purchase_identifier,omitempty"` - // The receipt credential request. Subsequent retries to create a login - // credential for the same purchase_identifier must use an identical - // receipt_credential_request. - // - // Callers must validate that the generated receipt credential has the - // following properties: - // - // - Level == 300 (The login level) - // - ExpirationTime % 86400 == 0 - // - ExpirationTime == PurchaseTime + (5 * 366 * 86400) +/- (7 * 86400) - ReceiptCredentialRequest []byte `protobuf:"bytes,3,opt,name=receipt_credential_request,json=receiptCredentialRequest,proto3" json:"receipt_credential_request,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateLoginReceiptCredentialRequest) Reset() { - *x = CreateLoginReceiptCredentialRequest{} - mi := &file_org_signal_chat_login_purchase_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateLoginReceiptCredentialRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateLoginReceiptCredentialRequest) ProtoMessage() {} - -func (x *CreateLoginReceiptCredentialRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_login_purchase_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateLoginReceiptCredentialRequest.ProtoReflect.Descriptor instead. -func (*CreateLoginReceiptCredentialRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_login_purchase_proto_rawDescGZIP(), []int{0} -} - -func (x *CreateLoginReceiptCredentialRequest) GetProcessor() subscriptions.PaymentProvider { - if x != nil { - return x.Processor - } - return subscriptions.PaymentProvider(0) -} - -func (x *CreateLoginReceiptCredentialRequest) GetPurchaseIdentifier() string { - if x != nil { - return x.PurchaseIdentifier - } - return "" -} - -func (x *CreateLoginReceiptCredentialRequest) GetReceiptCredentialRequest() []byte { - if x != nil { - return x.ReceiptCredentialRequest - } - return nil -} - -type CreateLoginReceiptCredentialResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *CreateLoginReceiptCredentialResponse_Result - // *CreateLoginReceiptCredentialResponse_PaymentStillProcessing - // *CreateLoginReceiptCredentialResponse_PaymentRequired - // *CreateLoginReceiptCredentialResponse_PaymentNotFound - // *CreateLoginReceiptCredentialResponse_ReceiptAlreadyIssued - Response isCreateLoginReceiptCredentialResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateLoginReceiptCredentialResponse) Reset() { - *x = CreateLoginReceiptCredentialResponse{} - mi := &file_org_signal_chat_login_purchase_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateLoginReceiptCredentialResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateLoginReceiptCredentialResponse) ProtoMessage() {} - -func (x *CreateLoginReceiptCredentialResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_login_purchase_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateLoginReceiptCredentialResponse.ProtoReflect.Descriptor instead. -func (*CreateLoginReceiptCredentialResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_login_purchase_proto_rawDescGZIP(), []int{1} -} - -func (x *CreateLoginReceiptCredentialResponse) GetResponse() isCreateLoginReceiptCredentialResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *CreateLoginReceiptCredentialResponse) GetResult() *CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult { - if x != nil { - if x, ok := x.Response.(*CreateLoginReceiptCredentialResponse_Result); ok { - return x.Result - } - } - return nil -} - -func (x *CreateLoginReceiptCredentialResponse) GetPaymentStillProcessing() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*CreateLoginReceiptCredentialResponse_PaymentStillProcessing); ok { - return x.PaymentStillProcessing - } - } - return nil -} - -func (x *CreateLoginReceiptCredentialResponse) GetPaymentRequired() *subscriptions.PaymentRequired { - if x != nil { - if x, ok := x.Response.(*CreateLoginReceiptCredentialResponse_PaymentRequired); ok { - return x.PaymentRequired - } - } - return nil -} - -func (x *CreateLoginReceiptCredentialResponse) GetPaymentNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*CreateLoginReceiptCredentialResponse_PaymentNotFound); ok { - return x.PaymentNotFound - } - } - return nil -} - -func (x *CreateLoginReceiptCredentialResponse) GetReceiptAlreadyIssued() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*CreateLoginReceiptCredentialResponse_ReceiptAlreadyIssued); ok { - return x.ReceiptAlreadyIssued - } - } - return nil -} - -type isCreateLoginReceiptCredentialResponse_Response interface { - isCreateLoginReceiptCredentialResponse_Response() -} - -type CreateLoginReceiptCredentialResponse_Result struct { - Result *CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` -} - -type CreateLoginReceiptCredentialResponse_PaymentStillProcessing struct { - // The purchase is still pending with the payment provider. The client may retry later. - PaymentStillProcessing *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=payment_still_processing,json=paymentStillProcessing,proto3,oneof"` -} - -type CreateLoginReceiptCredentialResponse_PaymentRequired struct { - // The purchase did not complete successfully. - PaymentRequired *subscriptions.PaymentRequired `protobuf:"bytes,3,opt,name=payment_required,json=paymentRequired,proto3,oneof"` -} - -type CreateLoginReceiptCredentialResponse_PaymentNotFound struct { - // The payment provider has no purchase with the provided purchase_identifier - PaymentNotFound *errors.NotFound `protobuf:"bytes,4,opt,name=payment_not_found,json=paymentNotFound,proto3,oneof"` -} - -type CreateLoginReceiptCredentialResponse_ReceiptAlreadyIssued struct { - // The purchase was already redeemed for a receipt credential, but with a different receipt credential request - ReceiptAlreadyIssued *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=receipt_already_issued,json=receiptAlreadyIssued,proto3,oneof"` -} - -func (*CreateLoginReceiptCredentialResponse_Result) isCreateLoginReceiptCredentialResponse_Response() { -} - -func (*CreateLoginReceiptCredentialResponse_PaymentStillProcessing) isCreateLoginReceiptCredentialResponse_Response() { -} - -func (*CreateLoginReceiptCredentialResponse_PaymentRequired) isCreateLoginReceiptCredentialResponse_Response() { -} - -func (*CreateLoginReceiptCredentialResponse_PaymentNotFound) isCreateLoginReceiptCredentialResponse_Response() { -} - -func (*CreateLoginReceiptCredentialResponse_ReceiptAlreadyIssued) isCreateLoginReceiptCredentialResponse_Response() { -} - -type CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - ReceiptCredentialResponse []byte `protobuf:"bytes,1,opt,name=receipt_credential_response,json=receiptCredentialResponse,proto3" json:"receipt_credential_response,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult) Reset() { - *x = CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult{} - mi := &file_org_signal_chat_login_purchase_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult) ProtoMessage() {} - -func (x *CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_login_purchase_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult.ProtoReflect.Descriptor instead. -func (*CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_login_purchase_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult) GetReceiptCredentialResponse() []byte { - if x != nil { - return x.ReceiptCredentialResponse - } - return nil -} - -var File_org_signal_chat_login_purchase_proto protoreflect.FileDescriptor - -const file_org_signal_chat_login_purchase_proto_rawDesc = "" + - "\n" + - "$org/signal/chat/login_purchase.proto\x12\x18org.signal.chat.purchase\x1a\x1dorg/signal/chat/require.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x19org/signal/chat/tag.proto\x1a#org/signal/chat/subscriptions.proto\"\xef\x01\n" + - "#CreateLoginReceiptCredentialRequest\x12M\n" + - "\tprocessor\x18\x01 \x01(\x0e2).org.signal.chat.purchase.PaymentProviderB\x04\x90\x97\"\x01R\tprocessor\x125\n" + - "\x13purchase_identifier\x18\x02 \x01(\tB\x04\x88\x97\"\x01R\x12purchaseIdentifier\x12B\n" + - "\x1areceipt_credential_request\x18\x03 \x01(\fB\x04\x88\x97\"\x01R\x18receiptCredentialRequest\"\xf1\x05\n" + - "$CreateLoginReceiptCredentialResponse\x12{\n" + - "\x06result\x18\x01 \x01(\v2a.org.signal.chat.purchase.CreateLoginReceiptCredentialResponse.CreateLoginReceiptCredentialResultH\x00R\x06result\x12\x84\x01\n" + - "\x18payment_still_processing\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1c\xc2\xd5\"\x18payment_still_processingH\x00R\x16paymentStillProcessing\x12l\n" + - "\x10payment_required\x18\x03 \x01(\v2).org.signal.chat.purchase.PaymentRequiredB\x14\xc2\xd5\"\x10payment_requiredH\x00R\x0fpaymentRequired\x12e\n" + - "\x11payment_not_found\x18\x04 \x01(\v2 .org.signal.chat.errors.NotFoundB\x15\xc2\xd5\"\x11payment_not_foundH\x00R\x0fpaymentNotFound\x12~\n" + - "\x16receipt_already_issued\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1a\xc2\xd5\"\x16receipt_already_issuedH\x00R\x14receiptAlreadyIssued\x1ad\n" + - "\"CreateLoginReceiptCredentialResult\x12>\n" + - "\x1breceipt_credential_response\x18\x01 \x01(\fR\x19receiptCredentialResponseB\n" + - "\n" + - "\bresponse2\xb7\x01\n" + - "\rLoginPurchase\x12\x9f\x01\n" + - "\x1cCreateLoginReceiptCredential\x12=.org.signal.chat.purchase.CreateLoginReceiptCredentialRequest\x1a>.org.signal.chat.purchase.CreateLoginReceiptCredentialResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_login_purchase_proto_rawDescOnce sync.Once - file_org_signal_chat_login_purchase_proto_rawDescData []byte -) - -func file_org_signal_chat_login_purchase_proto_rawDescGZIP() []byte { - file_org_signal_chat_login_purchase_proto_rawDescOnce.Do(func() { - file_org_signal_chat_login_purchase_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_login_purchase_proto_rawDesc), len(file_org_signal_chat_login_purchase_proto_rawDesc))) - }) - return file_org_signal_chat_login_purchase_proto_rawDescData -} - -var file_org_signal_chat_login_purchase_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_org_signal_chat_login_purchase_proto_goTypes = []any{ - (*CreateLoginReceiptCredentialRequest)(nil), // 0: org.signal.chat.purchase.CreateLoginReceiptCredentialRequest - (*CreateLoginReceiptCredentialResponse)(nil), // 1: org.signal.chat.purchase.CreateLoginReceiptCredentialResponse - (*CreateLoginReceiptCredentialResponse_CreateLoginReceiptCredentialResult)(nil), // 2: org.signal.chat.purchase.CreateLoginReceiptCredentialResponse.CreateLoginReceiptCredentialResult - (subscriptions.PaymentProvider)(0), // 3: org.signal.chat.purchase.PaymentProvider - (*errors.FailedPrecondition)(nil), // 4: org.signal.chat.errors.FailedPrecondition - (*subscriptions.PaymentRequired)(nil), // 5: org.signal.chat.purchase.PaymentRequired - (*errors.NotFound)(nil), // 6: org.signal.chat.errors.NotFound -} -var file_org_signal_chat_login_purchase_proto_depIdxs = []int32{ - 3, // 0: org.signal.chat.purchase.CreateLoginReceiptCredentialRequest.processor:type_name -> org.signal.chat.purchase.PaymentProvider - 2, // 1: org.signal.chat.purchase.CreateLoginReceiptCredentialResponse.result:type_name -> org.signal.chat.purchase.CreateLoginReceiptCredentialResponse.CreateLoginReceiptCredentialResult - 4, // 2: org.signal.chat.purchase.CreateLoginReceiptCredentialResponse.payment_still_processing:type_name -> org.signal.chat.errors.FailedPrecondition - 5, // 3: org.signal.chat.purchase.CreateLoginReceiptCredentialResponse.payment_required:type_name -> org.signal.chat.purchase.PaymentRequired - 6, // 4: org.signal.chat.purchase.CreateLoginReceiptCredentialResponse.payment_not_found:type_name -> org.signal.chat.errors.NotFound - 4, // 5: org.signal.chat.purchase.CreateLoginReceiptCredentialResponse.receipt_already_issued:type_name -> org.signal.chat.errors.FailedPrecondition - 0, // 6: org.signal.chat.purchase.LoginPurchase.CreateLoginReceiptCredential:input_type -> org.signal.chat.purchase.CreateLoginReceiptCredentialRequest - 1, // 7: org.signal.chat.purchase.LoginPurchase.CreateLoginReceiptCredential:output_type -> org.signal.chat.purchase.CreateLoginReceiptCredentialResponse - 7, // [7:8] is the sub-list for method output_type - 6, // [6:7] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_login_purchase_proto_init() } -func file_org_signal_chat_login_purchase_proto_init() { - if File_org_signal_chat_login_purchase_proto != nil { - return - } - file_org_signal_chat_login_purchase_proto_msgTypes[1].OneofWrappers = []any{ - (*CreateLoginReceiptCredentialResponse_Result)(nil), - (*CreateLoginReceiptCredentialResponse_PaymentStillProcessing)(nil), - (*CreateLoginReceiptCredentialResponse_PaymentRequired)(nil), - (*CreateLoginReceiptCredentialResponse_PaymentNotFound)(nil), - (*CreateLoginReceiptCredentialResponse_ReceiptAlreadyIssued)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_login_purchase_proto_rawDesc), len(file_org_signal_chat_login_purchase_proto_rawDesc)), - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_org_signal_chat_login_purchase_proto_goTypes, - DependencyIndexes: file_org_signal_chat_login_purchase_proto_depIdxs, - MessageInfos: file_org_signal_chat_login_purchase_proto_msgTypes, - }.Build() - File_org_signal_chat_login_purchase_proto = out.File - file_org_signal_chat_login_purchase_proto_goTypes = nil - file_org_signal_chat_login_purchase_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/login_purchase/login_purchase_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/login_purchase/login_purchase_grpc.pb.go deleted file mode 100644 index 38d4ce3..0000000 --- a/pkg/signalmeow/protobuf/rpc/login_purchase/login_purchase_grpc.pb.go +++ /dev/null @@ -1,135 +0,0 @@ -// -// Copyright 2026 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/login_purchase.proto - -package login_purchase - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - LoginPurchase_CreateLoginReceiptCredential_FullMethodName = "/org.signal.chat.purchase.LoginPurchase/CreateLoginReceiptCredential" -) - -// LoginPurchaseClient is the client API for LoginPurchase service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Service for one-time purchases of logins -type LoginPurchaseClient interface { - // Obtain a ZK receipt credential for a completed one-time login payment. - // - // The receipt credential can then be presented at registration - CreateLoginReceiptCredential(ctx context.Context, in *CreateLoginReceiptCredentialRequest, opts ...grpc.CallOption) (*CreateLoginReceiptCredentialResponse, error) -} - -type loginPurchaseClient struct { - cc grpc.ClientConnInterface -} - -func NewLoginPurchaseClient(cc grpc.ClientConnInterface) LoginPurchaseClient { - return &loginPurchaseClient{cc} -} - -func (c *loginPurchaseClient) CreateLoginReceiptCredential(ctx context.Context, in *CreateLoginReceiptCredentialRequest, opts ...grpc.CallOption) (*CreateLoginReceiptCredentialResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateLoginReceiptCredentialResponse) - err := c.cc.Invoke(ctx, LoginPurchase_CreateLoginReceiptCredential_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// LoginPurchaseServer is the server API for LoginPurchase service. -// All implementations must embed UnimplementedLoginPurchaseServer -// for forward compatibility. -// -// Service for one-time purchases of logins -type LoginPurchaseServer interface { - // Obtain a ZK receipt credential for a completed one-time login payment. - // - // The receipt credential can then be presented at registration - CreateLoginReceiptCredential(context.Context, *CreateLoginReceiptCredentialRequest) (*CreateLoginReceiptCredentialResponse, error) - mustEmbedUnimplementedLoginPurchaseServer() -} - -// UnimplementedLoginPurchaseServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedLoginPurchaseServer struct{} - -func (UnimplementedLoginPurchaseServer) CreateLoginReceiptCredential(context.Context, *CreateLoginReceiptCredentialRequest) (*CreateLoginReceiptCredentialResponse, error) { - return nil, status.Error(codes.Unimplemented, "method CreateLoginReceiptCredential not implemented") -} -func (UnimplementedLoginPurchaseServer) mustEmbedUnimplementedLoginPurchaseServer() {} -func (UnimplementedLoginPurchaseServer) testEmbeddedByValue() {} - -// UnsafeLoginPurchaseServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to LoginPurchaseServer will -// result in compilation errors. -type UnsafeLoginPurchaseServer interface { - mustEmbedUnimplementedLoginPurchaseServer() -} - -func RegisterLoginPurchaseServer(s grpc.ServiceRegistrar, srv LoginPurchaseServer) { - // If the following call panics, it indicates UnimplementedLoginPurchaseServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&LoginPurchase_ServiceDesc, srv) -} - -func _LoginPurchase_CreateLoginReceiptCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateLoginReceiptCredentialRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LoginPurchaseServer).CreateLoginReceiptCredential(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: LoginPurchase_CreateLoginReceiptCredential_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LoginPurchaseServer).CreateLoginReceiptCredential(ctx, req.(*CreateLoginReceiptCredentialRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// LoginPurchase_ServiceDesc is the grpc.ServiceDesc for LoginPurchase service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var LoginPurchase_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.purchase.LoginPurchase", - HandlerType: (*LoginPurchaseServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateLoginReceiptCredential", - Handler: _LoginPurchase_CreateLoginReceiptCredential_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/login_purchase.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/messages/messages.pb.go b/pkg/signalmeow/protobuf/rpc/messages/messages.pb.go deleted file mode 100644 index 2286bd3..0000000 --- a/pkg/signalmeow/protobuf/rpc/messages/messages.pb.go +++ /dev/null @@ -1,1986 +0,0 @@ -// -// Copyright 2025 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/messages.proto - -package messages - -import ( - common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" - errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" - signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type SendMessageType int32 - -const ( - SendMessageType_UNSPECIFIED SendMessageType = 0 - // A double-ratchet message represents a "normal," "unsealed-sender" message - // encrypted using the Double Ratchet within an established Signal session. - SendMessageType_DOUBLE_RATCHET SendMessageType = 1 - // A prekey message begins a new Signal session. The `content` of a prekey - // message is a superset of a double-ratchet message's `content` and - // contains the sender's identity public key and information identifying the - // pre-keys used in the message's ciphertext. - SendMessageType_PREKEY_MESSAGE SendMessageType = 2 - // A plaintext message is used solely to convey encryption error receipts - // and never contains encrypted message content. Encryption error receipts - // must be delivered in plaintext because encryption/decryption of a prior - // message failed and there is no reason to believe that - // encryption/decryption of subsequent messages with the same key material - // would succeed. - // - // Critically, plaintext messages never have "real" message content - // generated by users. Plaintext messages include sender information. - SendMessageType_PLAINTEXT_CONTENT SendMessageType = 3 - // An unidentified sender message is an encrypted message. No other - // information about the type of the encrypted message is known to the server. - // - // Unidenitfied sender messages require an unidentified access token or a - // group send endorsement token to prove the unidentified sender is authorized - // to send messages to the destination. - SendMessageType_UNIDENTIFIED_SENDER SendMessageType = 4 -) - -// Enum value maps for SendMessageType. -var ( - SendMessageType_name = map[int32]string{ - 0: "UNSPECIFIED", - 1: "DOUBLE_RATCHET", - 2: "PREKEY_MESSAGE", - 3: "PLAINTEXT_CONTENT", - 4: "UNIDENTIFIED_SENDER", - } - SendMessageType_value = map[string]int32{ - "UNSPECIFIED": 0, - "DOUBLE_RATCHET": 1, - "PREKEY_MESSAGE": 2, - "PLAINTEXT_CONTENT": 3, - "UNIDENTIFIED_SENDER": 4, - } -) - -func (x SendMessageType) Enum() *SendMessageType { - p := new(SendMessageType) - *p = x - return p -} - -func (x SendMessageType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SendMessageType) Descriptor() protoreflect.EnumDescriptor { - return file_org_signal_chat_messages_proto_enumTypes[0].Descriptor() -} - -func (SendMessageType) Type() protoreflect.EnumType { - return &file_org_signal_chat_messages_proto_enumTypes[0] -} - -func (x SendMessageType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SendMessageType.Descriptor instead. -func (SendMessageType) EnumDescriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{0} -} - -type ChallengeRequired_ChallengeType int32 - -const ( - ChallengeRequired_UNSPECIFIED ChallengeRequired_ChallengeType = 0 - // A challenge that callers can fulfill by completing a captcha. - ChallengeRequired_CAPTCHA ChallengeRequired_ChallengeType = 1 - // A challenge that callers can fulfill by supplying a token delivered via - // push notification. - ChallengeRequired_PUSH_CHALLENGE ChallengeRequired_ChallengeType = 2 -) - -// Enum value maps for ChallengeRequired_ChallengeType. -var ( - ChallengeRequired_ChallengeType_name = map[int32]string{ - 0: "UNSPECIFIED", - 1: "CAPTCHA", - 2: "PUSH_CHALLENGE", - } - ChallengeRequired_ChallengeType_value = map[string]int32{ - "UNSPECIFIED": 0, - "CAPTCHA": 1, - "PUSH_CHALLENGE": 2, - } -) - -func (x ChallengeRequired_ChallengeType) Enum() *ChallengeRequired_ChallengeType { - p := new(ChallengeRequired_ChallengeType) - *p = x - return p -} - -func (x ChallengeRequired_ChallengeType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ChallengeRequired_ChallengeType) Descriptor() protoreflect.EnumDescriptor { - return file_org_signal_chat_messages_proto_enumTypes[1].Descriptor() -} - -func (ChallengeRequired_ChallengeType) Type() protoreflect.EnumType { - return &file_org_signal_chat_messages_proto_enumTypes[1] -} - -func (x ChallengeRequired_ChallengeType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ChallengeRequired_ChallengeType.Descriptor instead. -func (ChallengeRequired_ChallengeType) EnumDescriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{17, 0} -} - -type GetMessagesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Request: - // - // *GetMessagesRequest_Options - // *GetMessagesRequest_ServerGuidAck - Request isGetMessagesRequest_Request `protobuf_oneof:"request"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetMessagesRequest) Reset() { - *x = GetMessagesRequest{} - mi := &file_org_signal_chat_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetMessagesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetMessagesRequest) ProtoMessage() {} - -func (x *GetMessagesRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetMessagesRequest.ProtoReflect.Descriptor instead. -func (*GetMessagesRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{0} -} - -func (x *GetMessagesRequest) GetRequest() isGetMessagesRequest_Request { - if x != nil { - return x.Request - } - return nil -} - -func (x *GetMessagesRequest) GetOptions() *GetMessagesRequest_GetMessageOptions { - if x != nil { - if x, ok := x.Request.(*GetMessagesRequest_Options); ok { - return x.Options - } - } - return nil -} - -func (x *GetMessagesRequest) GetServerGuidAck() []byte { - if x != nil { - if x, ok := x.Request.(*GetMessagesRequest_ServerGuidAck); ok { - return x.ServerGuidAck - } - } - return nil -} - -type isGetMessagesRequest_Request interface { - isGetMessagesRequest_Request() -} - -type GetMessagesRequest_Options struct { - // Configuration options for the message stream. Required for the first - // request of the stream, forbidden on subsequent reqeusts. - Options *GetMessagesRequest_GetMessageOptions `protobuf:"bytes,1,opt,name=options,proto3,oneof"` -} - -type GetMessagesRequest_ServerGuidAck struct { - // The server_guid of an envelope previously returned in a - // GetMessagesResponse that has been successfully processed by the caller. - // Forbidden on the first request of the stream, required on subsequent - // requests. - ServerGuidAck []byte `protobuf:"bytes,2,opt,name=server_guid_ack,json=serverGuidAck,proto3,oneof"` -} - -func (*GetMessagesRequest_Options) isGetMessagesRequest_Request() {} - -func (*GetMessagesRequest_ServerGuidAck) isGetMessagesRequest_Request() {} - -// The reason why a GetMessages RPC is being closed by the server. -type GetMessagesStreamClosed struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Reason: - // - // *GetMessagesStreamClosed_ConflictingStream - Reason isGetMessagesStreamClosed_Reason `protobuf_oneof:"reason"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetMessagesStreamClosed) Reset() { - *x = GetMessagesStreamClosed{} - mi := &file_org_signal_chat_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetMessagesStreamClosed) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetMessagesStreamClosed) ProtoMessage() {} - -func (x *GetMessagesStreamClosed) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetMessagesStreamClosed.ProtoReflect.Descriptor instead. -func (*GetMessagesStreamClosed) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{1} -} - -func (x *GetMessagesStreamClosed) GetReason() isGetMessagesStreamClosed_Reason { - if x != nil { - return x.Reason - } - return nil -} - -func (x *GetMessagesStreamClosed) GetConflictingStream() *emptypb.Empty { - if x != nil { - if x, ok := x.Reason.(*GetMessagesStreamClosed_ConflictingStream); ok { - return x.ConflictingStream - } - } - return nil -} - -type isGetMessagesStreamClosed_Reason interface { - isGetMessagesStreamClosed_Reason() -} - -type GetMessagesStreamClosed_ConflictingStream struct { - // Another caller has opened a GetMessages stream for the same device. - ConflictingStream *emptypb.Empty `protobuf:"bytes,1,opt,name=conflicting_stream,json=conflictingStream,proto3,oneof"` -} - -func (*GetMessagesStreamClosed_ConflictingStream) isGetMessagesStreamClosed_Reason() {} - -type GetMessagesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetMessagesResponse_Envelope - // *GetMessagesResponse_QueueEmpty - Response isGetMessagesResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetMessagesResponse) Reset() { - *x = GetMessagesResponse{} - mi := &file_org_signal_chat_messages_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetMessagesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetMessagesResponse) ProtoMessage() {} - -func (x *GetMessagesResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetMessagesResponse.ProtoReflect.Descriptor instead. -func (*GetMessagesResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{2} -} - -func (x *GetMessagesResponse) GetResponse() isGetMessagesResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetMessagesResponse) GetEnvelope() *signalpb.Envelope { - if x != nil { - if x, ok := x.Response.(*GetMessagesResponse_Envelope); ok { - return x.Envelope - } - } - return nil -} - -func (x *GetMessagesResponse) GetQueueEmpty() *emptypb.Empty { - if x != nil { - if x, ok := x.Response.(*GetMessagesResponse_QueueEmpty); ok { - return x.QueueEmpty - } - } - return nil -} - -type isGetMessagesResponse_Response interface { - isGetMessagesResponse_Response() -} - -type GetMessagesResponse_Envelope struct { - // A message. On successful receipt of an envelope the caller should ack - // the envelope by sending a GetMessagesRequest with the envelope's server - // guid. Acks should only be sent for envelopes received on the currently - // open RPC. - Envelope *signalpb.Envelope `protobuf:"bytes,1,opt,name=envelope,proto3,oneof"` -} - -type GetMessagesResponse_QueueEmpty struct { - // An indicator that all outstanding messages for the device have been - // drained and acked by the client. The stream will remain open and continue - // to deliver newly arrived messages. - QueueEmpty *emptypb.Empty `protobuf:"bytes,2,opt,name=queue_empty,json=queueEmpty,proto3,oneof"` -} - -func (*GetMessagesResponse_Envelope) isGetMessagesResponse_Response() {} - -func (*GetMessagesResponse_QueueEmpty) isGetMessagesResponse_Response() {} - -type IndividualRecipientMessageBundle struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The time, in milliseconds since the epoch, at which this message was - // originally sent from the perspective of the sender. Note that the maximum - // allowable timestamp for JavaScript clients is less than Long.MAX_VALUE; see - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_epoch_timestamps_and_invalid_date - // for additional details and discussion. - Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - // A map of device IDs to individual messages. Generally, callers must include - // one message for each device linked to the destination account. In cases of - // "sync messages" where a sender is distributing information to other devices - // linked to the sender's account, senders may omit a message for the sending - // device. - Messages map[uint32]*IndividualRecipientMessageBundle_Message `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IndividualRecipientMessageBundle) Reset() { - *x = IndividualRecipientMessageBundle{} - mi := &file_org_signal_chat_messages_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IndividualRecipientMessageBundle) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IndividualRecipientMessageBundle) ProtoMessage() {} - -func (x *IndividualRecipientMessageBundle) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IndividualRecipientMessageBundle.ProtoReflect.Descriptor instead. -func (*IndividualRecipientMessageBundle) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{3} -} - -func (x *IndividualRecipientMessageBundle) GetTimestamp() uint64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -func (x *IndividualRecipientMessageBundle) GetMessages() map[uint32]*IndividualRecipientMessageBundle_Message { - if x != nil { - return x.Messages - } - return nil -} - -type SendAuthenticatedSenderMessageRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The service identifier of the account to which to deliver the message. - Destination *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` - // If true, this message will only be delivered to destination devices that - // have an active message delivery channel with a Signal server. - Ephemeral bool `protobuf:"varint,2,opt,name=ephemeral,proto3" json:"ephemeral,omitempty"` - // Indicates whether this message is urgent and should trigger a high-priority - // notification if the destination device does not have an active message - // delivery channel with a Signal server - Urgent bool `protobuf:"varint,3,opt,name=urgent,proto3" json:"urgent,omitempty"` - // The messages to send to the destination account. - Messages *IndividualRecipientMessageBundle `protobuf:"bytes,4,opt,name=messages,proto3" json:"messages,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SendAuthenticatedSenderMessageRequest) Reset() { - *x = SendAuthenticatedSenderMessageRequest{} - mi := &file_org_signal_chat_messages_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SendAuthenticatedSenderMessageRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendAuthenticatedSenderMessageRequest) ProtoMessage() {} - -func (x *SendAuthenticatedSenderMessageRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendAuthenticatedSenderMessageRequest.ProtoReflect.Descriptor instead. -func (*SendAuthenticatedSenderMessageRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{4} -} - -func (x *SendAuthenticatedSenderMessageRequest) GetDestination() *common.ServiceIdentifier { - if x != nil { - return x.Destination - } - return nil -} - -func (x *SendAuthenticatedSenderMessageRequest) GetEphemeral() bool { - if x != nil { - return x.Ephemeral - } - return false -} - -func (x *SendAuthenticatedSenderMessageRequest) GetUrgent() bool { - if x != nil { - return x.Urgent - } - return false -} - -func (x *SendAuthenticatedSenderMessageRequest) GetMessages() *IndividualRecipientMessageBundle { - if x != nil { - return x.Messages - } - return nil -} - -type SendMessageAuthenticatedSenderResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The outcome of the message delivery - // - // Types that are valid to be assigned to Response: - // - // *SendMessageAuthenticatedSenderResponse_Success - // *SendMessageAuthenticatedSenderResponse_MismatchedDevices - // *SendMessageAuthenticatedSenderResponse_ChallengeRequired - // *SendMessageAuthenticatedSenderResponse_DestinationNotFound - Response isSendMessageAuthenticatedSenderResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SendMessageAuthenticatedSenderResponse) Reset() { - *x = SendMessageAuthenticatedSenderResponse{} - mi := &file_org_signal_chat_messages_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SendMessageAuthenticatedSenderResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendMessageAuthenticatedSenderResponse) ProtoMessage() {} - -func (x *SendMessageAuthenticatedSenderResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendMessageAuthenticatedSenderResponse.ProtoReflect.Descriptor instead. -func (*SendMessageAuthenticatedSenderResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{5} -} - -func (x *SendMessageAuthenticatedSenderResponse) GetResponse() isSendMessageAuthenticatedSenderResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *SendMessageAuthenticatedSenderResponse) GetSuccess() *emptypb.Empty { - if x != nil { - if x, ok := x.Response.(*SendMessageAuthenticatedSenderResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *SendMessageAuthenticatedSenderResponse) GetMismatchedDevices() *MismatchedDevices { - if x != nil { - if x, ok := x.Response.(*SendMessageAuthenticatedSenderResponse_MismatchedDevices); ok { - return x.MismatchedDevices - } - } - return nil -} - -func (x *SendMessageAuthenticatedSenderResponse) GetChallengeRequired() *ChallengeRequired { - if x != nil { - if x, ok := x.Response.(*SendMessageAuthenticatedSenderResponse_ChallengeRequired); ok { - return x.ChallengeRequired - } - } - return nil -} - -func (x *SendMessageAuthenticatedSenderResponse) GetDestinationNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*SendMessageAuthenticatedSenderResponse_DestinationNotFound); ok { - return x.DestinationNotFound - } - } - return nil -} - -type isSendMessageAuthenticatedSenderResponse_Response interface { - isSendMessageAuthenticatedSenderResponse_Response() -} - -type SendMessageAuthenticatedSenderResponse_Success struct { - // The message was successfully delivered to all destination devices - Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type SendMessageAuthenticatedSenderResponse_MismatchedDevices struct { - // A list of discrepancies between the destination devices identified in a - // request to send a message and the devices that are actually linked to an - // account. - MismatchedDevices *MismatchedDevices `protobuf:"bytes,2,opt,name=mismatched_devices,json=mismatchedDevices,proto3,oneof"` -} - -type SendMessageAuthenticatedSenderResponse_ChallengeRequired struct { - // A description of a challenge callers must complete before sending - // additional messages. - ChallengeRequired *ChallengeRequired `protobuf:"bytes,3,opt,name=challenge_required,json=challengeRequired,proto3,oneof"` -} - -type SendMessageAuthenticatedSenderResponse_DestinationNotFound struct { - // The destination account did not exist - DestinationNotFound *errors.NotFound `protobuf:"bytes,4,opt,name=destination_not_found,json=destinationNotFound,proto3,oneof"` -} - -func (*SendMessageAuthenticatedSenderResponse_Success) isSendMessageAuthenticatedSenderResponse_Response() { -} - -func (*SendMessageAuthenticatedSenderResponse_MismatchedDevices) isSendMessageAuthenticatedSenderResponse_Response() { -} - -func (*SendMessageAuthenticatedSenderResponse_ChallengeRequired) isSendMessageAuthenticatedSenderResponse_Response() { -} - -func (*SendMessageAuthenticatedSenderResponse_DestinationNotFound) isSendMessageAuthenticatedSenderResponse_Response() { -} - -type SendSyncMessageRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Indicates whether this message is urgent and should trigger a high-priority - // notification if the destination device does not have an active message - // delivery channel with a Signal server - Urgent bool `protobuf:"varint,1,opt,name=urgent,proto3" json:"urgent,omitempty"` - // The messages to send to the destination account. - Messages *IndividualRecipientMessageBundle `protobuf:"bytes,2,opt,name=messages,proto3" json:"messages,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SendSyncMessageRequest) Reset() { - *x = SendSyncMessageRequest{} - mi := &file_org_signal_chat_messages_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SendSyncMessageRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendSyncMessageRequest) ProtoMessage() {} - -func (x *SendSyncMessageRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendSyncMessageRequest.ProtoReflect.Descriptor instead. -func (*SendSyncMessageRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{6} -} - -func (x *SendSyncMessageRequest) GetUrgent() bool { - if x != nil { - return x.Urgent - } - return false -} - -func (x *SendSyncMessageRequest) GetMessages() *IndividualRecipientMessageBundle { - if x != nil { - return x.Messages - } - return nil -} - -type SendSealedSenderMessageRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The service identifier of the account to which to deliver the message. - Destination *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` - // If true, this message will only be delivered to destination devices that - // have an active message delivery channel with a Signal server. - Ephemeral bool `protobuf:"varint,2,opt,name=ephemeral,proto3" json:"ephemeral,omitempty"` - // Indicates whether this message is urgent and should trigger a high-priority - // notification if the destination device does not have an active message - // delivery channel with a Signal server - Urgent bool `protobuf:"varint,3,opt,name=urgent,proto3" json:"urgent,omitempty"` - // The messages to send to the destination account. - Messages *IndividualRecipientMessageBundle `protobuf:"bytes,4,opt,name=messages,proto3" json:"messages,omitempty"` - // A means to authorize the request. - // - // Types that are valid to be assigned to Authorization: - // - // *SendSealedSenderMessageRequest_UnidentifiedAccessKey - // *SendSealedSenderMessageRequest_GroupSendToken - // *SendSealedSenderMessageRequest_UnrestrictedAccess - Authorization isSendSealedSenderMessageRequest_Authorization `protobuf_oneof:"authorization"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SendSealedSenderMessageRequest) Reset() { - *x = SendSealedSenderMessageRequest{} - mi := &file_org_signal_chat_messages_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SendSealedSenderMessageRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendSealedSenderMessageRequest) ProtoMessage() {} - -func (x *SendSealedSenderMessageRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendSealedSenderMessageRequest.ProtoReflect.Descriptor instead. -func (*SendSealedSenderMessageRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{7} -} - -func (x *SendSealedSenderMessageRequest) GetDestination() *common.ServiceIdentifier { - if x != nil { - return x.Destination - } - return nil -} - -func (x *SendSealedSenderMessageRequest) GetEphemeral() bool { - if x != nil { - return x.Ephemeral - } - return false -} - -func (x *SendSealedSenderMessageRequest) GetUrgent() bool { - if x != nil { - return x.Urgent - } - return false -} - -func (x *SendSealedSenderMessageRequest) GetMessages() *IndividualRecipientMessageBundle { - if x != nil { - return x.Messages - } - return nil -} - -func (x *SendSealedSenderMessageRequest) GetAuthorization() isSendSealedSenderMessageRequest_Authorization { - if x != nil { - return x.Authorization - } - return nil -} - -func (x *SendSealedSenderMessageRequest) GetUnidentifiedAccessKey() []byte { - if x != nil { - if x, ok := x.Authorization.(*SendSealedSenderMessageRequest_UnidentifiedAccessKey); ok { - return x.UnidentifiedAccessKey - } - } - return nil -} - -func (x *SendSealedSenderMessageRequest) GetGroupSendToken() []byte { - if x != nil { - if x, ok := x.Authorization.(*SendSealedSenderMessageRequest_GroupSendToken); ok { - return x.GroupSendToken - } - } - return nil -} - -func (x *SendSealedSenderMessageRequest) GetUnrestrictedAccess() *emptypb.Empty { - if x != nil { - if x, ok := x.Authorization.(*SendSealedSenderMessageRequest_UnrestrictedAccess); ok { - return x.UnrestrictedAccess - } - } - return nil -} - -type isSendSealedSenderMessageRequest_Authorization interface { - isSendSealedSenderMessageRequest_Authorization() -} - -type SendSealedSenderMessageRequest_UnidentifiedAccessKey struct { - // The unidentified access key (UAK) for the destination account. - UnidentifiedAccessKey []byte `protobuf:"bytes,5,opt,name=unidentified_access_key,json=unidentifiedAccessKey,proto3,oneof"` -} - -type SendSealedSenderMessageRequest_GroupSendToken struct { - // A group send endorsement token for the destination account. - GroupSendToken []byte `protobuf:"bytes,6,opt,name=group_send_token,json=groupSendToken,proto3,oneof"` -} - -type SendSealedSenderMessageRequest_UnrestrictedAccess struct { - // The destination account allows unrestricted unidentified access - UnrestrictedAccess *emptypb.Empty `protobuf:"bytes,7,opt,name=unrestricted_access,json=unrestrictedAccess,proto3,oneof"` -} - -func (*SendSealedSenderMessageRequest_UnidentifiedAccessKey) isSendSealedSenderMessageRequest_Authorization() { -} - -func (*SendSealedSenderMessageRequest_GroupSendToken) isSendSealedSenderMessageRequest_Authorization() { -} - -func (*SendSealedSenderMessageRequest_UnrestrictedAccess) isSendSealedSenderMessageRequest_Authorization() { -} - -type SendStoryMessageRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The service identifier of the account to which to deliver the message. - Destination *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` - // Indicates whether this message is urgent and should trigger a high-priority - // notification if the destination device does not have an active message - // delivery channel with a Signal server - Urgent bool `protobuf:"varint,2,opt,name=urgent,proto3" json:"urgent,omitempty"` - // The messages to send to the destination account. - Messages *IndividualRecipientMessageBundle `protobuf:"bytes,3,opt,name=messages,proto3" json:"messages,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SendStoryMessageRequest) Reset() { - *x = SendStoryMessageRequest{} - mi := &file_org_signal_chat_messages_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SendStoryMessageRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendStoryMessageRequest) ProtoMessage() {} - -func (x *SendStoryMessageRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendStoryMessageRequest.ProtoReflect.Descriptor instead. -func (*SendStoryMessageRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{8} -} - -func (x *SendStoryMessageRequest) GetDestination() *common.ServiceIdentifier { - if x != nil { - return x.Destination - } - return nil -} - -func (x *SendStoryMessageRequest) GetUrgent() bool { - if x != nil { - return x.Urgent - } - return false -} - -func (x *SendStoryMessageRequest) GetMessages() *IndividualRecipientMessageBundle { - if x != nil { - return x.Messages - } - return nil -} - -type SendMessageResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The outcome of the message delivery - // - // Types that are valid to be assigned to Response: - // - // *SendMessageResponse_Success - // *SendMessageResponse_MismatchedDevices - // *SendMessageResponse_FailedUnidentifiedAuthorization - // *SendMessageResponse_DestinationNotFound - Response isSendMessageResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SendMessageResponse) Reset() { - *x = SendMessageResponse{} - mi := &file_org_signal_chat_messages_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SendMessageResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendMessageResponse) ProtoMessage() {} - -func (x *SendMessageResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendMessageResponse.ProtoReflect.Descriptor instead. -func (*SendMessageResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{9} -} - -func (x *SendMessageResponse) GetResponse() isSendMessageResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *SendMessageResponse) GetSuccess() *emptypb.Empty { - if x != nil { - if x, ok := x.Response.(*SendMessageResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *SendMessageResponse) GetMismatchedDevices() *MismatchedDevices { - if x != nil { - if x, ok := x.Response.(*SendMessageResponse_MismatchedDevices); ok { - return x.MismatchedDevices - } - } - return nil -} - -func (x *SendMessageResponse) GetFailedUnidentifiedAuthorization() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*SendMessageResponse_FailedUnidentifiedAuthorization); ok { - return x.FailedUnidentifiedAuthorization - } - } - return nil -} - -func (x *SendMessageResponse) GetDestinationNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*SendMessageResponse_DestinationNotFound); ok { - return x.DestinationNotFound - } - } - return nil -} - -type isSendMessageResponse_Response interface { - isSendMessageResponse_Response() -} - -type SendMessageResponse_Success struct { - // The message was successfully delivered to all destination devices - Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type SendMessageResponse_MismatchedDevices struct { - // A list of discrepancies between the destination devices identified in a - // request to send a message and the devices that are actually linked to an - // account. - MismatchedDevices *MismatchedDevices `protobuf:"bytes,2,opt,name=mismatched_devices,json=mismatchedDevices,proto3,oneof"` -} - -type SendMessageResponse_FailedUnidentifiedAuthorization struct { - // The provided unidentified authorization credential was invalid - FailedUnidentifiedAuthorization *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=failed_unidentified_authorization,json=failedUnidentifiedAuthorization,proto3,oneof"` -} - -type SendMessageResponse_DestinationNotFound struct { - // The destination account did not exist - DestinationNotFound *errors.NotFound `protobuf:"bytes,4,opt,name=destination_not_found,json=destinationNotFound,proto3,oneof"` -} - -func (*SendMessageResponse_Success) isSendMessageResponse_Response() {} - -func (*SendMessageResponse_MismatchedDevices) isSendMessageResponse_Response() {} - -func (*SendMessageResponse_FailedUnidentifiedAuthorization) isSendMessageResponse_Response() {} - -func (*SendMessageResponse_DestinationNotFound) isSendMessageResponse_Response() {} - -type MultiRecipientMessage struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The time, in milliseconds since the epoch, at which this message was - // originally sent from the perspective of the sender. Note that the maximum - // allowable timestamp for JavaScript clients is less than Long.MAX_VALUE; see - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_epoch_timestamps_and_invalid_date - // for additional details and discussion. - Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - // The serialized multi-recipient message payload. - Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // 256 KiB payload + (5000 * 100) of overhead - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MultiRecipientMessage) Reset() { - *x = MultiRecipientMessage{} - mi := &file_org_signal_chat_messages_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MultiRecipientMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MultiRecipientMessage) ProtoMessage() {} - -func (x *MultiRecipientMessage) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MultiRecipientMessage.ProtoReflect.Descriptor instead. -func (*MultiRecipientMessage) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{10} -} - -func (x *MultiRecipientMessage) GetTimestamp() uint64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -func (x *MultiRecipientMessage) GetPayload() []byte { - if x != nil { - return x.Payload - } - return nil -} - -type SendMultiRecipientMessageRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // If true, this message will only be delivered to destination devices that - // have an active message delivery channel with a Signal server. - Ephemeral bool `protobuf:"varint,1,opt,name=ephemeral,proto3" json:"ephemeral,omitempty"` - // Indicates whether this message is urgent and should trigger a high-priority - // notification if the destination device does not have an active message - // delivery channel with a Signal server - Urgent bool `protobuf:"varint,2,opt,name=urgent,proto3" json:"urgent,omitempty"` - // The multi-recipient message to send to all destination accounts and - // devices. - Message *MultiRecipientMessage `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` - // A group send endorsement token for the destination account. - GroupSendToken []byte `protobuf:"bytes,4,opt,name=group_send_token,json=groupSendToken,proto3" json:"group_send_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SendMultiRecipientMessageRequest) Reset() { - *x = SendMultiRecipientMessageRequest{} - mi := &file_org_signal_chat_messages_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SendMultiRecipientMessageRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendMultiRecipientMessageRequest) ProtoMessage() {} - -func (x *SendMultiRecipientMessageRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendMultiRecipientMessageRequest.ProtoReflect.Descriptor instead. -func (*SendMultiRecipientMessageRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{11} -} - -func (x *SendMultiRecipientMessageRequest) GetEphemeral() bool { - if x != nil { - return x.Ephemeral - } - return false -} - -func (x *SendMultiRecipientMessageRequest) GetUrgent() bool { - if x != nil { - return x.Urgent - } - return false -} - -func (x *SendMultiRecipientMessageRequest) GetMessage() *MultiRecipientMessage { - if x != nil { - return x.Message - } - return nil -} - -func (x *SendMultiRecipientMessageRequest) GetGroupSendToken() []byte { - if x != nil { - return x.GroupSendToken - } - return nil -} - -type SendMultiRecipientStoryRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Indicates whether this message is urgent and should trigger a high-priority - // notification if the destination device does not have an active message - // delivery channel with a Signal server - Urgent bool `protobuf:"varint,1,opt,name=urgent,proto3" json:"urgent,omitempty"` - // The multi-recipient story message to send to all destination accounts and - // devices. - Message *MultiRecipientMessage `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SendMultiRecipientStoryRequest) Reset() { - *x = SendMultiRecipientStoryRequest{} - mi := &file_org_signal_chat_messages_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SendMultiRecipientStoryRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendMultiRecipientStoryRequest) ProtoMessage() {} - -func (x *SendMultiRecipientStoryRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendMultiRecipientStoryRequest.ProtoReflect.Descriptor instead. -func (*SendMultiRecipientStoryRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{12} -} - -func (x *SendMultiRecipientStoryRequest) GetUrgent() bool { - if x != nil { - return x.Urgent - } - return false -} - -func (x *SendMultiRecipientStoryRequest) GetMessage() *MultiRecipientMessage { - if x != nil { - return x.Message - } - return nil -} - -type MultiRecipientSuccess struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A list of destination service identifiers that could not be resolved to - // registered Signal accounts. The message in the original request was sent - // to all service identifiers/devices in the original request except for the - // destination devices associated with the service identifiers in this list. - UnresolvedRecipients []*common.ServiceIdentifier `protobuf:"bytes,1,rep,name=unresolved_recipients,json=unresolvedRecipients,proto3" json:"unresolved_recipients,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MultiRecipientSuccess) Reset() { - *x = MultiRecipientSuccess{} - mi := &file_org_signal_chat_messages_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MultiRecipientSuccess) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MultiRecipientSuccess) ProtoMessage() {} - -func (x *MultiRecipientSuccess) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MultiRecipientSuccess.ProtoReflect.Descriptor instead. -func (*MultiRecipientSuccess) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{13} -} - -func (x *MultiRecipientSuccess) GetUnresolvedRecipients() []*common.ServiceIdentifier { - if x != nil { - return x.UnresolvedRecipients - } - return nil -} - -type SendMultiRecipientMessageResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The outcome of the message delivery - // - // Types that are valid to be assigned to Response: - // - // *SendMultiRecipientMessageResponse_Success - // *SendMultiRecipientMessageResponse_MismatchedDevices - // *SendMultiRecipientMessageResponse_FailedUnidentifiedAuthorization - Response isSendMultiRecipientMessageResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SendMultiRecipientMessageResponse) Reset() { - *x = SendMultiRecipientMessageResponse{} - mi := &file_org_signal_chat_messages_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SendMultiRecipientMessageResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendMultiRecipientMessageResponse) ProtoMessage() {} - -func (x *SendMultiRecipientMessageResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendMultiRecipientMessageResponse.ProtoReflect.Descriptor instead. -func (*SendMultiRecipientMessageResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{14} -} - -func (x *SendMultiRecipientMessageResponse) GetResponse() isSendMultiRecipientMessageResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *SendMultiRecipientMessageResponse) GetSuccess() *MultiRecipientSuccess { - if x != nil { - if x, ok := x.Response.(*SendMultiRecipientMessageResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *SendMultiRecipientMessageResponse) GetMismatchedDevices() *MultiRecipientMismatchedDevices { - if x != nil { - if x, ok := x.Response.(*SendMultiRecipientMessageResponse_MismatchedDevices); ok { - return x.MismatchedDevices - } - } - return nil -} - -func (x *SendMultiRecipientMessageResponse) GetFailedUnidentifiedAuthorization() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*SendMultiRecipientMessageResponse_FailedUnidentifiedAuthorization); ok { - return x.FailedUnidentifiedAuthorization - } - } - return nil -} - -type isSendMultiRecipientMessageResponse_Response interface { - isSendMultiRecipientMessageResponse_Response() -} - -type SendMultiRecipientMessageResponse_Success struct { - // The message was sent to at least some of the destination accounts/devices - // identified in the original request. - Success *MultiRecipientSuccess `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type SendMultiRecipientMessageResponse_MismatchedDevices struct { - // A list of sets of discrepancies between the destination devices - // identified in a request to send a message and the devices that are - // actually linked to a destination account. - MismatchedDevices *MultiRecipientMismatchedDevices `protobuf:"bytes,2,opt,name=mismatched_devices,json=mismatchedDevices,proto3,oneof"` -} - -type SendMultiRecipientMessageResponse_FailedUnidentifiedAuthorization struct { - // The provided unidentified authorization credential was invalid - FailedUnidentifiedAuthorization *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=failed_unidentified_authorization,json=failedUnidentifiedAuthorization,proto3,oneof"` -} - -func (*SendMultiRecipientMessageResponse_Success) isSendMultiRecipientMessageResponse_Response() {} - -func (*SendMultiRecipientMessageResponse_MismatchedDevices) isSendMultiRecipientMessageResponse_Response() { -} - -func (*SendMultiRecipientMessageResponse_FailedUnidentifiedAuthorization) isSendMultiRecipientMessageResponse_Response() { -} - -type MismatchedDevices struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The service identifier to which the devices named in this object are - // linked. - ServiceIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=service_identifier,json=serviceIdentifier,proto3" json:"service_identifier,omitempty"` - // A list of device IDs that are linked to the destination account, but were - // not included in the collection of messages bound for the destination - // account. - MissingDevices []uint32 `protobuf:"varint,2,rep,packed,name=missing_devices,json=missingDevices,proto3" json:"missing_devices,omitempty"` - // A list of device IDs that were included in the collection of messages bound - // for the destination account, but are not currently linked to the - // destination account. - ExtraDevices []uint32 `protobuf:"varint,3,rep,packed,name=extra_devices,json=extraDevices,proto3" json:"extra_devices,omitempty"` - // A list of device IDs that present in the collection of messages bound for - // the destination account and are linked to the destination account, but have - // a different registration ID than the registration ID presented by the - // sender (indicating that the destination device has likely been replaced by - // another device). - StaleDevices []uint32 `protobuf:"varint,4,rep,packed,name=stale_devices,json=staleDevices,proto3" json:"stale_devices,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MismatchedDevices) Reset() { - *x = MismatchedDevices{} - mi := &file_org_signal_chat_messages_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MismatchedDevices) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MismatchedDevices) ProtoMessage() {} - -func (x *MismatchedDevices) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[15] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MismatchedDevices.ProtoReflect.Descriptor instead. -func (*MismatchedDevices) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{15} -} - -func (x *MismatchedDevices) GetServiceIdentifier() *common.ServiceIdentifier { - if x != nil { - return x.ServiceIdentifier - } - return nil -} - -func (x *MismatchedDevices) GetMissingDevices() []uint32 { - if x != nil { - return x.MissingDevices - } - return nil -} - -func (x *MismatchedDevices) GetExtraDevices() []uint32 { - if x != nil { - return x.ExtraDevices - } - return nil -} - -func (x *MismatchedDevices) GetStaleDevices() []uint32 { - if x != nil { - return x.StaleDevices - } - return nil -} - -type MultiRecipientMismatchedDevices struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A list of sets of discrepancies between the destination devices identified - // in a request to send a message and the devices that are actually linked to - // a destination account. - MismatchedDevices []*MismatchedDevices `protobuf:"bytes,1,rep,name=mismatched_devices,json=mismatchedDevices,proto3" json:"mismatched_devices,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MultiRecipientMismatchedDevices) Reset() { - *x = MultiRecipientMismatchedDevices{} - mi := &file_org_signal_chat_messages_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MultiRecipientMismatchedDevices) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MultiRecipientMismatchedDevices) ProtoMessage() {} - -func (x *MultiRecipientMismatchedDevices) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[16] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MultiRecipientMismatchedDevices.ProtoReflect.Descriptor instead. -func (*MultiRecipientMismatchedDevices) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{16} -} - -func (x *MultiRecipientMismatchedDevices) GetMismatchedDevices() []*MismatchedDevices { - if x != nil { - return x.MismatchedDevices - } - return nil -} - -type ChallengeRequired struct { - state protoimpl.MessageState `protogen:"open.v1"` - // An opaque token identifying this challenge request. Clients must generally - // submit this token when submitting a challenge response. - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - // A list of challenge types callers may choose to complete to resolve the - // challenge requirement. May be empty, in which case callers cannot resolve - // the challenge by any means other than waiting. - ChallengeOptions []ChallengeRequired_ChallengeType `protobuf:"varint,2,rep,packed,name=challenge_options,json=challengeOptions,proto3,enum=org.signal.chat.messages.ChallengeRequired_ChallengeType" json:"challenge_options,omitempty"` - // A duration (in seconds) after which the challenge requirement may be - // resolved by simply waiting. May not be set if the challenge cannot be - // resolved by waiting. - RetryAfterSeconds *uint64 `protobuf:"varint,3,opt,name=retry_after_seconds,json=retryAfterSeconds,proto3,oneof" json:"retry_after_seconds,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ChallengeRequired) Reset() { - *x = ChallengeRequired{} - mi := &file_org_signal_chat_messages_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ChallengeRequired) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChallengeRequired) ProtoMessage() {} - -func (x *ChallengeRequired) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[17] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChallengeRequired.ProtoReflect.Descriptor instead. -func (*ChallengeRequired) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{17} -} - -func (x *ChallengeRequired) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *ChallengeRequired) GetChallengeOptions() []ChallengeRequired_ChallengeType { - if x != nil { - return x.ChallengeOptions - } - return nil -} - -func (x *ChallengeRequired) GetRetryAfterSeconds() uint64 { - if x != nil && x.RetryAfterSeconds != nil { - return *x.RetryAfterSeconds - } - return 0 -} - -type GetMessagesRequest_GetMessageOptions struct { - state protoimpl.MessageState `protogen:"open.v1"` - // If present and true, the server will not deliver any messages with the - // story flag set. This flag may only be set on the first GetMessagesRequest - // sent from the client to the server in an RPC stream. - DropStories bool `protobuf:"varint,1,opt,name=drop_stories,json=dropStories,proto3" json:"drop_stories,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetMessagesRequest_GetMessageOptions) Reset() { - *x = GetMessagesRequest_GetMessageOptions{} - mi := &file_org_signal_chat_messages_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetMessagesRequest_GetMessageOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetMessagesRequest_GetMessageOptions) ProtoMessage() {} - -func (x *GetMessagesRequest_GetMessageOptions) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[18] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetMessagesRequest_GetMessageOptions.ProtoReflect.Descriptor instead. -func (*GetMessagesRequest_GetMessageOptions) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *GetMessagesRequest_GetMessageOptions) GetDropStories() bool { - if x != nil { - return x.DropStories - } - return false -} - -// A message for an individual device linked to a destination account. -type IndividualRecipientMessageBundle_Message struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The registration ID for the destination device. - RegistrationId uint32 `protobuf:"varint,1,opt,name=registration_id,json=registrationId,proto3" json:"registration_id,omitempty"` - // The content of the message to deliver to the destination device. - Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // 256 KiB - // The message type of the message. If this message is part of an - // unidentified send, this must be UNIDENTIFIED_SENDER - Type SendMessageType `protobuf:"varint,3,opt,name=type,proto3,enum=org.signal.chat.messages.SendMessageType" json:"type,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *IndividualRecipientMessageBundle_Message) Reset() { - *x = IndividualRecipientMessageBundle_Message{} - mi := &file_org_signal_chat_messages_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *IndividualRecipientMessageBundle_Message) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IndividualRecipientMessageBundle_Message) ProtoMessage() {} - -func (x *IndividualRecipientMessageBundle_Message) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_messages_proto_msgTypes[19] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IndividualRecipientMessageBundle_Message.ProtoReflect.Descriptor instead. -func (*IndividualRecipientMessageBundle_Message) Descriptor() ([]byte, []int) { - return file_org_signal_chat_messages_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *IndividualRecipientMessageBundle_Message) GetRegistrationId() uint32 { - if x != nil { - return x.RegistrationId - } - return 0 -} - -func (x *IndividualRecipientMessageBundle_Message) GetPayload() []byte { - if x != nil { - return x.Payload - } - return nil -} - -func (x *IndividualRecipientMessageBundle_Message) GetType() SendMessageType { - if x != nil { - return x.Type - } - return SendMessageType_UNSPECIFIED -} - -var File_org_signal_chat_messages_proto protoreflect.FileDescriptor - -const file_org_signal_chat_messages_proto_rawDesc = "" + - "\n" + - "\x1eorg/signal/chat/messages.proto\x12\x18org.signal.chat.messages\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1corg/signal/chat/common.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x19org/signal/chat/tag.proto\x1a\x1csignalpb/SignalService.proto\"\xdd\x01\n" + - "\x12GetMessagesRequest\x12Z\n" + - "\aoptions\x18\x01 \x01(\v2>.org.signal.chat.messages.GetMessagesRequest.GetMessageOptionsH\x00R\aoptions\x12(\n" + - "\x0fserver_guid_ack\x18\x02 \x01(\fH\x00R\rserverGuidAck\x1a6\n" + - "\x11GetMessageOptions\x12!\n" + - "\fdrop_stories\x18\x01 \x01(\bR\vdropStoriesB\t\n" + - "\arequest\"l\n" + - "\x17GetMessagesStreamClosed\x12G\n" + - "\x12conflicting_stream\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\x11conflictingStreamB\b\n" + - "\x06reason\"\x93\x01\n" + - "\x13GetMessagesResponse\x125\n" + - "\benvelope\x18\x01 \x01(\v2\x17.signalservice.EnvelopeH\x00R\benvelope\x129\n" + - "\vqueue_empty\x18\x02 \x01(\v2\x16.google.protobuf.EmptyH\x00R\n" + - "queueEmptyB\n" + - "\n" + - "\bresponse\"\xe1\x03\n" + - " IndividualRecipientMessageBundle\x12-\n" + - "\ttimestamp\x18\x01 \x01(\x04B\x0f\xb2\x97\"\v\b\x01\x10\x80\x80\xf0\x96\x8c\xc1\xac\x0fR\ttimestamp\x12j\n" + - "\bmessages\x18\x02 \x03(\v2H.org.signal.chat.messages.IndividualRecipientMessageBundle.MessagesEntryB\x04\x88\x97\"\x01R\bmessages\x1a\xa0\x01\n" + - "\aMessage\x120\n" + - "\x0fregistration_id\x18\x01 \x01(\rB\a\xb2\x97\"\x03\x10\xff\x7fR\x0eregistrationId\x12$\n" + - "\apayload\x18\x02 \x01(\fB\n" + - "\x9a\x97\"\x06\b\x01\x10\x80\x80\x10R\apayload\x12=\n" + - "\x04type\x18\x03 \x01(\x0e2).org.signal.chat.messages.SendMessageTypeR\x04type\x1a\x7f\n" + - "\rMessagesEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\rR\x03key\x12X\n" + - "\x05value\x18\x02 \x01(\v2B.org.signal.chat.messages.IndividualRecipientMessageBundle.MessageR\x05value:\x028\x01\"\x82\x02\n" + - "%SendAuthenticatedSenderMessageRequest\x12K\n" + - "\vdestination\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\vdestination\x12\x1c\n" + - "\tephemeral\x18\x02 \x01(\bR\tephemeral\x12\x16\n" + - "\x06urgent\x18\x03 \x01(\bR\x06urgent\x12V\n" + - "\bmessages\x18\x04 \x01(\v2:.org.signal.chat.messages.IndividualRecipientMessageBundleR\bmessages\"\xc7\x03\n" + - "&SendMessageAuthenticatedSenderResponse\x122\n" + - "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12t\n" + - "\x12mismatched_devices\x18\x02 \x01(\v2+.org.signal.chat.messages.MismatchedDevicesB\x16\xc2\xd5\"\x12mismatched_devicesH\x00R\x11mismatchedDevices\x12t\n" + - "\x12challenge_required\x18\x03 \x01(\v2+.org.signal.chat.messages.ChallengeRequiredB\x16\xc2\xd5\"\x12challenge_requiredH\x00R\x11challengeRequired\x12q\n" + - "\x15destination_not_found\x18\x04 \x01(\v2 .org.signal.chat.errors.NotFoundB\x19\xc2\xd5\"\x15destination_not_foundH\x00R\x13destinationNotFoundB\n" + - "\n" + - "\bresponse\"\x88\x01\n" + - "\x16SendSyncMessageRequest\x12\x16\n" + - "\x06urgent\x18\x01 \x01(\bR\x06urgent\x12V\n" + - "\bmessages\x18\x02 \x01(\v2:.org.signal.chat.messages.IndividualRecipientMessageBundleR\bmessages\"\xc4\x03\n" + - "\x1eSendSealedSenderMessageRequest\x12K\n" + - "\vdestination\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\vdestination\x12\x1c\n" + - "\tephemeral\x18\x02 \x01(\bR\tephemeral\x12\x16\n" + - "\x06urgent\x18\x03 \x01(\bR\x06urgent\x12V\n" + - "\bmessages\x18\x04 \x01(\v2:.org.signal.chat.messages.IndividualRecipientMessageBundleR\bmessages\x12?\n" + - "\x17unidentified_access_key\x18\x05 \x01(\fB\x05\xa2\x97\"\x01\x10H\x00R\x15unidentifiedAccessKey\x12*\n" + - "\x10group_send_token\x18\x06 \x01(\fH\x00R\x0egroupSendToken\x12I\n" + - "\x13unrestricted_access\x18\a \x01(\v2\x16.google.protobuf.EmptyH\x00R\x12unrestrictedAccessB\x0f\n" + - "\rauthorization\"\xd6\x01\n" + - "\x17SendStoryMessageRequest\x12K\n" + - "\vdestination\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\vdestination\x12\x16\n" + - "\x06urgent\x18\x02 \x01(\bR\x06urgent\x12V\n" + - "\bmessages\x18\x03 \x01(\v2:.org.signal.chat.messages.IndividualRecipientMessageBundleR\bmessages\"\xed\x03\n" + - "\x13SendMessageResponse\x122\n" + - "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12t\n" + - "\x12mismatched_devices\x18\x02 \x01(\v2+.org.signal.chat.messages.MismatchedDevicesB\x16\xc2\xd5\"\x12mismatched_devicesH\x00R\x11mismatchedDevices\x12\xac\x01\n" + - "!failed_unidentified_authorization\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB%\xc2\xd5\"!failed_unidentified_authorizationH\x00R\x1ffailedUnidentifiedAuthorization\x12q\n" + - "\x15destination_not_found\x18\x04 \x01(\v2 .org.signal.chat.errors.NotFoundB\x19\xc2\xd5\"\x15destination_not_foundH\x00R\x13destinationNotFoundB\n" + - "\n" + - "\bresponse\"j\n" + - "\x15MultiRecipientMessage\x12-\n" + - "\ttimestamp\x18\x01 \x01(\x04B\x0f\xb2\x97\"\v\b\x01\x10\x80\x80\xf0\x96\x8c\xc1\xac\x0fR\ttimestamp\x12\"\n" + - "\apayload\x18\x02 \x01(\fB\b\x9a\x97\"\x04\x10\xa0\xc2.R\apayload\"\xd3\x01\n" + - " SendMultiRecipientMessageRequest\x12\x1c\n" + - "\tephemeral\x18\x01 \x01(\bR\tephemeral\x12\x16\n" + - "\x06urgent\x18\x02 \x01(\bR\x06urgent\x12I\n" + - "\amessage\x18\x03 \x01(\v2/.org.signal.chat.messages.MultiRecipientMessageR\amessage\x12.\n" + - "\x10group_send_token\x18\x04 \x01(\fB\x04\x88\x97\"\x01R\x0egroupSendToken\"\x83\x01\n" + - "\x1eSendMultiRecipientStoryRequest\x12\x16\n" + - "\x06urgent\x18\x01 \x01(\bR\x06urgent\x12I\n" + - "\amessage\x18\x02 \x01(\v2/.org.signal.chat.messages.MultiRecipientMessageR\amessage\"w\n" + - "\x15MultiRecipientSuccess\x12^\n" + - "\x15unresolved_recipients\x18\x01 \x03(\v2).org.signal.chat.common.ServiceIdentifierR\x14unresolvedRecipients\"\xb0\x03\n" + - "!SendMultiRecipientMessageResponse\x12K\n" + - "\asuccess\x18\x01 \x01(\v2/.org.signal.chat.messages.MultiRecipientSuccessH\x00R\asuccess\x12\x82\x01\n" + - "\x12mismatched_devices\x18\x02 \x01(\v29.org.signal.chat.messages.MultiRecipientMismatchedDevicesB\x16\xc2\xd5\"\x12mismatched_devicesH\x00R\x11mismatchedDevices\x12\xac\x01\n" + - "!failed_unidentified_authorization\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB%\xc2\xd5\"!failed_unidentified_authorizationH\x00R\x1ffailedUnidentifiedAuthorizationB\n" + - "\n" + - "\bresponse\"\xfe\x01\n" + - "\x11MismatchedDevices\x12X\n" + - "\x12service_identifier\x18\x01 \x01(\v2).org.signal.chat.common.ServiceIdentifierR\x11serviceIdentifier\x121\n" + - "\x0fmissing_devices\x18\x02 \x03(\rB\bҗ\"\x042\x02\x10\x7fR\x0emissingDevices\x12-\n" + - "\rextra_devices\x18\x03 \x03(\rB\bҗ\"\x042\x02\x10\x7fR\fextraDevices\x12-\n" + - "\rstale_devices\x18\x04 \x03(\rB\bҗ\"\x042\x02\x10\x7fR\fstaleDevices\"}\n" + - "\x1fMultiRecipientMismatchedDevices\x12Z\n" + - "\x12mismatched_devices\x18\x01 \x03(\v2+.org.signal.chat.messages.MismatchedDevicesR\x11mismatchedDevices\"\xa1\x02\n" + - "\x11ChallengeRequired\x12\x14\n" + - "\x05token\x18\x01 \x01(\tR\x05token\x12f\n" + - "\x11challenge_options\x18\x02 \x03(\x0e29.org.signal.chat.messages.ChallengeRequired.ChallengeTypeR\x10challengeOptions\x123\n" + - "\x13retry_after_seconds\x18\x03 \x01(\x04H\x00R\x11retryAfterSeconds\x88\x01\x01\"A\n" + - "\rChallengeType\x12\x0f\n" + - "\vUNSPECIFIED\x10\x00\x12\v\n" + - "\aCAPTCHA\x10\x01\x12\x12\n" + - "\x0ePUSH_CHALLENGE\x10\x02B\x16\n" + - "\x14_retry_after_seconds*z\n" + - "\x0fSendMessageType\x12\x0f\n" + - "\vUNSPECIFIED\x10\x00\x12\x12\n" + - "\x0eDOUBLE_RATCHET\x10\x01\x12\x12\n" + - "\x0ePREKEY_MESSAGE\x10\x02\x12\x15\n" + - "\x11PLAINTEXT_CONTENT\x10\x03\x12\x17\n" + - "\x13UNIDENTIFIED_SENDER\x10\x042\xa1\x03\n" + - "\bMessages\x12\x92\x01\n" + - "\vSendMessage\x12?.org.signal.chat.messages.SendAuthenticatedSenderMessageRequest\x1a@.org.signal.chat.messages.SendMessageAuthenticatedSenderResponse\"\x00\x12\x87\x01\n" + - "\x0fSendSyncMessage\x120.org.signal.chat.messages.SendSyncMessageRequest\x1a@.org.signal.chat.messages.SendMessageAuthenticatedSenderResponse\"\x00\x12p\n" + - "\vGetMessages\x12,.org.signal.chat.messages.GetMessagesRequest\x1a-.org.signal.chat.messages.GetMessagesResponse\"\x00(\x010\x01\x1a\x04\xc8\xd5\"\x012\xc2\x04\n" + - "\x11MessagesAnonymous\x12\x87\x01\n" + - "\x1aSendSingleRecipientMessage\x128.org.signal.chat.messages.SendSealedSenderMessageRequest\x1a-.org.signal.chat.messages.SendMessageResponse\"\x00\x12\x96\x01\n" + - "\x19SendMultiRecipientMessage\x12:.org.signal.chat.messages.SendMultiRecipientMessageRequest\x1a;.org.signal.chat.messages.SendMultiRecipientMessageResponse\"\x00\x12o\n" + - "\tSendStory\x121.org.signal.chat.messages.SendStoryMessageRequest\x1a-.org.signal.chat.messages.SendMessageResponse\"\x00\x12\x92\x01\n" + - "\x17SendMultiRecipientStory\x128.org.signal.chat.messages.SendMultiRecipientStoryRequest\x1a;.org.signal.chat.messages.SendMultiRecipientMessageResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_messages_proto_rawDescOnce sync.Once - file_org_signal_chat_messages_proto_rawDescData []byte -) - -func file_org_signal_chat_messages_proto_rawDescGZIP() []byte { - file_org_signal_chat_messages_proto_rawDescOnce.Do(func() { - file_org_signal_chat_messages_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_messages_proto_rawDesc), len(file_org_signal_chat_messages_proto_rawDesc))) - }) - return file_org_signal_chat_messages_proto_rawDescData -} - -var file_org_signal_chat_messages_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_org_signal_chat_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 21) -var file_org_signal_chat_messages_proto_goTypes = []any{ - (SendMessageType)(0), // 0: org.signal.chat.messages.SendMessageType - (ChallengeRequired_ChallengeType)(0), // 1: org.signal.chat.messages.ChallengeRequired.ChallengeType - (*GetMessagesRequest)(nil), // 2: org.signal.chat.messages.GetMessagesRequest - (*GetMessagesStreamClosed)(nil), // 3: org.signal.chat.messages.GetMessagesStreamClosed - (*GetMessagesResponse)(nil), // 4: org.signal.chat.messages.GetMessagesResponse - (*IndividualRecipientMessageBundle)(nil), // 5: org.signal.chat.messages.IndividualRecipientMessageBundle - (*SendAuthenticatedSenderMessageRequest)(nil), // 6: org.signal.chat.messages.SendAuthenticatedSenderMessageRequest - (*SendMessageAuthenticatedSenderResponse)(nil), // 7: org.signal.chat.messages.SendMessageAuthenticatedSenderResponse - (*SendSyncMessageRequest)(nil), // 8: org.signal.chat.messages.SendSyncMessageRequest - (*SendSealedSenderMessageRequest)(nil), // 9: org.signal.chat.messages.SendSealedSenderMessageRequest - (*SendStoryMessageRequest)(nil), // 10: org.signal.chat.messages.SendStoryMessageRequest - (*SendMessageResponse)(nil), // 11: org.signal.chat.messages.SendMessageResponse - (*MultiRecipientMessage)(nil), // 12: org.signal.chat.messages.MultiRecipientMessage - (*SendMultiRecipientMessageRequest)(nil), // 13: org.signal.chat.messages.SendMultiRecipientMessageRequest - (*SendMultiRecipientStoryRequest)(nil), // 14: org.signal.chat.messages.SendMultiRecipientStoryRequest - (*MultiRecipientSuccess)(nil), // 15: org.signal.chat.messages.MultiRecipientSuccess - (*SendMultiRecipientMessageResponse)(nil), // 16: org.signal.chat.messages.SendMultiRecipientMessageResponse - (*MismatchedDevices)(nil), // 17: org.signal.chat.messages.MismatchedDevices - (*MultiRecipientMismatchedDevices)(nil), // 18: org.signal.chat.messages.MultiRecipientMismatchedDevices - (*ChallengeRequired)(nil), // 19: org.signal.chat.messages.ChallengeRequired - (*GetMessagesRequest_GetMessageOptions)(nil), // 20: org.signal.chat.messages.GetMessagesRequest.GetMessageOptions - (*IndividualRecipientMessageBundle_Message)(nil), // 21: org.signal.chat.messages.IndividualRecipientMessageBundle.Message - nil, // 22: org.signal.chat.messages.IndividualRecipientMessageBundle.MessagesEntry - (*emptypb.Empty)(nil), // 23: google.protobuf.Empty - (*signalpb.Envelope)(nil), // 24: signalservice.Envelope - (*common.ServiceIdentifier)(nil), // 25: org.signal.chat.common.ServiceIdentifier - (*errors.NotFound)(nil), // 26: org.signal.chat.errors.NotFound - (*errors.FailedUnidentifiedAuthorization)(nil), // 27: org.signal.chat.errors.FailedUnidentifiedAuthorization -} -var file_org_signal_chat_messages_proto_depIdxs = []int32{ - 20, // 0: org.signal.chat.messages.GetMessagesRequest.options:type_name -> org.signal.chat.messages.GetMessagesRequest.GetMessageOptions - 23, // 1: org.signal.chat.messages.GetMessagesStreamClosed.conflicting_stream:type_name -> google.protobuf.Empty - 24, // 2: org.signal.chat.messages.GetMessagesResponse.envelope:type_name -> signalservice.Envelope - 23, // 3: org.signal.chat.messages.GetMessagesResponse.queue_empty:type_name -> google.protobuf.Empty - 22, // 4: org.signal.chat.messages.IndividualRecipientMessageBundle.messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle.MessagesEntry - 25, // 5: org.signal.chat.messages.SendAuthenticatedSenderMessageRequest.destination:type_name -> org.signal.chat.common.ServiceIdentifier - 5, // 6: org.signal.chat.messages.SendAuthenticatedSenderMessageRequest.messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle - 23, // 7: org.signal.chat.messages.SendMessageAuthenticatedSenderResponse.success:type_name -> google.protobuf.Empty - 17, // 8: org.signal.chat.messages.SendMessageAuthenticatedSenderResponse.mismatched_devices:type_name -> org.signal.chat.messages.MismatchedDevices - 19, // 9: org.signal.chat.messages.SendMessageAuthenticatedSenderResponse.challenge_required:type_name -> org.signal.chat.messages.ChallengeRequired - 26, // 10: org.signal.chat.messages.SendMessageAuthenticatedSenderResponse.destination_not_found:type_name -> org.signal.chat.errors.NotFound - 5, // 11: org.signal.chat.messages.SendSyncMessageRequest.messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle - 25, // 12: org.signal.chat.messages.SendSealedSenderMessageRequest.destination:type_name -> org.signal.chat.common.ServiceIdentifier - 5, // 13: org.signal.chat.messages.SendSealedSenderMessageRequest.messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle - 23, // 14: org.signal.chat.messages.SendSealedSenderMessageRequest.unrestricted_access:type_name -> google.protobuf.Empty - 25, // 15: org.signal.chat.messages.SendStoryMessageRequest.destination:type_name -> org.signal.chat.common.ServiceIdentifier - 5, // 16: org.signal.chat.messages.SendStoryMessageRequest.messages:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle - 23, // 17: org.signal.chat.messages.SendMessageResponse.success:type_name -> google.protobuf.Empty - 17, // 18: org.signal.chat.messages.SendMessageResponse.mismatched_devices:type_name -> org.signal.chat.messages.MismatchedDevices - 27, // 19: org.signal.chat.messages.SendMessageResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 26, // 20: org.signal.chat.messages.SendMessageResponse.destination_not_found:type_name -> org.signal.chat.errors.NotFound - 12, // 21: org.signal.chat.messages.SendMultiRecipientMessageRequest.message:type_name -> org.signal.chat.messages.MultiRecipientMessage - 12, // 22: org.signal.chat.messages.SendMultiRecipientStoryRequest.message:type_name -> org.signal.chat.messages.MultiRecipientMessage - 25, // 23: org.signal.chat.messages.MultiRecipientSuccess.unresolved_recipients:type_name -> org.signal.chat.common.ServiceIdentifier - 15, // 24: org.signal.chat.messages.SendMultiRecipientMessageResponse.success:type_name -> org.signal.chat.messages.MultiRecipientSuccess - 18, // 25: org.signal.chat.messages.SendMultiRecipientMessageResponse.mismatched_devices:type_name -> org.signal.chat.messages.MultiRecipientMismatchedDevices - 27, // 26: org.signal.chat.messages.SendMultiRecipientMessageResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 25, // 27: org.signal.chat.messages.MismatchedDevices.service_identifier:type_name -> org.signal.chat.common.ServiceIdentifier - 17, // 28: org.signal.chat.messages.MultiRecipientMismatchedDevices.mismatched_devices:type_name -> org.signal.chat.messages.MismatchedDevices - 1, // 29: org.signal.chat.messages.ChallengeRequired.challenge_options:type_name -> org.signal.chat.messages.ChallengeRequired.ChallengeType - 0, // 30: org.signal.chat.messages.IndividualRecipientMessageBundle.Message.type:type_name -> org.signal.chat.messages.SendMessageType - 21, // 31: org.signal.chat.messages.IndividualRecipientMessageBundle.MessagesEntry.value:type_name -> org.signal.chat.messages.IndividualRecipientMessageBundle.Message - 6, // 32: org.signal.chat.messages.Messages.SendMessage:input_type -> org.signal.chat.messages.SendAuthenticatedSenderMessageRequest - 8, // 33: org.signal.chat.messages.Messages.SendSyncMessage:input_type -> org.signal.chat.messages.SendSyncMessageRequest - 2, // 34: org.signal.chat.messages.Messages.GetMessages:input_type -> org.signal.chat.messages.GetMessagesRequest - 9, // 35: org.signal.chat.messages.MessagesAnonymous.SendSingleRecipientMessage:input_type -> org.signal.chat.messages.SendSealedSenderMessageRequest - 13, // 36: org.signal.chat.messages.MessagesAnonymous.SendMultiRecipientMessage:input_type -> org.signal.chat.messages.SendMultiRecipientMessageRequest - 10, // 37: org.signal.chat.messages.MessagesAnonymous.SendStory:input_type -> org.signal.chat.messages.SendStoryMessageRequest - 14, // 38: org.signal.chat.messages.MessagesAnonymous.SendMultiRecipientStory:input_type -> org.signal.chat.messages.SendMultiRecipientStoryRequest - 7, // 39: org.signal.chat.messages.Messages.SendMessage:output_type -> org.signal.chat.messages.SendMessageAuthenticatedSenderResponse - 7, // 40: org.signal.chat.messages.Messages.SendSyncMessage:output_type -> org.signal.chat.messages.SendMessageAuthenticatedSenderResponse - 4, // 41: org.signal.chat.messages.Messages.GetMessages:output_type -> org.signal.chat.messages.GetMessagesResponse - 11, // 42: org.signal.chat.messages.MessagesAnonymous.SendSingleRecipientMessage:output_type -> org.signal.chat.messages.SendMessageResponse - 16, // 43: org.signal.chat.messages.MessagesAnonymous.SendMultiRecipientMessage:output_type -> org.signal.chat.messages.SendMultiRecipientMessageResponse - 11, // 44: org.signal.chat.messages.MessagesAnonymous.SendStory:output_type -> org.signal.chat.messages.SendMessageResponse - 16, // 45: org.signal.chat.messages.MessagesAnonymous.SendMultiRecipientStory:output_type -> org.signal.chat.messages.SendMultiRecipientMessageResponse - 39, // [39:46] is the sub-list for method output_type - 32, // [32:39] is the sub-list for method input_type - 32, // [32:32] is the sub-list for extension type_name - 32, // [32:32] is the sub-list for extension extendee - 0, // [0:32] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_messages_proto_init() } -func file_org_signal_chat_messages_proto_init() { - if File_org_signal_chat_messages_proto != nil { - return - } - file_org_signal_chat_messages_proto_msgTypes[0].OneofWrappers = []any{ - (*GetMessagesRequest_Options)(nil), - (*GetMessagesRequest_ServerGuidAck)(nil), - } - file_org_signal_chat_messages_proto_msgTypes[1].OneofWrappers = []any{ - (*GetMessagesStreamClosed_ConflictingStream)(nil), - } - file_org_signal_chat_messages_proto_msgTypes[2].OneofWrappers = []any{ - (*GetMessagesResponse_Envelope)(nil), - (*GetMessagesResponse_QueueEmpty)(nil), - } - file_org_signal_chat_messages_proto_msgTypes[5].OneofWrappers = []any{ - (*SendMessageAuthenticatedSenderResponse_Success)(nil), - (*SendMessageAuthenticatedSenderResponse_MismatchedDevices)(nil), - (*SendMessageAuthenticatedSenderResponse_ChallengeRequired)(nil), - (*SendMessageAuthenticatedSenderResponse_DestinationNotFound)(nil), - } - file_org_signal_chat_messages_proto_msgTypes[7].OneofWrappers = []any{ - (*SendSealedSenderMessageRequest_UnidentifiedAccessKey)(nil), - (*SendSealedSenderMessageRequest_GroupSendToken)(nil), - (*SendSealedSenderMessageRequest_UnrestrictedAccess)(nil), - } - file_org_signal_chat_messages_proto_msgTypes[9].OneofWrappers = []any{ - (*SendMessageResponse_Success)(nil), - (*SendMessageResponse_MismatchedDevices)(nil), - (*SendMessageResponse_FailedUnidentifiedAuthorization)(nil), - (*SendMessageResponse_DestinationNotFound)(nil), - } - file_org_signal_chat_messages_proto_msgTypes[14].OneofWrappers = []any{ - (*SendMultiRecipientMessageResponse_Success)(nil), - (*SendMultiRecipientMessageResponse_MismatchedDevices)(nil), - (*SendMultiRecipientMessageResponse_FailedUnidentifiedAuthorization)(nil), - } - file_org_signal_chat_messages_proto_msgTypes[17].OneofWrappers = []any{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_messages_proto_rawDesc), len(file_org_signal_chat_messages_proto_rawDesc)), - NumEnums: 2, - NumMessages: 21, - NumExtensions: 0, - NumServices: 2, - }, - GoTypes: file_org_signal_chat_messages_proto_goTypes, - DependencyIndexes: file_org_signal_chat_messages_proto_depIdxs, - EnumInfos: file_org_signal_chat_messages_proto_enumTypes, - MessageInfos: file_org_signal_chat_messages_proto_msgTypes, - }.Build() - File_org_signal_chat_messages_proto = out.File - file_org_signal_chat_messages_proto_goTypes = nil - file_org_signal_chat_messages_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/messages/messages_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/messages/messages_grpc.pb.go deleted file mode 100644 index d9b0a6d..0000000 --- a/pkg/signalmeow/protobuf/rpc/messages/messages_grpc.pb.go +++ /dev/null @@ -1,490 +0,0 @@ -// -// Copyright 2025 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/messages.proto - -package messages - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Messages_SendMessage_FullMethodName = "/org.signal.chat.messages.Messages/SendMessage" - Messages_SendSyncMessage_FullMethodName = "/org.signal.chat.messages.Messages/SendSyncMessage" - Messages_GetMessages_FullMethodName = "/org.signal.chat.messages.Messages/GetMessages" -) - -// MessagesClient is the client API for Messages service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Provides methods for sending "unsealed sender" messages. -type MessagesClient interface { - // Sends an "unsealed sender" message to all devices linked to a single - // destination account. - // - // The destination account must not be the same as the authenticated caller. - // Callers should use `SendSyncMessage` to send messages to themselves. - SendMessage(ctx context.Context, in *SendAuthenticatedSenderMessageRequest, opts ...grpc.CallOption) (*SendMessageAuthenticatedSenderResponse, error) - // Sends a "sync" message to all other devices linked to the authenticated - // sender's account. - SendSyncMessage(ctx context.Context, in *SendSyncMessageRequest, opts ...grpc.CallOption) (*SendMessageAuthenticatedSenderResponse, error) - // Retrieve messages for the authenticated device. When the caller receives - // and successfully processes a message returned in a GetMessagesResponse they - // must send a corresponding GetMessagesRequest indicating that the message - // has been processed (an ack). Acks should only be sent for messages - // delivered via the currently open RPC. - // - // Only the first GetMessagesRequest may contain request parameters that - // configure the stream. The first request must not contain an ack. - // - // The server will keep the stream open until the client disconnects. Only - // one GetMessages stream may be open per device. If a second GetMessages - // stream is opened, the server may terminate any of the streams with - // a STREAM_CLOSED error reason. A GetMessagesStreamClosed message will be - // present in the error details. - GetMessages(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[GetMessagesRequest, GetMessagesResponse], error) -} - -type messagesClient struct { - cc grpc.ClientConnInterface -} - -func NewMessagesClient(cc grpc.ClientConnInterface) MessagesClient { - return &messagesClient{cc} -} - -func (c *messagesClient) SendMessage(ctx context.Context, in *SendAuthenticatedSenderMessageRequest, opts ...grpc.CallOption) (*SendMessageAuthenticatedSenderResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SendMessageAuthenticatedSenderResponse) - err := c.cc.Invoke(ctx, Messages_SendMessage_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *messagesClient) SendSyncMessage(ctx context.Context, in *SendSyncMessageRequest, opts ...grpc.CallOption) (*SendMessageAuthenticatedSenderResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SendMessageAuthenticatedSenderResponse) - err := c.cc.Invoke(ctx, Messages_SendSyncMessage_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *messagesClient) GetMessages(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[GetMessagesRequest, GetMessagesResponse], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &Messages_ServiceDesc.Streams[0], Messages_GetMessages_FullMethodName, cOpts...) - if err != nil { - return nil, err - } - x := &grpc.GenericClientStream[GetMessagesRequest, GetMessagesResponse]{ClientStream: stream} - return x, nil -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type Messages_GetMessagesClient = grpc.BidiStreamingClient[GetMessagesRequest, GetMessagesResponse] - -// MessagesServer is the server API for Messages service. -// All implementations must embed UnimplementedMessagesServer -// for forward compatibility. -// -// Provides methods for sending "unsealed sender" messages. -type MessagesServer interface { - // Sends an "unsealed sender" message to all devices linked to a single - // destination account. - // - // The destination account must not be the same as the authenticated caller. - // Callers should use `SendSyncMessage` to send messages to themselves. - SendMessage(context.Context, *SendAuthenticatedSenderMessageRequest) (*SendMessageAuthenticatedSenderResponse, error) - // Sends a "sync" message to all other devices linked to the authenticated - // sender's account. - SendSyncMessage(context.Context, *SendSyncMessageRequest) (*SendMessageAuthenticatedSenderResponse, error) - // Retrieve messages for the authenticated device. When the caller receives - // and successfully processes a message returned in a GetMessagesResponse they - // must send a corresponding GetMessagesRequest indicating that the message - // has been processed (an ack). Acks should only be sent for messages - // delivered via the currently open RPC. - // - // Only the first GetMessagesRequest may contain request parameters that - // configure the stream. The first request must not contain an ack. - // - // The server will keep the stream open until the client disconnects. Only - // one GetMessages stream may be open per device. If a second GetMessages - // stream is opened, the server may terminate any of the streams with - // a STREAM_CLOSED error reason. A GetMessagesStreamClosed message will be - // present in the error details. - GetMessages(grpc.BidiStreamingServer[GetMessagesRequest, GetMessagesResponse]) error - mustEmbedUnimplementedMessagesServer() -} - -// UnimplementedMessagesServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedMessagesServer struct{} - -func (UnimplementedMessagesServer) SendMessage(context.Context, *SendAuthenticatedSenderMessageRequest) (*SendMessageAuthenticatedSenderResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SendMessage not implemented") -} -func (UnimplementedMessagesServer) SendSyncMessage(context.Context, *SendSyncMessageRequest) (*SendMessageAuthenticatedSenderResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SendSyncMessage not implemented") -} -func (UnimplementedMessagesServer) GetMessages(grpc.BidiStreamingServer[GetMessagesRequest, GetMessagesResponse]) error { - return status.Error(codes.Unimplemented, "method GetMessages not implemented") -} -func (UnimplementedMessagesServer) mustEmbedUnimplementedMessagesServer() {} -func (UnimplementedMessagesServer) testEmbeddedByValue() {} - -// UnsafeMessagesServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MessagesServer will -// result in compilation errors. -type UnsafeMessagesServer interface { - mustEmbedUnimplementedMessagesServer() -} - -func RegisterMessagesServer(s grpc.ServiceRegistrar, srv MessagesServer) { - // If the following call panics, it indicates UnimplementedMessagesServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Messages_ServiceDesc, srv) -} - -func _Messages_SendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendAuthenticatedSenderMessageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MessagesServer).SendMessage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Messages_SendMessage_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MessagesServer).SendMessage(ctx, req.(*SendAuthenticatedSenderMessageRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Messages_SendSyncMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendSyncMessageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MessagesServer).SendSyncMessage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Messages_SendSyncMessage_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MessagesServer).SendSyncMessage(ctx, req.(*SendSyncMessageRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Messages_GetMessages_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(MessagesServer).GetMessages(&grpc.GenericServerStream[GetMessagesRequest, GetMessagesResponse]{ServerStream: stream}) -} - -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type Messages_GetMessagesServer = grpc.BidiStreamingServer[GetMessagesRequest, GetMessagesResponse] - -// Messages_ServiceDesc is the grpc.ServiceDesc for Messages service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Messages_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.messages.Messages", - HandlerType: (*MessagesServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SendMessage", - Handler: _Messages_SendMessage_Handler, - }, - { - MethodName: "SendSyncMessage", - Handler: _Messages_SendSyncMessage_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "GetMessages", - Handler: _Messages_GetMessages_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "org/signal/chat/messages.proto", -} - -const ( - MessagesAnonymous_SendSingleRecipientMessage_FullMethodName = "/org.signal.chat.messages.MessagesAnonymous/SendSingleRecipientMessage" - MessagesAnonymous_SendMultiRecipientMessage_FullMethodName = "/org.signal.chat.messages.MessagesAnonymous/SendMultiRecipientMessage" - MessagesAnonymous_SendStory_FullMethodName = "/org.signal.chat.messages.MessagesAnonymous/SendStory" - MessagesAnonymous_SendMultiRecipientStory_FullMethodName = "/org.signal.chat.messages.MessagesAnonymous/SendMultiRecipientStory" -) - -// MessagesAnonymousClient is the client API for MessagesAnonymous service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Provides methods for sending "sealed sender" messages. -type MessagesAnonymousClient interface { - // Sends a "sealed sender" message to all devices linked to a single - // destination account. - // - // If this RPC is authorized with an unidentified access key, it will fail - // with an authorization failure if the credential is invalid OR if the - // destination account was not found. If it is authorized using a group send - // token, it will fail with an authorization failure if the credential is - // invalid and with an destination not found error if the account does not - // exist - SendSingleRecipientMessage(ctx context.Context, in *SendSealedSenderMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error) - // Sends a "sealed sender" message with a common payload to all devices linked - // to multiple destination accounts. - SendMultiRecipientMessage(ctx context.Context, in *SendMultiRecipientMessageRequest, opts ...grpc.CallOption) (*SendMultiRecipientMessageResponse, error) - // Sends a story message to devices linked to a single destination account. - SendStory(ctx context.Context, in *SendStoryMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error) - // Sends a story message with a common payload to devices linked to devices - // linked to multiple destination accounts. - SendMultiRecipientStory(ctx context.Context, in *SendMultiRecipientStoryRequest, opts ...grpc.CallOption) (*SendMultiRecipientMessageResponse, error) -} - -type messagesAnonymousClient struct { - cc grpc.ClientConnInterface -} - -func NewMessagesAnonymousClient(cc grpc.ClientConnInterface) MessagesAnonymousClient { - return &messagesAnonymousClient{cc} -} - -func (c *messagesAnonymousClient) SendSingleRecipientMessage(ctx context.Context, in *SendSealedSenderMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SendMessageResponse) - err := c.cc.Invoke(ctx, MessagesAnonymous_SendSingleRecipientMessage_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *messagesAnonymousClient) SendMultiRecipientMessage(ctx context.Context, in *SendMultiRecipientMessageRequest, opts ...grpc.CallOption) (*SendMultiRecipientMessageResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SendMultiRecipientMessageResponse) - err := c.cc.Invoke(ctx, MessagesAnonymous_SendMultiRecipientMessage_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *messagesAnonymousClient) SendStory(ctx context.Context, in *SendStoryMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SendMessageResponse) - err := c.cc.Invoke(ctx, MessagesAnonymous_SendStory_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *messagesAnonymousClient) SendMultiRecipientStory(ctx context.Context, in *SendMultiRecipientStoryRequest, opts ...grpc.CallOption) (*SendMultiRecipientMessageResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SendMultiRecipientMessageResponse) - err := c.cc.Invoke(ctx, MessagesAnonymous_SendMultiRecipientStory_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MessagesAnonymousServer is the server API for MessagesAnonymous service. -// All implementations must embed UnimplementedMessagesAnonymousServer -// for forward compatibility. -// -// Provides methods for sending "sealed sender" messages. -type MessagesAnonymousServer interface { - // Sends a "sealed sender" message to all devices linked to a single - // destination account. - // - // If this RPC is authorized with an unidentified access key, it will fail - // with an authorization failure if the credential is invalid OR if the - // destination account was not found. If it is authorized using a group send - // token, it will fail with an authorization failure if the credential is - // invalid and with an destination not found error if the account does not - // exist - SendSingleRecipientMessage(context.Context, *SendSealedSenderMessageRequest) (*SendMessageResponse, error) - // Sends a "sealed sender" message with a common payload to all devices linked - // to multiple destination accounts. - SendMultiRecipientMessage(context.Context, *SendMultiRecipientMessageRequest) (*SendMultiRecipientMessageResponse, error) - // Sends a story message to devices linked to a single destination account. - SendStory(context.Context, *SendStoryMessageRequest) (*SendMessageResponse, error) - // Sends a story message with a common payload to devices linked to devices - // linked to multiple destination accounts. - SendMultiRecipientStory(context.Context, *SendMultiRecipientStoryRequest) (*SendMultiRecipientMessageResponse, error) - mustEmbedUnimplementedMessagesAnonymousServer() -} - -// UnimplementedMessagesAnonymousServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedMessagesAnonymousServer struct{} - -func (UnimplementedMessagesAnonymousServer) SendSingleRecipientMessage(context.Context, *SendSealedSenderMessageRequest) (*SendMessageResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SendSingleRecipientMessage not implemented") -} -func (UnimplementedMessagesAnonymousServer) SendMultiRecipientMessage(context.Context, *SendMultiRecipientMessageRequest) (*SendMultiRecipientMessageResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SendMultiRecipientMessage not implemented") -} -func (UnimplementedMessagesAnonymousServer) SendStory(context.Context, *SendStoryMessageRequest) (*SendMessageResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SendStory not implemented") -} -func (UnimplementedMessagesAnonymousServer) SendMultiRecipientStory(context.Context, *SendMultiRecipientStoryRequest) (*SendMultiRecipientMessageResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SendMultiRecipientStory not implemented") -} -func (UnimplementedMessagesAnonymousServer) mustEmbedUnimplementedMessagesAnonymousServer() {} -func (UnimplementedMessagesAnonymousServer) testEmbeddedByValue() {} - -// UnsafeMessagesAnonymousServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MessagesAnonymousServer will -// result in compilation errors. -type UnsafeMessagesAnonymousServer interface { - mustEmbedUnimplementedMessagesAnonymousServer() -} - -func RegisterMessagesAnonymousServer(s grpc.ServiceRegistrar, srv MessagesAnonymousServer) { - // If the following call panics, it indicates UnimplementedMessagesAnonymousServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&MessagesAnonymous_ServiceDesc, srv) -} - -func _MessagesAnonymous_SendSingleRecipientMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendSealedSenderMessageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MessagesAnonymousServer).SendSingleRecipientMessage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: MessagesAnonymous_SendSingleRecipientMessage_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MessagesAnonymousServer).SendSingleRecipientMessage(ctx, req.(*SendSealedSenderMessageRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MessagesAnonymous_SendMultiRecipientMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendMultiRecipientMessageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MessagesAnonymousServer).SendMultiRecipientMessage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: MessagesAnonymous_SendMultiRecipientMessage_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MessagesAnonymousServer).SendMultiRecipientMessage(ctx, req.(*SendMultiRecipientMessageRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MessagesAnonymous_SendStory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendStoryMessageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MessagesAnonymousServer).SendStory(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: MessagesAnonymous_SendStory_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MessagesAnonymousServer).SendStory(ctx, req.(*SendStoryMessageRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MessagesAnonymous_SendMultiRecipientStory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendMultiRecipientStoryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MessagesAnonymousServer).SendMultiRecipientStory(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: MessagesAnonymous_SendMultiRecipientStory_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MessagesAnonymousServer).SendMultiRecipientStory(ctx, req.(*SendMultiRecipientStoryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// MessagesAnonymous_ServiceDesc is the grpc.ServiceDesc for MessagesAnonymous service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var MessagesAnonymous_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.messages.MessagesAnonymous", - HandlerType: (*MessagesAnonymousServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SendSingleRecipientMessage", - Handler: _MessagesAnonymous_SendSingleRecipientMessage_Handler, - }, - { - MethodName: "SendMultiRecipientMessage", - Handler: _MessagesAnonymous_SendMultiRecipientMessage_Handler, - }, - { - MethodName: "SendStory", - Handler: _MessagesAnonymous_SendStory_Handler, - }, - { - MethodName: "SendMultiRecipientStory", - Handler: _MessagesAnonymous_SendMultiRecipientStory_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/messages.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations.pb.go b/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations.pb.go deleted file mode 100644 index 507d508..0000000 --- a/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations.pb.go +++ /dev/null @@ -1,1345 +0,0 @@ -// -// Copyright 2026 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/one_time_donations.proto - -package one_time_donations - -import ( - errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - subscriptions "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/subscriptions" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// The amount is below the minimum for the currency. -type AmountBelowMinimumError struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The minimum amount for the currency - Minimum string `protobuf:"bytes,1,opt,name=minimum,proto3" json:"minimum,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AmountBelowMinimumError) Reset() { - *x = AmountBelowMinimumError{} - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AmountBelowMinimumError) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AmountBelowMinimumError) ProtoMessage() {} - -func (x *AmountBelowMinimumError) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AmountBelowMinimumError.ProtoReflect.Descriptor instead. -func (*AmountBelowMinimumError) Descriptor() ([]byte, []int) { - return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{0} -} - -func (x *AmountBelowMinimumError) GetMinimum() string { - if x != nil { - return x.Minimum - } - return "" -} - -// The SEPA Direct Debit amount exceeds the allowed maximum. -type AmountAboveSepaLimitError struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The maximum amount for a SEPA transaction - Maximum string `protobuf:"bytes,1,opt,name=maximum,proto3" json:"maximum,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AmountAboveSepaLimitError) Reset() { - *x = AmountAboveSepaLimitError{} - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AmountAboveSepaLimitError) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AmountAboveSepaLimitError) ProtoMessage() {} - -func (x *AmountAboveSepaLimitError) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AmountAboveSepaLimitError.ProtoReflect.Descriptor instead. -func (*AmountAboveSepaLimitError) Descriptor() ([]byte, []int) { - return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{1} -} - -func (x *AmountAboveSepaLimitError) GetMaximum() string { - if x != nil { - return x.Maximum - } - return "" -} - -type CreateBoostRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // ISO 4217 currency code, case-insensitive (e.g. "usd", "EUR") - Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` - // The amount to pay in the [currency's minor unit](https://docs.stripe.com/currencies#minor-units) - Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` - // The level for the boost payment - Level uint64 `protobuf:"varint,3,opt,name=level,proto3" json:"level,omitempty"` - // The payment method - PaymentMethod subscriptions.PaymentMethod `protobuf:"varint,4,opt,name=payment_method,json=paymentMethod,proto3,enum=org.signal.chat.purchase.PaymentMethod" json:"payment_method,omitempty"` - // A donation permit retrieved from Donations.createDonationPermit - DonationPermit []byte `protobuf:"bytes,5,opt,name=donation_permit,json=donationPermit,proto3" json:"donation_permit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateBoostRequest) Reset() { - *x = CreateBoostRequest{} - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateBoostRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateBoostRequest) ProtoMessage() {} - -func (x *CreateBoostRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateBoostRequest.ProtoReflect.Descriptor instead. -func (*CreateBoostRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{2} -} - -func (x *CreateBoostRequest) GetCurrency() string { - if x != nil { - return x.Currency - } - return "" -} - -func (x *CreateBoostRequest) GetAmount() uint64 { - if x != nil { - return x.Amount - } - return 0 -} - -func (x *CreateBoostRequest) GetLevel() uint64 { - if x != nil { - return x.Level - } - return 0 -} - -func (x *CreateBoostRequest) GetPaymentMethod() subscriptions.PaymentMethod { - if x != nil { - return x.PaymentMethod - } - return subscriptions.PaymentMethod(0) -} - -func (x *CreateBoostRequest) GetDonationPermit() []byte { - if x != nil { - return x.DonationPermit - } - return nil -} - -type CreateBoostResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *CreateBoostResponse_ClientSecret - // *CreateBoostResponse_AmountBelowMinimum - // *CreateBoostResponse_AmountAboveSepaLimit - // *CreateBoostResponse_UnsupportedCurrency - // *CreateBoostResponse_UnsupportedLevel - // *CreateBoostResponse_PermitRejected - // *CreateBoostResponse_InvalidAmount - Response isCreateBoostResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateBoostResponse) Reset() { - *x = CreateBoostResponse{} - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateBoostResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateBoostResponse) ProtoMessage() {} - -func (x *CreateBoostResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateBoostResponse.ProtoReflect.Descriptor instead. -func (*CreateBoostResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{3} -} - -func (x *CreateBoostResponse) GetResponse() isCreateBoostResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *CreateBoostResponse) GetClientSecret() string { - if x != nil { - if x, ok := x.Response.(*CreateBoostResponse_ClientSecret); ok { - return x.ClientSecret - } - } - return "" -} - -func (x *CreateBoostResponse) GetAmountBelowMinimum() *AmountBelowMinimumError { - if x != nil { - if x, ok := x.Response.(*CreateBoostResponse_AmountBelowMinimum); ok { - return x.AmountBelowMinimum - } - } - return nil -} - -func (x *CreateBoostResponse) GetAmountAboveSepaLimit() *AmountAboveSepaLimitError { - if x != nil { - if x, ok := x.Response.(*CreateBoostResponse_AmountAboveSepaLimit); ok { - return x.AmountAboveSepaLimit - } - } - return nil -} - -func (x *CreateBoostResponse) GetUnsupportedCurrency() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*CreateBoostResponse_UnsupportedCurrency); ok { - return x.UnsupportedCurrency - } - } - return nil -} - -func (x *CreateBoostResponse) GetUnsupportedLevel() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*CreateBoostResponse_UnsupportedLevel); ok { - return x.UnsupportedLevel - } - } - return nil -} - -func (x *CreateBoostResponse) GetPermitRejected() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Response.(*CreateBoostResponse_PermitRejected); ok { - return x.PermitRejected - } - } - return nil -} - -func (x *CreateBoostResponse) GetInvalidAmount() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*CreateBoostResponse_InvalidAmount); ok { - return x.InvalidAmount - } - } - return nil -} - -type isCreateBoostResponse_Response interface { - isCreateBoostResponse_Response() -} - -type CreateBoostResponse_ClientSecret struct { - // A client secret that can be used to complete a stripe PaymentIntent - ClientSecret string `protobuf:"bytes,1,opt,name=client_secret,json=clientSecret,proto3,oneof"` -} - -type CreateBoostResponse_AmountBelowMinimum struct { - // The amount is below the minimum for the currency - AmountBelowMinimum *AmountBelowMinimumError `protobuf:"bytes,2,opt,name=amount_below_minimum,json=amountBelowMinimum,proto3,oneof"` -} - -type CreateBoostResponse_AmountAboveSepaLimit struct { - // The amount exceeds the maximum for SEPA Direct Debit - AmountAboveSepaLimit *AmountAboveSepaLimitError `protobuf:"bytes,3,opt,name=amount_above_sepa_limit,json=amountAboveSepaLimit,proto3,oneof"` -} - -type CreateBoostResponse_UnsupportedCurrency struct { - // The requested currency is not supported for the given payment method - UnsupportedCurrency *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=unsupported_currency,json=unsupportedCurrency,proto3,oneof"` -} - -type CreateBoostResponse_UnsupportedLevel struct { - // The requested level is not a valid one-time donation level - UnsupportedLevel *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=unsupported_level,json=unsupportedLevel,proto3,oneof"` -} - -type CreateBoostResponse_PermitRejected struct { - // Donation permit was invalid or already spent - PermitRejected *errors.FailedZkAuthentication `protobuf:"bytes,6,opt,name=permit_rejected,json=permitRejected,proto3,oneof"` -} - -type CreateBoostResponse_InvalidAmount struct { - // The amount in the specified currency is not supported by the payment provider - InvalidAmount *errors.FailedPrecondition `protobuf:"bytes,7,opt,name=invalid_amount,json=invalidAmount,proto3,oneof"` -} - -func (*CreateBoostResponse_ClientSecret) isCreateBoostResponse_Response() {} - -func (*CreateBoostResponse_AmountBelowMinimum) isCreateBoostResponse_Response() {} - -func (*CreateBoostResponse_AmountAboveSepaLimit) isCreateBoostResponse_Response() {} - -func (*CreateBoostResponse_UnsupportedCurrency) isCreateBoostResponse_Response() {} - -func (*CreateBoostResponse_UnsupportedLevel) isCreateBoostResponse_Response() {} - -func (*CreateBoostResponse_PermitRejected) isCreateBoostResponse_Response() {} - -func (*CreateBoostResponse_InvalidAmount) isCreateBoostResponse_Response() {} - -type CreatePayPalBoostRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // ISO 4217 currency code, case-insensitive (e.g. "usd", "EUR") - Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` - // Amount in the currency's minor unit (e.g. cents for USD), must be >= 1 - Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` - // Donation level. - Level uint64 `protobuf:"varint,3,opt,name=level,proto3" json:"level,omitempty"` - // URL to redirect the user to after PayPal approval - ReturnUrl string `protobuf:"bytes,4,opt,name=return_url,json=returnUrl,proto3" json:"return_url,omitempty"` - // URL to redirect the user to if they cancel - CancelUrl string `protobuf:"bytes,5,opt,name=cancel_url,json=cancelUrl,proto3" json:"cancel_url,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreatePayPalBoostRequest) Reset() { - *x = CreatePayPalBoostRequest{} - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreatePayPalBoostRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePayPalBoostRequest) ProtoMessage() {} - -func (x *CreatePayPalBoostRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreatePayPalBoostRequest.ProtoReflect.Descriptor instead. -func (*CreatePayPalBoostRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{4} -} - -func (x *CreatePayPalBoostRequest) GetCurrency() string { - if x != nil { - return x.Currency - } - return "" -} - -func (x *CreatePayPalBoostRequest) GetAmount() uint64 { - if x != nil { - return x.Amount - } - return 0 -} - -func (x *CreatePayPalBoostRequest) GetLevel() uint64 { - if x != nil { - return x.Level - } - return 0 -} - -func (x *CreatePayPalBoostRequest) GetReturnUrl() string { - if x != nil { - return x.ReturnUrl - } - return "" -} - -func (x *CreatePayPalBoostRequest) GetCancelUrl() string { - if x != nil { - return x.CancelUrl - } - return "" -} - -type CreatePayPalBoostResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *CreatePayPalBoostResponse_Result - // *CreatePayPalBoostResponse_AmountBelowMinimum - // *CreatePayPalBoostResponse_UnsupportedCurrency - // *CreatePayPalBoostResponse_UnsupportedLevel - Response isCreatePayPalBoostResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreatePayPalBoostResponse) Reset() { - *x = CreatePayPalBoostResponse{} - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreatePayPalBoostResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePayPalBoostResponse) ProtoMessage() {} - -func (x *CreatePayPalBoostResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreatePayPalBoostResponse.ProtoReflect.Descriptor instead. -func (*CreatePayPalBoostResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{5} -} - -func (x *CreatePayPalBoostResponse) GetResponse() isCreatePayPalBoostResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *CreatePayPalBoostResponse) GetResult() *CreatePayPalBoostResponse_CreatePayPalBoostResult { - if x != nil { - if x, ok := x.Response.(*CreatePayPalBoostResponse_Result); ok { - return x.Result - } - } - return nil -} - -func (x *CreatePayPalBoostResponse) GetAmountBelowMinimum() *AmountBelowMinimumError { - if x != nil { - if x, ok := x.Response.(*CreatePayPalBoostResponse_AmountBelowMinimum); ok { - return x.AmountBelowMinimum - } - } - return nil -} - -func (x *CreatePayPalBoostResponse) GetUnsupportedCurrency() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*CreatePayPalBoostResponse_UnsupportedCurrency); ok { - return x.UnsupportedCurrency - } - } - return nil -} - -func (x *CreatePayPalBoostResponse) GetUnsupportedLevel() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*CreatePayPalBoostResponse_UnsupportedLevel); ok { - return x.UnsupportedLevel - } - } - return nil -} - -type isCreatePayPalBoostResponse_Response interface { - isCreatePayPalBoostResponse_Response() -} - -type CreatePayPalBoostResponse_Result struct { - Result *CreatePayPalBoostResponse_CreatePayPalBoostResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` -} - -type CreatePayPalBoostResponse_AmountBelowMinimum struct { - // The amount is below the minimum for the currency - AmountBelowMinimum *AmountBelowMinimumError `protobuf:"bytes,2,opt,name=amount_below_minimum,json=amountBelowMinimum,proto3,oneof"` -} - -type CreatePayPalBoostResponse_UnsupportedCurrency struct { - // The requested currency is not supported for PayPal - UnsupportedCurrency *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=unsupported_currency,json=unsupportedCurrency,proto3,oneof"` -} - -type CreatePayPalBoostResponse_UnsupportedLevel struct { - // The requested level is not a valid one-time donation level - UnsupportedLevel *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=unsupported_level,json=unsupportedLevel,proto3,oneof"` -} - -func (*CreatePayPalBoostResponse_Result) isCreatePayPalBoostResponse_Response() {} - -func (*CreatePayPalBoostResponse_AmountBelowMinimum) isCreatePayPalBoostResponse_Response() {} - -func (*CreatePayPalBoostResponse_UnsupportedCurrency) isCreatePayPalBoostResponse_Response() {} - -func (*CreatePayPalBoostResponse_UnsupportedLevel) isCreatePayPalBoostResponse_Response() {} - -type ConfirmPayPalBoostRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // ISO 4217 currency code, case-insensitive (e.g. "usd", "EUR") - Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` - // Amount in the currency's minor unit, must be >= 1 - Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` - // Donation level. - Level uint64 `protobuf:"varint,3,opt,name=level,proto3" json:"level,omitempty"` - // PayPal payer ID from the approval redirect - PayerId string `protobuf:"bytes,4,opt,name=payer_id,json=payerId,proto3" json:"payer_id,omitempty"` - // PayPal payment ID (PAYID-…) from CreatePayPalBoost - PaymentId string `protobuf:"bytes,5,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` - // PayPal payment token (EC-…) from the approval redirect - PaymentToken string `protobuf:"bytes,6,opt,name=payment_token,json=paymentToken,proto3" json:"payment_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ConfirmPayPalBoostRequest) Reset() { - *x = ConfirmPayPalBoostRequest{} - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfirmPayPalBoostRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmPayPalBoostRequest) ProtoMessage() {} - -func (x *ConfirmPayPalBoostRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmPayPalBoostRequest.ProtoReflect.Descriptor instead. -func (*ConfirmPayPalBoostRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{6} -} - -func (x *ConfirmPayPalBoostRequest) GetCurrency() string { - if x != nil { - return x.Currency - } - return "" -} - -func (x *ConfirmPayPalBoostRequest) GetAmount() uint64 { - if x != nil { - return x.Amount - } - return 0 -} - -func (x *ConfirmPayPalBoostRequest) GetLevel() uint64 { - if x != nil { - return x.Level - } - return 0 -} - -func (x *ConfirmPayPalBoostRequest) GetPayerId() string { - if x != nil { - return x.PayerId - } - return "" -} - -func (x *ConfirmPayPalBoostRequest) GetPaymentId() string { - if x != nil { - return x.PaymentId - } - return "" -} - -func (x *ConfirmPayPalBoostRequest) GetPaymentToken() string { - if x != nil { - return x.PaymentToken - } - return "" -} - -type ConfirmPayPalBoostResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *ConfirmPayPalBoostResponse_Result - // *ConfirmPayPalBoostResponse_AmountBelowMinimum - // *ConfirmPayPalBoostResponse_UnsupportedCurrency - // *ConfirmPayPalBoostResponse_UnsupportedLevel - // *ConfirmPayPalBoostResponse_ChargeFailure - Response isConfirmPayPalBoostResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ConfirmPayPalBoostResponse) Reset() { - *x = ConfirmPayPalBoostResponse{} - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfirmPayPalBoostResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmPayPalBoostResponse) ProtoMessage() {} - -func (x *ConfirmPayPalBoostResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmPayPalBoostResponse.ProtoReflect.Descriptor instead. -func (*ConfirmPayPalBoostResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{7} -} - -func (x *ConfirmPayPalBoostResponse) GetResponse() isConfirmPayPalBoostResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *ConfirmPayPalBoostResponse) GetResult() *ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult { - if x != nil { - if x, ok := x.Response.(*ConfirmPayPalBoostResponse_Result); ok { - return x.Result - } - } - return nil -} - -func (x *ConfirmPayPalBoostResponse) GetAmountBelowMinimum() *AmountBelowMinimumError { - if x != nil { - if x, ok := x.Response.(*ConfirmPayPalBoostResponse_AmountBelowMinimum); ok { - return x.AmountBelowMinimum - } - } - return nil -} - -func (x *ConfirmPayPalBoostResponse) GetUnsupportedCurrency() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*ConfirmPayPalBoostResponse_UnsupportedCurrency); ok { - return x.UnsupportedCurrency - } - } - return nil -} - -func (x *ConfirmPayPalBoostResponse) GetUnsupportedLevel() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*ConfirmPayPalBoostResponse_UnsupportedLevel); ok { - return x.UnsupportedLevel - } - } - return nil -} - -func (x *ConfirmPayPalBoostResponse) GetChargeFailure() *subscriptions.ChargeFailure { - if x != nil { - if x, ok := x.Response.(*ConfirmPayPalBoostResponse_ChargeFailure); ok { - return x.ChargeFailure - } - } - return nil -} - -type isConfirmPayPalBoostResponse_Response interface { - isConfirmPayPalBoostResponse_Response() -} - -type ConfirmPayPalBoostResponse_Result struct { - Result *ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` -} - -type ConfirmPayPalBoostResponse_AmountBelowMinimum struct { - // The amount is below the minimum for the currency - AmountBelowMinimum *AmountBelowMinimumError `protobuf:"bytes,2,opt,name=amount_below_minimum,json=amountBelowMinimum,proto3,oneof"` -} - -type ConfirmPayPalBoostResponse_UnsupportedCurrency struct { - // The requested currency is not supported for PayPal - UnsupportedCurrency *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=unsupported_currency,json=unsupportedCurrency,proto3,oneof"` -} - -type ConfirmPayPalBoostResponse_UnsupportedLevel struct { - // The requested level is not a valid one-time donation level - UnsupportedLevel *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=unsupported_level,json=unsupportedLevel,proto3,oneof"` -} - -type ConfirmPayPalBoostResponse_ChargeFailure struct { - // The payment failed; see charge failure details - ChargeFailure *subscriptions.ChargeFailure `protobuf:"bytes,5,opt,name=charge_failure,json=chargeFailure,proto3,oneof"` -} - -func (*ConfirmPayPalBoostResponse_Result) isConfirmPayPalBoostResponse_Response() {} - -func (*ConfirmPayPalBoostResponse_AmountBelowMinimum) isConfirmPayPalBoostResponse_Response() {} - -func (*ConfirmPayPalBoostResponse_UnsupportedCurrency) isConfirmPayPalBoostResponse_Response() {} - -func (*ConfirmPayPalBoostResponse_UnsupportedLevel) isConfirmPayPalBoostResponse_Response() {} - -func (*ConfirmPayPalBoostResponse_ChargeFailure) isConfirmPayPalBoostResponse_Response() {} - -type CreateBoostReceiptCredentialsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // a payment ID from the processor - PaymentIntentId string `protobuf:"bytes,1,opt,name=payment_intent_id,json=paymentIntentId,proto3" json:"payment_intent_id,omitempty"` - // ZK blind-signature receipt credential request bytes - ReceiptCredentialRequest []byte `protobuf:"bytes,2,opt,name=receipt_credential_request,json=receiptCredentialRequest,proto3" json:"receipt_credential_request,omitempty"` - // The processor that handled the payment - Processor subscriptions.PaymentProvider `protobuf:"varint,3,opt,name=processor,proto3,enum=org.signal.chat.purchase.PaymentProvider" json:"processor,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateBoostReceiptCredentialsRequest) Reset() { - *x = CreateBoostReceiptCredentialsRequest{} - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateBoostReceiptCredentialsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateBoostReceiptCredentialsRequest) ProtoMessage() {} - -func (x *CreateBoostReceiptCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateBoostReceiptCredentialsRequest.ProtoReflect.Descriptor instead. -func (*CreateBoostReceiptCredentialsRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{8} -} - -func (x *CreateBoostReceiptCredentialsRequest) GetPaymentIntentId() string { - if x != nil { - return x.PaymentIntentId - } - return "" -} - -func (x *CreateBoostReceiptCredentialsRequest) GetReceiptCredentialRequest() []byte { - if x != nil { - return x.ReceiptCredentialRequest - } - return nil -} - -func (x *CreateBoostReceiptCredentialsRequest) GetProcessor() subscriptions.PaymentProvider { - if x != nil { - return x.Processor - } - return subscriptions.PaymentProvider(0) -} - -type CreateBoostReceiptCredentialsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *CreateBoostReceiptCredentialsResponse_Result - // *CreateBoostReceiptCredentialsResponse_PaymentStillProcessing - // *CreateBoostReceiptCredentialsResponse_PaymentRequired - // *CreateBoostReceiptCredentialsResponse_PaymentNotFound - // *CreateBoostReceiptCredentialsResponse_ReceiptAlreadyIssued - Response isCreateBoostReceiptCredentialsResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateBoostReceiptCredentialsResponse) Reset() { - *x = CreateBoostReceiptCredentialsResponse{} - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateBoostReceiptCredentialsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateBoostReceiptCredentialsResponse) ProtoMessage() {} - -func (x *CreateBoostReceiptCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateBoostReceiptCredentialsResponse.ProtoReflect.Descriptor instead. -func (*CreateBoostReceiptCredentialsResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{9} -} - -func (x *CreateBoostReceiptCredentialsResponse) GetResponse() isCreateBoostReceiptCredentialsResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *CreateBoostReceiptCredentialsResponse) GetResult() *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult { - if x != nil { - if x, ok := x.Response.(*CreateBoostReceiptCredentialsResponse_Result); ok { - return x.Result - } - } - return nil -} - -func (x *CreateBoostReceiptCredentialsResponse) GetPaymentStillProcessing() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*CreateBoostReceiptCredentialsResponse_PaymentStillProcessing); ok { - return x.PaymentStillProcessing - } - } - return nil -} - -func (x *CreateBoostReceiptCredentialsResponse) GetPaymentRequired() *subscriptions.PaymentRequired { - if x != nil { - if x, ok := x.Response.(*CreateBoostReceiptCredentialsResponse_PaymentRequired); ok { - return x.PaymentRequired - } - } - return nil -} - -func (x *CreateBoostReceiptCredentialsResponse) GetPaymentNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*CreateBoostReceiptCredentialsResponse_PaymentNotFound); ok { - return x.PaymentNotFound - } - } - return nil -} - -func (x *CreateBoostReceiptCredentialsResponse) GetReceiptAlreadyIssued() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*CreateBoostReceiptCredentialsResponse_ReceiptAlreadyIssued); ok { - return x.ReceiptAlreadyIssued - } - } - return nil -} - -type isCreateBoostReceiptCredentialsResponse_Response interface { - isCreateBoostReceiptCredentialsResponse_Response() -} - -type CreateBoostReceiptCredentialsResponse_Result struct { - Result *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` -} - -type CreateBoostReceiptCredentialsResponse_PaymentStillProcessing struct { - // Payment is still processing; client should retry - PaymentStillProcessing *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=payment_still_processing,json=paymentStillProcessing,proto3,oneof"` -} - -type CreateBoostReceiptCredentialsResponse_PaymentRequired struct { - // Payment failed - PaymentRequired *subscriptions.PaymentRequired `protobuf:"bytes,3,opt,name=payment_required,json=paymentRequired,proto3,oneof"` -} - -type CreateBoostReceiptCredentialsResponse_PaymentNotFound struct { - // Payment intent not found - PaymentNotFound *errors.NotFound `protobuf:"bytes,4,opt,name=payment_not_found,json=paymentNotFound,proto3,oneof"` -} - -type CreateBoostReceiptCredentialsResponse_ReceiptAlreadyIssued struct { - // A receipt credential was already issued for this payment - ReceiptAlreadyIssued *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=receipt_already_issued,json=receiptAlreadyIssued,proto3,oneof"` -} - -func (*CreateBoostReceiptCredentialsResponse_Result) isCreateBoostReceiptCredentialsResponse_Response() { -} - -func (*CreateBoostReceiptCredentialsResponse_PaymentStillProcessing) isCreateBoostReceiptCredentialsResponse_Response() { -} - -func (*CreateBoostReceiptCredentialsResponse_PaymentRequired) isCreateBoostReceiptCredentialsResponse_Response() { -} - -func (*CreateBoostReceiptCredentialsResponse_PaymentNotFound) isCreateBoostReceiptCredentialsResponse_Response() { -} - -func (*CreateBoostReceiptCredentialsResponse_ReceiptAlreadyIssued) isCreateBoostReceiptCredentialsResponse_Response() { -} - -type CreatePayPalBoostResponse_CreatePayPalBoostResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - ApprovalUrl string `protobuf:"bytes,1,opt,name=approval_url,json=approvalUrl,proto3" json:"approval_url,omitempty"` - PaymentId string `protobuf:"bytes,2,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreatePayPalBoostResponse_CreatePayPalBoostResult) Reset() { - *x = CreatePayPalBoostResponse_CreatePayPalBoostResult{} - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreatePayPalBoostResponse_CreatePayPalBoostResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePayPalBoostResponse_CreatePayPalBoostResult) ProtoMessage() {} - -func (x *CreatePayPalBoostResponse_CreatePayPalBoostResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreatePayPalBoostResponse_CreatePayPalBoostResult.ProtoReflect.Descriptor instead. -func (*CreatePayPalBoostResponse_CreatePayPalBoostResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{5, 0} -} - -func (x *CreatePayPalBoostResponse_CreatePayPalBoostResult) GetApprovalUrl() string { - if x != nil { - return x.ApprovalUrl - } - return "" -} - -func (x *CreatePayPalBoostResponse_CreatePayPalBoostResult) GetPaymentId() string { - if x != nil { - return x.PaymentId - } - return "" -} - -type ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - PaymentId string `protobuf:"bytes,1,opt,name=payment_id,json=paymentId,proto3" json:"payment_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult) Reset() { - *x = ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult{} - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult) ProtoMessage() {} - -func (x *ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult.ProtoReflect.Descriptor instead. -func (*ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult) GetPaymentId() string { - if x != nil { - return x.PaymentId - } - return "" -} - -type CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - ReceiptCredentialResponse []byte `protobuf:"bytes,1,opt,name=receipt_credential_response,json=receiptCredentialResponse,proto3" json:"receipt_credential_response,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) Reset() { - *x = CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult{} - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) ProtoMessage() {} - -func (x *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_one_time_donations_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult.ProtoReflect.Descriptor instead. -func (*CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_one_time_donations_proto_rawDescGZIP(), []int{9, 0} -} - -func (x *CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult) GetReceiptCredentialResponse() []byte { - if x != nil { - return x.ReceiptCredentialResponse - } - return nil -} - -var File_org_signal_chat_one_time_donations_proto protoreflect.FileDescriptor - -const file_org_signal_chat_one_time_donations_proto_rawDesc = "" + - "\n" + - "(org/signal/chat/one_time_donations.proto\x12\x18org.signal.chat.purchase\x1a\x1dorg/signal/chat/require.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x19org/signal/chat/tag.proto\x1a#org/signal/chat/subscriptions.proto\"3\n" + - "\x17AmountBelowMinimumError\x12\x18\n" + - "\aminimum\x18\x01 \x01(\tR\aminimum\"5\n" + - "\x19AmountAboveSepaLimitError\x12\x18\n" + - "\amaximum\x18\x01 \x01(\tR\amaximum\"\xfa\x01\n" + - "\x12CreateBoostRequest\x12!\n" + - "\bcurrency\x18\x01 \x01(\tB\x05\xa2\x97\"\x01\x03R\bcurrency\x12\x1e\n" + - "\x06amount\x18\x02 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\x06amount\x12\x1c\n" + - "\x05level\x18\x03 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\x05level\x12T\n" + - "\x0epayment_method\x18\x04 \x01(\x0e2'.org.signal.chat.purchase.PaymentMethodB\x04\x90\x97\"\x01R\rpaymentMethod\x12-\n" + - "\x0fdonation_permit\x18\x05 \x01(\fB\x04\x88\x97\"\x01R\x0edonationPermit\"\x9b\x06\n" + - "\x13CreateBoostResponse\x12%\n" + - "\rclient_secret\x18\x01 \x01(\tH\x00R\fclientSecret\x12\x7f\n" + - "\x14amount_below_minimum\x18\x02 \x01(\v21.org.signal.chat.purchase.AmountBelowMinimumErrorB\x18\xc2\xd5\"\x14amount_below_minimumH\x00R\x12amountBelowMinimum\x12\x89\x01\n" + - "\x17amount_above_sepa_limit\x18\x03 \x01(\v23.org.signal.chat.purchase.AmountAboveSepaLimitErrorB\x1b\xc2\xd5\"\x17amount_above_sepa_limitH\x00R\x14amountAboveSepaLimit\x12y\n" + - "\x14unsupported_currency\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x18\xc2\xd5\"\x14unsupported_currencyH\x00R\x13unsupportedCurrency\x12p\n" + - "\x11unsupported_level\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x15\xc2\xd5\"\x11unsupported_levelH\x00R\x10unsupportedLevel\x12n\n" + - "\x0fpermit_rejected\x18\x06 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x13\xc2\xd5\"\x0fpermit_rejectedH\x00R\x0epermitRejected\x12g\n" + - "\x0einvalid_amount\x18\a \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x12\xc2\xd5\"\x0einvalid_amountH\x00R\rinvalidAmountB\n" + - "\n" + - "\bresponse\"\xc5\x01\n" + - "\x18CreatePayPalBoostRequest\x12!\n" + - "\bcurrency\x18\x01 \x01(\tB\x05\xa2\x97\"\x01\x03R\bcurrency\x12\x1e\n" + - "\x06amount\x18\x02 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\x06amount\x12\x1c\n" + - "\x05level\x18\x03 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\x05level\x12#\n" + - "\n" + - "return_url\x18\x04 \x01(\tB\x04\x88\x97\"\x01R\treturnUrl\x12#\n" + - "\n" + - "cancel_url\x18\x05 \x01(\tB\x04\x88\x97\"\x01R\tcancelUrl\"\xd9\x04\n" + - "\x19CreatePayPalBoostResponse\x12e\n" + - "\x06result\x18\x01 \x01(\v2K.org.signal.chat.purchase.CreatePayPalBoostResponse.CreatePayPalBoostResultH\x00R\x06result\x12\x7f\n" + - "\x14amount_below_minimum\x18\x02 \x01(\v21.org.signal.chat.purchase.AmountBelowMinimumErrorB\x18\xc2\xd5\"\x14amount_below_minimumH\x00R\x12amountBelowMinimum\x12y\n" + - "\x14unsupported_currency\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x18\xc2\xd5\"\x14unsupported_currencyH\x00R\x13unsupportedCurrency\x12p\n" + - "\x11unsupported_level\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x15\xc2\xd5\"\x11unsupported_levelH\x00R\x10unsupportedLevel\x1a[\n" + - "\x17CreatePayPalBoostResult\x12!\n" + - "\fapproval_url\x18\x01 \x01(\tR\vapprovalUrl\x12\x1d\n" + - "\n" + - "payment_id\x18\x02 \x01(\tR\tpaymentIdB\n" + - "\n" + - "\bresponse\"\xed\x01\n" + - "\x19ConfirmPayPalBoostRequest\x12!\n" + - "\bcurrency\x18\x01 \x01(\tB\x05\xa2\x97\"\x01\x03R\bcurrency\x12\x1e\n" + - "\x06amount\x18\x02 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\x06amount\x12\x1c\n" + - "\x05level\x18\x03 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\x05level\x12\x1f\n" + - "\bpayer_id\x18\x04 \x01(\tB\x04\x88\x97\"\x01R\apayerId\x12#\n" + - "\n" + - "payment_id\x18\x05 \x01(\tB\x04\x88\x97\"\x01R\tpaymentId\x12)\n" + - "\rpayment_token\x18\x06 \x01(\tB\x04\x88\x97\"\x01R\fpaymentToken\"\xa0\x05\n" + - "\x1aConfirmPayPalBoostResponse\x12g\n" + - "\x06result\x18\x01 \x01(\v2M.org.signal.chat.purchase.ConfirmPayPalBoostResponse.ConfirmPayPalBoostResultH\x00R\x06result\x12\x7f\n" + - "\x14amount_below_minimum\x18\x02 \x01(\v21.org.signal.chat.purchase.AmountBelowMinimumErrorB\x18\xc2\xd5\"\x14amount_below_minimumH\x00R\x12amountBelowMinimum\x12y\n" + - "\x14unsupported_currency\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x18\xc2\xd5\"\x14unsupported_currencyH\x00R\x13unsupportedCurrency\x12p\n" + - "\x11unsupported_level\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x15\xc2\xd5\"\x11unsupported_levelH\x00R\x10unsupportedLevel\x12d\n" + - "\x0echarge_failure\x18\x05 \x01(\v2'.org.signal.chat.purchase.ChargeFailureB\x12\xc2\xd5\"\x0echarge_failureH\x00R\rchargeFailure\x1a9\n" + - "\x18ConfirmPayPalBoostResult\x12\x1d\n" + - "\n" + - "payment_id\x18\x01 \x01(\tR\tpaymentIdB\n" + - "\n" + - "\bresponse\"\xeb\x01\n" + - "$CreateBoostReceiptCredentialsRequest\x120\n" + - "\x11payment_intent_id\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\x0fpaymentIntentId\x12B\n" + - "\x1areceipt_credential_request\x18\x02 \x01(\fB\x04\x88\x97\"\x01R\x18receiptCredentialRequest\x12M\n" + - "\tprocessor\x18\x03 \x01(\x0e2).org.signal.chat.purchase.PaymentProviderB\x04\x90\x97\"\x01R\tprocessor\"\xf5\x05\n" + - "%CreateBoostReceiptCredentialsResponse\x12}\n" + - "\x06result\x18\x01 \x01(\v2c.org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.CreateBoostReceiptCredentialsResultH\x00R\x06result\x12\x84\x01\n" + - "\x18payment_still_processing\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1c\xc2\xd5\"\x18payment_still_processingH\x00R\x16paymentStillProcessing\x12l\n" + - "\x10payment_required\x18\x03 \x01(\v2).org.signal.chat.purchase.PaymentRequiredB\x14\xc2\xd5\"\x10payment_requiredH\x00R\x0fpaymentRequired\x12e\n" + - "\x11payment_not_found\x18\x04 \x01(\v2 .org.signal.chat.errors.NotFoundB\x15\xc2\xd5\"\x11payment_not_foundH\x00R\x0fpaymentNotFound\x12~\n" + - "\x16receipt_already_issued\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1a\xc2\xd5\"\x16receipt_already_issuedH\x00R\x14receiptAlreadyIssued\x1ae\n" + - "#CreateBoostReceiptCredentialsResult\x12>\n" + - "\x1breceipt_credential_response\x18\x01 \x01(\fR\x19receiptCredentialResponseB\n" + - "\n" + - "\bresponse2\xaf\x04\n" + - "\x10OneTimeDonations\x12l\n" + - "\vCreateBoost\x12,.org.signal.chat.purchase.CreateBoostRequest\x1a-.org.signal.chat.purchase.CreateBoostResponse\"\x00\x12~\n" + - "\x11CreatePayPalBoost\x122.org.signal.chat.purchase.CreatePayPalBoostRequest\x1a3.org.signal.chat.purchase.CreatePayPalBoostResponse\"\x00\x12\x81\x01\n" + - "\x12ConfirmPayPalBoost\x123.org.signal.chat.purchase.ConfirmPayPalBoostRequest\x1a4.org.signal.chat.purchase.ConfirmPayPalBoostResponse\"\x00\x12\xa2\x01\n" + - "\x1dCreateBoostReceiptCredentials\x12>.org.signal.chat.purchase.CreateBoostReceiptCredentialsRequest\x1a?.org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_one_time_donations_proto_rawDescOnce sync.Once - file_org_signal_chat_one_time_donations_proto_rawDescData []byte -) - -func file_org_signal_chat_one_time_donations_proto_rawDescGZIP() []byte { - file_org_signal_chat_one_time_donations_proto_rawDescOnce.Do(func() { - file_org_signal_chat_one_time_donations_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_one_time_donations_proto_rawDesc), len(file_org_signal_chat_one_time_donations_proto_rawDesc))) - }) - return file_org_signal_chat_one_time_donations_proto_rawDescData -} - -var file_org_signal_chat_one_time_donations_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_org_signal_chat_one_time_donations_proto_goTypes = []any{ - (*AmountBelowMinimumError)(nil), // 0: org.signal.chat.purchase.AmountBelowMinimumError - (*AmountAboveSepaLimitError)(nil), // 1: org.signal.chat.purchase.AmountAboveSepaLimitError - (*CreateBoostRequest)(nil), // 2: org.signal.chat.purchase.CreateBoostRequest - (*CreateBoostResponse)(nil), // 3: org.signal.chat.purchase.CreateBoostResponse - (*CreatePayPalBoostRequest)(nil), // 4: org.signal.chat.purchase.CreatePayPalBoostRequest - (*CreatePayPalBoostResponse)(nil), // 5: org.signal.chat.purchase.CreatePayPalBoostResponse - (*ConfirmPayPalBoostRequest)(nil), // 6: org.signal.chat.purchase.ConfirmPayPalBoostRequest - (*ConfirmPayPalBoostResponse)(nil), // 7: org.signal.chat.purchase.ConfirmPayPalBoostResponse - (*CreateBoostReceiptCredentialsRequest)(nil), // 8: org.signal.chat.purchase.CreateBoostReceiptCredentialsRequest - (*CreateBoostReceiptCredentialsResponse)(nil), // 9: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse - (*CreatePayPalBoostResponse_CreatePayPalBoostResult)(nil), // 10: org.signal.chat.purchase.CreatePayPalBoostResponse.CreatePayPalBoostResult - (*ConfirmPayPalBoostResponse_ConfirmPayPalBoostResult)(nil), // 11: org.signal.chat.purchase.ConfirmPayPalBoostResponse.ConfirmPayPalBoostResult - (*CreateBoostReceiptCredentialsResponse_CreateBoostReceiptCredentialsResult)(nil), // 12: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.CreateBoostReceiptCredentialsResult - (subscriptions.PaymentMethod)(0), // 13: org.signal.chat.purchase.PaymentMethod - (*errors.FailedPrecondition)(nil), // 14: org.signal.chat.errors.FailedPrecondition - (*errors.FailedZkAuthentication)(nil), // 15: org.signal.chat.errors.FailedZkAuthentication - (*subscriptions.ChargeFailure)(nil), // 16: org.signal.chat.purchase.ChargeFailure - (subscriptions.PaymentProvider)(0), // 17: org.signal.chat.purchase.PaymentProvider - (*subscriptions.PaymentRequired)(nil), // 18: org.signal.chat.purchase.PaymentRequired - (*errors.NotFound)(nil), // 19: org.signal.chat.errors.NotFound -} -var file_org_signal_chat_one_time_donations_proto_depIdxs = []int32{ - 13, // 0: org.signal.chat.purchase.CreateBoostRequest.payment_method:type_name -> org.signal.chat.purchase.PaymentMethod - 0, // 1: org.signal.chat.purchase.CreateBoostResponse.amount_below_minimum:type_name -> org.signal.chat.purchase.AmountBelowMinimumError - 1, // 2: org.signal.chat.purchase.CreateBoostResponse.amount_above_sepa_limit:type_name -> org.signal.chat.purchase.AmountAboveSepaLimitError - 14, // 3: org.signal.chat.purchase.CreateBoostResponse.unsupported_currency:type_name -> org.signal.chat.errors.FailedPrecondition - 14, // 4: org.signal.chat.purchase.CreateBoostResponse.unsupported_level:type_name -> org.signal.chat.errors.FailedPrecondition - 15, // 5: org.signal.chat.purchase.CreateBoostResponse.permit_rejected:type_name -> org.signal.chat.errors.FailedZkAuthentication - 14, // 6: org.signal.chat.purchase.CreateBoostResponse.invalid_amount:type_name -> org.signal.chat.errors.FailedPrecondition - 10, // 7: org.signal.chat.purchase.CreatePayPalBoostResponse.result:type_name -> org.signal.chat.purchase.CreatePayPalBoostResponse.CreatePayPalBoostResult - 0, // 8: org.signal.chat.purchase.CreatePayPalBoostResponse.amount_below_minimum:type_name -> org.signal.chat.purchase.AmountBelowMinimumError - 14, // 9: org.signal.chat.purchase.CreatePayPalBoostResponse.unsupported_currency:type_name -> org.signal.chat.errors.FailedPrecondition - 14, // 10: org.signal.chat.purchase.CreatePayPalBoostResponse.unsupported_level:type_name -> org.signal.chat.errors.FailedPrecondition - 11, // 11: org.signal.chat.purchase.ConfirmPayPalBoostResponse.result:type_name -> org.signal.chat.purchase.ConfirmPayPalBoostResponse.ConfirmPayPalBoostResult - 0, // 12: org.signal.chat.purchase.ConfirmPayPalBoostResponse.amount_below_minimum:type_name -> org.signal.chat.purchase.AmountBelowMinimumError - 14, // 13: org.signal.chat.purchase.ConfirmPayPalBoostResponse.unsupported_currency:type_name -> org.signal.chat.errors.FailedPrecondition - 14, // 14: org.signal.chat.purchase.ConfirmPayPalBoostResponse.unsupported_level:type_name -> org.signal.chat.errors.FailedPrecondition - 16, // 15: org.signal.chat.purchase.ConfirmPayPalBoostResponse.charge_failure:type_name -> org.signal.chat.purchase.ChargeFailure - 17, // 16: org.signal.chat.purchase.CreateBoostReceiptCredentialsRequest.processor:type_name -> org.signal.chat.purchase.PaymentProvider - 12, // 17: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.result:type_name -> org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.CreateBoostReceiptCredentialsResult - 14, // 18: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.payment_still_processing:type_name -> org.signal.chat.errors.FailedPrecondition - 18, // 19: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.payment_required:type_name -> org.signal.chat.purchase.PaymentRequired - 19, // 20: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.payment_not_found:type_name -> org.signal.chat.errors.NotFound - 14, // 21: org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse.receipt_already_issued:type_name -> org.signal.chat.errors.FailedPrecondition - 2, // 22: org.signal.chat.purchase.OneTimeDonations.CreateBoost:input_type -> org.signal.chat.purchase.CreateBoostRequest - 4, // 23: org.signal.chat.purchase.OneTimeDonations.CreatePayPalBoost:input_type -> org.signal.chat.purchase.CreatePayPalBoostRequest - 6, // 24: org.signal.chat.purchase.OneTimeDonations.ConfirmPayPalBoost:input_type -> org.signal.chat.purchase.ConfirmPayPalBoostRequest - 8, // 25: org.signal.chat.purchase.OneTimeDonations.CreateBoostReceiptCredentials:input_type -> org.signal.chat.purchase.CreateBoostReceiptCredentialsRequest - 3, // 26: org.signal.chat.purchase.OneTimeDonations.CreateBoost:output_type -> org.signal.chat.purchase.CreateBoostResponse - 5, // 27: org.signal.chat.purchase.OneTimeDonations.CreatePayPalBoost:output_type -> org.signal.chat.purchase.CreatePayPalBoostResponse - 7, // 28: org.signal.chat.purchase.OneTimeDonations.ConfirmPayPalBoost:output_type -> org.signal.chat.purchase.ConfirmPayPalBoostResponse - 9, // 29: org.signal.chat.purchase.OneTimeDonations.CreateBoostReceiptCredentials:output_type -> org.signal.chat.purchase.CreateBoostReceiptCredentialsResponse - 26, // [26:30] is the sub-list for method output_type - 22, // [22:26] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_one_time_donations_proto_init() } -func file_org_signal_chat_one_time_donations_proto_init() { - if File_org_signal_chat_one_time_donations_proto != nil { - return - } - file_org_signal_chat_one_time_donations_proto_msgTypes[3].OneofWrappers = []any{ - (*CreateBoostResponse_ClientSecret)(nil), - (*CreateBoostResponse_AmountBelowMinimum)(nil), - (*CreateBoostResponse_AmountAboveSepaLimit)(nil), - (*CreateBoostResponse_UnsupportedCurrency)(nil), - (*CreateBoostResponse_UnsupportedLevel)(nil), - (*CreateBoostResponse_PermitRejected)(nil), - (*CreateBoostResponse_InvalidAmount)(nil), - } - file_org_signal_chat_one_time_donations_proto_msgTypes[5].OneofWrappers = []any{ - (*CreatePayPalBoostResponse_Result)(nil), - (*CreatePayPalBoostResponse_AmountBelowMinimum)(nil), - (*CreatePayPalBoostResponse_UnsupportedCurrency)(nil), - (*CreatePayPalBoostResponse_UnsupportedLevel)(nil), - } - file_org_signal_chat_one_time_donations_proto_msgTypes[7].OneofWrappers = []any{ - (*ConfirmPayPalBoostResponse_Result)(nil), - (*ConfirmPayPalBoostResponse_AmountBelowMinimum)(nil), - (*ConfirmPayPalBoostResponse_UnsupportedCurrency)(nil), - (*ConfirmPayPalBoostResponse_UnsupportedLevel)(nil), - (*ConfirmPayPalBoostResponse_ChargeFailure)(nil), - } - file_org_signal_chat_one_time_donations_proto_msgTypes[9].OneofWrappers = []any{ - (*CreateBoostReceiptCredentialsResponse_Result)(nil), - (*CreateBoostReceiptCredentialsResponse_PaymentStillProcessing)(nil), - (*CreateBoostReceiptCredentialsResponse_PaymentRequired)(nil), - (*CreateBoostReceiptCredentialsResponse_PaymentNotFound)(nil), - (*CreateBoostReceiptCredentialsResponse_ReceiptAlreadyIssued)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_one_time_donations_proto_rawDesc), len(file_org_signal_chat_one_time_donations_proto_rawDesc)), - NumEnums: 0, - NumMessages: 13, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_org_signal_chat_one_time_donations_proto_goTypes, - DependencyIndexes: file_org_signal_chat_one_time_donations_proto_depIdxs, - MessageInfos: file_org_signal_chat_one_time_donations_proto_msgTypes, - }.Build() - File_org_signal_chat_one_time_donations_proto = out.File - file_org_signal_chat_one_time_donations_proto_goTypes = nil - file_org_signal_chat_one_time_donations_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations_grpc.pb.go deleted file mode 100644 index e80afa8..0000000 --- a/pkg/signalmeow/protobuf/rpc/one_time_donations/one_time_donations_grpc.pb.go +++ /dev/null @@ -1,263 +0,0 @@ -// -// Copyright 2026 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/one_time_donations.proto - -package one_time_donations - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - OneTimeDonations_CreateBoost_FullMethodName = "/org.signal.chat.purchase.OneTimeDonations/CreateBoost" - OneTimeDonations_CreatePayPalBoost_FullMethodName = "/org.signal.chat.purchase.OneTimeDonations/CreatePayPalBoost" - OneTimeDonations_ConfirmPayPalBoost_FullMethodName = "/org.signal.chat.purchase.OneTimeDonations/ConfirmPayPalBoost" - OneTimeDonations_CreateBoostReceiptCredentials_FullMethodName = "/org.signal.chat.purchase.OneTimeDonations/CreateBoostReceiptCredentials" -) - -// OneTimeDonationsClient is the client API for OneTimeDonations service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Service for making one-time donation payments (boost and gift) -// -// Configuration for one-time donations can be found in ProductConfiguration. -type OneTimeDonationsClient interface { - // Create a Stripe payment intent and return a client secret that can be used to complete the payment. - // Once the payment is complete, the paymentIntentId can be used with CreateBoostReceiptCredentials - CreateBoost(ctx context.Context, in *CreateBoostRequest, opts ...grpc.CallOption) (*CreateBoostResponse, error) - // Create a PayPal one-time payment. - // Once the payment is complete, call ConfirmPayPalBoost with the payment ID and token - CreatePayPalBoost(ctx context.Context, in *CreatePayPalBoostRequest, opts ...grpc.CallOption) (*CreatePayPalBoostResponse, error) - // Confirm a PayPal one-time payment - ConfirmPayPalBoost(ctx context.Context, in *ConfirmPayPalBoostRequest, opts ...grpc.CallOption) (*ConfirmPayPalBoostResponse, error) - // Obtain a ZK receipt credential for a completed one-time donation payment. - // The receipt credential can then be used to redeem the one-time donation entitlement - // via Donations.RedeemReceipt - CreateBoostReceiptCredentials(ctx context.Context, in *CreateBoostReceiptCredentialsRequest, opts ...grpc.CallOption) (*CreateBoostReceiptCredentialsResponse, error) -} - -type oneTimeDonationsClient struct { - cc grpc.ClientConnInterface -} - -func NewOneTimeDonationsClient(cc grpc.ClientConnInterface) OneTimeDonationsClient { - return &oneTimeDonationsClient{cc} -} - -func (c *oneTimeDonationsClient) CreateBoost(ctx context.Context, in *CreateBoostRequest, opts ...grpc.CallOption) (*CreateBoostResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateBoostResponse) - err := c.cc.Invoke(ctx, OneTimeDonations_CreateBoost_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *oneTimeDonationsClient) CreatePayPalBoost(ctx context.Context, in *CreatePayPalBoostRequest, opts ...grpc.CallOption) (*CreatePayPalBoostResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreatePayPalBoostResponse) - err := c.cc.Invoke(ctx, OneTimeDonations_CreatePayPalBoost_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *oneTimeDonationsClient) ConfirmPayPalBoost(ctx context.Context, in *ConfirmPayPalBoostRequest, opts ...grpc.CallOption) (*ConfirmPayPalBoostResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ConfirmPayPalBoostResponse) - err := c.cc.Invoke(ctx, OneTimeDonations_ConfirmPayPalBoost_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *oneTimeDonationsClient) CreateBoostReceiptCredentials(ctx context.Context, in *CreateBoostReceiptCredentialsRequest, opts ...grpc.CallOption) (*CreateBoostReceiptCredentialsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateBoostReceiptCredentialsResponse) - err := c.cc.Invoke(ctx, OneTimeDonations_CreateBoostReceiptCredentials_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// OneTimeDonationsServer is the server API for OneTimeDonations service. -// All implementations must embed UnimplementedOneTimeDonationsServer -// for forward compatibility. -// -// Service for making one-time donation payments (boost and gift) -// -// Configuration for one-time donations can be found in ProductConfiguration. -type OneTimeDonationsServer interface { - // Create a Stripe payment intent and return a client secret that can be used to complete the payment. - // Once the payment is complete, the paymentIntentId can be used with CreateBoostReceiptCredentials - CreateBoost(context.Context, *CreateBoostRequest) (*CreateBoostResponse, error) - // Create a PayPal one-time payment. - // Once the payment is complete, call ConfirmPayPalBoost with the payment ID and token - CreatePayPalBoost(context.Context, *CreatePayPalBoostRequest) (*CreatePayPalBoostResponse, error) - // Confirm a PayPal one-time payment - ConfirmPayPalBoost(context.Context, *ConfirmPayPalBoostRequest) (*ConfirmPayPalBoostResponse, error) - // Obtain a ZK receipt credential for a completed one-time donation payment. - // The receipt credential can then be used to redeem the one-time donation entitlement - // via Donations.RedeemReceipt - CreateBoostReceiptCredentials(context.Context, *CreateBoostReceiptCredentialsRequest) (*CreateBoostReceiptCredentialsResponse, error) - mustEmbedUnimplementedOneTimeDonationsServer() -} - -// UnimplementedOneTimeDonationsServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedOneTimeDonationsServer struct{} - -func (UnimplementedOneTimeDonationsServer) CreateBoost(context.Context, *CreateBoostRequest) (*CreateBoostResponse, error) { - return nil, status.Error(codes.Unimplemented, "method CreateBoost not implemented") -} -func (UnimplementedOneTimeDonationsServer) CreatePayPalBoost(context.Context, *CreatePayPalBoostRequest) (*CreatePayPalBoostResponse, error) { - return nil, status.Error(codes.Unimplemented, "method CreatePayPalBoost not implemented") -} -func (UnimplementedOneTimeDonationsServer) ConfirmPayPalBoost(context.Context, *ConfirmPayPalBoostRequest) (*ConfirmPayPalBoostResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ConfirmPayPalBoost not implemented") -} -func (UnimplementedOneTimeDonationsServer) CreateBoostReceiptCredentials(context.Context, *CreateBoostReceiptCredentialsRequest) (*CreateBoostReceiptCredentialsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method CreateBoostReceiptCredentials not implemented") -} -func (UnimplementedOneTimeDonationsServer) mustEmbedUnimplementedOneTimeDonationsServer() {} -func (UnimplementedOneTimeDonationsServer) testEmbeddedByValue() {} - -// UnsafeOneTimeDonationsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to OneTimeDonationsServer will -// result in compilation errors. -type UnsafeOneTimeDonationsServer interface { - mustEmbedUnimplementedOneTimeDonationsServer() -} - -func RegisterOneTimeDonationsServer(s grpc.ServiceRegistrar, srv OneTimeDonationsServer) { - // If the following call panics, it indicates UnimplementedOneTimeDonationsServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&OneTimeDonations_ServiceDesc, srv) -} - -func _OneTimeDonations_CreateBoost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateBoostRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OneTimeDonationsServer).CreateBoost(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: OneTimeDonations_CreateBoost_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OneTimeDonationsServer).CreateBoost(ctx, req.(*CreateBoostRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _OneTimeDonations_CreatePayPalBoost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePayPalBoostRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OneTimeDonationsServer).CreatePayPalBoost(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: OneTimeDonations_CreatePayPalBoost_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OneTimeDonationsServer).CreatePayPalBoost(ctx, req.(*CreatePayPalBoostRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _OneTimeDonations_ConfirmPayPalBoost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ConfirmPayPalBoostRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OneTimeDonationsServer).ConfirmPayPalBoost(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: OneTimeDonations_ConfirmPayPalBoost_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OneTimeDonationsServer).ConfirmPayPalBoost(ctx, req.(*ConfirmPayPalBoostRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _OneTimeDonations_CreateBoostReceiptCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateBoostReceiptCredentialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OneTimeDonationsServer).CreateBoostReceiptCredentials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: OneTimeDonations_CreateBoostReceiptCredentials_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OneTimeDonationsServer).CreateBoostReceiptCredentials(ctx, req.(*CreateBoostReceiptCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// OneTimeDonations_ServiceDesc is the grpc.ServiceDesc for OneTimeDonations service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var OneTimeDonations_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.purchase.OneTimeDonations", - HandlerType: (*OneTimeDonationsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateBoost", - Handler: _OneTimeDonations_CreateBoost_Handler, - }, - { - MethodName: "CreatePayPalBoost", - Handler: _OneTimeDonations_CreatePayPalBoost_Handler, - }, - { - MethodName: "ConfirmPayPalBoost", - Handler: _OneTimeDonations_ConfirmPayPalBoost_Handler, - }, - { - MethodName: "CreateBoostReceiptCredentials", - Handler: _OneTimeDonations_CreateBoostReceiptCredentials_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/one_time_donations.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/payments/payments.pb.go b/pkg/signalmeow/protobuf/rpc/payments/payments.pb.go deleted file mode 100644 index 4daf8a4..0000000 --- a/pkg/signalmeow/protobuf/rpc/payments/payments.pb.go +++ /dev/null @@ -1,242 +0,0 @@ -// -// Copyright 2023 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/payments.proto - -package payments - -import ( - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetCurrencyConversionsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCurrencyConversionsRequest) Reset() { - *x = GetCurrencyConversionsRequest{} - mi := &file_org_signal_chat_payments_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCurrencyConversionsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCurrencyConversionsRequest) ProtoMessage() {} - -func (x *GetCurrencyConversionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_payments_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCurrencyConversionsRequest.ProtoReflect.Descriptor instead. -func (*GetCurrencyConversionsRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_payments_proto_rawDescGZIP(), []int{0} -} - -type GetCurrencyConversionsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Currencies []*GetCurrencyConversionsResponse_CurrencyConversionEntity `protobuf:"bytes,2,rep,name=currencies,proto3" json:"currencies,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCurrencyConversionsResponse) Reset() { - *x = GetCurrencyConversionsResponse{} - mi := &file_org_signal_chat_payments_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCurrencyConversionsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCurrencyConversionsResponse) ProtoMessage() {} - -func (x *GetCurrencyConversionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_payments_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCurrencyConversionsResponse.ProtoReflect.Descriptor instead. -func (*GetCurrencyConversionsResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_payments_proto_rawDescGZIP(), []int{1} -} - -func (x *GetCurrencyConversionsResponse) GetTimestamp() uint64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -func (x *GetCurrencyConversionsResponse) GetCurrencies() []*GetCurrencyConversionsResponse_CurrencyConversionEntity { - if x != nil { - return x.Currencies - } - return nil -} - -type GetCurrencyConversionsResponse_CurrencyConversionEntity struct { - state protoimpl.MessageState `protogen:"open.v1"` - Base string `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` - Conversions map[string]string `protobuf:"bytes,2,rep,name=conversions,proto3" json:"conversions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetCurrencyConversionsResponse_CurrencyConversionEntity) Reset() { - *x = GetCurrencyConversionsResponse_CurrencyConversionEntity{} - mi := &file_org_signal_chat_payments_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetCurrencyConversionsResponse_CurrencyConversionEntity) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetCurrencyConversionsResponse_CurrencyConversionEntity) ProtoMessage() {} - -func (x *GetCurrencyConversionsResponse_CurrencyConversionEntity) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_payments_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetCurrencyConversionsResponse_CurrencyConversionEntity.ProtoReflect.Descriptor instead. -func (*GetCurrencyConversionsResponse_CurrencyConversionEntity) Descriptor() ([]byte, []int) { - return file_org_signal_chat_payments_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *GetCurrencyConversionsResponse_CurrencyConversionEntity) GetBase() string { - if x != nil { - return x.Base - } - return "" -} - -func (x *GetCurrencyConversionsResponse_CurrencyConversionEntity) GetConversions() map[string]string { - if x != nil { - return x.Conversions - } - return nil -} - -var File_org_signal_chat_payments_proto protoreflect.FileDescriptor - -const file_org_signal_chat_payments_proto_rawDesc = "" + - "\n" + - "\x1eorg/signal/chat/payments.proto\x12\x18org.signal.chat.payments\x1a\x1dorg/signal/chat/require.proto\"\x1f\n" + - "\x1dGetCurrencyConversionsRequest\"\xa9\x03\n" + - "\x1eGetCurrencyConversionsResponse\x12\x1c\n" + - "\ttimestamp\x18\x01 \x01(\x04R\ttimestamp\x12q\n" + - "\n" + - "currencies\x18\x02 \x03(\v2Q.org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntityR\n" + - "currencies\x1a\xf5\x01\n" + - "\x18CurrencyConversionEntity\x12\x12\n" + - "\x04base\x18\x01 \x01(\tR\x04base\x12\x84\x01\n" + - "\vconversions\x18\x02 \x03(\v2b.org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity.ConversionsEntryR\vconversions\x1a>\n" + - "\x10ConversionsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\xa0\x01\n" + - "\bPayments\x12\x8d\x01\n" + - "\x16GetCurrencyConversions\x127.org.signal.chat.payments.GetCurrencyConversionsRequest\x1a8.org.signal.chat.payments.GetCurrencyConversionsResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_payments_proto_rawDescOnce sync.Once - file_org_signal_chat_payments_proto_rawDescData []byte -) - -func file_org_signal_chat_payments_proto_rawDescGZIP() []byte { - file_org_signal_chat_payments_proto_rawDescOnce.Do(func() { - file_org_signal_chat_payments_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_payments_proto_rawDesc), len(file_org_signal_chat_payments_proto_rawDesc))) - }) - return file_org_signal_chat_payments_proto_rawDescData -} - -var file_org_signal_chat_payments_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_org_signal_chat_payments_proto_goTypes = []any{ - (*GetCurrencyConversionsRequest)(nil), // 0: org.signal.chat.payments.GetCurrencyConversionsRequest - (*GetCurrencyConversionsResponse)(nil), // 1: org.signal.chat.payments.GetCurrencyConversionsResponse - (*GetCurrencyConversionsResponse_CurrencyConversionEntity)(nil), // 2: org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity - nil, // 3: org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity.ConversionsEntry -} -var file_org_signal_chat_payments_proto_depIdxs = []int32{ - 2, // 0: org.signal.chat.payments.GetCurrencyConversionsResponse.currencies:type_name -> org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity - 3, // 1: org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity.conversions:type_name -> org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity.ConversionsEntry - 0, // 2: org.signal.chat.payments.Payments.GetCurrencyConversions:input_type -> org.signal.chat.payments.GetCurrencyConversionsRequest - 1, // 3: org.signal.chat.payments.Payments.GetCurrencyConversions:output_type -> org.signal.chat.payments.GetCurrencyConversionsResponse - 3, // [3:4] is the sub-list for method output_type - 2, // [2:3] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_payments_proto_init() } -func file_org_signal_chat_payments_proto_init() { - if File_org_signal_chat_payments_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_payments_proto_rawDesc), len(file_org_signal_chat_payments_proto_rawDesc)), - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_org_signal_chat_payments_proto_goTypes, - DependencyIndexes: file_org_signal_chat_payments_proto_depIdxs, - MessageInfos: file_org_signal_chat_payments_proto_msgTypes, - }.Build() - File_org_signal_chat_payments_proto = out.File - file_org_signal_chat_payments_proto_goTypes = nil - file_org_signal_chat_payments_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/payments/payments_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/payments/payments_grpc.pb.go deleted file mode 100644 index 7f79a03..0000000 --- a/pkg/signalmeow/protobuf/rpc/payments/payments_grpc.pb.go +++ /dev/null @@ -1,129 +0,0 @@ -// -// Copyright 2023 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/payments.proto - -package payments - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Payments_GetCurrencyConversions_FullMethodName = "/org.signal.chat.payments.Payments/GetCurrencyConversions" -) - -// PaymentsClient is the client API for Payments service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Provides methods for working with payments. -type PaymentsClient interface { - GetCurrencyConversions(ctx context.Context, in *GetCurrencyConversionsRequest, opts ...grpc.CallOption) (*GetCurrencyConversionsResponse, error) -} - -type paymentsClient struct { - cc grpc.ClientConnInterface -} - -func NewPaymentsClient(cc grpc.ClientConnInterface) PaymentsClient { - return &paymentsClient{cc} -} - -func (c *paymentsClient) GetCurrencyConversions(ctx context.Context, in *GetCurrencyConversionsRequest, opts ...grpc.CallOption) (*GetCurrencyConversionsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetCurrencyConversionsResponse) - err := c.cc.Invoke(ctx, Payments_GetCurrencyConversions_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PaymentsServer is the server API for Payments service. -// All implementations must embed UnimplementedPaymentsServer -// for forward compatibility. -// -// Provides methods for working with payments. -type PaymentsServer interface { - GetCurrencyConversions(context.Context, *GetCurrencyConversionsRequest) (*GetCurrencyConversionsResponse, error) - mustEmbedUnimplementedPaymentsServer() -} - -// UnimplementedPaymentsServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedPaymentsServer struct{} - -func (UnimplementedPaymentsServer) GetCurrencyConversions(context.Context, *GetCurrencyConversionsRequest) (*GetCurrencyConversionsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetCurrencyConversions not implemented") -} -func (UnimplementedPaymentsServer) mustEmbedUnimplementedPaymentsServer() {} -func (UnimplementedPaymentsServer) testEmbeddedByValue() {} - -// UnsafePaymentsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to PaymentsServer will -// result in compilation errors. -type UnsafePaymentsServer interface { - mustEmbedUnimplementedPaymentsServer() -} - -func RegisterPaymentsServer(s grpc.ServiceRegistrar, srv PaymentsServer) { - // If the following call panics, it indicates UnimplementedPaymentsServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Payments_ServiceDesc, srv) -} - -func _Payments_GetCurrencyConversions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetCurrencyConversionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PaymentsServer).GetCurrencyConversions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Payments_GetCurrencyConversions_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PaymentsServer).GetCurrencyConversions(ctx, req.(*GetCurrencyConversionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Payments_ServiceDesc is the grpc.ServiceDesc for Payments service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Payments_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.payments.Payments", - HandlerType: (*PaymentsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetCurrencyConversions", - Handler: _Payments_GetCurrencyConversions_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/payments.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration.pb.go b/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration.pb.go deleted file mode 100644 index bd1b669..0000000 --- a/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration.pb.go +++ /dev/null @@ -1,648 +0,0 @@ -// -// Copyright 2026 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/product_configuration.proto - -package product_configuration - -import ( - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - subscriptions "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/subscriptions" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetConfigurationRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetConfigurationRequest) Reset() { - *x = GetConfigurationRequest{} - mi := &file_org_signal_chat_product_configuration_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetConfigurationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConfigurationRequest) ProtoMessage() {} - -func (x *GetConfigurationRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_product_configuration_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetConfigurationRequest.ProtoReflect.Descriptor instead. -func (*GetConfigurationRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{0} -} - -type GetConfigurationResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Map of lower-cased ISO 3 currency codes to currency-specific configuration - Currencies map[string]*CurrencyConfiguration `protobuf:"bytes,1,rep,name=currencies,proto3" json:"currencies,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // Map of numeric donation level IDs to level-specific badge configuration - BadgeLevels map[uint64]*LevelConfiguration `protobuf:"bytes,2,rep,name=badge_levels,json=badgeLevels,proto3" json:"badge_levels,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // Configuration for backup subscription options - Backup *BackupConfiguration `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"` - // Maximum value of a one-time SEPA donation - SepaMaximumEuros string `protobuf:"bytes,4,opt,name=sepa_maximum_euros,json=sepaMaximumEuros,proto3" json:"sepa_maximum_euros,omitempty"` - // Configuration for one-time Signal Login purchases - Login *LoginConfiguration `protobuf:"bytes,5,opt,name=login,proto3" json:"login,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetConfigurationResponse) Reset() { - *x = GetConfigurationResponse{} - mi := &file_org_signal_chat_product_configuration_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetConfigurationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConfigurationResponse) ProtoMessage() {} - -func (x *GetConfigurationResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_product_configuration_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetConfigurationResponse.ProtoReflect.Descriptor instead. -func (*GetConfigurationResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{1} -} - -func (x *GetConfigurationResponse) GetCurrencies() map[string]*CurrencyConfiguration { - if x != nil { - return x.Currencies - } - return nil -} - -func (x *GetConfigurationResponse) GetBadgeLevels() map[uint64]*LevelConfiguration { - if x != nil { - return x.BadgeLevels - } - return nil -} - -func (x *GetConfigurationResponse) GetBackup() *BackupConfiguration { - if x != nil { - return x.Backup - } - return nil -} - -func (x *GetConfigurationResponse) GetSepaMaximumEuros() string { - if x != nil { - return x.SepaMaximumEuros - } - return "" -} - -func (x *GetConfigurationResponse) GetLogin() *LoginConfiguration { - if x != nil { - return x.Login - } - return nil -} - -type AmountList struct { - state protoimpl.MessageState `protogen:"open.v1"` - // NOTE: this is a string instead of a numeric type because it is intended - // for display purposes only - Amounts []string `protobuf:"bytes,1,rep,name=amounts,proto3" json:"amounts,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AmountList) Reset() { - *x = AmountList{} - mi := &file_org_signal_chat_product_configuration_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AmountList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AmountList) ProtoMessage() {} - -func (x *AmountList) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_product_configuration_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AmountList.ProtoReflect.Descriptor instead. -func (*AmountList) Descriptor() ([]byte, []int) { - return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{2} -} - -func (x *AmountList) GetAmounts() []string { - if x != nil { - return x.Amounts - } - return nil -} - -type CurrencyConfiguration struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Minimum one-time donation - // NOTE: this is a string instead of a numeric type because it is intended - // for display purposes only - Minimum string `protobuf:"bytes,1,opt,name=minimum,proto3" json:"minimum,omitempty"` - // Map of one-time donation level IDs to suggested amounts - OneTime map[uint64]*AmountList `protobuf:"bytes,2,rep,name=one_time,json=oneTime,proto3" json:"one_time,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // Map of subscription level IDs to the amount charged - Subscription map[uint64]string `protobuf:"bytes,3,rep,name=subscription,proto3" json:"subscription,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // Map of backup subscription level IDs to the amount charged - BackupSubscription map[uint64]string `protobuf:"bytes,4,rep,name=backup_subscription,json=backupSubscription,proto3" json:"backup_subscription,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - SupportedPaymentMethods []subscriptions.PaymentMethod `protobuf:"varint,5,rep,packed,name=supported_payment_methods,json=supportedPaymentMethods,proto3,enum=org.signal.chat.purchase.PaymentMethod" json:"supported_payment_methods,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CurrencyConfiguration) Reset() { - *x = CurrencyConfiguration{} - mi := &file_org_signal_chat_product_configuration_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CurrencyConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CurrencyConfiguration) ProtoMessage() {} - -func (x *CurrencyConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_product_configuration_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CurrencyConfiguration.ProtoReflect.Descriptor instead. -func (*CurrencyConfiguration) Descriptor() ([]byte, []int) { - return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{3} -} - -func (x *CurrencyConfiguration) GetMinimum() string { - if x != nil { - return x.Minimum - } - return "" -} - -func (x *CurrencyConfiguration) GetOneTime() map[uint64]*AmountList { - if x != nil { - return x.OneTime - } - return nil -} - -func (x *CurrencyConfiguration) GetSubscription() map[uint64]string { - if x != nil { - return x.Subscription - } - return nil -} - -func (x *CurrencyConfiguration) GetBackupSubscription() map[uint64]string { - if x != nil { - return x.BackupSubscription - } - return nil -} - -func (x *CurrencyConfiguration) GetSupportedPaymentMethods() []subscriptions.PaymentMethod { - if x != nil { - return x.SupportedPaymentMethods - } - return nil -} - -type LevelConfiguration struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The ID of the badge awarded at this level. Resolve to full badge details - // via RemoteConfiguration.GetBadges. - BadgeId string `protobuf:"bytes,1,opt,name=badge_id,json=badgeId,proto3" json:"badge_id,omitempty"` - // The duration for which a badge is valid. Present only for - // one-time (boost, gift) badges - BadgeDurationSeconds *uint64 `protobuf:"varint,2,opt,name=badge_duration_seconds,json=badgeDurationSeconds,proto3,oneof" json:"badge_duration_seconds,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LevelConfiguration) Reset() { - *x = LevelConfiguration{} - mi := &file_org_signal_chat_product_configuration_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LevelConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LevelConfiguration) ProtoMessage() {} - -func (x *LevelConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_product_configuration_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LevelConfiguration.ProtoReflect.Descriptor instead. -func (*LevelConfiguration) Descriptor() ([]byte, []int) { - return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{4} -} - -func (x *LevelConfiguration) GetBadgeId() string { - if x != nil { - return x.BadgeId - } - return "" -} - -func (x *LevelConfiguration) GetBadgeDurationSeconds() uint64 { - if x != nil && x.BadgeDurationSeconds != nil { - return *x.BadgeDurationSeconds - } - return 0 -} - -// Configuration for a backup level - use to present appropriate client interfaces -type BackupLevelConfiguration struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The amount of media storage in bytes that a paying subscriber may store - StorageAllowanceBytes uint64 `protobuf:"varint,1,opt,name=storage_allowance_bytes,json=storageAllowanceBytes,proto3" json:"storage_allowance_bytes,omitempty"` - // The play billing productID associated with this backup level - PlayProductId string `protobuf:"bytes,2,opt,name=play_product_id,json=playProductId,proto3" json:"play_product_id,omitempty"` - // The duration, in days, for which your backed up media is retained on the server after you stop refreshing with a paid credential - MediaTtlDays uint64 `protobuf:"varint,3,opt,name=media_ttl_days,json=mediaTtlDays,proto3" json:"media_ttl_days,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BackupLevelConfiguration) Reset() { - *x = BackupLevelConfiguration{} - mi := &file_org_signal_chat_product_configuration_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BackupLevelConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BackupLevelConfiguration) ProtoMessage() {} - -func (x *BackupLevelConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_product_configuration_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BackupLevelConfiguration.ProtoReflect.Descriptor instead. -func (*BackupLevelConfiguration) Descriptor() ([]byte, []int) { - return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{5} -} - -func (x *BackupLevelConfiguration) GetStorageAllowanceBytes() uint64 { - if x != nil { - return x.StorageAllowanceBytes - } - return 0 -} - -func (x *BackupLevelConfiguration) GetPlayProductId() string { - if x != nil { - return x.PlayProductId - } - return "" -} - -func (x *BackupLevelConfiguration) GetMediaTtlDays() uint64 { - if x != nil { - return x.MediaTtlDays - } - return 0 -} - -type BackupConfiguration struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A map of numeric backup level IDs to level-specific backup configuration - Levels map[uint64]*BackupLevelConfiguration `protobuf:"bytes,1,rep,name=levels,proto3" json:"levels,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // The number of days of media a free tier backup user gets - FreeTierMediaDays uint64 `protobuf:"varint,2,opt,name=free_tier_media_days,json=freeTierMediaDays,proto3" json:"free_tier_media_days,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BackupConfiguration) Reset() { - *x = BackupConfiguration{} - mi := &file_org_signal_chat_product_configuration_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BackupConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BackupConfiguration) ProtoMessage() {} - -func (x *BackupConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_product_configuration_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BackupConfiguration.ProtoReflect.Descriptor instead. -func (*BackupConfiguration) Descriptor() ([]byte, []int) { - return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{6} -} - -func (x *BackupConfiguration) GetLevels() map[uint64]*BackupLevelConfiguration { - if x != nil { - return x.Levels - } - return nil -} - -func (x *BackupConfiguration) GetFreeTierMediaDays() uint64 { - if x != nil { - return x.FreeTierMediaDays - } - return 0 -} - -// Configuration for one-time Signal Login purchases -type LoginConfiguration struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The receipt level associated with a Signal Login purchase - Level uint64 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` - // The play billing productID associated with a Signal Login purchase - PlayProductId string `protobuf:"bytes,2,opt,name=play_product_id,json=playProductId,proto3" json:"play_product_id,omitempty"` - // The App Store productID associated with a Signal Login purchase - AppStoreProductId string `protobuf:"bytes,3,opt,name=app_store_product_id,json=appStoreProductId,proto3" json:"app_store_product_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LoginConfiguration) Reset() { - *x = LoginConfiguration{} - mi := &file_org_signal_chat_product_configuration_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LoginConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoginConfiguration) ProtoMessage() {} - -func (x *LoginConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_product_configuration_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LoginConfiguration.ProtoReflect.Descriptor instead. -func (*LoginConfiguration) Descriptor() ([]byte, []int) { - return file_org_signal_chat_product_configuration_proto_rawDescGZIP(), []int{7} -} - -func (x *LoginConfiguration) GetLevel() uint64 { - if x != nil { - return x.Level - } - return 0 -} - -func (x *LoginConfiguration) GetPlayProductId() string { - if x != nil { - return x.PlayProductId - } - return "" -} - -func (x *LoginConfiguration) GetAppStoreProductId() string { - if x != nil { - return x.AppStoreProductId - } - return "" -} - -var File_org_signal_chat_product_configuration_proto protoreflect.FileDescriptor - -const file_org_signal_chat_product_configuration_proto_rawDesc = "" + - "\n" + - "+org/signal/chat/product_configuration.proto\x12\x18org.signal.chat.purchase\x1a\x1dorg/signal/chat/require.proto\x1a#org/signal/chat/subscriptions.proto\"\x19\n" + - "\x17GetConfigurationRequest\"\xfd\x04\n" + - "\x18GetConfigurationResponse\x12b\n" + - "\n" + - "currencies\x18\x01 \x03(\v2B.org.signal.chat.purchase.GetConfigurationResponse.CurrenciesEntryR\n" + - "currencies\x12f\n" + - "\fbadge_levels\x18\x02 \x03(\v2C.org.signal.chat.purchase.GetConfigurationResponse.BadgeLevelsEntryR\vbadgeLevels\x12E\n" + - "\x06backup\x18\x03 \x01(\v2-.org.signal.chat.purchase.BackupConfigurationR\x06backup\x12,\n" + - "\x12sepa_maximum_euros\x18\x04 \x01(\tR\x10sepaMaximumEuros\x12B\n" + - "\x05login\x18\x05 \x01(\v2,.org.signal.chat.purchase.LoginConfigurationR\x05login\x1an\n" + - "\x0fCurrenciesEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12E\n" + - "\x05value\x18\x02 \x01(\v2/.org.signal.chat.purchase.CurrencyConfigurationR\x05value:\x028\x01\x1al\n" + - "\x10BadgeLevelsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\x04R\x03key\x12B\n" + - "\x05value\x18\x02 \x01(\v2,.org.signal.chat.purchase.LevelConfigurationR\x05value:\x028\x01\"&\n" + - "\n" + - "AmountList\x12\x18\n" + - "\aamounts\x18\x01 \x03(\tR\aamounts\"\xba\x05\n" + - "\x15CurrencyConfiguration\x12\x18\n" + - "\aminimum\x18\x01 \x01(\tR\aminimum\x12W\n" + - "\bone_time\x18\x02 \x03(\v2<.org.signal.chat.purchase.CurrencyConfiguration.OneTimeEntryR\aoneTime\x12e\n" + - "\fsubscription\x18\x03 \x03(\v2A.org.signal.chat.purchase.CurrencyConfiguration.SubscriptionEntryR\fsubscription\x12x\n" + - "\x13backup_subscription\x18\x04 \x03(\v2G.org.signal.chat.purchase.CurrencyConfiguration.BackupSubscriptionEntryR\x12backupSubscription\x12c\n" + - "\x19supported_payment_methods\x18\x05 \x03(\x0e2'.org.signal.chat.purchase.PaymentMethodR\x17supportedPaymentMethods\x1a`\n" + - "\fOneTimeEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\x04R\x03key\x12:\n" + - "\x05value\x18\x02 \x01(\v2$.org.signal.chat.purchase.AmountListR\x05value:\x028\x01\x1a?\n" + - "\x11SubscriptionEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aE\n" + - "\x17BackupSubscriptionEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x85\x01\n" + - "\x12LevelConfiguration\x12\x19\n" + - "\bbadge_id\x18\x01 \x01(\tR\abadgeId\x129\n" + - "\x16badge_duration_seconds\x18\x02 \x01(\x04H\x00R\x14badgeDurationSeconds\x88\x01\x01B\x19\n" + - "\x17_badge_duration_seconds\"\xa0\x01\n" + - "\x18BackupLevelConfiguration\x126\n" + - "\x17storage_allowance_bytes\x18\x01 \x01(\x04R\x15storageAllowanceBytes\x12&\n" + - "\x0fplay_product_id\x18\x02 \x01(\tR\rplayProductId\x12$\n" + - "\x0emedia_ttl_days\x18\x03 \x01(\x04R\fmediaTtlDays\"\x88\x02\n" + - "\x13BackupConfiguration\x12Q\n" + - "\x06levels\x18\x01 \x03(\v29.org.signal.chat.purchase.BackupConfiguration.LevelsEntryR\x06levels\x12/\n" + - "\x14free_tier_media_days\x18\x02 \x01(\x04R\x11freeTierMediaDays\x1am\n" + - "\vLevelsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\x04R\x03key\x12H\n" + - "\x05value\x18\x02 \x01(\v22.org.signal.chat.purchase.BackupLevelConfigurationR\x05value:\x028\x01\"\x83\x01\n" + - "\x12LoginConfiguration\x12\x14\n" + - "\x05level\x18\x01 \x01(\x04R\x05level\x12&\n" + - "\x0fplay_product_id\x18\x02 \x01(\tR\rplayProductId\x12/\n" + - "\x14app_store_product_id\x18\x03 \x01(\tR\x11appStoreProductId2\x99\x01\n" + - "\x14ProductConfiguration\x12{\n" + - "\x10GetConfiguration\x121.org.signal.chat.purchase.GetConfigurationRequest\x1a2.org.signal.chat.purchase.GetConfigurationResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_product_configuration_proto_rawDescOnce sync.Once - file_org_signal_chat_product_configuration_proto_rawDescData []byte -) - -func file_org_signal_chat_product_configuration_proto_rawDescGZIP() []byte { - file_org_signal_chat_product_configuration_proto_rawDescOnce.Do(func() { - file_org_signal_chat_product_configuration_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_product_configuration_proto_rawDesc), len(file_org_signal_chat_product_configuration_proto_rawDesc))) - }) - return file_org_signal_chat_product_configuration_proto_rawDescData -} - -var file_org_signal_chat_product_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_org_signal_chat_product_configuration_proto_goTypes = []any{ - (*GetConfigurationRequest)(nil), // 0: org.signal.chat.purchase.GetConfigurationRequest - (*GetConfigurationResponse)(nil), // 1: org.signal.chat.purchase.GetConfigurationResponse - (*AmountList)(nil), // 2: org.signal.chat.purchase.AmountList - (*CurrencyConfiguration)(nil), // 3: org.signal.chat.purchase.CurrencyConfiguration - (*LevelConfiguration)(nil), // 4: org.signal.chat.purchase.LevelConfiguration - (*BackupLevelConfiguration)(nil), // 5: org.signal.chat.purchase.BackupLevelConfiguration - (*BackupConfiguration)(nil), // 6: org.signal.chat.purchase.BackupConfiguration - (*LoginConfiguration)(nil), // 7: org.signal.chat.purchase.LoginConfiguration - nil, // 8: org.signal.chat.purchase.GetConfigurationResponse.CurrenciesEntry - nil, // 9: org.signal.chat.purchase.GetConfigurationResponse.BadgeLevelsEntry - nil, // 10: org.signal.chat.purchase.CurrencyConfiguration.OneTimeEntry - nil, // 11: org.signal.chat.purchase.CurrencyConfiguration.SubscriptionEntry - nil, // 12: org.signal.chat.purchase.CurrencyConfiguration.BackupSubscriptionEntry - nil, // 13: org.signal.chat.purchase.BackupConfiguration.LevelsEntry - (subscriptions.PaymentMethod)(0), // 14: org.signal.chat.purchase.PaymentMethod -} -var file_org_signal_chat_product_configuration_proto_depIdxs = []int32{ - 8, // 0: org.signal.chat.purchase.GetConfigurationResponse.currencies:type_name -> org.signal.chat.purchase.GetConfigurationResponse.CurrenciesEntry - 9, // 1: org.signal.chat.purchase.GetConfigurationResponse.badge_levels:type_name -> org.signal.chat.purchase.GetConfigurationResponse.BadgeLevelsEntry - 6, // 2: org.signal.chat.purchase.GetConfigurationResponse.backup:type_name -> org.signal.chat.purchase.BackupConfiguration - 7, // 3: org.signal.chat.purchase.GetConfigurationResponse.login:type_name -> org.signal.chat.purchase.LoginConfiguration - 10, // 4: org.signal.chat.purchase.CurrencyConfiguration.one_time:type_name -> org.signal.chat.purchase.CurrencyConfiguration.OneTimeEntry - 11, // 5: org.signal.chat.purchase.CurrencyConfiguration.subscription:type_name -> org.signal.chat.purchase.CurrencyConfiguration.SubscriptionEntry - 12, // 6: org.signal.chat.purchase.CurrencyConfiguration.backup_subscription:type_name -> org.signal.chat.purchase.CurrencyConfiguration.BackupSubscriptionEntry - 14, // 7: org.signal.chat.purchase.CurrencyConfiguration.supported_payment_methods:type_name -> org.signal.chat.purchase.PaymentMethod - 13, // 8: org.signal.chat.purchase.BackupConfiguration.levels:type_name -> org.signal.chat.purchase.BackupConfiguration.LevelsEntry - 3, // 9: org.signal.chat.purchase.GetConfigurationResponse.CurrenciesEntry.value:type_name -> org.signal.chat.purchase.CurrencyConfiguration - 4, // 10: org.signal.chat.purchase.GetConfigurationResponse.BadgeLevelsEntry.value:type_name -> org.signal.chat.purchase.LevelConfiguration - 2, // 11: org.signal.chat.purchase.CurrencyConfiguration.OneTimeEntry.value:type_name -> org.signal.chat.purchase.AmountList - 5, // 12: org.signal.chat.purchase.BackupConfiguration.LevelsEntry.value:type_name -> org.signal.chat.purchase.BackupLevelConfiguration - 0, // 13: org.signal.chat.purchase.ProductConfiguration.GetConfiguration:input_type -> org.signal.chat.purchase.GetConfigurationRequest - 1, // 14: org.signal.chat.purchase.ProductConfiguration.GetConfiguration:output_type -> org.signal.chat.purchase.GetConfigurationResponse - 14, // [14:15] is the sub-list for method output_type - 13, // [13:14] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_product_configuration_proto_init() } -func file_org_signal_chat_product_configuration_proto_init() { - if File_org_signal_chat_product_configuration_proto != nil { - return - } - file_org_signal_chat_product_configuration_proto_msgTypes[4].OneofWrappers = []any{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_product_configuration_proto_rawDesc), len(file_org_signal_chat_product_configuration_proto_rawDesc)), - NumEnums: 0, - NumMessages: 14, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_org_signal_chat_product_configuration_proto_goTypes, - DependencyIndexes: file_org_signal_chat_product_configuration_proto_depIdxs, - MessageInfos: file_org_signal_chat_product_configuration_proto_msgTypes, - }.Build() - File_org_signal_chat_product_configuration_proto = out.File - file_org_signal_chat_product_configuration_proto_goTypes = nil - file_org_signal_chat_product_configuration_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration_grpc.pb.go deleted file mode 100644 index 0802e59..0000000 --- a/pkg/signalmeow/protobuf/rpc/product_configuration/product_configuration_grpc.pb.go +++ /dev/null @@ -1,135 +0,0 @@ -// -// Copyright 2026 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/product_configuration.proto - -package product_configuration - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - ProductConfiguration_GetConfiguration_FullMethodName = "/org.signal.chat.purchase.ProductConfiguration/GetConfiguration" -) - -// ProductConfigurationClient is the client API for ProductConfiguration service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Retrieve product metadata for one-time donations, subscriptions, and backups -type ProductConfigurationClient interface { - // Returns configuration for donation subscriptions, backup subscriptions, and one-time donation ( - // "boost" and "gift") minimum and suggested amounts. Badges are referenced by ID only; resolve those - // IDs to full badge details via RemoteConfiguration.GetBadges. - GetConfiguration(ctx context.Context, in *GetConfigurationRequest, opts ...grpc.CallOption) (*GetConfigurationResponse, error) -} - -type productConfigurationClient struct { - cc grpc.ClientConnInterface -} - -func NewProductConfigurationClient(cc grpc.ClientConnInterface) ProductConfigurationClient { - return &productConfigurationClient{cc} -} - -func (c *productConfigurationClient) GetConfiguration(ctx context.Context, in *GetConfigurationRequest, opts ...grpc.CallOption) (*GetConfigurationResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetConfigurationResponse) - err := c.cc.Invoke(ctx, ProductConfiguration_GetConfiguration_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ProductConfigurationServer is the server API for ProductConfiguration service. -// All implementations must embed UnimplementedProductConfigurationServer -// for forward compatibility. -// -// Retrieve product metadata for one-time donations, subscriptions, and backups -type ProductConfigurationServer interface { - // Returns configuration for donation subscriptions, backup subscriptions, and one-time donation ( - // "boost" and "gift") minimum and suggested amounts. Badges are referenced by ID only; resolve those - // IDs to full badge details via RemoteConfiguration.GetBadges. - GetConfiguration(context.Context, *GetConfigurationRequest) (*GetConfigurationResponse, error) - mustEmbedUnimplementedProductConfigurationServer() -} - -// UnimplementedProductConfigurationServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedProductConfigurationServer struct{} - -func (UnimplementedProductConfigurationServer) GetConfiguration(context.Context, *GetConfigurationRequest) (*GetConfigurationResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetConfiguration not implemented") -} -func (UnimplementedProductConfigurationServer) mustEmbedUnimplementedProductConfigurationServer() {} -func (UnimplementedProductConfigurationServer) testEmbeddedByValue() {} - -// UnsafeProductConfigurationServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ProductConfigurationServer will -// result in compilation errors. -type UnsafeProductConfigurationServer interface { - mustEmbedUnimplementedProductConfigurationServer() -} - -func RegisterProductConfigurationServer(s grpc.ServiceRegistrar, srv ProductConfigurationServer) { - // If the following call panics, it indicates UnimplementedProductConfigurationServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&ProductConfiguration_ServiceDesc, srv) -} - -func _ProductConfiguration_GetConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetConfigurationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProductConfigurationServer).GetConfiguration(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ProductConfiguration_GetConfiguration_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProductConfigurationServer).GetConfiguration(ctx, req.(*GetConfigurationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// ProductConfiguration_ServiceDesc is the grpc.ServiceDesc for ProductConfiguration service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var ProductConfiguration_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.purchase.ProductConfiguration", - HandlerType: (*ProductConfigurationServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetConfiguration", - Handler: _ProductConfiguration_GetConfiguration_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/product_configuration.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/profile/profile.pb.go b/pkg/signalmeow/protobuf/rpc/profile/profile.pb.go deleted file mode 100644 index 2c27314..0000000 --- a/pkg/signalmeow/protobuf/rpc/profile/profile.pb.go +++ /dev/null @@ -1,2418 +0,0 @@ -// -// Copyright 2023 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/profile.proto - -package profile - -import ( - common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" - errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CredentialType int32 - -const ( - CredentialType_CREDENTIAL_TYPE_UNSPECIFIED CredentialType = 0 - CredentialType_CREDENTIAL_TYPE_EXPIRING_PROFILE_KEY CredentialType = 1 -) - -// Enum value maps for CredentialType. -var ( - CredentialType_name = map[int32]string{ - 0: "CREDENTIAL_TYPE_UNSPECIFIED", - 1: "CREDENTIAL_TYPE_EXPIRING_PROFILE_KEY", - } - CredentialType_value = map[string]int32{ - "CREDENTIAL_TYPE_UNSPECIFIED": 0, - "CREDENTIAL_TYPE_EXPIRING_PROFILE_KEY": 1, - } -) - -func (x CredentialType) Enum() *CredentialType { - p := new(CredentialType) - *p = x - return p -} - -func (x CredentialType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CredentialType) Descriptor() protoreflect.EnumDescriptor { - return file_org_signal_chat_profile_proto_enumTypes[0].Descriptor() -} - -func (CredentialType) Type() protoreflect.EnumType { - return &file_org_signal_chat_profile_proto_enumTypes[0] -} - -func (x CredentialType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CredentialType.Descriptor instead. -func (CredentialType) EnumDescriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{0} -} - -type SetProfileV1Request_AvatarChange int32 - -const ( - SetProfileV1Request_AVATAR_CHANGE_UNCHANGED SetProfileV1Request_AvatarChange = 0 - SetProfileV1Request_AVATAR_CHANGE_CLEAR SetProfileV1Request_AvatarChange = 1 - SetProfileV1Request_AVATAR_CHANGE_UPDATE SetProfileV1Request_AvatarChange = 2 -) - -// Enum value maps for SetProfileV1Request_AvatarChange. -var ( - SetProfileV1Request_AvatarChange_name = map[int32]string{ - 0: "AVATAR_CHANGE_UNCHANGED", - 1: "AVATAR_CHANGE_CLEAR", - 2: "AVATAR_CHANGE_UPDATE", - } - SetProfileV1Request_AvatarChange_value = map[string]int32{ - "AVATAR_CHANGE_UNCHANGED": 0, - "AVATAR_CHANGE_CLEAR": 1, - "AVATAR_CHANGE_UPDATE": 2, - } -) - -func (x SetProfileV1Request_AvatarChange) Enum() *SetProfileV1Request_AvatarChange { - p := new(SetProfileV1Request_AvatarChange) - *p = x - return p -} - -func (x SetProfileV1Request_AvatarChange) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SetProfileV1Request_AvatarChange) Descriptor() protoreflect.EnumDescriptor { - return file_org_signal_chat_profile_proto_enumTypes[1].Descriptor() -} - -func (SetProfileV1Request_AvatarChange) Type() protoreflect.EnumType { - return &file_org_signal_chat_profile_proto_enumTypes[1] -} - -func (x SetProfileV1Request_AvatarChange) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SetProfileV1Request_AvatarChange.Descriptor instead. -func (SetProfileV1Request_AvatarChange) EnumDescriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{0, 0} -} - -type SetProfileV1Request struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The ciphertext of a name that users must set on the profile. - Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // An enum to indicate what change, if any, is made to the avatar with this request. - AvatarChange SetProfileV1Request_AvatarChange `protobuf:"varint,2,opt,name=avatar_change,json=avatarChange,proto3,enum=org.signal.chat.profile.SetProfileV1Request_AvatarChange" json:"avatar_change,omitempty"` - // The ciphertext of an emoji that users can set on their profile. - AboutEmoji []byte `protobuf:"bytes,3,opt,name=about_emoji,json=aboutEmoji,proto3" json:"about_emoji,omitempty"` - // The ciphertext of a description that users can set on their profile. - About []byte `protobuf:"bytes,4,opt,name=about,proto3" json:"about,omitempty"` - // The ciphertext of the phone-number sharing setting on the profile. 29-byte encrypted boolean. - PhoneNumberSharing []byte `protobuf:"bytes,6,opt,name=phone_number_sharing,json=phoneNumberSharing,proto3" json:"phone_number_sharing,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetProfileV1Request) Reset() { - *x = SetProfileV1Request{} - mi := &file_org_signal_chat_profile_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetProfileV1Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetProfileV1Request) ProtoMessage() {} - -func (x *SetProfileV1Request) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetProfileV1Request.ProtoReflect.Descriptor instead. -func (*SetProfileV1Request) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{0} -} - -func (x *SetProfileV1Request) GetName() []byte { - if x != nil { - return x.Name - } - return nil -} - -func (x *SetProfileV1Request) GetAvatarChange() SetProfileV1Request_AvatarChange { - if x != nil { - return x.AvatarChange - } - return SetProfileV1Request_AVATAR_CHANGE_UNCHANGED -} - -func (x *SetProfileV1Request) GetAboutEmoji() []byte { - if x != nil { - return x.AboutEmoji - } - return nil -} - -func (x *SetProfileV1Request) GetAbout() []byte { - if x != nil { - return x.About - } - return nil -} - -func (x *SetProfileV1Request) GetPhoneNumberSharing() []byte { - if x != nil { - return x.PhoneNumberSharing - } - return nil -} - -type SetProfileRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The profile version. Required. - Version []byte `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - // The ciphertext of a serialized Profile protobuf. Required. - // 937 max length = 909 plaintext serialization + 28 bytes encryption overhead - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - // The SHA-256 hash of the Profile ciphertext being replaced. - // This is used an optimistic lock against concurrent changes. - // - // Optional, if this is the initial request to create a version. - ExpectedCurrentDataHash []byte `protobuf:"bytes,3,opt,name=expected_current_data_hash,json=expectedCurrentDataHash,proto3" json:"expected_current_data_hash,omitempty"` - // The current profile version being updated. - // This is used as an optimistic lock against concurrent changes. - // - // Optional, if there is no current profile version for the account. - ExpectedCurrentVersion []byte `protobuf:"bytes,4,opt,name=expected_current_version,json=expectedCurrentVersion,proto3" json:"expected_current_version,omitempty"` - // The ciphertext of the MobileCoin wallet ID on the profile. - PaymentAddress []byte `protobuf:"bytes,5,opt,name=payment_address,json=paymentAddress,proto3" json:"payment_address,omitempty"` - // A list of badge IDs associated with the profile. - BadgeIds []string `protobuf:"bytes,6,rep,name=badge_ids,json=badgeIds,proto3" json:"badge_ids,omitempty"` - // The profile key commitment. Used to issue a profile key credential response. - // - // Required during the v1 -> v2 migration period. Afterwards will be optional, if this is an update to an existing version. - Commitment []byte `protobuf:"bytes,7,opt,name=commitment,proto3" json:"commitment,omitempty"` - // An embedded v1 request. Required during the v1 -> v2 migration period. - // - // Because this is a temporary field during the migration, it has the highest - // field number without serialization overhead. This is purely aesthetic. - V1Request *SetProfileV1Request `protobuf:"bytes,15,opt,name=v1Request,proto3" json:"v1Request,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetProfileRequest) Reset() { - *x = SetProfileRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetProfileRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetProfileRequest) ProtoMessage() {} - -func (x *SetProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetProfileRequest.ProtoReflect.Descriptor instead. -func (*SetProfileRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{1} -} - -func (x *SetProfileRequest) GetVersion() []byte { - if x != nil { - return x.Version - } - return nil -} - -func (x *SetProfileRequest) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *SetProfileRequest) GetExpectedCurrentDataHash() []byte { - if x != nil { - return x.ExpectedCurrentDataHash - } - return nil -} - -func (x *SetProfileRequest) GetExpectedCurrentVersion() []byte { - if x != nil { - return x.ExpectedCurrentVersion - } - return nil -} - -func (x *SetProfileRequest) GetPaymentAddress() []byte { - if x != nil { - return x.PaymentAddress - } - return nil -} - -func (x *SetProfileRequest) GetBadgeIds() []string { - if x != nil { - return x.BadgeIds - } - return nil -} - -func (x *SetProfileRequest) GetCommitment() []byte { - if x != nil { - return x.Commitment - } - return nil -} - -func (x *SetProfileRequest) GetV1Request() *SetProfileV1Request { - if x != nil { - return x.V1Request - } - return nil -} - -// Indicates that the account is not permitted to set a payment address, -// due to a disallowed country prefix on the account's phone number. -type PaymentsForbiddenInRegion struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PaymentsForbiddenInRegion) Reset() { - *x = PaymentsForbiddenInRegion{} - mi := &file_org_signal_chat_profile_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PaymentsForbiddenInRegion) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PaymentsForbiddenInRegion) ProtoMessage() {} - -func (x *PaymentsForbiddenInRegion) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PaymentsForbiddenInRegion.ProtoReflect.Descriptor instead. -func (*PaymentsForbiddenInRegion) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{2} -} - -// Indicates that the account does not have the Profiles v2 capability, which -// is required to call Profiles.SetProfile -type ProfilesV2CapabilityRequired struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ProfilesV2CapabilityRequired) Reset() { - *x = ProfilesV2CapabilityRequired{} - mi := &file_org_signal_chat_profile_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ProfilesV2CapabilityRequired) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProfilesV2CapabilityRequired) ProtoMessage() {} - -func (x *ProfilesV2CapabilityRequired) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProfilesV2CapabilityRequired.ProtoReflect.Descriptor instead. -func (*ProfilesV2CapabilityRequired) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{3} -} - -type SetProfileResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - // If the request included a v1 avatar change, this field contains the policy - // and credential used by clients to upload an avatar to the CDN. - // - // Because this is a temporary field during the migration, it has the highest - // field number without serialization overhead. This is purely aesthetic. - V1AvatarUploadForm *common.S3UploadForm `protobuf:"bytes,15,opt,name=v1_avatar_upload_form,json=v1AvatarUploadForm,proto3,oneof" json:"v1_avatar_upload_form,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetProfileResult) Reset() { - *x = SetProfileResult{} - mi := &file_org_signal_chat_profile_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetProfileResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetProfileResult) ProtoMessage() {} - -func (x *SetProfileResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetProfileResult.ProtoReflect.Descriptor instead. -func (*SetProfileResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{4} -} - -func (x *SetProfileResult) GetV1AvatarUploadForm() *common.S3UploadForm { - if x != nil { - return x.V1AvatarUploadForm - } - return nil -} - -type SetProfileResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *SetProfileResponse_Result - // *SetProfileResponse_ExpectedDataWriteConflict - // *SetProfileResponse_PaymentsForbiddenInRegion - // *SetProfileResponse_ExpectedVersionWriteConflict - // *SetProfileResponse_ProfilesV2CapabilityRequired - Response isSetProfileResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetProfileResponse) Reset() { - *x = SetProfileResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetProfileResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetProfileResponse) ProtoMessage() {} - -func (x *SetProfileResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetProfileResponse.ProtoReflect.Descriptor instead. -func (*SetProfileResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{5} -} - -func (x *SetProfileResponse) GetResponse() isSetProfileResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *SetProfileResponse) GetResult() *SetProfileResult { - if x != nil { - if x, ok := x.Response.(*SetProfileResponse_Result); ok { - return x.Result - } - } - return nil -} - -func (x *SetProfileResponse) GetExpectedDataWriteConflict() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetProfileResponse_ExpectedDataWriteConflict); ok { - return x.ExpectedDataWriteConflict - } - } - return nil -} - -func (x *SetProfileResponse) GetPaymentsForbiddenInRegion() *PaymentsForbiddenInRegion { - if x != nil { - if x, ok := x.Response.(*SetProfileResponse_PaymentsForbiddenInRegion); ok { - return x.PaymentsForbiddenInRegion - } - } - return nil -} - -func (x *SetProfileResponse) GetExpectedVersionWriteConflict() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetProfileResponse_ExpectedVersionWriteConflict); ok { - return x.ExpectedVersionWriteConflict - } - } - return nil -} - -func (x *SetProfileResponse) GetProfilesV2CapabilityRequired() *ProfilesV2CapabilityRequired { - if x != nil { - if x, ok := x.Response.(*SetProfileResponse_ProfilesV2CapabilityRequired); ok { - return x.ProfilesV2CapabilityRequired - } - } - return nil -} - -type isSetProfileResponse_Response interface { - isSetProfileResponse_Response() -} - -type SetProfileResponse_Result struct { - Result *SetProfileResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` -} - -type SetProfileResponse_ExpectedDataWriteConflict struct { - // The current data hash did not match the request's expectation, indicating - // another device on the account may have written an update the caller does not know about. - ExpectedDataWriteConflict *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=expected_data_write_conflict,json=expectedDataWriteConflict,proto3,oneof"` -} - -type SetProfileResponse_PaymentsForbiddenInRegion struct { - // Payments are not permitted in the account's region, based on its phone - // number or the caller's IP address if the account does not have a phone - // number. The request should be retried without `payment_address. - PaymentsForbiddenInRegion *PaymentsForbiddenInRegion `protobuf:"bytes,3,opt,name=payments_forbidden_in_region,json=paymentsForbiddenInRegion,proto3,oneof"` -} - -type SetProfileResponse_ExpectedVersionWriteConflict struct { - // The current version did not match the request's expectation, indicating - // another device on the account may have created a new version the caller does not know about. - ExpectedVersionWriteConflict *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=expected_version_write_conflict,json=expectedVersionWriteConflict,proto3,oneof"` -} - -type SetProfileResponse_ProfilesV2CapabilityRequired struct { - // Because this is a temporary field during the migration, it has the highest - // field number without serialization overhead. This is purely aesthetic. - ProfilesV2CapabilityRequired *ProfilesV2CapabilityRequired `protobuf:"bytes,15,opt,name=profiles_v2_capability_required,json=profilesV2CapabilityRequired,proto3,oneof"` -} - -func (*SetProfileResponse_Result) isSetProfileResponse_Response() {} - -func (*SetProfileResponse_ExpectedDataWriteConflict) isSetProfileResponse_Response() {} - -func (*SetProfileResponse_PaymentsForbiddenInRegion) isSetProfileResponse_Response() {} - -func (*SetProfileResponse_ExpectedVersionWriteConflict) isSetProfileResponse_Response() {} - -func (*SetProfileResponse_ProfilesV2CapabilityRequired) isSetProfileResponse_Response() {} - -type GetProfileRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The ACI of the account for which to get profile data. - AccountIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=account_identifier,json=accountIdentifier,proto3" json:"account_identifier,omitempty"` - // The profile version to retrieve. - Version []byte `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - // The `etag` from the previous request for this Profile version. If - // unchanged, the response will omit `profile` and `etag_matched` will be - // `true`. - Etag []byte `protobuf:"bytes,3,opt,name=etag,proto3" json:"etag,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetProfileRequest) Reset() { - *x = GetProfileRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetProfileRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetProfileRequest) ProtoMessage() {} - -func (x *GetProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetProfileRequest.ProtoReflect.Descriptor instead. -func (*GetProfileRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{6} -} - -func (x *GetProfileRequest) GetAccountIdentifier() *common.ServiceIdentifier { - if x != nil { - return x.AccountIdentifier - } - return nil -} - -func (x *GetProfileRequest) GetVersion() []byte { - if x != nil { - return x.Version - } - return nil -} - -func (x *GetProfileRequest) GetEtag() []byte { - if x != nil { - return x.Etag - } - return nil -} - -type GetProfileAnonymousRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Contains the data necessary to request a profile. - Request *GetProfileRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` - // Types that are valid to be assigned to Authentication: - // - // *GetProfileAnonymousRequest_UnidentifiedAccessKey - // *GetProfileAnonymousRequest_GroupSendToken - Authentication isGetProfileAnonymousRequest_Authentication `protobuf_oneof:"authentication"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetProfileAnonymousRequest) Reset() { - *x = GetProfileAnonymousRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetProfileAnonymousRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetProfileAnonymousRequest) ProtoMessage() {} - -func (x *GetProfileAnonymousRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetProfileAnonymousRequest.ProtoReflect.Descriptor instead. -func (*GetProfileAnonymousRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{7} -} - -func (x *GetProfileAnonymousRequest) GetRequest() *GetProfileRequest { - if x != nil { - return x.Request - } - return nil -} - -func (x *GetProfileAnonymousRequest) GetAuthentication() isGetProfileAnonymousRequest_Authentication { - if x != nil { - return x.Authentication - } - return nil -} - -func (x *GetProfileAnonymousRequest) GetUnidentifiedAccessKey() []byte { - if x != nil { - if x, ok := x.Authentication.(*GetProfileAnonymousRequest_UnidentifiedAccessKey); ok { - return x.UnidentifiedAccessKey - } - } - return nil -} - -func (x *GetProfileAnonymousRequest) GetGroupSendToken() []byte { - if x != nil { - if x, ok := x.Authentication.(*GetProfileAnonymousRequest_GroupSendToken); ok { - return x.GroupSendToken - } - } - return nil -} - -type isGetProfileAnonymousRequest_Authentication interface { - isGetProfileAnonymousRequest_Authentication() -} - -type GetProfileAnonymousRequest_UnidentifiedAccessKey struct { - // The unidentified access key for the targeted account. - UnidentifiedAccessKey []byte `protobuf:"bytes,2,opt,name=unidentified_access_key,json=unidentifiedAccessKey,proto3,oneof"` -} - -type GetProfileAnonymousRequest_GroupSendToken struct { - // A group send endorsement token for the targeted account. - GroupSendToken []byte `protobuf:"bytes,3,opt,name=group_send_token,json=groupSendToken,proto3,oneof"` -} - -func (*GetProfileAnonymousRequest_UnidentifiedAccessKey) isGetProfileAnonymousRequest_Authentication() { -} - -func (*GetProfileAnonymousRequest_GroupSendToken) isGetProfileAnonymousRequest_Authentication() {} - -type AccountInfo struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The account identity key of the targeted account. - IdentityKey []byte `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` - // A checksum of the unidentified access key for the targeted account. - UnidentifiedAccessKeyFingerprint []byte `protobuf:"bytes,2,opt,name=unidentified_access_key_fingerprint,json=unidentifiedAccessKeyFingerprint,proto3" json:"unidentified_access_key_fingerprint,omitempty"` - // Whether the account has enabled sealed sender from anyone. - UnrestrictedUnidentifiedAccess bool `protobuf:"varint,3,opt,name=unrestricted_unidentified_access,json=unrestrictedUnidentifiedAccess,proto3" json:"unrestricted_unidentified_access,omitempty"` - // A list of the badges ids associated with the account. Metadata to display - // badges may be obtained by cross-referencing badge ids with - // RemoteConfiguration.GetBadges. - BadgeIds []string `protobuf:"bytes,4,rep,name=badge_ids,json=badgeIds,proto3" json:"badge_ids,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AccountInfo) Reset() { - *x = AccountInfo{} - mi := &file_org_signal_chat_profile_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AccountInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccountInfo) ProtoMessage() {} - -func (x *AccountInfo) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AccountInfo.ProtoReflect.Descriptor instead. -func (*AccountInfo) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{8} -} - -func (x *AccountInfo) GetIdentityKey() []byte { - if x != nil { - return x.IdentityKey - } - return nil -} - -func (x *AccountInfo) GetUnidentifiedAccessKeyFingerprint() []byte { - if x != nil { - return x.UnidentifiedAccessKeyFingerprint - } - return nil -} - -func (x *AccountInfo) GetUnrestrictedUnidentifiedAccess() bool { - if x != nil { - return x.UnrestrictedUnidentifiedAccess - } - return false -} - -func (x *AccountInfo) GetBadgeIds() []string { - if x != nil { - return x.BadgeIds - } - return nil -} - -type ProfileResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The ciphertext of the requested version of the profile - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - // The ciphertext of the MobileCoin wallet ID on the profile. - PaymentAddress []byte `protobuf:"bytes,2,opt,name=payment_address,json=paymentAddress,proto3" json:"payment_address,omitempty"` - // Information about the targeted account - AccountInfo *AccountInfo `protobuf:"bytes,3,opt,name=account_info,json=accountInfo,proto3" json:"account_info,omitempty"` - // An entity tag for the profile. This may be used in subsequent requests - // for this profile version to optimize bandwidth. - // - // Note that this hash will not match the expected_data_hash used on - // SetProfile for concurrency control. - // - // Clients may validate that the value has been correctly calculated by - // calculating a 10-byte truncated TupleHash256 as follows: - // - // ``` - // TupleHash256(S = "ProfileETag/v1", L = 80 bits, tuple = [ - // - // data, - // payment_address, - // account_info.identity_key, - // account_info.unidentified_access_key_fingerprint, - // account_info.unrestricted_unidentified_access ? 0x01 : 0x00, - // uint32BE(count(account_info.badge_ids)), - // utf8(id) for each id in sortLexAscendingByUtf8Bytes(account_info.badge_ids), - // - // ]) - // ``` - // - // Absent/empty fields contribute an empty element (not zero bytes omitted): - // a missing payment_address is still a present, zero-length tuple element. - // - // This etag will always exclusively cover the documented fields. If fields - // are added in the future, a new etag field must be introduced. - Etag []byte `protobuf:"bytes,4,opt,name=etag,proto3" json:"etag,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ProfileResult) Reset() { - *x = ProfileResult{} - mi := &file_org_signal_chat_profile_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ProfileResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProfileResult) ProtoMessage() {} - -func (x *ProfileResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProfileResult.ProtoReflect.Descriptor instead. -func (*ProfileResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{9} -} - -func (x *ProfileResult) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *ProfileResult) GetPaymentAddress() []byte { - if x != nil { - return x.PaymentAddress - } - return nil -} - -func (x *ProfileResult) GetAccountInfo() *AccountInfo { - if x != nil { - return x.AccountInfo - } - return nil -} - -func (x *ProfileResult) GetEtag() []byte { - if x != nil { - return x.Etag - } - return nil -} - -type LegacyProfileResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The ciphertext of the name on the profile. - Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The ciphertext of the description on the profile. - About []byte `protobuf:"bytes,2,opt,name=about,proto3" json:"about,omitempty"` - // The ciphertext of the emoji on the profile. - AboutEmoji []byte `protobuf:"bytes,3,opt,name=about_emoji,json=aboutEmoji,proto3" json:"about_emoji,omitempty"` - // The cdn0 path of the avatar on the profile. - Avatar string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"` - // The ciphertext of the phone-number sharing setting on the profile. - PhoneNumberSharing []byte `protobuf:"bytes,5,opt,name=phone_number_sharing,json=phoneNumberSharing,proto3" json:"phone_number_sharing,omitempty"` - // The ciphertext of the MobileCoin wallet ID on the profile. - PaymentAddress []byte `protobuf:"bytes,6,opt,name=payment_address,json=paymentAddress,proto3" json:"payment_address,omitempty"` - // Information about the targeted account - AccountInfo *AccountInfo `protobuf:"bytes,7,opt,name=account_info,json=accountInfo,proto3" json:"account_info,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LegacyProfileResult) Reset() { - *x = LegacyProfileResult{} - mi := &file_org_signal_chat_profile_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LegacyProfileResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LegacyProfileResult) ProtoMessage() {} - -func (x *LegacyProfileResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LegacyProfileResult.ProtoReflect.Descriptor instead. -func (*LegacyProfileResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{10} -} - -func (x *LegacyProfileResult) GetName() []byte { - if x != nil { - return x.Name - } - return nil -} - -func (x *LegacyProfileResult) GetAbout() []byte { - if x != nil { - return x.About - } - return nil -} - -func (x *LegacyProfileResult) GetAboutEmoji() []byte { - if x != nil { - return x.AboutEmoji - } - return nil -} - -func (x *LegacyProfileResult) GetAvatar() string { - if x != nil { - return x.Avatar - } - return "" -} - -func (x *LegacyProfileResult) GetPhoneNumberSharing() []byte { - if x != nil { - return x.PhoneNumberSharing - } - return nil -} - -func (x *LegacyProfileResult) GetPaymentAddress() []byte { - if x != nil { - return x.PaymentAddress - } - return nil -} - -func (x *LegacyProfileResult) GetAccountInfo() *AccountInfo { - if x != nil { - return x.AccountInfo - } - return nil -} - -type GetProfileResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetProfileResponse_Profile - // *GetProfileResponse_EtagMatched - // *GetProfileResponse_NotFound - // *GetProfileResponse_LegacyProfile - Response isGetProfileResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetProfileResponse) Reset() { - *x = GetProfileResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetProfileResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetProfileResponse) ProtoMessage() {} - -func (x *GetProfileResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetProfileResponse.ProtoReflect.Descriptor instead. -func (*GetProfileResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{11} -} - -func (x *GetProfileResponse) GetResponse() isGetProfileResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetProfileResponse) GetProfile() *ProfileResult { - if x != nil { - if x, ok := x.Response.(*GetProfileResponse_Profile); ok { - return x.Profile - } - } - return nil -} - -func (x *GetProfileResponse) GetEtagMatched() bool { - if x != nil { - if x, ok := x.Response.(*GetProfileResponse_EtagMatched); ok { - return x.EtagMatched - } - } - return false -} - -func (x *GetProfileResponse) GetNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*GetProfileResponse_NotFound); ok { - return x.NotFound - } - } - return nil -} - -func (x *GetProfileResponse) GetLegacyProfile() *LegacyProfileResult { - if x != nil { - if x, ok := x.Response.(*GetProfileResponse_LegacyProfile); ok { - return x.LegacyProfile - } - } - return nil -} - -type isGetProfileResponse_Response interface { - isGetProfileResponse_Response() -} - -type GetProfileResponse_Profile struct { - // The full profile data. The current profile did not match the provided - // etag (or no etag was provided). - Profile *ProfileResult `protobuf:"bytes,1,opt,name=profile,proto3,oneof"` -} - -type GetProfileResponse_EtagMatched struct { - // The current profile matched the provided etag. If present, this will always be true. - EtagMatched bool `protobuf:"varint,2,opt,name=etag_matched,json=etagMatched,proto3,oneof"` -} - -type GetProfileResponse_NotFound struct { - NotFound *errors.NotFound `protobuf:"bytes,3,opt,name=not_found,json=notFound,proto3,oneof"` -} - -type GetProfileResponse_LegacyProfile struct { - // Will be present if there is no v2 Profile data for this version. - // - // Because this is a temporary field during the migration, it has the highest - // field number without serialization overhead. This is purely aesthetic. - LegacyProfile *LegacyProfileResult `protobuf:"bytes,15,opt,name=legacy_profile,json=legacyProfile,proto3,oneof"` -} - -func (*GetProfileResponse_Profile) isGetProfileResponse_Response() {} - -func (*GetProfileResponse_EtagMatched) isGetProfileResponse_Response() {} - -func (*GetProfileResponse_NotFound) isGetProfileResponse_Response() {} - -func (*GetProfileResponse_LegacyProfile) isGetProfileResponse_Response() {} - -type GetProfileAnonymousResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetProfileAnonymousResponse_Profile - // *GetProfileAnonymousResponse_EtagMatched - // *GetProfileAnonymousResponse_NotFound - // *GetProfileAnonymousResponse_FailedUnidentifiedAuthorization - // *GetProfileAnonymousResponse_ProfileV1 - Response isGetProfileAnonymousResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetProfileAnonymousResponse) Reset() { - *x = GetProfileAnonymousResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetProfileAnonymousResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetProfileAnonymousResponse) ProtoMessage() {} - -func (x *GetProfileAnonymousResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetProfileAnonymousResponse.ProtoReflect.Descriptor instead. -func (*GetProfileAnonymousResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{12} -} - -func (x *GetProfileAnonymousResponse) GetResponse() isGetProfileAnonymousResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetProfileAnonymousResponse) GetProfile() *ProfileResult { - if x != nil { - if x, ok := x.Response.(*GetProfileAnonymousResponse_Profile); ok { - return x.Profile - } - } - return nil -} - -func (x *GetProfileAnonymousResponse) GetEtagMatched() bool { - if x != nil { - if x, ok := x.Response.(*GetProfileAnonymousResponse_EtagMatched); ok { - return x.EtagMatched - } - } - return false -} - -func (x *GetProfileAnonymousResponse) GetNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*GetProfileAnonymousResponse_NotFound); ok { - return x.NotFound - } - } - return nil -} - -func (x *GetProfileAnonymousResponse) GetFailedUnidentifiedAuthorization() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*GetProfileAnonymousResponse_FailedUnidentifiedAuthorization); ok { - return x.FailedUnidentifiedAuthorization - } - } - return nil -} - -func (x *GetProfileAnonymousResponse) GetProfileV1() *LegacyProfileResult { - if x != nil { - if x, ok := x.Response.(*GetProfileAnonymousResponse_ProfileV1); ok { - return x.ProfileV1 - } - } - return nil -} - -type isGetProfileAnonymousResponse_Response interface { - isGetProfileAnonymousResponse_Response() -} - -type GetProfileAnonymousResponse_Profile struct { - // The full profile data. The current profile did not match the provided - // etag (or no etag was provided). - Profile *ProfileResult `protobuf:"bytes,1,opt,name=profile,proto3,oneof"` -} - -type GetProfileAnonymousResponse_EtagMatched struct { - // The current profile matched the provided etag. If present, this will always be true. - EtagMatched bool `protobuf:"varint,2,opt,name=etag_matched,json=etagMatched,proto3,oneof"` -} - -type GetProfileAnonymousResponse_NotFound struct { - NotFound *errors.NotFound `protobuf:"bytes,3,opt,name=not_found,json=notFound,proto3,oneof"` -} - -type GetProfileAnonymousResponse_FailedUnidentifiedAuthorization struct { - FailedUnidentifiedAuthorization *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,4,opt,name=failed_unidentified_authorization,json=failedUnidentifiedAuthorization,proto3,oneof"` -} - -type GetProfileAnonymousResponse_ProfileV1 struct { - // Will be present if there is no v2 Profile data for this version. - // - // Because this is a temporary field during the migration, it has the highest - // field number without serialization overhead. This is purely aesthetic. - ProfileV1 *LegacyProfileResult `protobuf:"bytes,15,opt,name=profile_v1,json=profileV1,proto3,oneof"` -} - -func (*GetProfileAnonymousResponse_Profile) isGetProfileAnonymousResponse_Response() {} - -func (*GetProfileAnonymousResponse_EtagMatched) isGetProfileAnonymousResponse_Response() {} - -func (*GetProfileAnonymousResponse_NotFound) isGetProfileAnonymousResponse_Response() {} - -func (*GetProfileAnonymousResponse_FailedUnidentifiedAuthorization) isGetProfileAnonymousResponse_Response() { -} - -func (*GetProfileAnonymousResponse_ProfileV1) isGetProfileAnonymousResponse_Response() {} - -type GetExpiringProfileKeyCredentialRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The ACI of the account for which to get a profile key credential. - AccountIdentifier *common.ServiceIdentifier `protobuf:"bytes,1,opt,name=account_identifier,json=accountIdentifier,proto3" json:"account_identifier,omitempty"` - // A zkgroup request for a profile key credential. - CredentialRequest []byte `protobuf:"bytes,2,opt,name=credential_request,json=credentialRequest,proto3" json:"credential_request,omitempty"` - // The type of credential being requested. - CredentialType CredentialType `protobuf:"varint,3,opt,name=credential_type,json=credentialType,proto3,enum=org.signal.chat.profile.CredentialType" json:"credential_type,omitempty"` - // The profile version for which to generate a profile key credential. - Version []byte `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetExpiringProfileKeyCredentialRequest) Reset() { - *x = GetExpiringProfileKeyCredentialRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetExpiringProfileKeyCredentialRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetExpiringProfileKeyCredentialRequest) ProtoMessage() {} - -func (x *GetExpiringProfileKeyCredentialRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetExpiringProfileKeyCredentialRequest.ProtoReflect.Descriptor instead. -func (*GetExpiringProfileKeyCredentialRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{13} -} - -func (x *GetExpiringProfileKeyCredentialRequest) GetAccountIdentifier() *common.ServiceIdentifier { - if x != nil { - return x.AccountIdentifier - } - return nil -} - -func (x *GetExpiringProfileKeyCredentialRequest) GetCredentialRequest() []byte { - if x != nil { - return x.CredentialRequest - } - return nil -} - -func (x *GetExpiringProfileKeyCredentialRequest) GetCredentialType() CredentialType { - if x != nil { - return x.CredentialType - } - return CredentialType_CREDENTIAL_TYPE_UNSPECIFIED -} - -func (x *GetExpiringProfileKeyCredentialRequest) GetVersion() []byte { - if x != nil { - return x.Version - } - return nil -} - -type GetExpiringProfileKeyCredentialAnonymousRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Contains the data necessary to request an expiring profile key credential. - Request *GetExpiringProfileKeyCredentialRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` - // The unidentified access key for the targeted account. - UnidentifiedAccessKey []byte `protobuf:"bytes,2,opt,name=unidentified_access_key,json=unidentifiedAccessKey,proto3" json:"unidentified_access_key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetExpiringProfileKeyCredentialAnonymousRequest) Reset() { - *x = GetExpiringProfileKeyCredentialAnonymousRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetExpiringProfileKeyCredentialAnonymousRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetExpiringProfileKeyCredentialAnonymousRequest) ProtoMessage() {} - -func (x *GetExpiringProfileKeyCredentialAnonymousRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetExpiringProfileKeyCredentialAnonymousRequest.ProtoReflect.Descriptor instead. -func (*GetExpiringProfileKeyCredentialAnonymousRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{14} -} - -func (x *GetExpiringProfileKeyCredentialAnonymousRequest) GetRequest() *GetExpiringProfileKeyCredentialRequest { - if x != nil { - return x.Request - } - return nil -} - -func (x *GetExpiringProfileKeyCredentialAnonymousRequest) GetUnidentifiedAccessKey() []byte { - if x != nil { - return x.UnidentifiedAccessKey - } - return nil -} - -type GetExpiringProfileKeyCredentialResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A zkgroup credential used by a client to prove that it has the profile key - // of a targeted account. - ProfileKeyCredential []byte `protobuf:"bytes,1,opt,name=profile_key_credential,json=profileKeyCredential,proto3" json:"profile_key_credential,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetExpiringProfileKeyCredentialResult) Reset() { - *x = GetExpiringProfileKeyCredentialResult{} - mi := &file_org_signal_chat_profile_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetExpiringProfileKeyCredentialResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetExpiringProfileKeyCredentialResult) ProtoMessage() {} - -func (x *GetExpiringProfileKeyCredentialResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[15] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetExpiringProfileKeyCredentialResult.ProtoReflect.Descriptor instead. -func (*GetExpiringProfileKeyCredentialResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{15} -} - -func (x *GetExpiringProfileKeyCredentialResult) GetProfileKeyCredential() []byte { - if x != nil { - return x.ProfileKeyCredential - } - return nil -} - -type GetExpiringProfileKeyCredentialAnonymousResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetExpiringProfileKeyCredentialAnonymousResponse_Result - // *GetExpiringProfileKeyCredentialAnonymousResponse_NotFound - // *GetExpiringProfileKeyCredentialAnonymousResponse_FailedUnidentifiedAuthorization - Response isGetExpiringProfileKeyCredentialAnonymousResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetExpiringProfileKeyCredentialAnonymousResponse) Reset() { - *x = GetExpiringProfileKeyCredentialAnonymousResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetExpiringProfileKeyCredentialAnonymousResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetExpiringProfileKeyCredentialAnonymousResponse) ProtoMessage() {} - -func (x *GetExpiringProfileKeyCredentialAnonymousResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[16] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetExpiringProfileKeyCredentialAnonymousResponse.ProtoReflect.Descriptor instead. -func (*GetExpiringProfileKeyCredentialAnonymousResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{16} -} - -func (x *GetExpiringProfileKeyCredentialAnonymousResponse) GetResponse() isGetExpiringProfileKeyCredentialAnonymousResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetExpiringProfileKeyCredentialAnonymousResponse) GetResult() *GetExpiringProfileKeyCredentialResult { - if x != nil { - if x, ok := x.Response.(*GetExpiringProfileKeyCredentialAnonymousResponse_Result); ok { - return x.Result - } - } - return nil -} - -func (x *GetExpiringProfileKeyCredentialAnonymousResponse) GetNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*GetExpiringProfileKeyCredentialAnonymousResponse_NotFound); ok { - return x.NotFound - } - } - return nil -} - -func (x *GetExpiringProfileKeyCredentialAnonymousResponse) GetFailedUnidentifiedAuthorization() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*GetExpiringProfileKeyCredentialAnonymousResponse_FailedUnidentifiedAuthorization); ok { - return x.FailedUnidentifiedAuthorization - } - } - return nil -} - -type isGetExpiringProfileKeyCredentialAnonymousResponse_Response interface { - isGetExpiringProfileKeyCredentialAnonymousResponse_Response() -} - -type GetExpiringProfileKeyCredentialAnonymousResponse_Result struct { - Result *GetExpiringProfileKeyCredentialResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` -} - -type GetExpiringProfileKeyCredentialAnonymousResponse_NotFound struct { - NotFound *errors.NotFound `protobuf:"bytes,2,opt,name=not_found,json=notFound,proto3,oneof"` -} - -type GetExpiringProfileKeyCredentialAnonymousResponse_FailedUnidentifiedAuthorization struct { - FailedUnidentifiedAuthorization *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=failed_unidentified_authorization,json=failedUnidentifiedAuthorization,proto3,oneof"` -} - -func (*GetExpiringProfileKeyCredentialAnonymousResponse_Result) isGetExpiringProfileKeyCredentialAnonymousResponse_Response() { -} - -func (*GetExpiringProfileKeyCredentialAnonymousResponse_NotFound) isGetExpiringProfileKeyCredentialAnonymousResponse_Response() { -} - -func (*GetExpiringProfileKeyCredentialAnonymousResponse_FailedUnidentifiedAuthorization) isGetExpiringProfileKeyCredentialAnonymousResponse_Response() { -} - -type GetAvatarCredentialsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - AvatarCredentialsRequest []byte `protobuf:"bytes,1,opt,name=avatar_credentials_request,json=avatarCredentialsRequest,proto3" json:"avatar_credentials_request,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetAvatarCredentialsRequest) Reset() { - *x = GetAvatarCredentialsRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetAvatarCredentialsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAvatarCredentialsRequest) ProtoMessage() {} - -func (x *GetAvatarCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[17] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAvatarCredentialsRequest.ProtoReflect.Descriptor instead. -func (*GetAvatarCredentialsRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{17} -} - -func (x *GetAvatarCredentialsRequest) GetAvatarCredentialsRequest() []byte { - if x != nil { - return x.AvatarCredentialsRequest - } - return nil -} - -type GetAvatarCredentialsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetAvatarCredentialsResponse_AvatarCredentials - // *GetAvatarCredentialsResponse_MissingZkCredentialKey - Response isGetAvatarCredentialsResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetAvatarCredentialsResponse) Reset() { - *x = GetAvatarCredentialsResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetAvatarCredentialsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAvatarCredentialsResponse) ProtoMessage() {} - -func (x *GetAvatarCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[18] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAvatarCredentialsResponse.ProtoReflect.Descriptor instead. -func (*GetAvatarCredentialsResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{18} -} - -func (x *GetAvatarCredentialsResponse) GetResponse() isGetAvatarCredentialsResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetAvatarCredentialsResponse) GetAvatarCredentials() []byte { - if x != nil { - if x, ok := x.Response.(*GetAvatarCredentialsResponse_AvatarCredentials); ok { - return x.AvatarCredentials - } - } - return nil -} - -func (x *GetAvatarCredentialsResponse) GetMissingZkCredentialKey() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*GetAvatarCredentialsResponse_MissingZkCredentialKey); ok { - return x.MissingZkCredentialKey - } - } - return nil -} - -type isGetAvatarCredentialsResponse_Response interface { - isGetAvatarCredentialsResponse_Response() -} - -type GetAvatarCredentialsResponse_AvatarCredentials struct { - AvatarCredentials []byte `protobuf:"bytes,1,opt,name=avatar_credentials,json=avatarCredentials,proto3,oneof"` -} - -type GetAvatarCredentialsResponse_MissingZkCredentialKey struct { - // the client must call Accounts.SetZkCredentialKey to call this method - MissingZkCredentialKey *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=missing_zk_credential_key,json=missingZkCredentialKey,proto3,oneof"` -} - -func (*GetAvatarCredentialsResponse_AvatarCredentials) isGetAvatarCredentialsResponse_Response() {} - -func (*GetAvatarCredentialsResponse_MissingZkCredentialKey) isGetAvatarCredentialsResponse_Response() { -} - -type GetAvatarUploadFormRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - AvatarCredentialsPresentation []byte `protobuf:"bytes,1,opt,name=avatar_credentials_presentation,json=avatarCredentialsPresentation,proto3" json:"avatar_credentials_presentation,omitempty"` - // The length of the attachment for the requested upload form. Uploads - // performed with this form will be limited to the provided length. - UploadLength uint32 `protobuf:"varint,2,opt,name=upload_length,json=uploadLength,proto3" json:"upload_length,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetAvatarUploadFormRequest) Reset() { - *x = GetAvatarUploadFormRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetAvatarUploadFormRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAvatarUploadFormRequest) ProtoMessage() {} - -func (x *GetAvatarUploadFormRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[19] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAvatarUploadFormRequest.ProtoReflect.Descriptor instead. -func (*GetAvatarUploadFormRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{19} -} - -func (x *GetAvatarUploadFormRequest) GetAvatarCredentialsPresentation() []byte { - if x != nil { - return x.AvatarCredentialsPresentation - } - return nil -} - -func (x *GetAvatarUploadFormRequest) GetUploadLength() uint32 { - if x != nil { - return x.UploadLength - } - return 0 -} - -type GetAvatarUploadFormResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetAvatarUploadFormResponse_AvatarUploadForm - // *GetAvatarUploadFormResponse_InvalidCredentialsPresentation - Response isGetAvatarUploadFormResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetAvatarUploadFormResponse) Reset() { - *x = GetAvatarUploadFormResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetAvatarUploadFormResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAvatarUploadFormResponse) ProtoMessage() {} - -func (x *GetAvatarUploadFormResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[20] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAvatarUploadFormResponse.ProtoReflect.Descriptor instead. -func (*GetAvatarUploadFormResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{20} -} - -func (x *GetAvatarUploadFormResponse) GetResponse() isGetAvatarUploadFormResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetAvatarUploadFormResponse) GetAvatarUploadForm() *common.S3UploadForm { - if x != nil { - if x, ok := x.Response.(*GetAvatarUploadFormResponse_AvatarUploadForm); ok { - return x.AvatarUploadForm - } - } - return nil -} - -func (x *GetAvatarUploadFormResponse) GetInvalidCredentialsPresentation() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Response.(*GetAvatarUploadFormResponse_InvalidCredentialsPresentation); ok { - return x.InvalidCredentialsPresentation - } - } - return nil -} - -type isGetAvatarUploadFormResponse_Response interface { - isGetAvatarUploadFormResponse_Response() -} - -type GetAvatarUploadFormResponse_AvatarUploadForm struct { - AvatarUploadForm *common.S3UploadForm `protobuf:"bytes,1,opt,name=avatar_upload_form,json=avatarUploadForm,proto3,oneof"` -} - -type GetAvatarUploadFormResponse_InvalidCredentialsPresentation struct { - InvalidCredentialsPresentation *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=invalid_credentials_presentation,json=invalidCredentialsPresentation,proto3,oneof"` -} - -func (*GetAvatarUploadFormResponse_AvatarUploadForm) isGetAvatarUploadFormResponse_Response() {} - -func (*GetAvatarUploadFormResponse_InvalidCredentialsPresentation) isGetAvatarUploadFormResponse_Response() { -} - -type ExtendAvatarTTLRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - AvatarCredentialsPresentation []byte `protobuf:"bytes,1,opt,name=avatar_credentials_presentation,json=avatarCredentialsPresentation,proto3" json:"avatar_credentials_presentation,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ExtendAvatarTTLRequest) Reset() { - *x = ExtendAvatarTTLRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ExtendAvatarTTLRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtendAvatarTTLRequest) ProtoMessage() {} - -func (x *ExtendAvatarTTLRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[21] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtendAvatarTTLRequest.ProtoReflect.Descriptor instead. -func (*ExtendAvatarTTLRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{21} -} - -func (x *ExtendAvatarTTLRequest) GetAvatarCredentialsPresentation() []byte { - if x != nil { - return x.AvatarCredentialsPresentation - } - return nil -} - -type ExtendAvatarTTLResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *ExtendAvatarTTLResponse_Path - // *ExtendAvatarTTLResponse_InvalidCredentialsPresentation - // *ExtendAvatarTTLResponse_NotFound - Response isExtendAvatarTTLResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ExtendAvatarTTLResponse) Reset() { - *x = ExtendAvatarTTLResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ExtendAvatarTTLResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtendAvatarTTLResponse) ProtoMessage() {} - -func (x *ExtendAvatarTTLResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[22] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtendAvatarTTLResponse.ProtoReflect.Descriptor instead. -func (*ExtendAvatarTTLResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{22} -} - -func (x *ExtendAvatarTTLResponse) GetResponse() isExtendAvatarTTLResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *ExtendAvatarTTLResponse) GetPath() string { - if x != nil { - if x, ok := x.Response.(*ExtendAvatarTTLResponse_Path); ok { - return x.Path - } - } - return "" -} - -func (x *ExtendAvatarTTLResponse) GetInvalidCredentialsPresentation() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Response.(*ExtendAvatarTTLResponse_InvalidCredentialsPresentation); ok { - return x.InvalidCredentialsPresentation - } - } - return nil -} - -func (x *ExtendAvatarTTLResponse) GetNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*ExtendAvatarTTLResponse_NotFound); ok { - return x.NotFound - } - } - return nil -} - -type isExtendAvatarTTLResponse_Response interface { - isExtendAvatarTTLResponse_Response() -} - -type ExtendAvatarTTLResponse_Path struct { - // The avatar that was extended. May be used as a check against state de-synchronization. - Path string `protobuf:"bytes,1,opt,name=path,proto3,oneof"` -} - -type ExtendAvatarTTLResponse_InvalidCredentialsPresentation struct { - InvalidCredentialsPresentation *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=invalid_credentials_presentation,json=invalidCredentialsPresentation,proto3,oneof"` -} - -type ExtendAvatarTTLResponse_NotFound struct { - // the identity does not have an active avatar - NotFound *errors.NotFound `protobuf:"bytes,3,opt,name=not_found,json=notFound,proto3,oneof"` -} - -func (*ExtendAvatarTTLResponse_Path) isExtendAvatarTTLResponse_Response() {} - -func (*ExtendAvatarTTLResponse_InvalidCredentialsPresentation) isExtendAvatarTTLResponse_Response() {} - -func (*ExtendAvatarTTLResponse_NotFound) isExtendAvatarTTLResponse_Response() {} - -type DeleteAvatarRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - AvatarCredentialsPresentation []byte `protobuf:"bytes,1,opt,name=avatar_credentials_presentation,json=avatarCredentialsPresentation,proto3" json:"avatar_credentials_presentation,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteAvatarRequest) Reset() { - *x = DeleteAvatarRequest{} - mi := &file_org_signal_chat_profile_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteAvatarRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteAvatarRequest) ProtoMessage() {} - -func (x *DeleteAvatarRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[23] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteAvatarRequest.ProtoReflect.Descriptor instead. -func (*DeleteAvatarRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{23} -} - -func (x *DeleteAvatarRequest) GetAvatarCredentialsPresentation() []byte { - if x != nil { - return x.AvatarCredentialsPresentation - } - return nil -} - -type DeleteAvatarResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *DeleteAvatarResponse_Success - // *DeleteAvatarResponse_InvalidCredentialsPresentation - Response isDeleteAvatarResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteAvatarResponse) Reset() { - *x = DeleteAvatarResponse{} - mi := &file_org_signal_chat_profile_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteAvatarResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteAvatarResponse) ProtoMessage() {} - -func (x *DeleteAvatarResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_profile_proto_msgTypes[24] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteAvatarResponse.ProtoReflect.Descriptor instead. -func (*DeleteAvatarResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_profile_proto_rawDescGZIP(), []int{24} -} - -func (x *DeleteAvatarResponse) GetResponse() isDeleteAvatarResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *DeleteAvatarResponse) GetSuccess() *emptypb.Empty { - if x != nil { - if x, ok := x.Response.(*DeleteAvatarResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *DeleteAvatarResponse) GetInvalidCredentialsPresentation() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Response.(*DeleteAvatarResponse_InvalidCredentialsPresentation); ok { - return x.InvalidCredentialsPresentation - } - } - return nil -} - -type isDeleteAvatarResponse_Response interface { - isDeleteAvatarResponse_Response() -} - -type DeleteAvatarResponse_Success struct { - Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type DeleteAvatarResponse_InvalidCredentialsPresentation struct { - InvalidCredentialsPresentation *errors.FailedZkAuthentication `protobuf:"bytes,2,opt,name=invalid_credentials_presentation,json=invalidCredentialsPresentation,proto3,oneof"` -} - -func (*DeleteAvatarResponse_Success) isDeleteAvatarResponse_Response() {} - -func (*DeleteAvatarResponse_InvalidCredentialsPresentation) isDeleteAvatarResponse_Response() {} - -var File_org_signal_chat_profile_proto protoreflect.FileDescriptor - -const file_org_signal_chat_profile_proto_rawDesc = "" + - "\n" + - "\x1dorg/signal/chat/profile.proto\x12\x17org.signal.chat.profile\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1corg/signal/chat/common.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x19org/signal/chat/tag.proto\"\xf7\x02\n" + - "\x13SetProfileV1Request\x12\x1b\n" + - "\x04name\x18\x01 \x01(\fB\a\xa2\x97\"\x03Q\x9d\x02R\x04name\x12^\n" + - "\ravatar_change\x18\x02 \x01(\x0e29.org.signal.chat.profile.SetProfileV1Request.AvatarChangeR\favatarChange\x12'\n" + - "\vabout_emoji\x18\x03 \x01(\fB\x06\xa2\x97\"\x02\x00.org.signal.chat.profile.GetExpiringProfileKeyCredentialResultH\x00R\x06result\x12N\n" + - "\tnot_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\r\xc2\xd5\"\tnot_foundH\x00R\bnotFound\x12\xac\x01\n" + - "!failed_unidentified_authorization\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB%\xc2\xd5\"!failed_unidentified_authorizationH\x00R\x1ffailedUnidentifiedAuthorizationB\n" + - "\n" + - "\bresponse\"[\n" + - "\x1bGetAvatarCredentialsRequest\x12<\n" + - "\x1aavatar_credentials_request\x18\x01 \x01(\fR\x18avatarCredentialsRequest\"\xe4\x01\n" + - "\x1cGetAvatarCredentialsResponse\x12/\n" + - "\x12avatar_credentials\x18\x01 \x01(\fH\x00R\x11avatarCredentials\x12\x86\x01\n" + - "\x19missing_zk_credential_key\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1d\xc2\xd5\"\x19missing_zk_credential_keyH\x00R\x16missingZkCredentialKeyB\n" + - "\n" + - "\bresponse\"\x96\x01\n" + - "\x1aGetAvatarUploadFormRequest\x12F\n" + - "\x1favatar_credentials_presentation\x18\x01 \x01(\fR\x1davatarCredentialsPresentation\x120\n" + - "\rupload_length\x18\x02 \x01(\rB\v\xb2\x97\"\a\b\x01\x10\x80\x80\x80\x05R\fuploadLength\"\xa2\x02\n" + - "\x1bGetAvatarUploadFormResponse\x12T\n" + - "\x12avatar_upload_form\x18\x01 \x01(\v2$.org.signal.chat.common.S3UploadFormH\x00R\x10avatarUploadForm\x12\xa0\x01\n" + - " invalid_credentials_presentation\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB$\xc2\xd5\" invalid_credentials_presentationH\x00R\x1einvalidCredentialsPresentationB\n" + - "\n" + - "\bresponse\"`\n" + - "\x16ExtendAvatarTTLRequest\x12F\n" + - "\x1favatar_credentials_presentation\x18\x01 \x01(\fR\x1davatarCredentialsPresentation\"\xb5\x02\n" + - "\x17ExtendAvatarTTLResponse\x12\x14\n" + - "\x04path\x18\x01 \x01(\tH\x00R\x04path\x12\xa0\x01\n" + - " invalid_credentials_presentation\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB$\xc2\xd5\" invalid_credentials_presentationH\x00R\x1einvalidCredentialsPresentation\x12U\n" + - "\tnot_found\x18\x03 \x01(\v2 .org.signal.chat.errors.NotFoundB\x14\xc2\xd5\"\x10no_active_avatarH\x00R\bnotFoundB\n" + - "\n" + - "\bresponse\"]\n" + - "\x13DeleteAvatarRequest\x12F\n" + - "\x1favatar_credentials_presentation\x18\x01 \x01(\fR\x1davatarCredentialsPresentation\"\xf9\x01\n" + - "\x14DeleteAvatarResponse\x122\n" + - "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\xa0\x01\n" + - " invalid_credentials_presentation\x18\x02 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB$\xc2\xd5\" invalid_credentials_presentationH\x00R\x1einvalidCredentialsPresentationB\n" + - "\n" + - "\bresponse*[\n" + - "\x0eCredentialType\x12\x1f\n" + - "\x1bCREDENTIAL_TYPE_UNSPECIFIED\x10\x00\x12(\n" + - "$CREDENTIAL_TYPE_EXPIRING_PROFILE_KEY\x10\x012\xe9\x02\n" + - "\aProfile\x12g\n" + - "\n" + - "SetProfile\x12*.org.signal.chat.profile.SetProfileRequest\x1a+.org.signal.chat.profile.SetProfileResponse\"\x00\x12g\n" + - "\n" + - "GetProfile\x12*.org.signal.chat.profile.GetProfileRequest\x1a+.org.signal.chat.profile.GetProfileResponse\"\x00\x12\x85\x01\n" + - "\x14GetAvatarCredentials\x124.org.signal.chat.profile.GetAvatarCredentialsRequest\x1a5.org.signal.chat.profile.GetAvatarCredentialsResponse\"\x00\x1a\x04\xc8\xd5\"\x012\xba\x05\n" + - "\x10ProfileAnonymous\x12y\n" + - "\n" + - "GetProfile\x123.org.signal.chat.profile.GetProfileAnonymousRequest\x1a4.org.signal.chat.profile.GetProfileAnonymousResponse\"\x00\x12\xb8\x01\n" + - "\x1fGetExpiringProfileKeyCredential\x12H.org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest\x1aI.org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse\"\x00\x12\x82\x01\n" + - "\x13GetAvatarUploadForm\x123.org.signal.chat.profile.GetAvatarUploadFormRequest\x1a4.org.signal.chat.profile.GetAvatarUploadFormResponse\"\x00\x12v\n" + - "\x0fExtendAvatarTTL\x12/.org.signal.chat.profile.ExtendAvatarTTLRequest\x1a0.org.signal.chat.profile.ExtendAvatarTTLResponse\"\x00\x12m\n" + - "\fDeleteAvatar\x12,.org.signal.chat.profile.DeleteAvatarRequest\x1a-.org.signal.chat.profile.DeleteAvatarResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_profile_proto_rawDescOnce sync.Once - file_org_signal_chat_profile_proto_rawDescData []byte -) - -func file_org_signal_chat_profile_proto_rawDescGZIP() []byte { - file_org_signal_chat_profile_proto_rawDescOnce.Do(func() { - file_org_signal_chat_profile_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_profile_proto_rawDesc), len(file_org_signal_chat_profile_proto_rawDesc))) - }) - return file_org_signal_chat_profile_proto_rawDescData -} - -var file_org_signal_chat_profile_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_org_signal_chat_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 25) -var file_org_signal_chat_profile_proto_goTypes = []any{ - (CredentialType)(0), // 0: org.signal.chat.profile.CredentialType - (SetProfileV1Request_AvatarChange)(0), // 1: org.signal.chat.profile.SetProfileV1Request.AvatarChange - (*SetProfileV1Request)(nil), // 2: org.signal.chat.profile.SetProfileV1Request - (*SetProfileRequest)(nil), // 3: org.signal.chat.profile.SetProfileRequest - (*PaymentsForbiddenInRegion)(nil), // 4: org.signal.chat.profile.PaymentsForbiddenInRegion - (*ProfilesV2CapabilityRequired)(nil), // 5: org.signal.chat.profile.ProfilesV2CapabilityRequired - (*SetProfileResult)(nil), // 6: org.signal.chat.profile.SetProfileResult - (*SetProfileResponse)(nil), // 7: org.signal.chat.profile.SetProfileResponse - (*GetProfileRequest)(nil), // 8: org.signal.chat.profile.GetProfileRequest - (*GetProfileAnonymousRequest)(nil), // 9: org.signal.chat.profile.GetProfileAnonymousRequest - (*AccountInfo)(nil), // 10: org.signal.chat.profile.AccountInfo - (*ProfileResult)(nil), // 11: org.signal.chat.profile.ProfileResult - (*LegacyProfileResult)(nil), // 12: org.signal.chat.profile.LegacyProfileResult - (*GetProfileResponse)(nil), // 13: org.signal.chat.profile.GetProfileResponse - (*GetProfileAnonymousResponse)(nil), // 14: org.signal.chat.profile.GetProfileAnonymousResponse - (*GetExpiringProfileKeyCredentialRequest)(nil), // 15: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest - (*GetExpiringProfileKeyCredentialAnonymousRequest)(nil), // 16: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest - (*GetExpiringProfileKeyCredentialResult)(nil), // 17: org.signal.chat.profile.GetExpiringProfileKeyCredentialResult - (*GetExpiringProfileKeyCredentialAnonymousResponse)(nil), // 18: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse - (*GetAvatarCredentialsRequest)(nil), // 19: org.signal.chat.profile.GetAvatarCredentialsRequest - (*GetAvatarCredentialsResponse)(nil), // 20: org.signal.chat.profile.GetAvatarCredentialsResponse - (*GetAvatarUploadFormRequest)(nil), // 21: org.signal.chat.profile.GetAvatarUploadFormRequest - (*GetAvatarUploadFormResponse)(nil), // 22: org.signal.chat.profile.GetAvatarUploadFormResponse - (*ExtendAvatarTTLRequest)(nil), // 23: org.signal.chat.profile.ExtendAvatarTTLRequest - (*ExtendAvatarTTLResponse)(nil), // 24: org.signal.chat.profile.ExtendAvatarTTLResponse - (*DeleteAvatarRequest)(nil), // 25: org.signal.chat.profile.DeleteAvatarRequest - (*DeleteAvatarResponse)(nil), // 26: org.signal.chat.profile.DeleteAvatarResponse - (*common.S3UploadForm)(nil), // 27: org.signal.chat.common.S3UploadForm - (*errors.FailedPrecondition)(nil), // 28: org.signal.chat.errors.FailedPrecondition - (*common.ServiceIdentifier)(nil), // 29: org.signal.chat.common.ServiceIdentifier - (*errors.NotFound)(nil), // 30: org.signal.chat.errors.NotFound - (*errors.FailedUnidentifiedAuthorization)(nil), // 31: org.signal.chat.errors.FailedUnidentifiedAuthorization - (*errors.FailedZkAuthentication)(nil), // 32: org.signal.chat.errors.FailedZkAuthentication - (*emptypb.Empty)(nil), // 33: google.protobuf.Empty -} -var file_org_signal_chat_profile_proto_depIdxs = []int32{ - 1, // 0: org.signal.chat.profile.SetProfileV1Request.avatar_change:type_name -> org.signal.chat.profile.SetProfileV1Request.AvatarChange - 2, // 1: org.signal.chat.profile.SetProfileRequest.v1Request:type_name -> org.signal.chat.profile.SetProfileV1Request - 27, // 2: org.signal.chat.profile.SetProfileResult.v1_avatar_upload_form:type_name -> org.signal.chat.common.S3UploadForm - 6, // 3: org.signal.chat.profile.SetProfileResponse.result:type_name -> org.signal.chat.profile.SetProfileResult - 28, // 4: org.signal.chat.profile.SetProfileResponse.expected_data_write_conflict:type_name -> org.signal.chat.errors.FailedPrecondition - 4, // 5: org.signal.chat.profile.SetProfileResponse.payments_forbidden_in_region:type_name -> org.signal.chat.profile.PaymentsForbiddenInRegion - 28, // 6: org.signal.chat.profile.SetProfileResponse.expected_version_write_conflict:type_name -> org.signal.chat.errors.FailedPrecondition - 5, // 7: org.signal.chat.profile.SetProfileResponse.profiles_v2_capability_required:type_name -> org.signal.chat.profile.ProfilesV2CapabilityRequired - 29, // 8: org.signal.chat.profile.GetProfileRequest.account_identifier:type_name -> org.signal.chat.common.ServiceIdentifier - 8, // 9: org.signal.chat.profile.GetProfileAnonymousRequest.request:type_name -> org.signal.chat.profile.GetProfileRequest - 10, // 10: org.signal.chat.profile.ProfileResult.account_info:type_name -> org.signal.chat.profile.AccountInfo - 10, // 11: org.signal.chat.profile.LegacyProfileResult.account_info:type_name -> org.signal.chat.profile.AccountInfo - 11, // 12: org.signal.chat.profile.GetProfileResponse.profile:type_name -> org.signal.chat.profile.ProfileResult - 30, // 13: org.signal.chat.profile.GetProfileResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 12, // 14: org.signal.chat.profile.GetProfileResponse.legacy_profile:type_name -> org.signal.chat.profile.LegacyProfileResult - 11, // 15: org.signal.chat.profile.GetProfileAnonymousResponse.profile:type_name -> org.signal.chat.profile.ProfileResult - 30, // 16: org.signal.chat.profile.GetProfileAnonymousResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 31, // 17: org.signal.chat.profile.GetProfileAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 12, // 18: org.signal.chat.profile.GetProfileAnonymousResponse.profile_v1:type_name -> org.signal.chat.profile.LegacyProfileResult - 29, // 19: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest.account_identifier:type_name -> org.signal.chat.common.ServiceIdentifier - 0, // 20: org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest.credential_type:type_name -> org.signal.chat.profile.CredentialType - 15, // 21: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest.request:type_name -> org.signal.chat.profile.GetExpiringProfileKeyCredentialRequest - 17, // 22: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse.result:type_name -> org.signal.chat.profile.GetExpiringProfileKeyCredentialResult - 30, // 23: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 31, // 24: org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse.failed_unidentified_authorization:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 28, // 25: org.signal.chat.profile.GetAvatarCredentialsResponse.missing_zk_credential_key:type_name -> org.signal.chat.errors.FailedPrecondition - 27, // 26: org.signal.chat.profile.GetAvatarUploadFormResponse.avatar_upload_form:type_name -> org.signal.chat.common.S3UploadForm - 32, // 27: org.signal.chat.profile.GetAvatarUploadFormResponse.invalid_credentials_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication - 32, // 28: org.signal.chat.profile.ExtendAvatarTTLResponse.invalid_credentials_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication - 30, // 29: org.signal.chat.profile.ExtendAvatarTTLResponse.not_found:type_name -> org.signal.chat.errors.NotFound - 33, // 30: org.signal.chat.profile.DeleteAvatarResponse.success:type_name -> google.protobuf.Empty - 32, // 31: org.signal.chat.profile.DeleteAvatarResponse.invalid_credentials_presentation:type_name -> org.signal.chat.errors.FailedZkAuthentication - 3, // 32: org.signal.chat.profile.Profile.SetProfile:input_type -> org.signal.chat.profile.SetProfileRequest - 8, // 33: org.signal.chat.profile.Profile.GetProfile:input_type -> org.signal.chat.profile.GetProfileRequest - 19, // 34: org.signal.chat.profile.Profile.GetAvatarCredentials:input_type -> org.signal.chat.profile.GetAvatarCredentialsRequest - 9, // 35: org.signal.chat.profile.ProfileAnonymous.GetProfile:input_type -> org.signal.chat.profile.GetProfileAnonymousRequest - 16, // 36: org.signal.chat.profile.ProfileAnonymous.GetExpiringProfileKeyCredential:input_type -> org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousRequest - 21, // 37: org.signal.chat.profile.ProfileAnonymous.GetAvatarUploadForm:input_type -> org.signal.chat.profile.GetAvatarUploadFormRequest - 23, // 38: org.signal.chat.profile.ProfileAnonymous.ExtendAvatarTTL:input_type -> org.signal.chat.profile.ExtendAvatarTTLRequest - 25, // 39: org.signal.chat.profile.ProfileAnonymous.DeleteAvatar:input_type -> org.signal.chat.profile.DeleteAvatarRequest - 7, // 40: org.signal.chat.profile.Profile.SetProfile:output_type -> org.signal.chat.profile.SetProfileResponse - 13, // 41: org.signal.chat.profile.Profile.GetProfile:output_type -> org.signal.chat.profile.GetProfileResponse - 20, // 42: org.signal.chat.profile.Profile.GetAvatarCredentials:output_type -> org.signal.chat.profile.GetAvatarCredentialsResponse - 14, // 43: org.signal.chat.profile.ProfileAnonymous.GetProfile:output_type -> org.signal.chat.profile.GetProfileAnonymousResponse - 18, // 44: org.signal.chat.profile.ProfileAnonymous.GetExpiringProfileKeyCredential:output_type -> org.signal.chat.profile.GetExpiringProfileKeyCredentialAnonymousResponse - 22, // 45: org.signal.chat.profile.ProfileAnonymous.GetAvatarUploadForm:output_type -> org.signal.chat.profile.GetAvatarUploadFormResponse - 24, // 46: org.signal.chat.profile.ProfileAnonymous.ExtendAvatarTTL:output_type -> org.signal.chat.profile.ExtendAvatarTTLResponse - 26, // 47: org.signal.chat.profile.ProfileAnonymous.DeleteAvatar:output_type -> org.signal.chat.profile.DeleteAvatarResponse - 40, // [40:48] is the sub-list for method output_type - 32, // [32:40] is the sub-list for method input_type - 32, // [32:32] is the sub-list for extension type_name - 32, // [32:32] is the sub-list for extension extendee - 0, // [0:32] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_profile_proto_init() } -func file_org_signal_chat_profile_proto_init() { - if File_org_signal_chat_profile_proto != nil { - return - } - file_org_signal_chat_profile_proto_msgTypes[4].OneofWrappers = []any{} - file_org_signal_chat_profile_proto_msgTypes[5].OneofWrappers = []any{ - (*SetProfileResponse_Result)(nil), - (*SetProfileResponse_ExpectedDataWriteConflict)(nil), - (*SetProfileResponse_PaymentsForbiddenInRegion)(nil), - (*SetProfileResponse_ExpectedVersionWriteConflict)(nil), - (*SetProfileResponse_ProfilesV2CapabilityRequired)(nil), - } - file_org_signal_chat_profile_proto_msgTypes[7].OneofWrappers = []any{ - (*GetProfileAnonymousRequest_UnidentifiedAccessKey)(nil), - (*GetProfileAnonymousRequest_GroupSendToken)(nil), - } - file_org_signal_chat_profile_proto_msgTypes[11].OneofWrappers = []any{ - (*GetProfileResponse_Profile)(nil), - (*GetProfileResponse_EtagMatched)(nil), - (*GetProfileResponse_NotFound)(nil), - (*GetProfileResponse_LegacyProfile)(nil), - } - file_org_signal_chat_profile_proto_msgTypes[12].OneofWrappers = []any{ - (*GetProfileAnonymousResponse_Profile)(nil), - (*GetProfileAnonymousResponse_EtagMatched)(nil), - (*GetProfileAnonymousResponse_NotFound)(nil), - (*GetProfileAnonymousResponse_FailedUnidentifiedAuthorization)(nil), - (*GetProfileAnonymousResponse_ProfileV1)(nil), - } - file_org_signal_chat_profile_proto_msgTypes[16].OneofWrappers = []any{ - (*GetExpiringProfileKeyCredentialAnonymousResponse_Result)(nil), - (*GetExpiringProfileKeyCredentialAnonymousResponse_NotFound)(nil), - (*GetExpiringProfileKeyCredentialAnonymousResponse_FailedUnidentifiedAuthorization)(nil), - } - file_org_signal_chat_profile_proto_msgTypes[18].OneofWrappers = []any{ - (*GetAvatarCredentialsResponse_AvatarCredentials)(nil), - (*GetAvatarCredentialsResponse_MissingZkCredentialKey)(nil), - } - file_org_signal_chat_profile_proto_msgTypes[20].OneofWrappers = []any{ - (*GetAvatarUploadFormResponse_AvatarUploadForm)(nil), - (*GetAvatarUploadFormResponse_InvalidCredentialsPresentation)(nil), - } - file_org_signal_chat_profile_proto_msgTypes[22].OneofWrappers = []any{ - (*ExtendAvatarTTLResponse_Path)(nil), - (*ExtendAvatarTTLResponse_InvalidCredentialsPresentation)(nil), - (*ExtendAvatarTTLResponse_NotFound)(nil), - } - file_org_signal_chat_profile_proto_msgTypes[24].OneofWrappers = []any{ - (*DeleteAvatarResponse_Success)(nil), - (*DeleteAvatarResponse_InvalidCredentialsPresentation)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_profile_proto_rawDesc), len(file_org_signal_chat_profile_proto_rawDesc)), - NumEnums: 2, - NumMessages: 25, - NumExtensions: 0, - NumServices: 2, - }, - GoTypes: file_org_signal_chat_profile_proto_goTypes, - DependencyIndexes: file_org_signal_chat_profile_proto_depIdxs, - EnumInfos: file_org_signal_chat_profile_proto_enumTypes, - MessageInfos: file_org_signal_chat_profile_proto_msgTypes, - }.Build() - File_org_signal_chat_profile_proto = out.File - file_org_signal_chat_profile_proto_goTypes = nil - file_org_signal_chat_profile_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/profile/profile_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/profile/profile_grpc.pb.go deleted file mode 100644 index f7be155..0000000 --- a/pkg/signalmeow/protobuf/rpc/profile/profile_grpc.pb.go +++ /dev/null @@ -1,513 +0,0 @@ -// -// Copyright 2023 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/profile.proto - -package profile - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Profile_SetProfile_FullMethodName = "/org.signal.chat.profile.Profile/SetProfile" - Profile_GetProfile_FullMethodName = "/org.signal.chat.profile.Profile/GetProfile" - Profile_GetAvatarCredentials_FullMethodName = "/org.signal.chat.profile.Profile/GetAvatarCredentials" -) - -// ProfileClient is the client API for Profile service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Provides methods for working with profiles and profile-related data. -type ProfileClient interface { - // Sets profile data and, if needed, returns credentials used by clients to upload a v1 avatar. - SetProfile(ctx context.Context, in *SetProfileRequest, opts ...grpc.CallOption) (*SetProfileResponse, error) - // Retrieves profile data. Callers with an unidentified access key for the account - // should use the version of this method in `ProfileAnonymous` instead. - GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*GetProfileResponse, error) - // Returns anonymous credentials that may be presented with avatar operations in ProfilesAnonymous - // - // Note: `Accounts.SetZkCredentialKey` is a pre-requisite for this RPC - GetAvatarCredentials(ctx context.Context, in *GetAvatarCredentialsRequest, opts ...grpc.CallOption) (*GetAvatarCredentialsResponse, error) -} - -type profileClient struct { - cc grpc.ClientConnInterface -} - -func NewProfileClient(cc grpc.ClientConnInterface) ProfileClient { - return &profileClient{cc} -} - -func (c *profileClient) SetProfile(ctx context.Context, in *SetProfileRequest, opts ...grpc.CallOption) (*SetProfileResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetProfileResponse) - err := c.cc.Invoke(ctx, Profile_SetProfile_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *profileClient) GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*GetProfileResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetProfileResponse) - err := c.cc.Invoke(ctx, Profile_GetProfile_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *profileClient) GetAvatarCredentials(ctx context.Context, in *GetAvatarCredentialsRequest, opts ...grpc.CallOption) (*GetAvatarCredentialsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetAvatarCredentialsResponse) - err := c.cc.Invoke(ctx, Profile_GetAvatarCredentials_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ProfileServer is the server API for Profile service. -// All implementations must embed UnimplementedProfileServer -// for forward compatibility. -// -// Provides methods for working with profiles and profile-related data. -type ProfileServer interface { - // Sets profile data and, if needed, returns credentials used by clients to upload a v1 avatar. - SetProfile(context.Context, *SetProfileRequest) (*SetProfileResponse, error) - // Retrieves profile data. Callers with an unidentified access key for the account - // should use the version of this method in `ProfileAnonymous` instead. - GetProfile(context.Context, *GetProfileRequest) (*GetProfileResponse, error) - // Returns anonymous credentials that may be presented with avatar operations in ProfilesAnonymous - // - // Note: `Accounts.SetZkCredentialKey` is a pre-requisite for this RPC - GetAvatarCredentials(context.Context, *GetAvatarCredentialsRequest) (*GetAvatarCredentialsResponse, error) - mustEmbedUnimplementedProfileServer() -} - -// UnimplementedProfileServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedProfileServer struct{} - -func (UnimplementedProfileServer) SetProfile(context.Context, *SetProfileRequest) (*SetProfileResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetProfile not implemented") -} -func (UnimplementedProfileServer) GetProfile(context.Context, *GetProfileRequest) (*GetProfileResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetProfile not implemented") -} -func (UnimplementedProfileServer) GetAvatarCredentials(context.Context, *GetAvatarCredentialsRequest) (*GetAvatarCredentialsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetAvatarCredentials not implemented") -} -func (UnimplementedProfileServer) mustEmbedUnimplementedProfileServer() {} -func (UnimplementedProfileServer) testEmbeddedByValue() {} - -// UnsafeProfileServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ProfileServer will -// result in compilation errors. -type UnsafeProfileServer interface { - mustEmbedUnimplementedProfileServer() -} - -func RegisterProfileServer(s grpc.ServiceRegistrar, srv ProfileServer) { - // If the following call panics, it indicates UnimplementedProfileServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Profile_ServiceDesc, srv) -} - -func _Profile_SetProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetProfileRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProfileServer).SetProfile(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Profile_SetProfile_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProfileServer).SetProfile(ctx, req.(*SetProfileRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Profile_GetProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetProfileRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProfileServer).GetProfile(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Profile_GetProfile_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProfileServer).GetProfile(ctx, req.(*GetProfileRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Profile_GetAvatarCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAvatarCredentialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProfileServer).GetAvatarCredentials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Profile_GetAvatarCredentials_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProfileServer).GetAvatarCredentials(ctx, req.(*GetAvatarCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Profile_ServiceDesc is the grpc.ServiceDesc for Profile service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Profile_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.profile.Profile", - HandlerType: (*ProfileServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SetProfile", - Handler: _Profile_SetProfile_Handler, - }, - { - MethodName: "GetProfile", - Handler: _Profile_GetProfile_Handler, - }, - { - MethodName: "GetAvatarCredentials", - Handler: _Profile_GetAvatarCredentials_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/profile.proto", -} - -const ( - ProfileAnonymous_GetProfile_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/GetProfile" - ProfileAnonymous_GetExpiringProfileKeyCredential_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/GetExpiringProfileKeyCredential" - ProfileAnonymous_GetAvatarUploadForm_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/GetAvatarUploadForm" - ProfileAnonymous_ExtendAvatarTTL_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/ExtendAvatarTTL" - ProfileAnonymous_DeleteAvatar_FullMethodName = "/org.signal.chat.profile.ProfileAnonymous/DeleteAvatar" -) - -// ProfileAnonymousClient is the client API for ProfileAnonymous service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Provides methods for working with profiles and profile-related data using "unidentified access" -// credentials. Callers must not submit any self-identifying credentials -// when calling methods in this service and must instead present the targeted account's -// unidentified access key as an anonymous authentication mechanism. Callers -// without an unidentified access key should use the equivalent, authenticated -// methods in `Profile` instead. -type ProfileAnonymousClient interface { - // Retrieves profile data. - GetProfile(ctx context.Context, in *GetProfileAnonymousRequest, opts ...grpc.CallOption) (*GetProfileAnonymousResponse, error) - // Retrieves a profile key credential. - GetExpiringProfileKeyCredential(ctx context.Context, in *GetExpiringProfileKeyCredentialAnonymousRequest, opts ...grpc.CallOption) (*GetExpiringProfileKeyCredentialAnonymousResponse, error) - // Returns credentials to upload a v2 avatar. After uploading the avatar, the client - // must call SetProfile with the new avatar URL in the encrypted `data`. - // - // Because avatars are uploaded anonymously, they have an expiration equal to the - // idle account expiration. Clients must periodically (recommended: every 90 days) - // call ExtendAvatarTTL to extend the TTl. - // - // Note: any existing avatar associated with these credentials will be deleted immediately - GetAvatarUploadForm(ctx context.Context, in *GetAvatarUploadFormRequest, opts ...grpc.CallOption) (*GetAvatarUploadFormResponse, error) - // Extends the TTL of the avatar currently associated with the request’s avatar auth credential - ExtendAvatarTTL(ctx context.Context, in *ExtendAvatarTTLRequest, opts ...grpc.CallOption) (*ExtendAvatarTTLResponse, error) - // Deletes the avatar currently associated with the request’s avatar auth credential. - // - // Clients must also call SetProfile to remove the avatar from the encrypted `data`. - DeleteAvatar(ctx context.Context, in *DeleteAvatarRequest, opts ...grpc.CallOption) (*DeleteAvatarResponse, error) -} - -type profileAnonymousClient struct { - cc grpc.ClientConnInterface -} - -func NewProfileAnonymousClient(cc grpc.ClientConnInterface) ProfileAnonymousClient { - return &profileAnonymousClient{cc} -} - -func (c *profileAnonymousClient) GetProfile(ctx context.Context, in *GetProfileAnonymousRequest, opts ...grpc.CallOption) (*GetProfileAnonymousResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetProfileAnonymousResponse) - err := c.cc.Invoke(ctx, ProfileAnonymous_GetProfile_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *profileAnonymousClient) GetExpiringProfileKeyCredential(ctx context.Context, in *GetExpiringProfileKeyCredentialAnonymousRequest, opts ...grpc.CallOption) (*GetExpiringProfileKeyCredentialAnonymousResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetExpiringProfileKeyCredentialAnonymousResponse) - err := c.cc.Invoke(ctx, ProfileAnonymous_GetExpiringProfileKeyCredential_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *profileAnonymousClient) GetAvatarUploadForm(ctx context.Context, in *GetAvatarUploadFormRequest, opts ...grpc.CallOption) (*GetAvatarUploadFormResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetAvatarUploadFormResponse) - err := c.cc.Invoke(ctx, ProfileAnonymous_GetAvatarUploadForm_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *profileAnonymousClient) ExtendAvatarTTL(ctx context.Context, in *ExtendAvatarTTLRequest, opts ...grpc.CallOption) (*ExtendAvatarTTLResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ExtendAvatarTTLResponse) - err := c.cc.Invoke(ctx, ProfileAnonymous_ExtendAvatarTTL_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *profileAnonymousClient) DeleteAvatar(ctx context.Context, in *DeleteAvatarRequest, opts ...grpc.CallOption) (*DeleteAvatarResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(DeleteAvatarResponse) - err := c.cc.Invoke(ctx, ProfileAnonymous_DeleteAvatar_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ProfileAnonymousServer is the server API for ProfileAnonymous service. -// All implementations must embed UnimplementedProfileAnonymousServer -// for forward compatibility. -// -// Provides methods for working with profiles and profile-related data using "unidentified access" -// credentials. Callers must not submit any self-identifying credentials -// when calling methods in this service and must instead present the targeted account's -// unidentified access key as an anonymous authentication mechanism. Callers -// without an unidentified access key should use the equivalent, authenticated -// methods in `Profile` instead. -type ProfileAnonymousServer interface { - // Retrieves profile data. - GetProfile(context.Context, *GetProfileAnonymousRequest) (*GetProfileAnonymousResponse, error) - // Retrieves a profile key credential. - GetExpiringProfileKeyCredential(context.Context, *GetExpiringProfileKeyCredentialAnonymousRequest) (*GetExpiringProfileKeyCredentialAnonymousResponse, error) - // Returns credentials to upload a v2 avatar. After uploading the avatar, the client - // must call SetProfile with the new avatar URL in the encrypted `data`. - // - // Because avatars are uploaded anonymously, they have an expiration equal to the - // idle account expiration. Clients must periodically (recommended: every 90 days) - // call ExtendAvatarTTL to extend the TTl. - // - // Note: any existing avatar associated with these credentials will be deleted immediately - GetAvatarUploadForm(context.Context, *GetAvatarUploadFormRequest) (*GetAvatarUploadFormResponse, error) - // Extends the TTL of the avatar currently associated with the request’s avatar auth credential - ExtendAvatarTTL(context.Context, *ExtendAvatarTTLRequest) (*ExtendAvatarTTLResponse, error) - // Deletes the avatar currently associated with the request’s avatar auth credential. - // - // Clients must also call SetProfile to remove the avatar from the encrypted `data`. - DeleteAvatar(context.Context, *DeleteAvatarRequest) (*DeleteAvatarResponse, error) - mustEmbedUnimplementedProfileAnonymousServer() -} - -// UnimplementedProfileAnonymousServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedProfileAnonymousServer struct{} - -func (UnimplementedProfileAnonymousServer) GetProfile(context.Context, *GetProfileAnonymousRequest) (*GetProfileAnonymousResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetProfile not implemented") -} -func (UnimplementedProfileAnonymousServer) GetExpiringProfileKeyCredential(context.Context, *GetExpiringProfileKeyCredentialAnonymousRequest) (*GetExpiringProfileKeyCredentialAnonymousResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetExpiringProfileKeyCredential not implemented") -} -func (UnimplementedProfileAnonymousServer) GetAvatarUploadForm(context.Context, *GetAvatarUploadFormRequest) (*GetAvatarUploadFormResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetAvatarUploadForm not implemented") -} -func (UnimplementedProfileAnonymousServer) ExtendAvatarTTL(context.Context, *ExtendAvatarTTLRequest) (*ExtendAvatarTTLResponse, error) { - return nil, status.Error(codes.Unimplemented, "method ExtendAvatarTTL not implemented") -} -func (UnimplementedProfileAnonymousServer) DeleteAvatar(context.Context, *DeleteAvatarRequest) (*DeleteAvatarResponse, error) { - return nil, status.Error(codes.Unimplemented, "method DeleteAvatar not implemented") -} -func (UnimplementedProfileAnonymousServer) mustEmbedUnimplementedProfileAnonymousServer() {} -func (UnimplementedProfileAnonymousServer) testEmbeddedByValue() {} - -// UnsafeProfileAnonymousServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ProfileAnonymousServer will -// result in compilation errors. -type UnsafeProfileAnonymousServer interface { - mustEmbedUnimplementedProfileAnonymousServer() -} - -func RegisterProfileAnonymousServer(s grpc.ServiceRegistrar, srv ProfileAnonymousServer) { - // If the following call panics, it indicates UnimplementedProfileAnonymousServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&ProfileAnonymous_ServiceDesc, srv) -} - -func _ProfileAnonymous_GetProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetProfileAnonymousRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProfileAnonymousServer).GetProfile(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ProfileAnonymous_GetProfile_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProfileAnonymousServer).GetProfile(ctx, req.(*GetProfileAnonymousRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProfileAnonymous_GetExpiringProfileKeyCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetExpiringProfileKeyCredentialAnonymousRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProfileAnonymousServer).GetExpiringProfileKeyCredential(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ProfileAnonymous_GetExpiringProfileKeyCredential_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProfileAnonymousServer).GetExpiringProfileKeyCredential(ctx, req.(*GetExpiringProfileKeyCredentialAnonymousRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProfileAnonymous_GetAvatarUploadForm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAvatarUploadFormRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProfileAnonymousServer).GetAvatarUploadForm(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ProfileAnonymous_GetAvatarUploadForm_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProfileAnonymousServer).GetAvatarUploadForm(ctx, req.(*GetAvatarUploadFormRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProfileAnonymous_ExtendAvatarTTL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExtendAvatarTTLRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProfileAnonymousServer).ExtendAvatarTTL(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ProfileAnonymous_ExtendAvatarTTL_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProfileAnonymousServer).ExtendAvatarTTL(ctx, req.(*ExtendAvatarTTLRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ProfileAnonymous_DeleteAvatar_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteAvatarRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProfileAnonymousServer).DeleteAvatar(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ProfileAnonymous_DeleteAvatar_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProfileAnonymousServer).DeleteAvatar(ctx, req.(*DeleteAvatarRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// ProfileAnonymous_ServiceDesc is the grpc.ServiceDesc for ProfileAnonymous service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var ProfileAnonymous_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.profile.ProfileAnonymous", - HandlerType: (*ProfileAnonymousServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetProfile", - Handler: _ProfileAnonymous_GetProfile_Handler, - }, - { - MethodName: "GetExpiringProfileKeyCredential", - Handler: _ProfileAnonymous_GetExpiringProfileKeyCredential_Handler, - }, - { - MethodName: "GetAvatarUploadForm", - Handler: _ProfileAnonymous_GetAvatarUploadForm_Handler, - }, - { - MethodName: "ExtendAvatarTTL", - Handler: _ProfileAnonymous_ExtendAvatarTTL_Handler, - }, - { - MethodName: "DeleteAvatar", - Handler: _ProfileAnonymous_DeleteAvatar_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/profile.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/remote_configuration/remote_configuration.pb.go b/pkg/signalmeow/protobuf/rpc/remote_configuration/remote_configuration.pb.go deleted file mode 100644 index 5747e77..0000000 --- a/pkg/signalmeow/protobuf/rpc/remote_configuration/remote_configuration.pb.go +++ /dev/null @@ -1,609 +0,0 @@ -// -// Copyright 2026 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/remote_configuration.proto - -package remote_configuration - -import ( - common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetConfigurationRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // If present, the etag from a prior GetConfigurationResponse. If the - // provided etag matches the current configuration etag, the server may elide - // the configuration response. - Etag []byte `protobuf:"bytes,1,opt,name=etag,proto3" json:"etag,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetConfigurationRequest) Reset() { - *x = GetConfigurationRequest{} - mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetConfigurationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConfigurationRequest) ProtoMessage() {} - -func (x *GetConfigurationRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetConfigurationRequest.ProtoReflect.Descriptor instead. -func (*GetConfigurationRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_remote_configuration_proto_rawDescGZIP(), []int{0} -} - -func (x *GetConfigurationRequest) GetEtag() []byte { - if x != nil { - return x.Etag - } - return nil -} - -type GetConfigurationResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetConfigurationResponse_TaggedConfiguration - // *GetConfigurationResponse_EtagMatched - Response isGetConfigurationResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetConfigurationResponse) Reset() { - *x = GetConfigurationResponse{} - mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetConfigurationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConfigurationResponse) ProtoMessage() {} - -func (x *GetConfigurationResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetConfigurationResponse.ProtoReflect.Descriptor instead. -func (*GetConfigurationResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_remote_configuration_proto_rawDescGZIP(), []int{1} -} - -func (x *GetConfigurationResponse) GetResponse() isGetConfigurationResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetConfigurationResponse) GetTaggedConfiguration() *TaggedConfiguration { - if x != nil { - if x, ok := x.Response.(*GetConfigurationResponse_TaggedConfiguration); ok { - return x.TaggedConfiguration - } - } - return nil -} - -func (x *GetConfigurationResponse) GetEtagMatched() bool { - if x != nil { - if x, ok := x.Response.(*GetConfigurationResponse_EtagMatched); ok { - return x.EtagMatched - } - } - return false -} - -type isGetConfigurationResponse_Response interface { - isGetConfigurationResponse_Response() -} - -type GetConfigurationResponse_TaggedConfiguration struct { - // The full configuration and corresponding etag. - TaggedConfiguration *TaggedConfiguration `protobuf:"bytes,1,opt,name=tagged_configuration,json=taggedConfiguration,proto3,oneof"` -} - -type GetConfigurationResponse_EtagMatched struct { - // The etag in the request matched the current configuration etag. - EtagMatched bool `protobuf:"varint,2,opt,name=etag_matched,json=etagMatched,proto3,oneof"` -} - -func (*GetConfigurationResponse_TaggedConfiguration) isGetConfigurationResponse_Response() {} - -func (*GetConfigurationResponse_EtagMatched) isGetConfigurationResponse_Response() {} - -type Configuration struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A map of namespaced configuration keys to their resolved values. All - // configuration values are represented as strings. boolean values are - // represented as the strings "true" or "false". - Configuration map[string]string `protobuf:"bytes,1,rep,name=configuration,proto3" json:"configuration,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Configuration) Reset() { - *x = Configuration{} - mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Configuration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Configuration) ProtoMessage() {} - -func (x *Configuration) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Configuration.ProtoReflect.Descriptor instead. -func (*Configuration) Descriptor() ([]byte, []int) { - return file_org_signal_chat_remote_configuration_proto_rawDescGZIP(), []int{2} -} - -func (x *Configuration) GetConfiguration() map[string]string { - if x != nil { - return x.Configuration - } - return nil -} - -type TaggedConfiguration struct { - state protoimpl.MessageState `protogen:"open.v1"` - Configuration *Configuration `protobuf:"bytes,1,opt,name=configuration,proto3" json:"configuration,omitempty"` - // An entity tag for `configuration`. This may be supplied in a - // subsequent request to optimize bandwidth when the configuration has not - // changed. - Etag []byte `protobuf:"bytes,2,opt,name=etag,proto3" json:"etag,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TaggedConfiguration) Reset() { - *x = TaggedConfiguration{} - mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TaggedConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaggedConfiguration) ProtoMessage() {} - -func (x *TaggedConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TaggedConfiguration.ProtoReflect.Descriptor instead. -func (*TaggedConfiguration) Descriptor() ([]byte, []int) { - return file_org_signal_chat_remote_configuration_proto_rawDescGZIP(), []int{3} -} - -func (x *TaggedConfiguration) GetConfiguration() *Configuration { - if x != nil { - return x.Configuration - } - return nil -} - -func (x *TaggedConfiguration) GetEtag() []byte { - if x != nil { - return x.Etag - } - return nil -} - -type GetBadgesRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // If present, the etag from a prior GetBadgesResponse. If the provided etag - // matches the current badge etag, the server may elide the badge response. - Etag []byte `protobuf:"bytes,1,opt,name=etag,proto3" json:"etag,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetBadgesRequest) Reset() { - *x = GetBadgesRequest{} - mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetBadgesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBadgesRequest) ProtoMessage() {} - -func (x *GetBadgesRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetBadgesRequest.ProtoReflect.Descriptor instead. -func (*GetBadgesRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_remote_configuration_proto_rawDescGZIP(), []int{4} -} - -func (x *GetBadgesRequest) GetEtag() []byte { - if x != nil { - return x.Etag - } - return nil -} - -type GetBadgesResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetBadgesResponse_TaggedBadges - // *GetBadgesResponse_EtagMatched - Response isGetBadgesResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetBadgesResponse) Reset() { - *x = GetBadgesResponse{} - mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetBadgesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBadgesResponse) ProtoMessage() {} - -func (x *GetBadgesResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetBadgesResponse.ProtoReflect.Descriptor instead. -func (*GetBadgesResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_remote_configuration_proto_rawDescGZIP(), []int{5} -} - -func (x *GetBadgesResponse) GetResponse() isGetBadgesResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetBadgesResponse) GetTaggedBadges() *TaggedBadges { - if x != nil { - if x, ok := x.Response.(*GetBadgesResponse_TaggedBadges); ok { - return x.TaggedBadges - } - } - return nil -} - -func (x *GetBadgesResponse) GetEtagMatched() bool { - if x != nil { - if x, ok := x.Response.(*GetBadgesResponse_EtagMatched); ok { - return x.EtagMatched - } - } - return false -} - -type isGetBadgesResponse_Response interface { - isGetBadgesResponse_Response() -} - -type GetBadgesResponse_TaggedBadges struct { - // The full set of badges and corresponding etag. - TaggedBadges *TaggedBadges `protobuf:"bytes,1,opt,name=tagged_badges,json=taggedBadges,proto3,oneof"` -} - -type GetBadgesResponse_EtagMatched struct { - // The etag in the request matched the current badge etag. - EtagMatched bool `protobuf:"varint,2,opt,name=etag_matched,json=etagMatched,proto3,oneof"` -} - -func (*GetBadgesResponse_TaggedBadges) isGetBadgesResponse_Response() {} - -func (*GetBadgesResponse_EtagMatched) isGetBadgesResponse_Response() {} - -type Badges struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A map of badge ID to the detailed information for that badge. - Badges map[string]*common.Badge `protobuf:"bytes,1,rep,name=badges,proto3" json:"badges,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Badges) Reset() { - *x = Badges{} - mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Badges) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Badges) ProtoMessage() {} - -func (x *Badges) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Badges.ProtoReflect.Descriptor instead. -func (*Badges) Descriptor() ([]byte, []int) { - return file_org_signal_chat_remote_configuration_proto_rawDescGZIP(), []int{6} -} - -func (x *Badges) GetBadges() map[string]*common.Badge { - if x != nil { - return x.Badges - } - return nil -} - -type TaggedBadges struct { - state protoimpl.MessageState `protogen:"open.v1"` - Badges *Badges `protobuf:"bytes,1,opt,name=badges,proto3" json:"badges,omitempty"` - // An entity tag for `badges`. This may be supplied in a subsequent request - // to optimize bandwidth when the set of badges has not changed. - Etag []byte `protobuf:"bytes,2,opt,name=etag,proto3" json:"etag,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TaggedBadges) Reset() { - *x = TaggedBadges{} - mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TaggedBadges) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TaggedBadges) ProtoMessage() {} - -func (x *TaggedBadges) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_remote_configuration_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TaggedBadges.ProtoReflect.Descriptor instead. -func (*TaggedBadges) Descriptor() ([]byte, []int) { - return file_org_signal_chat_remote_configuration_proto_rawDescGZIP(), []int{7} -} - -func (x *TaggedBadges) GetBadges() *Badges { - if x != nil { - return x.Badges - } - return nil -} - -func (x *TaggedBadges) GetEtag() []byte { - if x != nil { - return x.Etag - } - return nil -} - -var File_org_signal_chat_remote_configuration_proto protoreflect.FileDescriptor - -const file_org_signal_chat_remote_configuration_proto_rawDesc = "" + - "\n" + - "*org/signal/chat/remote_configuration.proto\x12#org.signal.chat.remoteconfiguration\x1a\x1corg/signal/chat/common.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x19org/signal/chat/tag.proto\"-\n" + - "\x17GetConfigurationRequest\x12\x12\n" + - "\x04etag\x18\x01 \x01(\fR\x04etag\"\xca\x01\n" + - "\x18GetConfigurationResponse\x12m\n" + - "\x14tagged_configuration\x18\x01 \x01(\v28.org.signal.chat.remoteconfiguration.TaggedConfigurationH\x00R\x13taggedConfiguration\x123\n" + - "\fetag_matched\x18\x02 \x01(\bB\x0e\xc2\xd5\"\n" + - "etag_matchH\x00R\vetagMatchedB\n" + - "\n" + - "\bresponse\"\xbe\x01\n" + - "\rConfiguration\x12k\n" + - "\rconfiguration\x18\x01 \x03(\v2E.org.signal.chat.remoteconfiguration.Configuration.ConfigurationEntryR\rconfiguration\x1a@\n" + - "\x12ConfigurationEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x83\x01\n" + - "\x13TaggedConfiguration\x12X\n" + - "\rconfiguration\x18\x01 \x01(\v22.org.signal.chat.remoteconfiguration.ConfigurationR\rconfiguration\x12\x12\n" + - "\x04etag\x18\x02 \x01(\fR\x04etag\"&\n" + - "\x10GetBadgesRequest\x12\x12\n" + - "\x04etag\x18\x01 \x01(\fR\x04etag\"\xae\x01\n" + - "\x11GetBadgesResponse\x12X\n" + - "\rtagged_badges\x18\x01 \x01(\v21.org.signal.chat.remoteconfiguration.TaggedBadgesH\x00R\ftaggedBadges\x123\n" + - "\fetag_matched\x18\x02 \x01(\bB\x0e\xc2\xd5\"\n" + - "etag_matchH\x00R\vetagMatchedB\n" + - "\n" + - "\bresponse\"\xb3\x01\n" + - "\x06Badges\x12O\n" + - "\x06badges\x18\x01 \x03(\v27.org.signal.chat.remoteconfiguration.Badges.BadgesEntryR\x06badges\x1aX\n" + - "\vBadgesEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x123\n" + - "\x05value\x18\x02 \x01(\v2\x1d.org.signal.chat.common.BadgeR\x05value:\x028\x01\"g\n" + - "\fTaggedBadges\x12C\n" + - "\x06badges\x18\x01 \x01(\v2+.org.signal.chat.remoteconfiguration.BadgesR\x06badges\x12\x12\n" + - "\x04etag\x18\x02 \x01(\fR\x04etag2\xad\x02\n" + - "\x13RemoteConfiguration\x12\x91\x01\n" + - "\x10GetConfiguration\x12<.org.signal.chat.remoteconfiguration.GetConfigurationRequest\x1a=.org.signal.chat.remoteconfiguration.GetConfigurationResponse\"\x00\x12|\n" + - "\tGetBadges\x125.org.signal.chat.remoteconfiguration.GetBadgesRequest\x1a6.org.signal.chat.remoteconfiguration.GetBadgesResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_remote_configuration_proto_rawDescOnce sync.Once - file_org_signal_chat_remote_configuration_proto_rawDescData []byte -) - -func file_org_signal_chat_remote_configuration_proto_rawDescGZIP() []byte { - file_org_signal_chat_remote_configuration_proto_rawDescOnce.Do(func() { - file_org_signal_chat_remote_configuration_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_remote_configuration_proto_rawDesc), len(file_org_signal_chat_remote_configuration_proto_rawDesc))) - }) - return file_org_signal_chat_remote_configuration_proto_rawDescData -} - -var file_org_signal_chat_remote_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_org_signal_chat_remote_configuration_proto_goTypes = []any{ - (*GetConfigurationRequest)(nil), // 0: org.signal.chat.remoteconfiguration.GetConfigurationRequest - (*GetConfigurationResponse)(nil), // 1: org.signal.chat.remoteconfiguration.GetConfigurationResponse - (*Configuration)(nil), // 2: org.signal.chat.remoteconfiguration.Configuration - (*TaggedConfiguration)(nil), // 3: org.signal.chat.remoteconfiguration.TaggedConfiguration - (*GetBadgesRequest)(nil), // 4: org.signal.chat.remoteconfiguration.GetBadgesRequest - (*GetBadgesResponse)(nil), // 5: org.signal.chat.remoteconfiguration.GetBadgesResponse - (*Badges)(nil), // 6: org.signal.chat.remoteconfiguration.Badges - (*TaggedBadges)(nil), // 7: org.signal.chat.remoteconfiguration.TaggedBadges - nil, // 8: org.signal.chat.remoteconfiguration.Configuration.ConfigurationEntry - nil, // 9: org.signal.chat.remoteconfiguration.Badges.BadgesEntry - (*common.Badge)(nil), // 10: org.signal.chat.common.Badge -} -var file_org_signal_chat_remote_configuration_proto_depIdxs = []int32{ - 3, // 0: org.signal.chat.remoteconfiguration.GetConfigurationResponse.tagged_configuration:type_name -> org.signal.chat.remoteconfiguration.TaggedConfiguration - 8, // 1: org.signal.chat.remoteconfiguration.Configuration.configuration:type_name -> org.signal.chat.remoteconfiguration.Configuration.ConfigurationEntry - 2, // 2: org.signal.chat.remoteconfiguration.TaggedConfiguration.configuration:type_name -> org.signal.chat.remoteconfiguration.Configuration - 7, // 3: org.signal.chat.remoteconfiguration.GetBadgesResponse.tagged_badges:type_name -> org.signal.chat.remoteconfiguration.TaggedBadges - 9, // 4: org.signal.chat.remoteconfiguration.Badges.badges:type_name -> org.signal.chat.remoteconfiguration.Badges.BadgesEntry - 6, // 5: org.signal.chat.remoteconfiguration.TaggedBadges.badges:type_name -> org.signal.chat.remoteconfiguration.Badges - 10, // 6: org.signal.chat.remoteconfiguration.Badges.BadgesEntry.value:type_name -> org.signal.chat.common.Badge - 0, // 7: org.signal.chat.remoteconfiguration.RemoteConfiguration.GetConfiguration:input_type -> org.signal.chat.remoteconfiguration.GetConfigurationRequest - 4, // 8: org.signal.chat.remoteconfiguration.RemoteConfiguration.GetBadges:input_type -> org.signal.chat.remoteconfiguration.GetBadgesRequest - 1, // 9: org.signal.chat.remoteconfiguration.RemoteConfiguration.GetConfiguration:output_type -> org.signal.chat.remoteconfiguration.GetConfigurationResponse - 5, // 10: org.signal.chat.remoteconfiguration.RemoteConfiguration.GetBadges:output_type -> org.signal.chat.remoteconfiguration.GetBadgesResponse - 9, // [9:11] is the sub-list for method output_type - 7, // [7:9] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_remote_configuration_proto_init() } -func file_org_signal_chat_remote_configuration_proto_init() { - if File_org_signal_chat_remote_configuration_proto != nil { - return - } - file_org_signal_chat_remote_configuration_proto_msgTypes[1].OneofWrappers = []any{ - (*GetConfigurationResponse_TaggedConfiguration)(nil), - (*GetConfigurationResponse_EtagMatched)(nil), - } - file_org_signal_chat_remote_configuration_proto_msgTypes[5].OneofWrappers = []any{ - (*GetBadgesResponse_TaggedBadges)(nil), - (*GetBadgesResponse_EtagMatched)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_remote_configuration_proto_rawDesc), len(file_org_signal_chat_remote_configuration_proto_rawDesc)), - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_org_signal_chat_remote_configuration_proto_goTypes, - DependencyIndexes: file_org_signal_chat_remote_configuration_proto_depIdxs, - MessageInfos: file_org_signal_chat_remote_configuration_proto_msgTypes, - }.Build() - File_org_signal_chat_remote_configuration_proto = out.File - file_org_signal_chat_remote_configuration_proto_goTypes = nil - file_org_signal_chat_remote_configuration_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/remote_configuration/remote_configuration_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/remote_configuration/remote_configuration_grpc.pb.go deleted file mode 100644 index cd8032a..0000000 --- a/pkg/signalmeow/protobuf/rpc/remote_configuration/remote_configuration_grpc.pb.go +++ /dev/null @@ -1,189 +0,0 @@ -// -// Copyright 2026 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/remote_configuration.proto - -package remote_configuration - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - RemoteConfiguration_GetConfiguration_FullMethodName = "/org.signal.chat.remoteconfiguration.RemoteConfiguration/GetConfiguration" - RemoteConfiguration_GetBadges_FullMethodName = "/org.signal.chat.remoteconfiguration.RemoteConfiguration/GetBadges" -) - -// RemoteConfigurationClient is the client API for RemoteConfiguration service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Provides remote configuration applicable to the authenticated user -type RemoteConfigurationClient interface { - // Fetches the configuration for the authenticated user. Returned - // values are based on the authenticated account and caller's client platform, - // which is derived from the "User-Agent" header. - GetConfiguration(ctx context.Context, in *GetConfigurationRequest, opts ...grpc.CallOption) (*GetConfigurationResponse, error) - // Returns detailed information for all configured badges, keyed by badge ID. - // - // Badge descriptions may contain localized strings. Callers should set their - // language preferences via an "Accept-Language" header on the request - // https://datatracker.ietf.org/doc/html/rfc3282#section-3 - // - // Callers may cache a badges result for up to 1 day before checking (via - // etag) if there are any new updates. - GetBadges(ctx context.Context, in *GetBadgesRequest, opts ...grpc.CallOption) (*GetBadgesResponse, error) -} - -type remoteConfigurationClient struct { - cc grpc.ClientConnInterface -} - -func NewRemoteConfigurationClient(cc grpc.ClientConnInterface) RemoteConfigurationClient { - return &remoteConfigurationClient{cc} -} - -func (c *remoteConfigurationClient) GetConfiguration(ctx context.Context, in *GetConfigurationRequest, opts ...grpc.CallOption) (*GetConfigurationResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetConfigurationResponse) - err := c.cc.Invoke(ctx, RemoteConfiguration_GetConfiguration_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *remoteConfigurationClient) GetBadges(ctx context.Context, in *GetBadgesRequest, opts ...grpc.CallOption) (*GetBadgesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetBadgesResponse) - err := c.cc.Invoke(ctx, RemoteConfiguration_GetBadges_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RemoteConfigurationServer is the server API for RemoteConfiguration service. -// All implementations must embed UnimplementedRemoteConfigurationServer -// for forward compatibility. -// -// Provides remote configuration applicable to the authenticated user -type RemoteConfigurationServer interface { - // Fetches the configuration for the authenticated user. Returned - // values are based on the authenticated account and caller's client platform, - // which is derived from the "User-Agent" header. - GetConfiguration(context.Context, *GetConfigurationRequest) (*GetConfigurationResponse, error) - // Returns detailed information for all configured badges, keyed by badge ID. - // - // Badge descriptions may contain localized strings. Callers should set their - // language preferences via an "Accept-Language" header on the request - // https://datatracker.ietf.org/doc/html/rfc3282#section-3 - // - // Callers may cache a badges result for up to 1 day before checking (via - // etag) if there are any new updates. - GetBadges(context.Context, *GetBadgesRequest) (*GetBadgesResponse, error) - mustEmbedUnimplementedRemoteConfigurationServer() -} - -// UnimplementedRemoteConfigurationServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedRemoteConfigurationServer struct{} - -func (UnimplementedRemoteConfigurationServer) GetConfiguration(context.Context, *GetConfigurationRequest) (*GetConfigurationResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetConfiguration not implemented") -} -func (UnimplementedRemoteConfigurationServer) GetBadges(context.Context, *GetBadgesRequest) (*GetBadgesResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetBadges not implemented") -} -func (UnimplementedRemoteConfigurationServer) mustEmbedUnimplementedRemoteConfigurationServer() {} -func (UnimplementedRemoteConfigurationServer) testEmbeddedByValue() {} - -// UnsafeRemoteConfigurationServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to RemoteConfigurationServer will -// result in compilation errors. -type UnsafeRemoteConfigurationServer interface { - mustEmbedUnimplementedRemoteConfigurationServer() -} - -func RegisterRemoteConfigurationServer(s grpc.ServiceRegistrar, srv RemoteConfigurationServer) { - // If the following call panics, it indicates UnimplementedRemoteConfigurationServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&RemoteConfiguration_ServiceDesc, srv) -} - -func _RemoteConfiguration_GetConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetConfigurationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RemoteConfigurationServer).GetConfiguration(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: RemoteConfiguration_GetConfiguration_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RemoteConfigurationServer).GetConfiguration(ctx, req.(*GetConfigurationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RemoteConfiguration_GetBadges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBadgesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RemoteConfigurationServer).GetBadges(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: RemoteConfiguration_GetBadges_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RemoteConfigurationServer).GetBadges(ctx, req.(*GetBadgesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// RemoteConfiguration_ServiceDesc is the grpc.ServiceDesc for RemoteConfiguration service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var RemoteConfiguration_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.remoteconfiguration.RemoteConfiguration", - HandlerType: (*RemoteConfigurationServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetConfiguration", - Handler: _RemoteConfiguration_GetConfiguration_Handler, - }, - { - MethodName: "GetBadges", - Handler: _RemoteConfiguration_GetBadges_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/remote_configuration.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/require/require.pb.go b/pkg/signalmeow/protobuf/rpc/require/require.pb.go deleted file mode 100644 index 21b39f0..0000000 --- a/pkg/signalmeow/protobuf/rpc/require/require.pb.go +++ /dev/null @@ -1,765 +0,0 @@ -// -// Copyright 2023 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/require.proto - -package require - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Auth int32 - -const ( - Auth_AUTH_UNSPECIFIED Auth = 0 - Auth_AUTH_ONLY_AUTHENTICATED Auth = 1 - Auth_AUTH_ONLY_ANONYMOUS Auth = 2 -) - -// Enum value maps for Auth. -var ( - Auth_name = map[int32]string{ - 0: "AUTH_UNSPECIFIED", - 1: "AUTH_ONLY_AUTHENTICATED", - 2: "AUTH_ONLY_ANONYMOUS", - } - Auth_value = map[string]int32{ - "AUTH_UNSPECIFIED": 0, - "AUTH_ONLY_AUTHENTICATED": 1, - "AUTH_ONLY_ANONYMOUS": 2, - } -) - -func (x Auth) Enum() *Auth { - p := new(Auth) - *p = x - return p -} - -func (x Auth) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Auth) Descriptor() protoreflect.EnumDescriptor { - return file_org_signal_chat_require_proto_enumTypes[0].Descriptor() -} - -func (Auth) Type() protoreflect.EnumType { - return &file_org_signal_chat_require_proto_enumTypes[0] -} - -func (x Auth) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Auth.Descriptor instead. -func (Auth) EnumDescriptor() ([]byte, []int) { - return file_org_signal_chat_require_proto_rawDescGZIP(), []int{0} -} - -// This is duplicated from common.proto because: -// -// 1. importing would be a circular dependency -// 2. the canonical declaration belongs there -type IdentityType int32 - -const ( - IdentityType_IDENTITY_TYPE_UNSPECIFIED IdentityType = 0 - IdentityType_IDENTITY_TYPE_ACI IdentityType = 1 - IdentityType_IDENTITY_TYPE_PNI IdentityType = 2 -) - -// Enum value maps for IdentityType. -var ( - IdentityType_name = map[int32]string{ - 0: "IDENTITY_TYPE_UNSPECIFIED", - 1: "IDENTITY_TYPE_ACI", - 2: "IDENTITY_TYPE_PNI", - } - IdentityType_value = map[string]int32{ - "IDENTITY_TYPE_UNSPECIFIED": 0, - "IDENTITY_TYPE_ACI": 1, - "IDENTITY_TYPE_PNI": 2, - } -) - -func (x IdentityType) Enum() *IdentityType { - p := new(IdentityType) - *p = x - return p -} - -func (x IdentityType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (IdentityType) Descriptor() protoreflect.EnumDescriptor { - return file_org_signal_chat_require_proto_enumTypes[1].Descriptor() -} - -func (IdentityType) Type() protoreflect.EnumType { - return &file_org_signal_chat_require_proto_enumTypes[1] -} - -func (x IdentityType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use IdentityType.Descriptor instead. -func (IdentityType) EnumDescriptor() ([]byte, []int) { - return file_org_signal_chat_require_proto_rawDescGZIP(), []int{1} -} - -type ElementConstraint struct { - state protoimpl.MessageState `protogen:"open.v1"` - NonEmpty *bool `protobuf:"varint,1,opt,name=nonEmpty,proto3,oneof" json:"nonEmpty,omitempty"` - Size *SizeConstraint `protobuf:"bytes,2,opt,name=size,proto3,oneof" json:"size,omitempty"` - ExactlySize []uint32 `protobuf:"varint,3,rep,packed,name=exactlySize,proto3" json:"exactlySize,omitempty"` - E164 *bool `protobuf:"varint,4,opt,name=e164,proto3,oneof" json:"e164,omitempty"` - Base64Url *bool `protobuf:"varint,5,opt,name=base64url,proto3,oneof" json:"base64url,omitempty"` - Range *ValueRangeConstraint `protobuf:"bytes,6,opt,name=range,proto3,oneof" json:"range,omitempty"` - IdentityType *IdentityType `protobuf:"varint,7,opt,name=identityType,proto3,enum=org.signal.chat.require.IdentityType,oneof" json:"identityType,omitempty"` - Specified *bool `protobuf:"varint,8,opt,name=specified,proto3,oneof" json:"specified,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ElementConstraint) Reset() { - *x = ElementConstraint{} - mi := &file_org_signal_chat_require_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ElementConstraint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ElementConstraint) ProtoMessage() {} - -func (x *ElementConstraint) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_require_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ElementConstraint.ProtoReflect.Descriptor instead. -func (*ElementConstraint) Descriptor() ([]byte, []int) { - return file_org_signal_chat_require_proto_rawDescGZIP(), []int{0} -} - -func (x *ElementConstraint) GetNonEmpty() bool { - if x != nil && x.NonEmpty != nil { - return *x.NonEmpty - } - return false -} - -func (x *ElementConstraint) GetSize() *SizeConstraint { - if x != nil { - return x.Size - } - return nil -} - -func (x *ElementConstraint) GetExactlySize() []uint32 { - if x != nil { - return x.ExactlySize - } - return nil -} - -func (x *ElementConstraint) GetE164() bool { - if x != nil && x.E164 != nil { - return *x.E164 - } - return false -} - -func (x *ElementConstraint) GetBase64Url() bool { - if x != nil && x.Base64Url != nil { - return *x.Base64Url - } - return false -} - -func (x *ElementConstraint) GetRange() *ValueRangeConstraint { - if x != nil { - return x.Range - } - return nil -} - -func (x *ElementConstraint) GetIdentityType() IdentityType { - if x != nil && x.IdentityType != nil { - return *x.IdentityType - } - return IdentityType_IDENTITY_TYPE_UNSPECIFIED -} - -func (x *ElementConstraint) GetSpecified() bool { - if x != nil && x.Specified != nil { - return *x.Specified - } - return false -} - -type SizeConstraint struct { - state protoimpl.MessageState `protogen:"open.v1"` - Min *uint32 `protobuf:"varint,1,opt,name=min,proto3,oneof" json:"min,omitempty"` - Max *uint32 `protobuf:"varint,2,opt,name=max,proto3,oneof" json:"max,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SizeConstraint) Reset() { - *x = SizeConstraint{} - mi := &file_org_signal_chat_require_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SizeConstraint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SizeConstraint) ProtoMessage() {} - -func (x *SizeConstraint) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_require_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SizeConstraint.ProtoReflect.Descriptor instead. -func (*SizeConstraint) Descriptor() ([]byte, []int) { - return file_org_signal_chat_require_proto_rawDescGZIP(), []int{1} -} - -func (x *SizeConstraint) GetMin() uint32 { - if x != nil && x.Min != nil { - return *x.Min - } - return 0 -} - -func (x *SizeConstraint) GetMax() uint32 { - if x != nil && x.Max != nil { - return *x.Max - } - return 0 -} - -type ValueRangeConstraint struct { - state protoimpl.MessageState `protogen:"open.v1"` - Min *int64 `protobuf:"varint,1,opt,name=min,proto3,oneof" json:"min,omitempty"` - Max *int64 `protobuf:"varint,2,opt,name=max,proto3,oneof" json:"max,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ValueRangeConstraint) Reset() { - *x = ValueRangeConstraint{} - mi := &file_org_signal_chat_require_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ValueRangeConstraint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValueRangeConstraint) ProtoMessage() {} - -func (x *ValueRangeConstraint) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_require_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ValueRangeConstraint.ProtoReflect.Descriptor instead. -func (*ValueRangeConstraint) Descriptor() ([]byte, []int) { - return file_org_signal_chat_require_proto_rawDescGZIP(), []int{2} -} - -func (x *ValueRangeConstraint) GetMin() int64 { - if x != nil && x.Min != nil { - return *x.Min - } - return 0 -} - -func (x *ValueRangeConstraint) GetMax() int64 { - if x != nil && x.Max != nil { - return *x.Max - } - return 0 -} - -var file_org_signal_chat_require_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 70001, - Name: "org.signal.chat.require.nonEmpty", - Tag: "varint,70001,opt,name=nonEmpty", - Filename: "org/signal/chat/require.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 70002, - Name: "org.signal.chat.require.specified", - Tag: "varint,70002,opt,name=specified", - Filename: "org/signal/chat/require.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*SizeConstraint)(nil), - Field: 70003, - Name: "org.signal.chat.require.size", - Tag: "bytes,70003,opt,name=size", - Filename: "org/signal/chat/require.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: ([]uint32)(nil), - Field: 70004, - Name: "org.signal.chat.require.exactlySize", - Tag: "varint,70004,rep,packed,name=exactlySize", - Filename: "org/signal/chat/require.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 70005, - Name: "org.signal.chat.require.e164", - Tag: "varint,70005,opt,name=e164", - Filename: "org/signal/chat/require.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*ValueRangeConstraint)(nil), - Field: 70006, - Name: "org.signal.chat.require.range", - Tag: "bytes,70006,opt,name=range", - Filename: "org/signal/chat/require.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 70007, - Name: "org.signal.chat.require.present", - Tag: "varint,70007,opt,name=present", - Filename: "org/signal/chat/require.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 70008, - Name: "org.signal.chat.require.base64url", - Tag: "varint,70008,opt,name=base64url", - Filename: "org/signal/chat/require.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*IdentityType)(nil), - Field: 70009, - Name: "org.signal.chat.require.identityType", - Tag: "varint,70009,opt,name=identityType,enum=org.signal.chat.require.IdentityType", - Filename: "org/signal/chat/require.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*ElementConstraint)(nil), - Field: 70010, - Name: "org.signal.chat.require.each", - Tag: "bytes,70010,opt,name=each", - Filename: "org/signal/chat/require.proto", - }, - { - ExtendedType: (*descriptorpb.ServiceOptions)(nil), - ExtensionType: (*Auth)(nil), - Field: 71001, - Name: "org.signal.chat.require.auth", - Tag: "varint,71001,opt,name=auth,enum=org.signal.chat.require.Auth", - Filename: "org/signal/chat/require.proto", - }, -} - -// Extension fields to descriptorpb.FieldOptions. -var ( - // Requires a field to have content of non-zero size/length. - // Applies to both `optional` and regular fields, i.e. if the field is not set - // or has a default value, it's considered to be empty. This does not apply - // to fields that are contained in a `oneof`. - // - // ``` - // import "org/signal/chat/require.proto"; - // - // message Data { - // string nonEmptyString = 1 [(require.nonEmpty) = true]; - // bytes nonEmptyBytes = 2 [(require.nonEmpty) = true]; - // optional string nonEmptyStringOptional = 3 [(require.nonEmpty) = true]; - // optional bytes nonEmptyBytesOptional = 4 [(require.nonEmpty) = true]; - // repeated string nonEmptyList = 5 [(require.nonEmpty) = true]; - // } - // - // ``` - // - // Applicable to fields of type `string`, `byte`, and `repeated` fields. - // - // optional bool nonEmpty = 70001; - E_NonEmpty = &file_org_signal_chat_require_proto_extTypes[0] - // Requires a enum field to have value with an index greater than zero. - // Applies to both `optional` and regular fields, i.e. if the field is not set or has a default value, - // its index will be <= 0. - // - // ``` - // import "org/signal/chat/require.proto"; - // - // message Data { - // Color color = 1 [(require.specified) = true]; - // } - // - // enum Color { - // COLOR_UNSPECIFIED = 0; - // COLOR_RED = 1; - // COLOR_GREEN = 2; - // COLOR_BLUE = 3; - // } - // - // ``` - // - // optional bool specified = 70002; - E_Specified = &file_org_signal_chat_require_proto_extTypes[1] - // Requires a size/length of a field to be within certain boundaries. - // Applies to both `optional` and regular fields, i.e. if the field is not set - // or has a default value, its size considered to be zero. However, if the - // field is contained in a `oneof` and is not set, this annotation does not - // apply. - // - // ``` - // import "org/signal/chat/require.proto"; - // - // message Data { - // - // string name = 1 [(require.size) = {min: 3, max: 8}]; - // - // optional string address = 2 [(require.size) = {min: 3, max: 8}]; - // } - // - // ``` - // - // Applicable to fields of type `string`, `byte`, and `repeated` fields. - // - // optional org.signal.chat.require.SizeConstraint size = 70003; - E_Size = &file_org_signal_chat_require_proto_extTypes[2] - // Requires a size/length of a field to be within certain boundaries. - // Applies to both `optional` and regular fields, i.e. if the field is not set - // or has a default value, its size considered to be zero. However, if the - // field is contained in a `oneof` and is not set, this annotation does not - // apply. - // - // ``` - // import "org/signal/chat/require.proto"; - // - // message Data { - // - // string zip = 1 [(require.exactlySize) = 5]; - // - // optional string exactlySizeVariants = 2 [(require.exactlySize) = 2, (require.exactlySize) = 4]; - // } - // - // ``` - // - // Applicable to fields of type `string`, `byte`, and `repeated` fields. - // - // repeated uint32 exactlySize = 70004; - E_ExactlySize = &file_org_signal_chat_require_proto_extTypes[3] - // Requires a value of a string field to be a valid E164-normalized phone number. - // If the field is `optional`, this check allows a value to be not set. - // - // ``` - // import "org/signal/chat/require.proto"; - // - // message Data { - // string number = 1 [(require.e164)]; - // } - // ``` - // - // optional bool e164 = 70005; - E_E164 = &file_org_signal_chat_require_proto_extTypes[4] - // Requires an integer value to be within a certain range. The range boundaries are specified - // with the values of type `int32`, which should be enough for all practical purposes. - // - // If the field is `optional`, this check allows a value to be not set. - // - // ``` - // import "org/signal/chat/require.proto"; - // - // message Data { - // int32 byte = 1 [(require.range) = {min: -128, max: 127}]; - // uint32 unsignedByte = 2 [(require.range).max = 255]; - // } - // - // ``` - // - // optional org.signal.chat.require.ValueRangeConstraint range = 70006; - E_Range = &file_org_signal_chat_require_proto_extTypes[5] - // Require a value of a message field to be present. - // - // Applies to both `optional` and regular fields (both of which have explicit - // presence for the message type anyways). This does not apply to fields that - // are contained in a `oneof`. - // - // ``` - // import "org/signal/chat/require.proto"; - // - // message Data { - // message MyMessage {} - // MyMessage myMessage = 1 [(require.present) = true]; - // } - // - // ```` - // - // optional bool present = 70007; - E_Present = &file_org_signal_chat_require_proto_extTypes[6] - // Requires a value of a string field to be a valid base64 URL string. The - // string may be padded or unpadded. If the field is `optional`, this check - // allows a value to be not set. - // - // ``` - // import "org/signal/chat/require.proto"; - // - // message Data { - // string myString = 1 [(require.base64url) = true]; - // } - // ``` - // - // optional bool base64url = 70008; - E_Base64Url = &file_org_signal_chat_require_proto_extTypes[7] - // Requires a common.ServiceIdentifier field to have its IdentityType - // be the given type (`aci` or `pni`). - // - // ``` - // import "org/signal/chat/require.proto"; - // import "org/signal/chat/common.proto"; - // - // message Data { - // common.ServiceIdentifier accountIdentifier = 1 [(require.identityType) = IDENTITY_TYPE_ACI]; - // } - // ``` - // - // optional org.signal.chat.require.IdentityType identityType = 70009; - E_IdentityType = &file_org_signal_chat_require_proto_extTypes[8] - // Applies element-wise constraints to the elements of a `repeated` field. - // Top-level `require.*` annotations on a `repeated` field constrain the - // collection itself (e.g. element count), `each` constrains the - // individual elements. - // - // ``` - // import "org/signal/chat/require.proto"; - // - // message Data { - // // 1-20 username hashes, each exactly 32 bytes - // repeated bytes username_hashes = 1 [ - // (require.size) = {min: 1, max: 20}, - // (require.each) = { exactlySize: 32 } - // ]; - // } - // - // ``` - // - // Applicable only to `repeated` fields. - // - // optional org.signal.chat.require.ElementConstraint each = 70010; - E_Each = &file_org_signal_chat_require_proto_extTypes[9] -) - -// Extension fields to descriptorpb.ServiceOptions. -var ( - // Indicates that all methods in a given service require a certain kind of authentication. - // - // ``` - // import "org/signal/chat/require.proto"; - // - // service AuthService { - // option (require.auth) = AUTH_ONLY_AUTHENTICATED; - // - // rpc AuthenticatedMethod (google.protobuf.Empty) returns (google.protobuf.Empty) {} - // } - // - // ``` - // - // optional org.signal.chat.require.Auth auth = 71001; - E_Auth = &file_org_signal_chat_require_proto_extTypes[10] -) - -var File_org_signal_chat_require_proto protoreflect.FileDescriptor - -const file_org_signal_chat_require_proto_rawDesc = "" + - "\n" + - "\x1dorg/signal/chat/require.proto\x12\x17org.signal.chat.require\x1a google/protobuf/descriptor.proto\"\xe7\x03\n" + - "\x11ElementConstraint\x12\x1f\n" + - "\bnonEmpty\x18\x01 \x01(\bH\x00R\bnonEmpty\x88\x01\x01\x12@\n" + - "\x04size\x18\x02 \x01(\v2'.org.signal.chat.require.SizeConstraintH\x01R\x04size\x88\x01\x01\x12 \n" + - "\vexactlySize\x18\x03 \x03(\rR\vexactlySize\x12\x17\n" + - "\x04e164\x18\x04 \x01(\bH\x02R\x04e164\x88\x01\x01\x12!\n" + - "\tbase64url\x18\x05 \x01(\bH\x03R\tbase64url\x88\x01\x01\x12H\n" + - "\x05range\x18\x06 \x01(\v2-.org.signal.chat.require.ValueRangeConstraintH\x04R\x05range\x88\x01\x01\x12N\n" + - "\fidentityType\x18\a \x01(\x0e2%.org.signal.chat.require.IdentityTypeH\x05R\fidentityType\x88\x01\x01\x12!\n" + - "\tspecified\x18\b \x01(\bH\x06R\tspecified\x88\x01\x01B\v\n" + - "\t_nonEmptyB\a\n" + - "\x05_sizeB\a\n" + - "\x05_e164B\f\n" + - "\n" + - "_base64urlB\b\n" + - "\x06_rangeB\x0f\n" + - "\r_identityTypeB\f\n" + - "\n" + - "_specified\"N\n" + - "\x0eSizeConstraint\x12\x15\n" + - "\x03min\x18\x01 \x01(\rH\x00R\x03min\x88\x01\x01\x12\x15\n" + - "\x03max\x18\x02 \x01(\rH\x01R\x03max\x88\x01\x01B\x06\n" + - "\x04_minB\x06\n" + - "\x04_max\"T\n" + - "\x14ValueRangeConstraint\x12\x15\n" + - "\x03min\x18\x01 \x01(\x03H\x00R\x03min\x88\x01\x01\x12\x15\n" + - "\x03max\x18\x02 \x01(\x03H\x01R\x03max\x88\x01\x01B\x06\n" + - "\x04_minB\x06\n" + - "\x04_max*R\n" + - "\x04Auth\x12\x14\n" + - "\x10AUTH_UNSPECIFIED\x10\x00\x12\x1b\n" + - "\x17AUTH_ONLY_AUTHENTICATED\x10\x01\x12\x17\n" + - "\x13AUTH_ONLY_ANONYMOUS\x10\x02*[\n" + - "\fIdentityType\x12\x1d\n" + - "\x19IDENTITY_TYPE_UNSPECIFIED\x10\x00\x12\x15\n" + - "\x11IDENTITY_TYPE_ACI\x10\x01\x12\x15\n" + - "\x11IDENTITY_TYPE_PNI\x10\x02:>\n" + - "\bnonEmpty\x12\x1d.google.protobuf.FieldOptions\x18\xf1\xa2\x04 \x01(\bR\bnonEmpty\x88\x01\x01:@\n" + - "\tspecified\x12\x1d.google.protobuf.FieldOptions\x18\xf2\xa2\x04 \x01(\bR\tspecified\x88\x01\x01:_\n" + - "\x04size\x12\x1d.google.protobuf.FieldOptions\x18\xf3\xa2\x04 \x01(\v2'.org.signal.chat.require.SizeConstraintR\x04size\x88\x01\x01:A\n" + - "\vexactlySize\x12\x1d.google.protobuf.FieldOptions\x18\xf4\xa2\x04 \x03(\rR\vexactlySize:6\n" + - "\x04e164\x12\x1d.google.protobuf.FieldOptions\x18\xf5\xa2\x04 \x01(\bR\x04e164\x88\x01\x01:g\n" + - "\x05range\x12\x1d.google.protobuf.FieldOptions\x18\xf6\xa2\x04 \x01(\v2-.org.signal.chat.require.ValueRangeConstraintR\x05range\x88\x01\x01:<\n" + - "\apresent\x12\x1d.google.protobuf.FieldOptions\x18\xf7\xa2\x04 \x01(\bR\apresent\x88\x01\x01:@\n" + - "\tbase64url\x12\x1d.google.protobuf.FieldOptions\x18\xf8\xa2\x04 \x01(\bR\tbase64url\x88\x01\x01:m\n" + - "\fidentityType\x12\x1d.google.protobuf.FieldOptions\x18\xf9\xa2\x04 \x01(\x0e2%.org.signal.chat.require.IdentityTypeR\fidentityType\x88\x01\x01:b\n" + - "\x04each\x12\x1d.google.protobuf.FieldOptions\x18\xfa\xa2\x04 \x01(\v2*.org.signal.chat.require.ElementConstraintR\x04each\x88\x01\x01:W\n" + - "\x04auth\x12\x1f.google.protobuf.ServiceOptions\x18Ùª\x04 \x01(\x0e2\x1d.org.signal.chat.require.AuthR\x04auth\x88\x01\x01B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_require_proto_rawDescOnce sync.Once - file_org_signal_chat_require_proto_rawDescData []byte -) - -func file_org_signal_chat_require_proto_rawDescGZIP() []byte { - file_org_signal_chat_require_proto_rawDescOnce.Do(func() { - file_org_signal_chat_require_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_require_proto_rawDesc), len(file_org_signal_chat_require_proto_rawDesc))) - }) - return file_org_signal_chat_require_proto_rawDescData -} - -var file_org_signal_chat_require_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_org_signal_chat_require_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_org_signal_chat_require_proto_goTypes = []any{ - (Auth)(0), // 0: org.signal.chat.require.Auth - (IdentityType)(0), // 1: org.signal.chat.require.IdentityType - (*ElementConstraint)(nil), // 2: org.signal.chat.require.ElementConstraint - (*SizeConstraint)(nil), // 3: org.signal.chat.require.SizeConstraint - (*ValueRangeConstraint)(nil), // 4: org.signal.chat.require.ValueRangeConstraint - (*descriptorpb.FieldOptions)(nil), // 5: google.protobuf.FieldOptions - (*descriptorpb.ServiceOptions)(nil), // 6: google.protobuf.ServiceOptions -} -var file_org_signal_chat_require_proto_depIdxs = []int32{ - 3, // 0: org.signal.chat.require.ElementConstraint.size:type_name -> org.signal.chat.require.SizeConstraint - 4, // 1: org.signal.chat.require.ElementConstraint.range:type_name -> org.signal.chat.require.ValueRangeConstraint - 1, // 2: org.signal.chat.require.ElementConstraint.identityType:type_name -> org.signal.chat.require.IdentityType - 5, // 3: org.signal.chat.require.nonEmpty:extendee -> google.protobuf.FieldOptions - 5, // 4: org.signal.chat.require.specified:extendee -> google.protobuf.FieldOptions - 5, // 5: org.signal.chat.require.size:extendee -> google.protobuf.FieldOptions - 5, // 6: org.signal.chat.require.exactlySize:extendee -> google.protobuf.FieldOptions - 5, // 7: org.signal.chat.require.e164:extendee -> google.protobuf.FieldOptions - 5, // 8: org.signal.chat.require.range:extendee -> google.protobuf.FieldOptions - 5, // 9: org.signal.chat.require.present:extendee -> google.protobuf.FieldOptions - 5, // 10: org.signal.chat.require.base64url:extendee -> google.protobuf.FieldOptions - 5, // 11: org.signal.chat.require.identityType:extendee -> google.protobuf.FieldOptions - 5, // 12: org.signal.chat.require.each:extendee -> google.protobuf.FieldOptions - 6, // 13: org.signal.chat.require.auth:extendee -> google.protobuf.ServiceOptions - 3, // 14: org.signal.chat.require.size:type_name -> org.signal.chat.require.SizeConstraint - 4, // 15: org.signal.chat.require.range:type_name -> org.signal.chat.require.ValueRangeConstraint - 1, // 16: org.signal.chat.require.identityType:type_name -> org.signal.chat.require.IdentityType - 2, // 17: org.signal.chat.require.each:type_name -> org.signal.chat.require.ElementConstraint - 0, // 18: org.signal.chat.require.auth:type_name -> org.signal.chat.require.Auth - 19, // [19:19] is the sub-list for method output_type - 19, // [19:19] is the sub-list for method input_type - 14, // [14:19] is the sub-list for extension type_name - 3, // [3:14] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_require_proto_init() } -func file_org_signal_chat_require_proto_init() { - if File_org_signal_chat_require_proto != nil { - return - } - file_org_signal_chat_require_proto_msgTypes[0].OneofWrappers = []any{} - file_org_signal_chat_require_proto_msgTypes[1].OneofWrappers = []any{} - file_org_signal_chat_require_proto_msgTypes[2].OneofWrappers = []any{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_require_proto_rawDesc), len(file_org_signal_chat_require_proto_rawDesc)), - NumEnums: 2, - NumMessages: 3, - NumExtensions: 11, - NumServices: 0, - }, - GoTypes: file_org_signal_chat_require_proto_goTypes, - DependencyIndexes: file_org_signal_chat_require_proto_depIdxs, - EnumInfos: file_org_signal_chat_require_proto_enumTypes, - MessageInfos: file_org_signal_chat_require_proto_msgTypes, - ExtensionInfos: file_org_signal_chat_require_proto_extTypes, - }.Build() - File_org_signal_chat_require_proto = out.File - file_org_signal_chat_require_proto_goTypes = nil - file_org_signal_chat_require_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions.pb.go b/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions.pb.go deleted file mode 100644 index f39f345..0000000 --- a/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions.pb.go +++ /dev/null @@ -1,3403 +0,0 @@ -// -// Copyright 2026 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/subscriptions.proto - -package subscriptions - -import ( - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common" - errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require" - _ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type PaymentProvider int32 - -const ( - PaymentProvider_PAYMENT_PROVIDER_UNKNOWN PaymentProvider = 0 - PaymentProvider_PAYMENT_PROVIDER_STRIPE PaymentProvider = 1 - PaymentProvider_PAYMENT_PROVIDER_BRAINTREE PaymentProvider = 2 - PaymentProvider_PAYMENT_PROVIDER_GOOGLE_PLAY_BILLING PaymentProvider = 3 - PaymentProvider_PAYMENT_PROVIDER_APPLE_APP_STORE PaymentProvider = 4 -) - -// Enum value maps for PaymentProvider. -var ( - PaymentProvider_name = map[int32]string{ - 0: "PAYMENT_PROVIDER_UNKNOWN", - 1: "PAYMENT_PROVIDER_STRIPE", - 2: "PAYMENT_PROVIDER_BRAINTREE", - 3: "PAYMENT_PROVIDER_GOOGLE_PLAY_BILLING", - 4: "PAYMENT_PROVIDER_APPLE_APP_STORE", - } - PaymentProvider_value = map[string]int32{ - "PAYMENT_PROVIDER_UNKNOWN": 0, - "PAYMENT_PROVIDER_STRIPE": 1, - "PAYMENT_PROVIDER_BRAINTREE": 2, - "PAYMENT_PROVIDER_GOOGLE_PLAY_BILLING": 3, - "PAYMENT_PROVIDER_APPLE_APP_STORE": 4, - } -) - -func (x PaymentProvider) Enum() *PaymentProvider { - p := new(PaymentProvider) - *p = x - return p -} - -func (x PaymentProvider) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PaymentProvider) Descriptor() protoreflect.EnumDescriptor { - return file_org_signal_chat_subscriptions_proto_enumTypes[0].Descriptor() -} - -func (PaymentProvider) Type() protoreflect.EnumType { - return &file_org_signal_chat_subscriptions_proto_enumTypes[0] -} - -func (x PaymentProvider) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PaymentProvider.Descriptor instead. -func (PaymentProvider) EnumDescriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{0} -} - -type PaymentMethod int32 - -const ( - PaymentMethod_PAYMENT_METHOD_UNKNOWN PaymentMethod = 0 - // A credit card or debit card, including those from Apple Pay and Google Pay - PaymentMethod_PAYMENT_METHOD_CARD PaymentMethod = 1 - // A SEPA debit account - PaymentMethod_PAYMENT_METHOD_SEPA_DEBIT PaymentMethod = 2 - // An iDEAL account - PaymentMethod_PAYMENT_METHOD_IDEAL PaymentMethod = 3 - // A PayPal account - PaymentMethod_PAYMENT_METHOD_PAYPAL PaymentMethod = 4 - PaymentMethod_PAYMENT_METHOD_GOOGLE_PLAY_BILLING PaymentMethod = 5 - PaymentMethod_PAYMENT_METHOD_APPLE_APP_STORE PaymentMethod = 6 -) - -// Enum value maps for PaymentMethod. -var ( - PaymentMethod_name = map[int32]string{ - 0: "PAYMENT_METHOD_UNKNOWN", - 1: "PAYMENT_METHOD_CARD", - 2: "PAYMENT_METHOD_SEPA_DEBIT", - 3: "PAYMENT_METHOD_IDEAL", - 4: "PAYMENT_METHOD_PAYPAL", - 5: "PAYMENT_METHOD_GOOGLE_PLAY_BILLING", - 6: "PAYMENT_METHOD_APPLE_APP_STORE", - } - PaymentMethod_value = map[string]int32{ - "PAYMENT_METHOD_UNKNOWN": 0, - "PAYMENT_METHOD_CARD": 1, - "PAYMENT_METHOD_SEPA_DEBIT": 2, - "PAYMENT_METHOD_IDEAL": 3, - "PAYMENT_METHOD_PAYPAL": 4, - "PAYMENT_METHOD_GOOGLE_PLAY_BILLING": 5, - "PAYMENT_METHOD_APPLE_APP_STORE": 6, - } -) - -func (x PaymentMethod) Enum() *PaymentMethod { - p := new(PaymentMethod) - *p = x - return p -} - -func (x PaymentMethod) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PaymentMethod) Descriptor() protoreflect.EnumDescriptor { - return file_org_signal_chat_subscriptions_proto_enumTypes[1].Descriptor() -} - -func (PaymentMethod) Type() protoreflect.EnumType { - return &file_org_signal_chat_subscriptions_proto_enumTypes[1] -} - -func (x PaymentMethod) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PaymentMethod.Descriptor instead. -func (PaymentMethod) EnumDescriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{1} -} - -type SubscriptionStatus int32 - -const ( - SubscriptionStatus_SUBSCRIPTION_STATUS_UNKNOWN SubscriptionStatus = 0 - // The subscription is in good standing and the most recent payment was successful. - SubscriptionStatus_SUBSCRIPTION_STATUS_ACTIVE SubscriptionStatus = 1 - // Payment failed when creating the subscription, or the subscription's start date is in the future. - SubscriptionStatus_SUBSCRIPTION_STATUS_INCOMPLETE SubscriptionStatus = 2 - // Payment on the latest renewal failed but there are processor retries left, or payment wasn't attempted. - SubscriptionStatus_SUBSCRIPTION_STATUS_PAST_DUE SubscriptionStatus = 3 - // The subscription has been canceled. - SubscriptionStatus_SUBSCRIPTION_STATUS_CANCELED SubscriptionStatus = 4 - // The latest renewal hasn't been paid but the subscription remains in place. - SubscriptionStatus_SUBSCRIPTION_STATUS_UNPAID SubscriptionStatus = 5 -) - -// Enum value maps for SubscriptionStatus. -var ( - SubscriptionStatus_name = map[int32]string{ - 0: "SUBSCRIPTION_STATUS_UNKNOWN", - 1: "SUBSCRIPTION_STATUS_ACTIVE", - 2: "SUBSCRIPTION_STATUS_INCOMPLETE", - 3: "SUBSCRIPTION_STATUS_PAST_DUE", - 4: "SUBSCRIPTION_STATUS_CANCELED", - 5: "SUBSCRIPTION_STATUS_UNPAID", - } - SubscriptionStatus_value = map[string]int32{ - "SUBSCRIPTION_STATUS_UNKNOWN": 0, - "SUBSCRIPTION_STATUS_ACTIVE": 1, - "SUBSCRIPTION_STATUS_INCOMPLETE": 2, - "SUBSCRIPTION_STATUS_PAST_DUE": 3, - "SUBSCRIPTION_STATUS_CANCELED": 4, - "SUBSCRIPTION_STATUS_UNPAID": 5, - } -) - -func (x SubscriptionStatus) Enum() *SubscriptionStatus { - p := new(SubscriptionStatus) - *p = x - return p -} - -func (x SubscriptionStatus) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SubscriptionStatus) Descriptor() protoreflect.EnumDescriptor { - return file_org_signal_chat_subscriptions_proto_enumTypes[2].Descriptor() -} - -func (SubscriptionStatus) Type() protoreflect.EnumType { - return &file_org_signal_chat_subscriptions_proto_enumTypes[2] -} - -func (x SubscriptionStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SubscriptionStatus.Descriptor instead. -func (SubscriptionStatus) EnumDescriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{2} -} - -type BankTransferType int32 - -const ( - BankTransferType_BANK_TRANSFER_TYPE_UNKNOWN BankTransferType = 0 - BankTransferType_BANK_TRANSFER_TYPE_SEPA_DEBIT BankTransferType = 1 -) - -// Enum value maps for BankTransferType. -var ( - BankTransferType_name = map[int32]string{ - 0: "BANK_TRANSFER_TYPE_UNKNOWN", - 1: "BANK_TRANSFER_TYPE_SEPA_DEBIT", - } - BankTransferType_value = map[string]int32{ - "BANK_TRANSFER_TYPE_UNKNOWN": 0, - "BANK_TRANSFER_TYPE_SEPA_DEBIT": 1, - } -) - -func (x BankTransferType) Enum() *BankTransferType { - p := new(BankTransferType) - *p = x - return p -} - -func (x BankTransferType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (BankTransferType) Descriptor() protoreflect.EnumDescriptor { - return file_org_signal_chat_subscriptions_proto_enumTypes[3].Descriptor() -} - -func (BankTransferType) Type() protoreflect.EnumType { - return &file_org_signal_chat_subscriptions_proto_enumTypes[3] -} - -func (x BankTransferType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use BankTransferType.Descriptor instead. -func (BankTransferType) EnumDescriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{3} -} - -type UpdateSubscriberRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriber_id,json=subscriberId,proto3" json:"subscriber_id,omitempty"` - // A libsignal DonationPermit from rpc Donations.CreateDonationPermit. - // Not required if the subscriber already exists. - DonationPermit []byte `protobuf:"bytes,2,opt,name=donation_permit,json=donationPermit,proto3" json:"donation_permit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateSubscriberRequest) Reset() { - *x = UpdateSubscriberRequest{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateSubscriberRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateSubscriberRequest) ProtoMessage() {} - -func (x *UpdateSubscriberRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateSubscriberRequest.ProtoReflect.Descriptor instead. -func (*UpdateSubscriberRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{0} -} - -func (x *UpdateSubscriberRequest) GetSubscriberId() []byte { - if x != nil { - return x.SubscriberId - } - return nil -} - -func (x *UpdateSubscriberRequest) GetDonationPermit() []byte { - if x != nil { - return x.DonationPermit - } - return nil -} - -type UpdateSubscriberResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *UpdateSubscriberResponse_Success - // *UpdateSubscriberResponse_SubscriberIdMismatch - // *UpdateSubscriberResponse_PermitRejected - Response isUpdateSubscriberResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UpdateSubscriberResponse) Reset() { - *x = UpdateSubscriberResponse{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UpdateSubscriberResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateSubscriberResponse) ProtoMessage() {} - -func (x *UpdateSubscriberResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateSubscriberResponse.ProtoReflect.Descriptor instead. -func (*UpdateSubscriberResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{1} -} - -func (x *UpdateSubscriberResponse) GetResponse() isUpdateSubscriberResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *UpdateSubscriberResponse) GetSuccess() *emptypb.Empty { - if x != nil { - if x, ok := x.Response.(*UpdateSubscriberResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *UpdateSubscriberResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*UpdateSubscriberResponse_SubscriberIdMismatch); ok { - return x.SubscriberIdMismatch - } - } - return nil -} - -func (x *UpdateSubscriberResponse) GetPermitRejected() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Response.(*UpdateSubscriberResponse_PermitRejected); ok { - return x.PermitRejected - } - } - return nil -} - -type isUpdateSubscriberResponse_Response interface { - isUpdateSubscriberResponse_Response() -} - -type UpdateSubscriberResponse_Success struct { - Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type UpdateSubscriberResponse_SubscriberIdMismatch struct { - // subscriberId authentication failure - SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,2,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` -} - -type UpdateSubscriberResponse_PermitRejected struct { - // The donation permit was expired or already spent - PermitRejected *errors.FailedZkAuthentication `protobuf:"bytes,3,opt,name=permit_rejected,json=permitRejected,proto3,oneof"` -} - -func (*UpdateSubscriberResponse_Success) isUpdateSubscriberResponse_Response() {} - -func (*UpdateSubscriberResponse_SubscriberIdMismatch) isUpdateSubscriberResponse_Response() {} - -func (*UpdateSubscriberResponse_PermitRejected) isUpdateSubscriberResponse_Response() {} - -type DeleteSubscriberRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteSubscriberRequest) Reset() { - *x = DeleteSubscriberRequest{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteSubscriberRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSubscriberRequest) ProtoMessage() {} - -func (x *DeleteSubscriberRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteSubscriberRequest.ProtoReflect.Descriptor instead. -func (*DeleteSubscriberRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{2} -} - -func (x *DeleteSubscriberRequest) GetSubscriberId() []byte { - if x != nil { - return x.SubscriberId - } - return nil -} - -type DeleteSubscriberResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *DeleteSubscriberResponse_Success - // *DeleteSubscriberResponse_SubscriberNotFound - // *DeleteSubscriberResponse_CannotCancelSubscription - Response isDeleteSubscriberResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteSubscriberResponse) Reset() { - *x = DeleteSubscriberResponse{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteSubscriberResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSubscriberResponse) ProtoMessage() {} - -func (x *DeleteSubscriberResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteSubscriberResponse.ProtoReflect.Descriptor instead. -func (*DeleteSubscriberResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{3} -} - -func (x *DeleteSubscriberResponse) GetResponse() isDeleteSubscriberResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *DeleteSubscriberResponse) GetSuccess() *emptypb.Empty { - if x != nil { - if x, ok := x.Response.(*DeleteSubscriberResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *DeleteSubscriberResponse) GetSubscriberNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*DeleteSubscriberResponse_SubscriberNotFound); ok { - return x.SubscriberNotFound - } - } - return nil -} - -func (x *DeleteSubscriberResponse) GetCannotCancelSubscription() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*DeleteSubscriberResponse_CannotCancelSubscription); ok { - return x.CannotCancelSubscription - } - } - return nil -} - -type isDeleteSubscriberResponse_Response interface { - isDeleteSubscriberResponse_Response() -} - -type DeleteSubscriberResponse_Success struct { - Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type DeleteSubscriberResponse_SubscriberNotFound struct { - SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` -} - -type DeleteSubscriberResponse_CannotCancelSubscription struct { - // The associated subscription is not a type that can be cancelled by the server. Cancel client-side, and then retry. - CannotCancelSubscription *errors.FailedPrecondition `protobuf:"bytes,3,opt,name=cannot_cancel_subscription,json=cannotCancelSubscription,proto3,oneof"` -} - -func (*DeleteSubscriberResponse_Success) isDeleteSubscriberResponse_Response() {} - -func (*DeleteSubscriberResponse_SubscriberNotFound) isDeleteSubscriberResponse_Response() {} - -func (*DeleteSubscriberResponse_CannotCancelSubscription) isDeleteSubscriberResponse_Response() {} - -type CreatePaymentMethodRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Only PAYMENT_METHOD_CARD, PAYMENT_METHOD_SEPA_DEBIT, and PAYMENT_METHOD_IDEAL are supported; - // other values will result in an INVALID_ARGUMENT error. - SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriber_id,json=subscriberId,proto3" json:"subscriber_id,omitempty"` - PaymentMethod PaymentMethod `protobuf:"varint,2,opt,name=payment_method,json=paymentMethod,proto3,enum=org.signal.chat.purchase.PaymentMethod" json:"payment_method,omitempty"` - // a libsignal DonationPermit from rpc Donations.CreateDonationPermit - DonationPermit []byte `protobuf:"bytes,3,opt,name=donation_permit,json=donationPermit,proto3" json:"donation_permit,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreatePaymentMethodRequest) Reset() { - *x = CreatePaymentMethodRequest{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreatePaymentMethodRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePaymentMethodRequest) ProtoMessage() {} - -func (x *CreatePaymentMethodRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreatePaymentMethodRequest.ProtoReflect.Descriptor instead. -func (*CreatePaymentMethodRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{4} -} - -func (x *CreatePaymentMethodRequest) GetSubscriberId() []byte { - if x != nil { - return x.SubscriberId - } - return nil -} - -func (x *CreatePaymentMethodRequest) GetPaymentMethod() PaymentMethod { - if x != nil { - return x.PaymentMethod - } - return PaymentMethod_PAYMENT_METHOD_UNKNOWN -} - -func (x *CreatePaymentMethodRequest) GetDonationPermit() []byte { - if x != nil { - return x.DonationPermit - } - return nil -} - -type CreatePaymentMethodResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *CreatePaymentMethodResponse_Result - // *CreatePaymentMethodResponse_SubscriberNotFound - // *CreatePaymentMethodResponse_SubscriberIdMismatch - // *CreatePaymentMethodResponse_SubscriptionProcessorConflict - // *CreatePaymentMethodResponse_PermitRejected - Response isCreatePaymentMethodResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreatePaymentMethodResponse) Reset() { - *x = CreatePaymentMethodResponse{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreatePaymentMethodResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePaymentMethodResponse) ProtoMessage() {} - -func (x *CreatePaymentMethodResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreatePaymentMethodResponse.ProtoReflect.Descriptor instead. -func (*CreatePaymentMethodResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{5} -} - -func (x *CreatePaymentMethodResponse) GetResponse() isCreatePaymentMethodResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *CreatePaymentMethodResponse) GetResult() *CreatePaymentMethodResponse_CreatePaymentMethodResult { - if x != nil { - if x, ok := x.Response.(*CreatePaymentMethodResponse_Result); ok { - return x.Result - } - } - return nil -} - -func (x *CreatePaymentMethodResponse) GetSubscriberNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*CreatePaymentMethodResponse_SubscriberNotFound); ok { - return x.SubscriberNotFound - } - } - return nil -} - -func (x *CreatePaymentMethodResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*CreatePaymentMethodResponse_SubscriberIdMismatch); ok { - return x.SubscriberIdMismatch - } - } - return nil -} - -func (x *CreatePaymentMethodResponse) GetSubscriptionProcessorConflict() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*CreatePaymentMethodResponse_SubscriptionProcessorConflict); ok { - return x.SubscriptionProcessorConflict - } - } - return nil -} - -func (x *CreatePaymentMethodResponse) GetPermitRejected() *errors.FailedZkAuthentication { - if x != nil { - if x, ok := x.Response.(*CreatePaymentMethodResponse_PermitRejected); ok { - return x.PermitRejected - } - } - return nil -} - -type isCreatePaymentMethodResponse_Response interface { - isCreatePaymentMethodResponse_Response() -} - -type CreatePaymentMethodResponse_Result struct { - Result *CreatePaymentMethodResponse_CreatePaymentMethodResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` -} - -type CreatePaymentMethodResponse_SubscriberNotFound struct { - SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` -} - -type CreatePaymentMethodResponse_SubscriberIdMismatch struct { - // subscriberId authentication failure - SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` -} - -type CreatePaymentMethodResponse_SubscriptionProcessorConflict struct { - // New payment processor does not match existing processor associated with the subscription - SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` -} - -type CreatePaymentMethodResponse_PermitRejected struct { - // The donation permit was expired or already spent - PermitRejected *errors.FailedZkAuthentication `protobuf:"bytes,5,opt,name=permit_rejected,json=permitRejected,proto3,oneof"` -} - -func (*CreatePaymentMethodResponse_Result) isCreatePaymentMethodResponse_Response() {} - -func (*CreatePaymentMethodResponse_SubscriberNotFound) isCreatePaymentMethodResponse_Response() {} - -func (*CreatePaymentMethodResponse_SubscriberIdMismatch) isCreatePaymentMethodResponse_Response() {} - -func (*CreatePaymentMethodResponse_SubscriptionProcessorConflict) isCreatePaymentMethodResponse_Response() { -} - -func (*CreatePaymentMethodResponse_PermitRejected) isCreatePaymentMethodResponse_Response() {} - -type CreatePayPalPaymentMethodRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` - // a callback URL (e.g. an in-client URL handler) for when the user approved the payment - ReturnUrl string `protobuf:"bytes,2,opt,name=returnUrl,proto3" json:"returnUrl,omitempty"` - // a callback URL (e.g. an in-client URL handler) for when the user did not approve the payment - CancelUrl string `protobuf:"bytes,3,opt,name=cancelUrl,proto3" json:"cancelUrl,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreatePayPalPaymentMethodRequest) Reset() { - *x = CreatePayPalPaymentMethodRequest{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreatePayPalPaymentMethodRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePayPalPaymentMethodRequest) ProtoMessage() {} - -func (x *CreatePayPalPaymentMethodRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreatePayPalPaymentMethodRequest.ProtoReflect.Descriptor instead. -func (*CreatePayPalPaymentMethodRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{6} -} - -func (x *CreatePayPalPaymentMethodRequest) GetSubscriberId() []byte { - if x != nil { - return x.SubscriberId - } - return nil -} - -func (x *CreatePayPalPaymentMethodRequest) GetReturnUrl() string { - if x != nil { - return x.ReturnUrl - } - return "" -} - -func (x *CreatePayPalPaymentMethodRequest) GetCancelUrl() string { - if x != nil { - return x.CancelUrl - } - return "" -} - -type CreatePayPalPaymentMethodResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *CreatePayPalPaymentMethodResponse_Result - // *CreatePayPalPaymentMethodResponse_SubscriberNotFound - // *CreatePayPalPaymentMethodResponse_SubscriberIdMismatch - // *CreatePayPalPaymentMethodResponse_SubscriptionProcessorConflict - Response isCreatePayPalPaymentMethodResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreatePayPalPaymentMethodResponse) Reset() { - *x = CreatePayPalPaymentMethodResponse{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreatePayPalPaymentMethodResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePayPalPaymentMethodResponse) ProtoMessage() {} - -func (x *CreatePayPalPaymentMethodResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreatePayPalPaymentMethodResponse.ProtoReflect.Descriptor instead. -func (*CreatePayPalPaymentMethodResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{7} -} - -func (x *CreatePayPalPaymentMethodResponse) GetResponse() isCreatePayPalPaymentMethodResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *CreatePayPalPaymentMethodResponse) GetResult() *CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult { - if x != nil { - if x, ok := x.Response.(*CreatePayPalPaymentMethodResponse_Result); ok { - return x.Result - } - } - return nil -} - -func (x *CreatePayPalPaymentMethodResponse) GetSubscriberNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*CreatePayPalPaymentMethodResponse_SubscriberNotFound); ok { - return x.SubscriberNotFound - } - } - return nil -} - -func (x *CreatePayPalPaymentMethodResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*CreatePayPalPaymentMethodResponse_SubscriberIdMismatch); ok { - return x.SubscriberIdMismatch - } - } - return nil -} - -func (x *CreatePayPalPaymentMethodResponse) GetSubscriptionProcessorConflict() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*CreatePayPalPaymentMethodResponse_SubscriptionProcessorConflict); ok { - return x.SubscriptionProcessorConflict - } - } - return nil -} - -type isCreatePayPalPaymentMethodResponse_Response interface { - isCreatePayPalPaymentMethodResponse_Response() -} - -type CreatePayPalPaymentMethodResponse_Result struct { - Result *CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult `protobuf:"bytes,1,opt,name=result,proto3,oneof"` -} - -type CreatePayPalPaymentMethodResponse_SubscriberNotFound struct { - SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` -} - -type CreatePayPalPaymentMethodResponse_SubscriberIdMismatch struct { - // subscriberId authentication failure - SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` -} - -type CreatePayPalPaymentMethodResponse_SubscriptionProcessorConflict struct { - // New payment processor does not match existing processor associated with the subscription - SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` -} - -func (*CreatePayPalPaymentMethodResponse_Result) isCreatePayPalPaymentMethodResponse_Response() {} - -func (*CreatePayPalPaymentMethodResponse_SubscriberNotFound) isCreatePayPalPaymentMethodResponse_Response() { -} - -func (*CreatePayPalPaymentMethodResponse_SubscriberIdMismatch) isCreatePayPalPaymentMethodResponse_Response() { -} - -func (*CreatePayPalPaymentMethodResponse_SubscriptionProcessorConflict) isCreatePayPalPaymentMethodResponse_Response() { -} - -type SetDefaultPaymentMethodRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` - // Types that are valid to be assigned to Request: - // - // *SetDefaultPaymentMethodRequest_Stripe - // *SetDefaultPaymentMethodRequest_Braintree - // *SetDefaultPaymentMethodRequest_Sepa - Request isSetDefaultPaymentMethodRequest_Request `protobuf_oneof:"request"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetDefaultPaymentMethodRequest) Reset() { - *x = SetDefaultPaymentMethodRequest{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetDefaultPaymentMethodRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetDefaultPaymentMethodRequest) ProtoMessage() {} - -func (x *SetDefaultPaymentMethodRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetDefaultPaymentMethodRequest.ProtoReflect.Descriptor instead. -func (*SetDefaultPaymentMethodRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{8} -} - -func (x *SetDefaultPaymentMethodRequest) GetSubscriberId() []byte { - if x != nil { - return x.SubscriberId - } - return nil -} - -func (x *SetDefaultPaymentMethodRequest) GetRequest() isSetDefaultPaymentMethodRequest_Request { - if x != nil { - return x.Request - } - return nil -} - -func (x *SetDefaultPaymentMethodRequest) GetStripe() *SetDefaultPaymentMethodRequest_StripePaymentMethod { - if x != nil { - if x, ok := x.Request.(*SetDefaultPaymentMethodRequest_Stripe); ok { - return x.Stripe - } - } - return nil -} - -func (x *SetDefaultPaymentMethodRequest) GetBraintree() *SetDefaultPaymentMethodRequest_BraintreePaymentMethod { - if x != nil { - if x, ok := x.Request.(*SetDefaultPaymentMethodRequest_Braintree); ok { - return x.Braintree - } - } - return nil -} - -func (x *SetDefaultPaymentMethodRequest) GetSepa() *SetDefaultPaymentMethodRequest_SepaPaymentMethod { - if x != nil { - if x, ok := x.Request.(*SetDefaultPaymentMethodRequest_Sepa); ok { - return x.Sepa - } - } - return nil -} - -type isSetDefaultPaymentMethodRequest_Request interface { - isSetDefaultPaymentMethodRequest_Request() -} - -type SetDefaultPaymentMethodRequest_Stripe struct { - Stripe *SetDefaultPaymentMethodRequest_StripePaymentMethod `protobuf:"bytes,2,opt,name=stripe,proto3,oneof"` -} - -type SetDefaultPaymentMethodRequest_Braintree struct { - Braintree *SetDefaultPaymentMethodRequest_BraintreePaymentMethod `protobuf:"bytes,3,opt,name=braintree,proto3,oneof"` -} - -type SetDefaultPaymentMethodRequest_Sepa struct { - Sepa *SetDefaultPaymentMethodRequest_SepaPaymentMethod `protobuf:"bytes,4,opt,name=sepa,proto3,oneof"` -} - -func (*SetDefaultPaymentMethodRequest_Stripe) isSetDefaultPaymentMethodRequest_Request() {} - -func (*SetDefaultPaymentMethodRequest_Braintree) isSetDefaultPaymentMethodRequest_Request() {} - -func (*SetDefaultPaymentMethodRequest_Sepa) isSetDefaultPaymentMethodRequest_Request() {} - -type SetDefaultPaymentMethodResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *SetDefaultPaymentMethodResponse_Success - // *SetDefaultPaymentMethodResponse_SubscriberNotFound - // *SetDefaultPaymentMethodResponse_SubscriberIdMismatch - // *SetDefaultPaymentMethodResponse_PaymentMethodNotSetUp - // *SetDefaultPaymentMethodResponse_SubscriptionProcessorConflict - Response isSetDefaultPaymentMethodResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetDefaultPaymentMethodResponse) Reset() { - *x = SetDefaultPaymentMethodResponse{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetDefaultPaymentMethodResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetDefaultPaymentMethodResponse) ProtoMessage() {} - -func (x *SetDefaultPaymentMethodResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetDefaultPaymentMethodResponse.ProtoReflect.Descriptor instead. -func (*SetDefaultPaymentMethodResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{9} -} - -func (x *SetDefaultPaymentMethodResponse) GetResponse() isSetDefaultPaymentMethodResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *SetDefaultPaymentMethodResponse) GetSuccess() *emptypb.Empty { - if x != nil { - if x, ok := x.Response.(*SetDefaultPaymentMethodResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *SetDefaultPaymentMethodResponse) GetSubscriberNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*SetDefaultPaymentMethodResponse_SubscriberNotFound); ok { - return x.SubscriberNotFound - } - } - return nil -} - -func (x *SetDefaultPaymentMethodResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*SetDefaultPaymentMethodResponse_SubscriberIdMismatch); ok { - return x.SubscriberIdMismatch - } - } - return nil -} - -func (x *SetDefaultPaymentMethodResponse) GetPaymentMethodNotSetUp() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetDefaultPaymentMethodResponse_PaymentMethodNotSetUp); ok { - return x.PaymentMethodNotSetUp - } - } - return nil -} - -func (x *SetDefaultPaymentMethodResponse) GetSubscriptionProcessorConflict() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetDefaultPaymentMethodResponse_SubscriptionProcessorConflict); ok { - return x.SubscriptionProcessorConflict - } - } - return nil -} - -type isSetDefaultPaymentMethodResponse_Response interface { - isSetDefaultPaymentMethodResponse_Response() -} - -type SetDefaultPaymentMethodResponse_Success struct { - Success *emptypb.Empty `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type SetDefaultPaymentMethodResponse_SubscriberNotFound struct { - SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` -} - -type SetDefaultPaymentMethodResponse_SubscriberIdMismatch struct { - // subscriberId authentication failure - SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` -} - -type SetDefaultPaymentMethodResponse_PaymentMethodNotSetUp struct { - PaymentMethodNotSetUp *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=payment_method_not_set_up,json=paymentMethodNotSetUp,proto3,oneof"` -} - -type SetDefaultPaymentMethodResponse_SubscriptionProcessorConflict struct { - // Payment processor does not match existing processor associated with the subscription - SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` -} - -func (*SetDefaultPaymentMethodResponse_Success) isSetDefaultPaymentMethodResponse_Response() {} - -func (*SetDefaultPaymentMethodResponse_SubscriberNotFound) isSetDefaultPaymentMethodResponse_Response() { -} - -func (*SetDefaultPaymentMethodResponse_SubscriberIdMismatch) isSetDefaultPaymentMethodResponse_Response() { -} - -func (*SetDefaultPaymentMethodResponse_PaymentMethodNotSetUp) isSetDefaultPaymentMethodResponse_Response() { -} - -func (*SetDefaultPaymentMethodResponse_SubscriptionProcessorConflict) isSetDefaultPaymentMethodResponse_Response() { -} - -type SetSubscriptionLevelRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` - Level uint64 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"` - Currency string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"` - IdempotencyKey string `protobuf:"bytes,4,opt,name=idempotencyKey,proto3" json:"idempotencyKey,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetSubscriptionLevelRequest) Reset() { - *x = SetSubscriptionLevelRequest{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetSubscriptionLevelRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetSubscriptionLevelRequest) ProtoMessage() {} - -func (x *SetSubscriptionLevelRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetSubscriptionLevelRequest.ProtoReflect.Descriptor instead. -func (*SetSubscriptionLevelRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{10} -} - -func (x *SetSubscriptionLevelRequest) GetSubscriberId() []byte { - if x != nil { - return x.SubscriberId - } - return nil -} - -func (x *SetSubscriptionLevelRequest) GetLevel() uint64 { - if x != nil { - return x.Level - } - return 0 -} - -func (x *SetSubscriptionLevelRequest) GetCurrency() string { - if x != nil { - return x.Currency - } - return "" -} - -func (x *SetSubscriptionLevelRequest) GetIdempotencyKey() string { - if x != nil { - return x.IdempotencyKey - } - return "" -} - -// Meaningfully interpreting chargeFailure response fields requires inspecting the processor field first. -// -// For Stripe, code will be one of the [codes defined here](https://stripe.com/docs/api/charges/object#charge_object-failure_code), -// while message [may contain a further textual description](https://stripe.com/docs/api/charges/object#charge_object-failure_message). -// The outcome fields are optional, but present values will directly map to Stripe [response properties](https://stripe.com/docs/api/charges/object#charge_object-outcome-network_status) -// -// For Braintree, the outcome fields will be null. The code and message will contain one of -// - a processor decline code (as a string) in code, and associated text in message, as defined this [table](https://developer.paypal.com/braintree/docs/reference/general/processor-responses/authorization-responses) -// - `gateway` in code, with a [reason](https://developer.paypal.com/braintree/articles/control-panel/transactions/gateway-rejections) in message -// - `code` = "unknown", message = "unknown" -// -// IAP payment processors will never include charge failure information, and detailed order information should be -// retrieved from the payment processor directly -type ChargeFailure struct { - state protoimpl.MessageState `protogen:"open.v1"` - Processor PaymentProvider `protobuf:"varint,1,opt,name=processor,proto3,enum=org.signal.chat.purchase.PaymentProvider" json:"processor,omitempty"` - // See [Stripe failure codes](https://stripe.com/docs/api/charges/object#charge_object-failure_code) or - // [Braintree decline codes](https://developer.paypal.com/braintree/docs/reference/general/processor-responses/authorization-responses#decline-codes) - // depending on which processor was used - Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` - // See [Stripe failure codes](https://stripe.com/docs/api/charges/object#charge_object-failure_code) or - // [Braintree decline codes](https://developer.paypal.com/braintree/docs/reference/general/processor-responses/authorization-responses#decline-codes) - // depending on which processor was used - Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` - // See [Outcome Network Status](https://stripe.com/docs/api/charges/object#charge_object-outcome-network_status) - OutcomeNetworkStatus *string `protobuf:"bytes,4,opt,name=outcome_network_status,json=outcomeNetworkStatus,proto3,oneof" json:"outcome_network_status,omitempty"` - // See [Outcome Reason](https://stripe.com/docs/api/charges/object#charge_object-outcome-reason) - OutcomeReason *string `protobuf:"bytes,5,opt,name=outcome_reason,json=outcomeReason,proto3,oneof" json:"outcome_reason,omitempty"` - // See [Outcome Type](https://stripe.com/docs/api/charges/object#charge_object-outcome-type) - OutcomeType *string `protobuf:"bytes,6,opt,name=outcome_type,json=outcomeType,proto3,oneof" json:"outcome_type,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ChargeFailure) Reset() { - *x = ChargeFailure{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ChargeFailure) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChargeFailure) ProtoMessage() {} - -func (x *ChargeFailure) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChargeFailure.ProtoReflect.Descriptor instead. -func (*ChargeFailure) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{11} -} - -func (x *ChargeFailure) GetProcessor() PaymentProvider { - if x != nil { - return x.Processor - } - return PaymentProvider_PAYMENT_PROVIDER_UNKNOWN -} - -func (x *ChargeFailure) GetCode() string { - if x != nil { - return x.Code - } - return "" -} - -func (x *ChargeFailure) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *ChargeFailure) GetOutcomeNetworkStatus() string { - if x != nil && x.OutcomeNetworkStatus != nil { - return *x.OutcomeNetworkStatus - } - return "" -} - -func (x *ChargeFailure) GetOutcomeReason() string { - if x != nil && x.OutcomeReason != nil { - return *x.OutcomeReason - } - return "" -} - -func (x *ChargeFailure) GetOutcomeType() string { - if x != nil && x.OutcomeType != nil { - return *x.OutcomeType - } - return "" -} - -type PaymentRequired struct { - state protoimpl.MessageState `protogen:"open.v1"` - ChargeFailure *ChargeFailure `protobuf:"bytes,1,opt,name=charge_failure,json=chargeFailure,proto3,oneof" json:"charge_failure,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PaymentRequired) Reset() { - *x = PaymentRequired{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PaymentRequired) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PaymentRequired) ProtoMessage() {} - -func (x *PaymentRequired) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PaymentRequired.ProtoReflect.Descriptor instead. -func (*PaymentRequired) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{12} -} - -func (x *PaymentRequired) GetChargeFailure() *ChargeFailure { - if x != nil { - return x.ChargeFailure - } - return nil -} - -type SetSubscriptionLevelResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *SetSubscriptionLevelResponse_Success - // *SetSubscriptionLevelResponse_SubscriberNotFound - // *SetSubscriptionLevelResponse_SubscriberIdMismatch - // *SetSubscriptionLevelResponse_SubscriptionProcessorConflict - // *SetSubscriptionLevelResponse_PaymentMethodNotSetUp - // *SetSubscriptionLevelResponse_UnsupportedOperation - // *SetSubscriptionLevelResponse_UnsupportedLevel - // *SetSubscriptionLevelResponse_UnsupportedCurrency - // *SetSubscriptionLevelResponse_PaymentRequiresAction - // *SetSubscriptionLevelResponse_InvalidLevelTransition - // *SetSubscriptionLevelResponse_InvalidIdempotencyKey - // *SetSubscriptionLevelResponse_ChargeFailure - Response isSetSubscriptionLevelResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetSubscriptionLevelResponse) Reset() { - *x = SetSubscriptionLevelResponse{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetSubscriptionLevelResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetSubscriptionLevelResponse) ProtoMessage() {} - -func (x *SetSubscriptionLevelResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetSubscriptionLevelResponse.ProtoReflect.Descriptor instead. -func (*SetSubscriptionLevelResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{13} -} - -func (x *SetSubscriptionLevelResponse) GetResponse() isSetSubscriptionLevelResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *SetSubscriptionLevelResponse) GetSuccess() *SetSubscriptionLevelResponse_SetSubscriptionLevelResult { - if x != nil { - if x, ok := x.Response.(*SetSubscriptionLevelResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *SetSubscriptionLevelResponse) GetSubscriberNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*SetSubscriptionLevelResponse_SubscriberNotFound); ok { - return x.SubscriberNotFound - } - } - return nil -} - -func (x *SetSubscriptionLevelResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*SetSubscriptionLevelResponse_SubscriberIdMismatch); ok { - return x.SubscriberIdMismatch - } - } - return nil -} - -func (x *SetSubscriptionLevelResponse) GetSubscriptionProcessorConflict() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetSubscriptionLevelResponse_SubscriptionProcessorConflict); ok { - return x.SubscriptionProcessorConflict - } - } - return nil -} - -func (x *SetSubscriptionLevelResponse) GetPaymentMethodNotSetUp() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetSubscriptionLevelResponse_PaymentMethodNotSetUp); ok { - return x.PaymentMethodNotSetUp - } - } - return nil -} - -func (x *SetSubscriptionLevelResponse) GetUnsupportedOperation() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetSubscriptionLevelResponse_UnsupportedOperation); ok { - return x.UnsupportedOperation - } - } - return nil -} - -func (x *SetSubscriptionLevelResponse) GetUnsupportedLevel() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetSubscriptionLevelResponse_UnsupportedLevel); ok { - return x.UnsupportedLevel - } - } - return nil -} - -func (x *SetSubscriptionLevelResponse) GetUnsupportedCurrency() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetSubscriptionLevelResponse_UnsupportedCurrency); ok { - return x.UnsupportedCurrency - } - } - return nil -} - -func (x *SetSubscriptionLevelResponse) GetPaymentRequiresAction() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetSubscriptionLevelResponse_PaymentRequiresAction); ok { - return x.PaymentRequiresAction - } - } - return nil -} - -func (x *SetSubscriptionLevelResponse) GetInvalidLevelTransition() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetSubscriptionLevelResponse_InvalidLevelTransition); ok { - return x.InvalidLevelTransition - } - } - return nil -} - -func (x *SetSubscriptionLevelResponse) GetInvalidIdempotencyKey() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetSubscriptionLevelResponse_InvalidIdempotencyKey); ok { - return x.InvalidIdempotencyKey - } - } - return nil -} - -func (x *SetSubscriptionLevelResponse) GetChargeFailure() *ChargeFailure { - if x != nil { - if x, ok := x.Response.(*SetSubscriptionLevelResponse_ChargeFailure); ok { - return x.ChargeFailure - } - } - return nil -} - -type isSetSubscriptionLevelResponse_Response interface { - isSetSubscriptionLevelResponse_Response() -} - -type SetSubscriptionLevelResponse_Success struct { - Success *SetSubscriptionLevelResponse_SetSubscriptionLevelResult `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type SetSubscriptionLevelResponse_SubscriberNotFound struct { - SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` -} - -type SetSubscriptionLevelResponse_SubscriberIdMismatch struct { - // subscriberId authentication failure - SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` -} - -type SetSubscriptionLevelResponse_SubscriptionProcessorConflict struct { - // New payment processor does not match existing processor associated with the subscription - SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` -} - -type SetSubscriptionLevelResponse_PaymentMethodNotSetUp struct { - PaymentMethodNotSetUp *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=payment_method_not_set_up,json=paymentMethodNotSetUp,proto3,oneof"` -} - -type SetSubscriptionLevelResponse_UnsupportedOperation struct { - // The payment processor does not support this operation - UnsupportedOperation *errors.FailedPrecondition `protobuf:"bytes,6,opt,name=unsupported_operation,json=unsupportedOperation,proto3,oneof"` -} - -type SetSubscriptionLevelResponse_UnsupportedLevel struct { - // The requested level was invalid - UnsupportedLevel *errors.FailedPrecondition `protobuf:"bytes,7,opt,name=unsupported_level,json=unsupportedLevel,proto3,oneof"` -} - -type SetSubscriptionLevelResponse_UnsupportedCurrency struct { - // The requested currency was invalid - UnsupportedCurrency *errors.FailedPrecondition `protobuf:"bytes,8,opt,name=unsupported_currency,json=unsupportedCurrency,proto3,oneof"` -} - -type SetSubscriptionLevelResponse_PaymentRequiresAction struct { - // The card could not be charged - PaymentRequiresAction *errors.FailedPrecondition `protobuf:"bytes,9,opt,name=payment_requires_action,json=paymentRequiresAction,proto3,oneof"` -} - -type SetSubscriptionLevelResponse_InvalidLevelTransition struct { - // Cannot transition from existing level to the requested level - InvalidLevelTransition *errors.FailedPrecondition `protobuf:"bytes,10,opt,name=invalid_level_transition,json=invalidLevelTransition,proto3,oneof"` -} - -type SetSubscriptionLevelResponse_InvalidIdempotencyKey struct { - // The idempotency key was invalid or re-used with a modified request - InvalidIdempotencyKey *errors.FailedPrecondition `protobuf:"bytes,11,opt,name=invalid_idempotency_key,json=invalidIdempotencyKey,proto3,oneof"` -} - -type SetSubscriptionLevelResponse_ChargeFailure struct { - // The payment failed; see charge failure details - ChargeFailure *ChargeFailure `protobuf:"bytes,12,opt,name=charge_failure,json=chargeFailure,proto3,oneof"` -} - -func (*SetSubscriptionLevelResponse_Success) isSetSubscriptionLevelResponse_Response() {} - -func (*SetSubscriptionLevelResponse_SubscriberNotFound) isSetSubscriptionLevelResponse_Response() {} - -func (*SetSubscriptionLevelResponse_SubscriberIdMismatch) isSetSubscriptionLevelResponse_Response() {} - -func (*SetSubscriptionLevelResponse_SubscriptionProcessorConflict) isSetSubscriptionLevelResponse_Response() { -} - -func (*SetSubscriptionLevelResponse_PaymentMethodNotSetUp) isSetSubscriptionLevelResponse_Response() { -} - -func (*SetSubscriptionLevelResponse_UnsupportedOperation) isSetSubscriptionLevelResponse_Response() {} - -func (*SetSubscriptionLevelResponse_UnsupportedLevel) isSetSubscriptionLevelResponse_Response() {} - -func (*SetSubscriptionLevelResponse_UnsupportedCurrency) isSetSubscriptionLevelResponse_Response() {} - -func (*SetSubscriptionLevelResponse_PaymentRequiresAction) isSetSubscriptionLevelResponse_Response() { -} - -func (*SetSubscriptionLevelResponse_InvalidLevelTransition) isSetSubscriptionLevelResponse_Response() { -} - -func (*SetSubscriptionLevelResponse_InvalidIdempotencyKey) isSetSubscriptionLevelResponse_Response() { -} - -func (*SetSubscriptionLevelResponse_ChargeFailure) isSetSubscriptionLevelResponse_Response() {} - -type SetIapSubscriptionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` - // Types that are valid to be assigned to Request: - // - // *SetIapSubscriptionRequest_AppStore - // *SetIapSubscriptionRequest_PlayBilling - Request isSetIapSubscriptionRequest_Request `protobuf_oneof:"request"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetIapSubscriptionRequest) Reset() { - *x = SetIapSubscriptionRequest{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetIapSubscriptionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetIapSubscriptionRequest) ProtoMessage() {} - -func (x *SetIapSubscriptionRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetIapSubscriptionRequest.ProtoReflect.Descriptor instead. -func (*SetIapSubscriptionRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{14} -} - -func (x *SetIapSubscriptionRequest) GetSubscriberId() []byte { - if x != nil { - return x.SubscriberId - } - return nil -} - -func (x *SetIapSubscriptionRequest) GetRequest() isSetIapSubscriptionRequest_Request { - if x != nil { - return x.Request - } - return nil -} - -func (x *SetIapSubscriptionRequest) GetAppStore() *SetIapSubscriptionRequest_AppStorePurchase { - if x != nil { - if x, ok := x.Request.(*SetIapSubscriptionRequest_AppStore); ok { - return x.AppStore - } - } - return nil -} - -func (x *SetIapSubscriptionRequest) GetPlayBilling() *SetIapSubscriptionRequest_PlayBillingPurchase { - if x != nil { - if x, ok := x.Request.(*SetIapSubscriptionRequest_PlayBilling); ok { - return x.PlayBilling - } - } - return nil -} - -type isSetIapSubscriptionRequest_Request interface { - isSetIapSubscriptionRequest_Request() -} - -type SetIapSubscriptionRequest_AppStore struct { - AppStore *SetIapSubscriptionRequest_AppStorePurchase `protobuf:"bytes,2,opt,name=app_store,json=appStore,proto3,oneof"` -} - -type SetIapSubscriptionRequest_PlayBilling struct { - PlayBilling *SetIapSubscriptionRequest_PlayBillingPurchase `protobuf:"bytes,3,opt,name=play_billing,json=playBilling,proto3,oneof"` -} - -func (*SetIapSubscriptionRequest_AppStore) isSetIapSubscriptionRequest_Request() {} - -func (*SetIapSubscriptionRequest_PlayBilling) isSetIapSubscriptionRequest_Request() {} - -type SetIapSubscriptionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *SetIapSubscriptionResponse_Success - // *SetIapSubscriptionResponse_SubscriberNotFound - // *SetIapSubscriptionResponse_SubscriberIdMismatch - // *SetIapSubscriptionResponse_SubscriptionProcessorConflict - // *SetIapSubscriptionResponse_PaymentRequired - // *SetIapSubscriptionResponse_InvalidTransaction - Response isSetIapSubscriptionResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetIapSubscriptionResponse) Reset() { - *x = SetIapSubscriptionResponse{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetIapSubscriptionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetIapSubscriptionResponse) ProtoMessage() {} - -func (x *SetIapSubscriptionResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[15] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetIapSubscriptionResponse.ProtoReflect.Descriptor instead. -func (*SetIapSubscriptionResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{15} -} - -func (x *SetIapSubscriptionResponse) GetResponse() isSetIapSubscriptionResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *SetIapSubscriptionResponse) GetSuccess() *SetIapSubscriptionResponse_SetIapSubscriptionResult { - if x != nil { - if x, ok := x.Response.(*SetIapSubscriptionResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *SetIapSubscriptionResponse) GetSubscriberNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*SetIapSubscriptionResponse_SubscriberNotFound); ok { - return x.SubscriberNotFound - } - } - return nil -} - -func (x *SetIapSubscriptionResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*SetIapSubscriptionResponse_SubscriberIdMismatch); ok { - return x.SubscriberIdMismatch - } - } - return nil -} - -func (x *SetIapSubscriptionResponse) GetSubscriptionProcessorConflict() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetIapSubscriptionResponse_SubscriptionProcessorConflict); ok { - return x.SubscriptionProcessorConflict - } - } - return nil -} - -func (x *SetIapSubscriptionResponse) GetPaymentRequired() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetIapSubscriptionResponse_PaymentRequired); ok { - return x.PaymentRequired - } - } - return nil -} - -func (x *SetIapSubscriptionResponse) GetInvalidTransaction() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*SetIapSubscriptionResponse_InvalidTransaction); ok { - return x.InvalidTransaction - } - } - return nil -} - -type isSetIapSubscriptionResponse_Response interface { - isSetIapSubscriptionResponse_Response() -} - -type SetIapSubscriptionResponse_Success struct { - Success *SetIapSubscriptionResponse_SetIapSubscriptionResult `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type SetIapSubscriptionResponse_SubscriberNotFound struct { - SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` -} - -type SetIapSubscriptionResponse_SubscriberIdMismatch struct { - // subscriberId authentication failure - SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` -} - -type SetIapSubscriptionResponse_SubscriptionProcessorConflict struct { - // New payment processor does not match existing processor associated with the subscription - SubscriptionProcessorConflict *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=subscription_processor_conflict,json=subscriptionProcessorConflict,proto3,oneof"` -} - -type SetIapSubscriptionResponse_PaymentRequired struct { - PaymentRequired *errors.FailedPrecondition `protobuf:"bytes,5,opt,name=payment_required,json=paymentRequired,proto3,oneof"` -} - -type SetIapSubscriptionResponse_InvalidTransaction struct { - InvalidTransaction *errors.FailedPrecondition `protobuf:"bytes,6,opt,name=invalid_transaction,json=invalidTransaction,proto3,oneof"` -} - -func (*SetIapSubscriptionResponse_Success) isSetIapSubscriptionResponse_Response() {} - -func (*SetIapSubscriptionResponse_SubscriberNotFound) isSetIapSubscriptionResponse_Response() {} - -func (*SetIapSubscriptionResponse_SubscriberIdMismatch) isSetIapSubscriptionResponse_Response() {} - -func (*SetIapSubscriptionResponse_SubscriptionProcessorConflict) isSetIapSubscriptionResponse_Response() { -} - -func (*SetIapSubscriptionResponse_PaymentRequired) isSetIapSubscriptionResponse_Response() {} - -func (*SetIapSubscriptionResponse_InvalidTransaction) isSetIapSubscriptionResponse_Response() {} - -type GetReceiptCredentialsRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` - ReceiptCredentialRequest []byte `protobuf:"bytes,2,opt,name=receiptCredentialRequest,proto3" json:"receiptCredentialRequest,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetReceiptCredentialsRequest) Reset() { - *x = GetReceiptCredentialsRequest{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetReceiptCredentialsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetReceiptCredentialsRequest) ProtoMessage() {} - -func (x *GetReceiptCredentialsRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[16] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetReceiptCredentialsRequest.ProtoReflect.Descriptor instead. -func (*GetReceiptCredentialsRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{16} -} - -func (x *GetReceiptCredentialsRequest) GetSubscriberId() []byte { - if x != nil { - return x.SubscriberId - } - return nil -} - -func (x *GetReceiptCredentialsRequest) GetReceiptCredentialRequest() []byte { - if x != nil { - return x.ReceiptCredentialRequest - } - return nil -} - -type GetReceiptCredentialsResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetReceiptCredentialsResponse_Success - // *GetReceiptCredentialsResponse_SubscriberNotFound - // *GetReceiptCredentialsResponse_SubscriberIdMismatch - // *GetReceiptCredentialsResponse_NoPaidInvoice - // *GetReceiptCredentialsResponse_PaymentRequired - // *GetReceiptCredentialsResponse_AlreadyRedeemed - Response isGetReceiptCredentialsResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetReceiptCredentialsResponse) Reset() { - *x = GetReceiptCredentialsResponse{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetReceiptCredentialsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetReceiptCredentialsResponse) ProtoMessage() {} - -func (x *GetReceiptCredentialsResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[17] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetReceiptCredentialsResponse.ProtoReflect.Descriptor instead. -func (*GetReceiptCredentialsResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{17} -} - -func (x *GetReceiptCredentialsResponse) GetResponse() isGetReceiptCredentialsResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetReceiptCredentialsResponse) GetSuccess() *GetReceiptCredentialsResponse_GetReceiptCredentialsResult { - if x != nil { - if x, ok := x.Response.(*GetReceiptCredentialsResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *GetReceiptCredentialsResponse) GetSubscriberNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*GetReceiptCredentialsResponse_SubscriberNotFound); ok { - return x.SubscriberNotFound - } - } - return nil -} - -func (x *GetReceiptCredentialsResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*GetReceiptCredentialsResponse_SubscriberIdMismatch); ok { - return x.SubscriberIdMismatch - } - } - return nil -} - -func (x *GetReceiptCredentialsResponse) GetNoPaidInvoice() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*GetReceiptCredentialsResponse_NoPaidInvoice); ok { - return x.NoPaidInvoice - } - } - return nil -} - -func (x *GetReceiptCredentialsResponse) GetPaymentRequired() *PaymentRequired { - if x != nil { - if x, ok := x.Response.(*GetReceiptCredentialsResponse_PaymentRequired); ok { - return x.PaymentRequired - } - } - return nil -} - -func (x *GetReceiptCredentialsResponse) GetAlreadyRedeemed() *errors.FailedPrecondition { - if x != nil { - if x, ok := x.Response.(*GetReceiptCredentialsResponse_AlreadyRedeemed); ok { - return x.AlreadyRedeemed - } - } - return nil -} - -type isGetReceiptCredentialsResponse_Response interface { - isGetReceiptCredentialsResponse_Response() -} - -type GetReceiptCredentialsResponse_Success struct { - Success *GetReceiptCredentialsResponse_GetReceiptCredentialsResult `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type GetReceiptCredentialsResponse_SubscriberNotFound struct { - SubscriberNotFound *errors.NotFound `protobuf:"bytes,2,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` -} - -type GetReceiptCredentialsResponse_SubscriberIdMismatch struct { - // subscriberId authentication failure - SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,3,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` -} - -type GetReceiptCredentialsResponse_NoPaidInvoice struct { - // No invoice has been issued for this subscription OR invoice is in 'draft' or 'open' state - NoPaidInvoice *errors.FailedPrecondition `protobuf:"bytes,4,opt,name=no_paid_invoice,json=noPaidInvoice,proto3,oneof"` -} - -type GetReceiptCredentialsResponse_PaymentRequired struct { - // Invoice is in any state other than 'draft', 'open', or 'paid'; Charge failure details may be present - PaymentRequired *PaymentRequired `protobuf:"bytes,5,opt,name=payment_required,json=paymentRequired,proto3,oneof"` -} - -type GetReceiptCredentialsResponse_AlreadyRedeemed struct { - // Latest paid receipt on subscription was already redeemed for a receipt credential but with a different GetReceiptCredentialRequest - AlreadyRedeemed *errors.FailedPrecondition `protobuf:"bytes,6,opt,name=already_redeemed,json=alreadyRedeemed,proto3,oneof"` -} - -func (*GetReceiptCredentialsResponse_Success) isGetReceiptCredentialsResponse_Response() {} - -func (*GetReceiptCredentialsResponse_SubscriberNotFound) isGetReceiptCredentialsResponse_Response() {} - -func (*GetReceiptCredentialsResponse_SubscriberIdMismatch) isGetReceiptCredentialsResponse_Response() { -} - -func (*GetReceiptCredentialsResponse_NoPaidInvoice) isGetReceiptCredentialsResponse_Response() {} - -func (*GetReceiptCredentialsResponse_PaymentRequired) isGetReceiptCredentialsResponse_Response() {} - -func (*GetReceiptCredentialsResponse_AlreadyRedeemed) isGetReceiptCredentialsResponse_Response() {} - -type GetSubscriptionInformationRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - SubscriberId []byte `protobuf:"bytes,1,opt,name=subscriberId,proto3" json:"subscriberId,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetSubscriptionInformationRequest) Reset() { - *x = GetSubscriptionInformationRequest{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetSubscriptionInformationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSubscriptionInformationRequest) ProtoMessage() {} - -func (x *GetSubscriptionInformationRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[18] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSubscriptionInformationRequest.ProtoReflect.Descriptor instead. -func (*GetSubscriptionInformationRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{18} -} - -func (x *GetSubscriptionInformationRequest) GetSubscriberId() []byte { - if x != nil { - return x.SubscriberId - } - return nil -} - -type GetSubscriptionInformationResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Response: - // - // *GetSubscriptionInformationResponse_Success - // *GetSubscriptionInformationResponse_NoSubscription - // *GetSubscriptionInformationResponse_SubscriberNotFound - // *GetSubscriptionInformationResponse_SubscriberIdMismatch - Response isGetSubscriptionInformationResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetSubscriptionInformationResponse) Reset() { - *x = GetSubscriptionInformationResponse{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetSubscriptionInformationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSubscriptionInformationResponse) ProtoMessage() {} - -func (x *GetSubscriptionInformationResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[19] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSubscriptionInformationResponse.ProtoReflect.Descriptor instead. -func (*GetSubscriptionInformationResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{19} -} - -func (x *GetSubscriptionInformationResponse) GetResponse() isGetSubscriptionInformationResponse_Response { - if x != nil { - return x.Response - } - return nil -} - -func (x *GetSubscriptionInformationResponse) GetSuccess() *GetSubscriptionInformationResponse_Subscription { - if x != nil { - if x, ok := x.Response.(*GetSubscriptionInformationResponse_Success); ok { - return x.Success - } - } - return nil -} - -func (x *GetSubscriptionInformationResponse) GetNoSubscription() *emptypb.Empty { - if x != nil { - if x, ok := x.Response.(*GetSubscriptionInformationResponse_NoSubscription); ok { - return x.NoSubscription - } - } - return nil -} - -func (x *GetSubscriptionInformationResponse) GetSubscriberNotFound() *errors.NotFound { - if x != nil { - if x, ok := x.Response.(*GetSubscriptionInformationResponse_SubscriberNotFound); ok { - return x.SubscriberNotFound - } - } - return nil -} - -func (x *GetSubscriptionInformationResponse) GetSubscriberIdMismatch() *errors.FailedUnidentifiedAuthorization { - if x != nil { - if x, ok := x.Response.(*GetSubscriptionInformationResponse_SubscriberIdMismatch); ok { - return x.SubscriberIdMismatch - } - } - return nil -} - -type isGetSubscriptionInformationResponse_Response interface { - isGetSubscriptionInformationResponse_Response() -} - -type GetSubscriptionInformationResponse_Success struct { - Success *GetSubscriptionInformationResponse_Subscription `protobuf:"bytes,1,opt,name=success,proto3,oneof"` -} - -type GetSubscriptionInformationResponse_NoSubscription struct { - NoSubscription *emptypb.Empty `protobuf:"bytes,2,opt,name=no_subscription,json=noSubscription,proto3,oneof"` -} - -type GetSubscriptionInformationResponse_SubscriberNotFound struct { - SubscriberNotFound *errors.NotFound `protobuf:"bytes,3,opt,name=subscriber_not_found,json=subscriberNotFound,proto3,oneof"` -} - -type GetSubscriptionInformationResponse_SubscriberIdMismatch struct { - // subscriberId authentication failure - SubscriberIdMismatch *errors.FailedUnidentifiedAuthorization `protobuf:"bytes,4,opt,name=subscriber_id_mismatch,json=subscriberIdMismatch,proto3,oneof"` -} - -func (*GetSubscriptionInformationResponse_Success) isGetSubscriptionInformationResponse_Response() {} - -func (*GetSubscriptionInformationResponse_NoSubscription) isGetSubscriptionInformationResponse_Response() { -} - -func (*GetSubscriptionInformationResponse_SubscriberNotFound) isGetSubscriptionInformationResponse_Response() { -} - -func (*GetSubscriptionInformationResponse_SubscriberIdMismatch) isGetSubscriptionInformationResponse_Response() { -} - -type GetBankMandateRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - BankTransferType BankTransferType `protobuf:"varint,1,opt,name=bank_transfer_type,json=bankTransferType,proto3,enum=org.signal.chat.purchase.BankTransferType" json:"bank_transfer_type,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetBankMandateRequest) Reset() { - *x = GetBankMandateRequest{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetBankMandateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBankMandateRequest) ProtoMessage() {} - -func (x *GetBankMandateRequest) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[20] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetBankMandateRequest.ProtoReflect.Descriptor instead. -func (*GetBankMandateRequest) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{20} -} - -func (x *GetBankMandateRequest) GetBankTransferType() BankTransferType { - if x != nil { - return x.BankTransferType - } - return BankTransferType_BANK_TRANSFER_TYPE_UNKNOWN -} - -type GetBankMandateResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Mandate string `protobuf:"bytes,1,opt,name=mandate,proto3" json:"mandate,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetBankMandateResponse) Reset() { - *x = GetBankMandateResponse{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetBankMandateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBankMandateResponse) ProtoMessage() {} - -func (x *GetBankMandateResponse) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[21] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetBankMandateResponse.ProtoReflect.Descriptor instead. -func (*GetBankMandateResponse) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{21} -} - -func (x *GetBankMandateResponse) GetMandate() string { - if x != nil { - return x.Mandate - } - return "" -} - -type CreatePaymentMethodResponse_CreatePaymentMethodResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - ClientSecret string `protobuf:"bytes,1,opt,name=clientSecret,proto3" json:"clientSecret,omitempty"` - PaymentProvider PaymentProvider `protobuf:"varint,2,opt,name=paymentProvider,proto3,enum=org.signal.chat.purchase.PaymentProvider" json:"paymentProvider,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreatePaymentMethodResponse_CreatePaymentMethodResult) Reset() { - *x = CreatePaymentMethodResponse_CreatePaymentMethodResult{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreatePaymentMethodResponse_CreatePaymentMethodResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePaymentMethodResponse_CreatePaymentMethodResult) ProtoMessage() {} - -func (x *CreatePaymentMethodResponse_CreatePaymentMethodResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[22] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreatePaymentMethodResponse_CreatePaymentMethodResult.ProtoReflect.Descriptor instead. -func (*CreatePaymentMethodResponse_CreatePaymentMethodResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{5, 0} -} - -func (x *CreatePaymentMethodResponse_CreatePaymentMethodResult) GetClientSecret() string { - if x != nil { - return x.ClientSecret - } - return "" -} - -func (x *CreatePaymentMethodResponse_CreatePaymentMethodResult) GetPaymentProvider() PaymentProvider { - if x != nil { - return x.PaymentProvider - } - return PaymentProvider_PAYMENT_PROVIDER_UNKNOWN -} - -type CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - // a URL to open where the user may approve the payment - ApprovalUrl string `protobuf:"bytes,1,opt,name=approvalUrl,proto3" json:"approvalUrl,omitempty"` - // an opaque PayPal payment identifier to use with SetDefaultPaymentMethodRequest - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult) Reset() { - *x = CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult) ProtoMessage() {} - -func (x *CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[23] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult.ProtoReflect.Descriptor instead. -func (*CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult) GetApprovalUrl() string { - if x != nil { - return x.ApprovalUrl - } - return "" -} - -func (x *CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -type SetDefaultPaymentMethodRequest_StripePaymentMethod struct { - state protoimpl.MessageState `protogen:"open.v1"` - PaymentMethodToken string `protobuf:"bytes,1,opt,name=paymentMethodToken,proto3" json:"paymentMethodToken,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetDefaultPaymentMethodRequest_StripePaymentMethod) Reset() { - *x = SetDefaultPaymentMethodRequest_StripePaymentMethod{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetDefaultPaymentMethodRequest_StripePaymentMethod) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetDefaultPaymentMethodRequest_StripePaymentMethod) ProtoMessage() {} - -func (x *SetDefaultPaymentMethodRequest_StripePaymentMethod) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[24] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetDefaultPaymentMethodRequest_StripePaymentMethod.ProtoReflect.Descriptor instead. -func (*SetDefaultPaymentMethodRequest_StripePaymentMethod) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{8, 0} -} - -func (x *SetDefaultPaymentMethodRequest_StripePaymentMethod) GetPaymentMethodToken() string { - if x != nil { - return x.PaymentMethodToken - } - return "" -} - -type SetDefaultPaymentMethodRequest_BraintreePaymentMethod struct { - state protoimpl.MessageState `protogen:"open.v1"` - PaymentMethodToken string `protobuf:"bytes,1,opt,name=paymentMethodToken,proto3" json:"paymentMethodToken,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetDefaultPaymentMethodRequest_BraintreePaymentMethod) Reset() { - *x = SetDefaultPaymentMethodRequest_BraintreePaymentMethod{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetDefaultPaymentMethodRequest_BraintreePaymentMethod) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetDefaultPaymentMethodRequest_BraintreePaymentMethod) ProtoMessage() {} - -func (x *SetDefaultPaymentMethodRequest_BraintreePaymentMethod) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[25] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetDefaultPaymentMethodRequest_BraintreePaymentMethod.ProtoReflect.Descriptor instead. -func (*SetDefaultPaymentMethodRequest_BraintreePaymentMethod) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{8, 1} -} - -func (x *SetDefaultPaymentMethodRequest_BraintreePaymentMethod) GetPaymentMethodToken() string { - if x != nil { - return x.PaymentMethodToken - } - return "" -} - -type SetDefaultPaymentMethodRequest_SepaPaymentMethod struct { - state protoimpl.MessageState `protogen:"open.v1"` - SetupIntentId string `protobuf:"bytes,1,opt,name=setupIntentId,proto3" json:"setupIntentId,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetDefaultPaymentMethodRequest_SepaPaymentMethod) Reset() { - *x = SetDefaultPaymentMethodRequest_SepaPaymentMethod{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetDefaultPaymentMethodRequest_SepaPaymentMethod) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetDefaultPaymentMethodRequest_SepaPaymentMethod) ProtoMessage() {} - -func (x *SetDefaultPaymentMethodRequest_SepaPaymentMethod) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[26] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetDefaultPaymentMethodRequest_SepaPaymentMethod.ProtoReflect.Descriptor instead. -func (*SetDefaultPaymentMethodRequest_SepaPaymentMethod) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{8, 2} -} - -func (x *SetDefaultPaymentMethodRequest_SepaPaymentMethod) GetSetupIntentId() string { - if x != nil { - return x.SetupIntentId - } - return "" -} - -type SetSubscriptionLevelResponse_SetSubscriptionLevelResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - Level uint64 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetSubscriptionLevelResponse_SetSubscriptionLevelResult) Reset() { - *x = SetSubscriptionLevelResponse_SetSubscriptionLevelResult{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetSubscriptionLevelResponse_SetSubscriptionLevelResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetSubscriptionLevelResponse_SetSubscriptionLevelResult) ProtoMessage() {} - -func (x *SetSubscriptionLevelResponse_SetSubscriptionLevelResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[27] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetSubscriptionLevelResponse_SetSubscriptionLevelResult.ProtoReflect.Descriptor instead. -func (*SetSubscriptionLevelResponse_SetSubscriptionLevelResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{13, 0} -} - -func (x *SetSubscriptionLevelResponse_SetSubscriptionLevelResult) GetLevel() uint64 { - if x != nil { - return x.Level - } - return 0 -} - -type SetIapSubscriptionRequest_AppStorePurchase struct { - state protoimpl.MessageState `protogen:"open.v1"` - OriginalTransactionId string `protobuf:"bytes,1,opt,name=original_transaction_id,json=originalTransactionId,proto3" json:"original_transaction_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetIapSubscriptionRequest_AppStorePurchase) Reset() { - *x = SetIapSubscriptionRequest_AppStorePurchase{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetIapSubscriptionRequest_AppStorePurchase) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetIapSubscriptionRequest_AppStorePurchase) ProtoMessage() {} - -func (x *SetIapSubscriptionRequest_AppStorePurchase) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[28] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetIapSubscriptionRequest_AppStorePurchase.ProtoReflect.Descriptor instead. -func (*SetIapSubscriptionRequest_AppStorePurchase) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{14, 0} -} - -func (x *SetIapSubscriptionRequest_AppStorePurchase) GetOriginalTransactionId() string { - if x != nil { - return x.OriginalTransactionId - } - return "" -} - -type SetIapSubscriptionRequest_PlayBillingPurchase struct { - state protoimpl.MessageState `protogen:"open.v1"` - PurchaseToken string `protobuf:"bytes,1,opt,name=purchase_token,json=purchaseToken,proto3" json:"purchase_token,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetIapSubscriptionRequest_PlayBillingPurchase) Reset() { - *x = SetIapSubscriptionRequest_PlayBillingPurchase{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetIapSubscriptionRequest_PlayBillingPurchase) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetIapSubscriptionRequest_PlayBillingPurchase) ProtoMessage() {} - -func (x *SetIapSubscriptionRequest_PlayBillingPurchase) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[29] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetIapSubscriptionRequest_PlayBillingPurchase.ProtoReflect.Descriptor instead. -func (*SetIapSubscriptionRequest_PlayBillingPurchase) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{14, 1} -} - -func (x *SetIapSubscriptionRequest_PlayBillingPurchase) GetPurchaseToken() string { - if x != nil { - return x.PurchaseToken - } - return "" -} - -type SetIapSubscriptionResponse_SetIapSubscriptionResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - Level uint64 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SetIapSubscriptionResponse_SetIapSubscriptionResult) Reset() { - *x = SetIapSubscriptionResponse_SetIapSubscriptionResult{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SetIapSubscriptionResponse_SetIapSubscriptionResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetIapSubscriptionResponse_SetIapSubscriptionResult) ProtoMessage() {} - -func (x *SetIapSubscriptionResponse_SetIapSubscriptionResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[30] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SetIapSubscriptionResponse_SetIapSubscriptionResult.ProtoReflect.Descriptor instead. -func (*SetIapSubscriptionResponse_SetIapSubscriptionResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{15, 0} -} - -func (x *SetIapSubscriptionResponse_SetIapSubscriptionResult) GetLevel() uint64 { - if x != nil { - return x.Level - } - return 0 -} - -type GetReceiptCredentialsResponse_GetReceiptCredentialsResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - ReceiptCredentialResponse []byte `protobuf:"bytes,1,opt,name=receiptCredentialResponse,proto3" json:"receiptCredentialResponse,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetReceiptCredentialsResponse_GetReceiptCredentialsResult) Reset() { - *x = GetReceiptCredentialsResponse_GetReceiptCredentialsResult{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetReceiptCredentialsResponse_GetReceiptCredentialsResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetReceiptCredentialsResponse_GetReceiptCredentialsResult) ProtoMessage() {} - -func (x *GetReceiptCredentialsResponse_GetReceiptCredentialsResult) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[31] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetReceiptCredentialsResponse_GetReceiptCredentialsResult.ProtoReflect.Descriptor instead. -func (*GetReceiptCredentialsResponse_GetReceiptCredentialsResult) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{17, 0} -} - -func (x *GetReceiptCredentialsResponse_GetReceiptCredentialsResult) GetReceiptCredentialResponse() []byte { - if x != nil { - return x.ReceiptCredentialResponse - } - return nil -} - -type GetSubscriptionInformationResponse_Subscription struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The subscription level - Level uint64 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` - // If present, UNIX Epoch Timestamp in seconds, can be used to calculate next billing date. - BillingCycleAnchor *uint64 `protobuf:"varint,2,opt,name=billing_cycle_anchor,json=billingCycleAnchor,proto3,oneof" json:"billing_cycle_anchor,omitempty"` - // UNIX Epoch Timestamp in seconds, when the current subscription period ends - EndOfCurrentPeriod uint64 `protobuf:"varint,3,opt,name=end_of_current_period,json=endOfCurrentPeriod,proto3" json:"end_of_current_period,omitempty"` - // Whether there is a currently active subscription - Active bool `protobuf:"varint,4,opt,name=active,proto3" json:"active,omitempty"` - // If true, an active subscription will not auto-renew at the end of the current period - CancelAtPeriodEnd bool `protobuf:"varint,5,opt,name=cancel_at_period_end,json=cancelAtPeriodEnd,proto3" json:"cancel_at_period_end,omitempty"` - // A three-letter ISO 4217 currency code for currency used in the subscription - Currency string `protobuf:"bytes,6,opt,name=currency,proto3" json:"currency,omitempty"` - // The amount paid for the subscription in the currency's smallest unit - Amount uint64 `protobuf:"varint,7,opt,name=amount,proto3" json:"amount,omitempty"` - // The subscription's status, mapped to Stripe's statuses. trialing will never be returned - Status SubscriptionStatus `protobuf:"varint,8,opt,name=status,proto3,enum=org.signal.chat.purchase.SubscriptionStatus" json:"status,omitempty"` - // The payment provider associated with the subscription - Processor PaymentProvider `protobuf:"varint,9,opt,name=processor,proto3,enum=org.signal.chat.purchase.PaymentProvider" json:"processor,omitempty"` - // The payment method associated with the subscription - PaymentMethod PaymentMethod `protobuf:"varint,10,opt,name=payment_method,json=paymentMethod,proto3,enum=org.signal.chat.purchase.PaymentMethod" json:"payment_method,omitempty"` - // Whether the latest charge for the subscription is in a non-terminal state - PaymentProcessing bool `protobuf:"varint,11,opt,name=payment_processing,json=paymentProcessing,proto3" json:"payment_processing,omitempty"` - // if present, contains information that may be interpreted to help the user fix a failure - ChargeFailure *ChargeFailure `protobuf:"bytes,12,opt,name=charge_failure,json=chargeFailure,proto3,oneof" json:"charge_failure,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetSubscriptionInformationResponse_Subscription) Reset() { - *x = GetSubscriptionInformationResponse_Subscription{} - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetSubscriptionInformationResponse_Subscription) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSubscriptionInformationResponse_Subscription) ProtoMessage() {} - -func (x *GetSubscriptionInformationResponse_Subscription) ProtoReflect() protoreflect.Message { - mi := &file_org_signal_chat_subscriptions_proto_msgTypes[32] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSubscriptionInformationResponse_Subscription.ProtoReflect.Descriptor instead. -func (*GetSubscriptionInformationResponse_Subscription) Descriptor() ([]byte, []int) { - return file_org_signal_chat_subscriptions_proto_rawDescGZIP(), []int{19, 0} -} - -func (x *GetSubscriptionInformationResponse_Subscription) GetLevel() uint64 { - if x != nil { - return x.Level - } - return 0 -} - -func (x *GetSubscriptionInformationResponse_Subscription) GetBillingCycleAnchor() uint64 { - if x != nil && x.BillingCycleAnchor != nil { - return *x.BillingCycleAnchor - } - return 0 -} - -func (x *GetSubscriptionInformationResponse_Subscription) GetEndOfCurrentPeriod() uint64 { - if x != nil { - return x.EndOfCurrentPeriod - } - return 0 -} - -func (x *GetSubscriptionInformationResponse_Subscription) GetActive() bool { - if x != nil { - return x.Active - } - return false -} - -func (x *GetSubscriptionInformationResponse_Subscription) GetCancelAtPeriodEnd() bool { - if x != nil { - return x.CancelAtPeriodEnd - } - return false -} - -func (x *GetSubscriptionInformationResponse_Subscription) GetCurrency() string { - if x != nil { - return x.Currency - } - return "" -} - -func (x *GetSubscriptionInformationResponse_Subscription) GetAmount() uint64 { - if x != nil { - return x.Amount - } - return 0 -} - -func (x *GetSubscriptionInformationResponse_Subscription) GetStatus() SubscriptionStatus { - if x != nil { - return x.Status - } - return SubscriptionStatus_SUBSCRIPTION_STATUS_UNKNOWN -} - -func (x *GetSubscriptionInformationResponse_Subscription) GetProcessor() PaymentProvider { - if x != nil { - return x.Processor - } - return PaymentProvider_PAYMENT_PROVIDER_UNKNOWN -} - -func (x *GetSubscriptionInformationResponse_Subscription) GetPaymentMethod() PaymentMethod { - if x != nil { - return x.PaymentMethod - } - return PaymentMethod_PAYMENT_METHOD_UNKNOWN -} - -func (x *GetSubscriptionInformationResponse_Subscription) GetPaymentProcessing() bool { - if x != nil { - return x.PaymentProcessing - } - return false -} - -func (x *GetSubscriptionInformationResponse_Subscription) GetChargeFailure() *ChargeFailure { - if x != nil { - return x.ChargeFailure - } - return nil -} - -var File_org_signal_chat_subscriptions_proto protoreflect.FileDescriptor - -const file_org_signal_chat_subscriptions_proto_rawDesc = "" + - "\n" + - "#org/signal/chat/subscriptions.proto\x12\x18org.signal.chat.purchase\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1corg/signal/chat/common.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x19org/signal/chat/tag.proto\"n\n" + - "\x17UpdateSubscriberRequest\x12*\n" + - "\rsubscriber_id\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12'\n" + - "\x0fdonation_permit\x18\x02 \x01(\fR\x0edonationPermit\"\xd8\x02\n" + - "\x18UpdateSubscriberResponse\x122\n" + - "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12\x8b\x01\n" + - "\x16subscriber_id_mismatch\x18\x02 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12n\n" + - "\x0fpermit_rejected\x18\x03 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x13\xc2\xd5\"\x0fpermit_rejectedH\x00R\x0epermitRejectedB\n" + - "\n" + - "\bresponse\"D\n" + - "\x17DeleteSubscriberRequest\x12)\n" + - "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\"\xd7\x02\n" + - "\x18DeleteSubscriberResponse\x122\n" + - "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12n\n" + - "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8a\x01\n" + - "\x1acannot_cancel_subscription\x18\x03 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1e\xc2\xd5\"\x1acannot_cancel_subscriptionH\x00R\x18cannotCancelSubscriptionB\n" + - "\n" + - "\bresponse\"\xcd\x01\n" + - "\x1aCreatePaymentMethodRequest\x12*\n" + - "\rsubscriber_id\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12T\n" + - "\x0epayment_method\x18\x02 \x01(\x0e2'.org.signal.chat.purchase.PaymentMethodB\x04\x90\x97\"\x01R\rpaymentMethod\x12-\n" + - "\x0fdonation_permit\x18\x03 \x01(\fB\x04\x88\x97\"\x01R\x0edonationPermit\"\xb5\x06\n" + - "\x1bCreatePaymentMethodResponse\x12i\n" + - "\x06result\x18\x01 \x01(\v2O.org.signal.chat.purchase.CreatePaymentMethodResponse.CreatePaymentMethodResultH\x00R\x06result\x12n\n" + - "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + - "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12\x99\x01\n" + - "\x1fsubscription_processor_conflict\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflict\x12n\n" + - "\x0fpermit_rejected\x18\x05 \x01(\v2..org.signal.chat.errors.FailedZkAuthenticationB\x13\xc2\xd5\"\x0fpermit_rejectedH\x00R\x0epermitRejected\x1a\x94\x01\n" + - "\x19CreatePaymentMethodResult\x12\"\n" + - "\fclientSecret\x18\x01 \x01(\tR\fclientSecret\x12S\n" + - "\x0fpaymentProvider\x18\x02 \x01(\x0e2).org.signal.chat.purchase.PaymentProviderR\x0fpaymentProviderB\n" + - "\n" + - "\bresponse\"\x89\x01\n" + - " CreatePayPalPaymentMethodRequest\x12)\n" + - "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12\x1c\n" + - "\treturnUrl\x18\x02 \x01(\tR\treturnUrl\x12\x1c\n" + - "\tcancelUrl\x18\x03 \x01(\tR\tcancelUrl\"\x9b\x05\n" + - "!CreatePayPalPaymentMethodResponse\x12u\n" + - "\x06result\x18\x01 \x01(\v2[.org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.CreatePayPalPaymentMethodResultH\x00R\x06result\x12n\n" + - "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + - "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12\x99\x01\n" + - "\x1fsubscription_processor_conflict\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflict\x1aY\n" + - "\x1fCreatePayPalPaymentMethodResult\x12 \n" + - "\vapprovalUrl\x18\x01 \x01(\tR\vapprovalUrl\x12\x14\n" + - "\x05token\x18\x02 \x01(\tR\x05tokenB\n" + - "\n" + - "\bresponse\"\xef\x04\n" + - "\x1eSetDefaultPaymentMethodRequest\x12)\n" + - "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12f\n" + - "\x06stripe\x18\x02 \x01(\v2L.org.signal.chat.purchase.SetDefaultPaymentMethodRequest.StripePaymentMethodH\x00R\x06stripe\x12o\n" + - "\tbraintree\x18\x03 \x01(\v2O.org.signal.chat.purchase.SetDefaultPaymentMethodRequest.BraintreePaymentMethodH\x00R\tbraintree\x12`\n" + - "\x04sepa\x18\x04 \x01(\v2J.org.signal.chat.purchase.SetDefaultPaymentMethodRequest.SepaPaymentMethodH\x00R\x04sepa\x1aK\n" + - "\x13StripePaymentMethod\x124\n" + - "\x12paymentMethodToken\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\x12paymentMethodToken\x1aN\n" + - "\x16BraintreePaymentMethod\x124\n" + - "\x12paymentMethodToken\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\x12paymentMethodToken\x1a?\n" + - "\x11SepaPaymentMethod\x12*\n" + - "\rsetupIntentId\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\rsetupIntentIdB\t\n" + - "\arequest\"\x83\x05\n" + - "\x1fSetDefaultPaymentMethodResponse\x122\n" + - "\asuccess\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\asuccess\x12n\n" + - "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + - "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12\x85\x01\n" + - "\x19payment_method_not_set_up\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1d\xc2\xd5\"\x19payment_method_not_set_upH\x00R\x15paymentMethodNotSetUp\x12\x99\x01\n" + - "\x1fsubscription_processor_conflict\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflictB\n" + - "\n" + - "\bresponse\"\xa2\x01\n" + - "\x1bSetSubscriptionLevelRequest\x12)\n" + - "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12\x14\n" + - "\x05level\x18\x02 \x01(\x04R\x05level\x12\x1a\n" + - "\bcurrency\x18\x03 \x01(\tR\bcurrency\x12&\n" + - "\x0eidempotencyKey\x18\x04 \x01(\tR\x0eidempotencyKey\"\xd4\x02\n" + - "\rChargeFailure\x12G\n" + - "\tprocessor\x18\x01 \x01(\x0e2).org.signal.chat.purchase.PaymentProviderR\tprocessor\x12\x12\n" + - "\x04code\x18\x02 \x01(\tR\x04code\x12\x18\n" + - "\amessage\x18\x03 \x01(\tR\amessage\x129\n" + - "\x16outcome_network_status\x18\x04 \x01(\tH\x00R\x14outcomeNetworkStatus\x88\x01\x01\x12*\n" + - "\x0eoutcome_reason\x18\x05 \x01(\tH\x01R\routcomeReason\x88\x01\x01\x12&\n" + - "\foutcome_type\x18\x06 \x01(\tH\x02R\voutcomeType\x88\x01\x01B\x19\n" + - "\x17_outcome_network_statusB\x11\n" + - "\x0f_outcome_reasonB\x0f\n" + - "\r_outcome_type\"y\n" + - "\x0fPaymentRequired\x12S\n" + - "\x0echarge_failure\x18\x01 \x01(\v2'.org.signal.chat.purchase.ChargeFailureH\x00R\rchargeFailure\x88\x01\x01B\x11\n" + - "\x0f_charge_failure\"\xcf\f\n" + - "\x1cSetSubscriptionLevelResponse\x12m\n" + - "\asuccess\x18\x01 \x01(\v2Q.org.signal.chat.purchase.SetSubscriptionLevelResponse.SetSubscriptionLevelResultH\x00R\asuccess\x12n\n" + - "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + - "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12\x99\x01\n" + - "\x1fsubscription_processor_conflict\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflict\x12\x85\x01\n" + - "\x19payment_method_not_set_up\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1d\xc2\xd5\"\x19payment_method_not_set_upH\x00R\x15paymentMethodNotSetUp\x12|\n" + - "\x15unsupported_operation\x18\x06 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x19\xc2\xd5\"\x15unsupported_operationH\x00R\x14unsupportedOperation\x12p\n" + - "\x11unsupported_level\x18\a \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x15\xc2\xd5\"\x11unsupported_levelH\x00R\x10unsupportedLevel\x12y\n" + - "\x14unsupported_currency\x18\b \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x18\xc2\xd5\"\x14unsupported_currencyH\x00R\x13unsupportedCurrency\x12\x81\x01\n" + - "\x17payment_requires_action\x18\t \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1b\xc2\xd5\"\x17payment_requires_actionH\x00R\x15paymentRequiresAction\x12\x84\x01\n" + - "\x18invalid_level_transition\x18\n" + - " \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1c\xc2\xd5\"\x18invalid_level_transitionH\x00R\x16invalidLevelTransition\x12\x81\x01\n" + - "\x17invalid_idempotency_key\x18\v \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x1b\xc2\xd5\"\x17invalid_idempotency_keyH\x00R\x15invalidIdempotencyKey\x12d\n" + - "\x0echarge_failure\x18\f \x01(\v2'.org.signal.chat.purchase.ChargeFailureB\x12\xc2\xd5\"\x0echarge_failureH\x00R\rchargeFailure\x1a2\n" + - "\x1aSetSubscriptionLevelResult\x12\x14\n" + - "\x05level\x18\x01 \x01(\x04R\x05levelB\n" + - "\n" + - "\bresponse\"\xba\x03\n" + - "\x19SetIapSubscriptionRequest\x12)\n" + - "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12c\n" + - "\tapp_store\x18\x02 \x01(\v2D.org.signal.chat.purchase.SetIapSubscriptionRequest.AppStorePurchaseH\x00R\bappStore\x12l\n" + - "\fplay_billing\x18\x03 \x01(\v2G.org.signal.chat.purchase.SetIapSubscriptionRequest.PlayBillingPurchaseH\x00R\vplayBilling\x1aP\n" + - "\x10AppStorePurchase\x12<\n" + - "\x17original_transaction_id\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\x15originalTransactionId\x1aB\n" + - "\x13PlayBillingPurchase\x12+\n" + - "\x0epurchase_token\x18\x01 \x01(\tB\x04\x88\x97\"\x01R\rpurchaseTokenB\t\n" + - "\arequest\"\xc6\x06\n" + - "\x1aSetIapSubscriptionResponse\x12i\n" + - "\asuccess\x18\x01 \x01(\v2M.org.signal.chat.purchase.SetIapSubscriptionResponse.SetIapSubscriptionResultH\x00R\asuccess\x12n\n" + - "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + - "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12\x99\x01\n" + - "\x1fsubscription_processor_conflict\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB#\xc2\xd5\"\x1fsubscription_processor_conflictH\x00R\x1dsubscriptionProcessorConflict\x12m\n" + - "\x10payment_required\x18\x05 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x14\xc2\xd5\"\x10payment_requiredH\x00R\x0fpaymentRequired\x12v\n" + - "\x13invalid_transaction\x18\x06 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x17\xc2\xd5\"\x13invalid_transactionH\x00R\x12invalidTransaction\x1a0\n" + - "\x18SetIapSubscriptionResult\x12\x14\n" + - "\x05level\x18\x01 \x01(\x04R\x05levelB\n" + - "\n" + - "\bresponse\"\x8c\x01\n" + - "\x1cGetReceiptCredentialsRequest\x12)\n" + - "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\x12A\n" + - "\x18receiptCredentialRequest\x18\x02 \x01(\fB\x05\xa2\x97\"\x01aR\x18receiptCredentialRequest\"\xbf\x06\n" + - "\x1dGetReceiptCredentialsResponse\x12o\n" + - "\asuccess\x18\x01 \x01(\v2S.org.signal.chat.purchase.GetReceiptCredentialsResponse.GetReceiptCredentialsResultH\x00R\asuccess\x12n\n" + - "\x14subscriber_not_found\x18\x02 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + - "\x16subscriber_id_mismatch\x18\x03 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x12i\n" + - "\x0fno_paid_invoice\x18\x04 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x13\xc2\xd5\"\x0fno_paid_invoiceH\x00R\rnoPaidInvoice\x12l\n" + - "\x10payment_required\x18\x05 \x01(\v2).org.signal.chat.purchase.PaymentRequiredB\x14\xc2\xd5\"\x10payment_requiredH\x00R\x0fpaymentRequired\x12m\n" + - "\x10already_redeemed\x18\x06 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x14\xc2\xd5\"\x10already_redeemedH\x00R\x0falreadyRedeemed\x1a[\n" + - "\x1bGetReceiptCredentialsResult\x12<\n" + - "\x19receiptCredentialResponse\x18\x01 \x01(\fR\x19receiptCredentialResponseB\n" + - "\n" + - "\bresponse\"N\n" + - "!GetSubscriptionInformationRequest\x12)\n" + - "\fsubscriberId\x18\x01 \x01(\fB\x05\xa2\x97\"\x01 R\fsubscriberId\"\xf5\b\n" + - "\"GetSubscriptionInformationResponse\x12e\n" + - "\asuccess\x18\x01 \x01(\v2I.org.signal.chat.purchase.GetSubscriptionInformationResponse.SubscriptionH\x00R\asuccess\x12A\n" + - "\x0fno_subscription\x18\x02 \x01(\v2\x16.google.protobuf.EmptyH\x00R\x0enoSubscription\x12n\n" + - "\x14subscriber_not_found\x18\x03 \x01(\v2 .org.signal.chat.errors.NotFoundB\x18\xc2\xd5\"\x14subscriber_not_foundH\x00R\x12subscriberNotFound\x12\x8b\x01\n" + - "\x16subscriber_id_mismatch\x18\x04 \x01(\v27.org.signal.chat.errors.FailedUnidentifiedAuthorizationB\x1a\xc2\xd5\"\x16subscriber_id_mismatchH\x00R\x14subscriberIdMismatch\x1a\x9a\x05\n" + - "\fSubscription\x12\x14\n" + - "\x05level\x18\x01 \x01(\x04R\x05level\x125\n" + - "\x14billing_cycle_anchor\x18\x02 \x01(\x04H\x00R\x12billingCycleAnchor\x88\x01\x01\x121\n" + - "\x15end_of_current_period\x18\x03 \x01(\x04R\x12endOfCurrentPeriod\x12\x16\n" + - "\x06active\x18\x04 \x01(\bR\x06active\x12/\n" + - "\x14cancel_at_period_end\x18\x05 \x01(\bR\x11cancelAtPeriodEnd\x12\x1a\n" + - "\bcurrency\x18\x06 \x01(\tR\bcurrency\x12\x16\n" + - "\x06amount\x18\a \x01(\x04R\x06amount\x12D\n" + - "\x06status\x18\b \x01(\x0e2,.org.signal.chat.purchase.SubscriptionStatusR\x06status\x12G\n" + - "\tprocessor\x18\t \x01(\x0e2).org.signal.chat.purchase.PaymentProviderR\tprocessor\x12N\n" + - "\x0epayment_method\x18\n" + - " \x01(\x0e2'.org.signal.chat.purchase.PaymentMethodR\rpaymentMethod\x12-\n" + - "\x12payment_processing\x18\v \x01(\bR\x11paymentProcessing\x12S\n" + - "\x0echarge_failure\x18\f \x01(\v2'.org.signal.chat.purchase.ChargeFailureH\x01R\rchargeFailure\x88\x01\x01B\x17\n" + - "\x15_billing_cycle_anchorB\x11\n" + - "\x0f_charge_failureB\n" + - "\n" + - "\bresponse\"w\n" + - "\x15GetBankMandateRequest\x12^\n" + - "\x12bank_transfer_type\x18\x01 \x01(\x0e2*.org.signal.chat.purchase.BankTransferTypeB\x04\x90\x97\"\x01R\x10bankTransferType\"2\n" + - "\x16GetBankMandateResponse\x12\x18\n" + - "\amandate\x18\x01 \x01(\tR\amandate*\xbc\x01\n" + - "\x0fPaymentProvider\x12\x1c\n" + - "\x18PAYMENT_PROVIDER_UNKNOWN\x10\x00\x12\x1b\n" + - "\x17PAYMENT_PROVIDER_STRIPE\x10\x01\x12\x1e\n" + - "\x1aPAYMENT_PROVIDER_BRAINTREE\x10\x02\x12(\n" + - "$PAYMENT_PROVIDER_GOOGLE_PLAY_BILLING\x10\x03\x12$\n" + - " PAYMENT_PROVIDER_APPLE_APP_STORE\x10\x04*\xe4\x01\n" + - "\rPaymentMethod\x12\x1a\n" + - "\x16PAYMENT_METHOD_UNKNOWN\x10\x00\x12\x17\n" + - "\x13PAYMENT_METHOD_CARD\x10\x01\x12\x1d\n" + - "\x19PAYMENT_METHOD_SEPA_DEBIT\x10\x02\x12\x18\n" + - "\x14PAYMENT_METHOD_IDEAL\x10\x03\x12\x19\n" + - "\x15PAYMENT_METHOD_PAYPAL\x10\x04\x12&\n" + - "\"PAYMENT_METHOD_GOOGLE_PLAY_BILLING\x10\x05\x12\"\n" + - "\x1ePAYMENT_METHOD_APPLE_APP_STORE\x10\x06*\xdd\x01\n" + - "\x12SubscriptionStatus\x12\x1f\n" + - "\x1bSUBSCRIPTION_STATUS_UNKNOWN\x10\x00\x12\x1e\n" + - "\x1aSUBSCRIPTION_STATUS_ACTIVE\x10\x01\x12\"\n" + - "\x1eSUBSCRIPTION_STATUS_INCOMPLETE\x10\x02\x12 \n" + - "\x1cSUBSCRIPTION_STATUS_PAST_DUE\x10\x03\x12 \n" + - "\x1cSUBSCRIPTION_STATUS_CANCELED\x10\x04\x12\x1e\n" + - "\x1aSUBSCRIPTION_STATUS_UNPAID\x10\x05*U\n" + - "\x10BankTransferType\x12\x1e\n" + - "\x1aBANK_TRANSFER_TYPE_UNKNOWN\x10\x00\x12!\n" + - "\x1dBANK_TRANSFER_TYPE_SEPA_DEBIT\x10\x012\xf0\n" + - "\n" + - "\rSubscriptions\x12{\n" + - "\x10UpdateSubscriber\x121.org.signal.chat.purchase.UpdateSubscriberRequest\x1a2.org.signal.chat.purchase.UpdateSubscriberResponse\"\x00\x12{\n" + - "\x10DeleteSubscriber\x121.org.signal.chat.purchase.DeleteSubscriberRequest\x1a2.org.signal.chat.purchase.DeleteSubscriberResponse\"\x00\x12\x84\x01\n" + - "\x13CreatePaymentMethod\x124.org.signal.chat.purchase.CreatePaymentMethodRequest\x1a5.org.signal.chat.purchase.CreatePaymentMethodResponse\"\x00\x12\x96\x01\n" + - "\x19CreatePayPalPaymentMethod\x12:.org.signal.chat.purchase.CreatePayPalPaymentMethodRequest\x1a;.org.signal.chat.purchase.CreatePayPalPaymentMethodResponse\"\x00\x12\x90\x01\n" + - "\x17SetDefaultPaymentMethod\x128.org.signal.chat.purchase.SetDefaultPaymentMethodRequest\x1a9.org.signal.chat.purchase.SetDefaultPaymentMethodResponse\"\x00\x12\x87\x01\n" + - "\x14SetSubscriptionLevel\x125.org.signal.chat.purchase.SetSubscriptionLevelRequest\x1a6.org.signal.chat.purchase.SetSubscriptionLevelResponse\"\x00\x12\x99\x01\n" + - "\x1aGetSubscriptionInformation\x12;.org.signal.chat.purchase.GetSubscriptionInformationRequest\x1a<.org.signal.chat.purchase.GetSubscriptionInformationResponse\"\x00\x12\x8a\x01\n" + - "\x15GetReceiptCredentials\x126.org.signal.chat.purchase.GetReceiptCredentialsRequest\x1a7.org.signal.chat.purchase.GetReceiptCredentialsResponse\"\x00\x12\x81\x01\n" + - "\x12SetIapSubscription\x123.org.signal.chat.purchase.SetIapSubscriptionRequest\x1a4.org.signal.chat.purchase.SetIapSubscriptionResponse\"\x00\x12u\n" + - "\x0eGetBankMandate\x12/.org.signal.chat.purchase.GetBankMandateRequest\x1a0.org.signal.chat.purchase.GetBankMandateResponse\"\x00\x1a\x04\xc8\xd5\"\x02B\x02P\x01b\x06proto3" - -var ( - file_org_signal_chat_subscriptions_proto_rawDescOnce sync.Once - file_org_signal_chat_subscriptions_proto_rawDescData []byte -) - -func file_org_signal_chat_subscriptions_proto_rawDescGZIP() []byte { - file_org_signal_chat_subscriptions_proto_rawDescOnce.Do(func() { - file_org_signal_chat_subscriptions_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_subscriptions_proto_rawDesc), len(file_org_signal_chat_subscriptions_proto_rawDesc))) - }) - return file_org_signal_chat_subscriptions_proto_rawDescData -} - -var file_org_signal_chat_subscriptions_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_org_signal_chat_subscriptions_proto_msgTypes = make([]protoimpl.MessageInfo, 33) -var file_org_signal_chat_subscriptions_proto_goTypes = []any{ - (PaymentProvider)(0), // 0: org.signal.chat.purchase.PaymentProvider - (PaymentMethod)(0), // 1: org.signal.chat.purchase.PaymentMethod - (SubscriptionStatus)(0), // 2: org.signal.chat.purchase.SubscriptionStatus - (BankTransferType)(0), // 3: org.signal.chat.purchase.BankTransferType - (*UpdateSubscriberRequest)(nil), // 4: org.signal.chat.purchase.UpdateSubscriberRequest - (*UpdateSubscriberResponse)(nil), // 5: org.signal.chat.purchase.UpdateSubscriberResponse - (*DeleteSubscriberRequest)(nil), // 6: org.signal.chat.purchase.DeleteSubscriberRequest - (*DeleteSubscriberResponse)(nil), // 7: org.signal.chat.purchase.DeleteSubscriberResponse - (*CreatePaymentMethodRequest)(nil), // 8: org.signal.chat.purchase.CreatePaymentMethodRequest - (*CreatePaymentMethodResponse)(nil), // 9: org.signal.chat.purchase.CreatePaymentMethodResponse - (*CreatePayPalPaymentMethodRequest)(nil), // 10: org.signal.chat.purchase.CreatePayPalPaymentMethodRequest - (*CreatePayPalPaymentMethodResponse)(nil), // 11: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse - (*SetDefaultPaymentMethodRequest)(nil), // 12: org.signal.chat.purchase.SetDefaultPaymentMethodRequest - (*SetDefaultPaymentMethodResponse)(nil), // 13: org.signal.chat.purchase.SetDefaultPaymentMethodResponse - (*SetSubscriptionLevelRequest)(nil), // 14: org.signal.chat.purchase.SetSubscriptionLevelRequest - (*ChargeFailure)(nil), // 15: org.signal.chat.purchase.ChargeFailure - (*PaymentRequired)(nil), // 16: org.signal.chat.purchase.PaymentRequired - (*SetSubscriptionLevelResponse)(nil), // 17: org.signal.chat.purchase.SetSubscriptionLevelResponse - (*SetIapSubscriptionRequest)(nil), // 18: org.signal.chat.purchase.SetIapSubscriptionRequest - (*SetIapSubscriptionResponse)(nil), // 19: org.signal.chat.purchase.SetIapSubscriptionResponse - (*GetReceiptCredentialsRequest)(nil), // 20: org.signal.chat.purchase.GetReceiptCredentialsRequest - (*GetReceiptCredentialsResponse)(nil), // 21: org.signal.chat.purchase.GetReceiptCredentialsResponse - (*GetSubscriptionInformationRequest)(nil), // 22: org.signal.chat.purchase.GetSubscriptionInformationRequest - (*GetSubscriptionInformationResponse)(nil), // 23: org.signal.chat.purchase.GetSubscriptionInformationResponse - (*GetBankMandateRequest)(nil), // 24: org.signal.chat.purchase.GetBankMandateRequest - (*GetBankMandateResponse)(nil), // 25: org.signal.chat.purchase.GetBankMandateResponse - (*CreatePaymentMethodResponse_CreatePaymentMethodResult)(nil), // 26: org.signal.chat.purchase.CreatePaymentMethodResponse.CreatePaymentMethodResult - (*CreatePayPalPaymentMethodResponse_CreatePayPalPaymentMethodResult)(nil), // 27: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.CreatePayPalPaymentMethodResult - (*SetDefaultPaymentMethodRequest_StripePaymentMethod)(nil), // 28: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.StripePaymentMethod - (*SetDefaultPaymentMethodRequest_BraintreePaymentMethod)(nil), // 29: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.BraintreePaymentMethod - (*SetDefaultPaymentMethodRequest_SepaPaymentMethod)(nil), // 30: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.SepaPaymentMethod - (*SetSubscriptionLevelResponse_SetSubscriptionLevelResult)(nil), // 31: org.signal.chat.purchase.SetSubscriptionLevelResponse.SetSubscriptionLevelResult - (*SetIapSubscriptionRequest_AppStorePurchase)(nil), // 32: org.signal.chat.purchase.SetIapSubscriptionRequest.AppStorePurchase - (*SetIapSubscriptionRequest_PlayBillingPurchase)(nil), // 33: org.signal.chat.purchase.SetIapSubscriptionRequest.PlayBillingPurchase - (*SetIapSubscriptionResponse_SetIapSubscriptionResult)(nil), // 34: org.signal.chat.purchase.SetIapSubscriptionResponse.SetIapSubscriptionResult - (*GetReceiptCredentialsResponse_GetReceiptCredentialsResult)(nil), // 35: org.signal.chat.purchase.GetReceiptCredentialsResponse.GetReceiptCredentialsResult - (*GetSubscriptionInformationResponse_Subscription)(nil), // 36: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription - (*emptypb.Empty)(nil), // 37: google.protobuf.Empty - (*errors.FailedUnidentifiedAuthorization)(nil), // 38: org.signal.chat.errors.FailedUnidentifiedAuthorization - (*errors.FailedZkAuthentication)(nil), // 39: org.signal.chat.errors.FailedZkAuthentication - (*errors.NotFound)(nil), // 40: org.signal.chat.errors.NotFound - (*errors.FailedPrecondition)(nil), // 41: org.signal.chat.errors.FailedPrecondition -} -var file_org_signal_chat_subscriptions_proto_depIdxs = []int32{ - 37, // 0: org.signal.chat.purchase.UpdateSubscriberResponse.success:type_name -> google.protobuf.Empty - 38, // 1: org.signal.chat.purchase.UpdateSubscriberResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 39, // 2: org.signal.chat.purchase.UpdateSubscriberResponse.permit_rejected:type_name -> org.signal.chat.errors.FailedZkAuthentication - 37, // 3: org.signal.chat.purchase.DeleteSubscriberResponse.success:type_name -> google.protobuf.Empty - 40, // 4: org.signal.chat.purchase.DeleteSubscriberResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 41, // 5: org.signal.chat.purchase.DeleteSubscriberResponse.cannot_cancel_subscription:type_name -> org.signal.chat.errors.FailedPrecondition - 1, // 6: org.signal.chat.purchase.CreatePaymentMethodRequest.payment_method:type_name -> org.signal.chat.purchase.PaymentMethod - 26, // 7: org.signal.chat.purchase.CreatePaymentMethodResponse.result:type_name -> org.signal.chat.purchase.CreatePaymentMethodResponse.CreatePaymentMethodResult - 40, // 8: org.signal.chat.purchase.CreatePaymentMethodResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 38, // 9: org.signal.chat.purchase.CreatePaymentMethodResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 41, // 10: org.signal.chat.purchase.CreatePaymentMethodResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition - 39, // 11: org.signal.chat.purchase.CreatePaymentMethodResponse.permit_rejected:type_name -> org.signal.chat.errors.FailedZkAuthentication - 27, // 12: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.result:type_name -> org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.CreatePayPalPaymentMethodResult - 40, // 13: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 38, // 14: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 41, // 15: org.signal.chat.purchase.CreatePayPalPaymentMethodResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition - 28, // 16: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.stripe:type_name -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest.StripePaymentMethod - 29, // 17: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.braintree:type_name -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest.BraintreePaymentMethod - 30, // 18: org.signal.chat.purchase.SetDefaultPaymentMethodRequest.sepa:type_name -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest.SepaPaymentMethod - 37, // 19: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.success:type_name -> google.protobuf.Empty - 40, // 20: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 38, // 21: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 41, // 22: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.payment_method_not_set_up:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 23: org.signal.chat.purchase.SetDefaultPaymentMethodResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition - 0, // 24: org.signal.chat.purchase.ChargeFailure.processor:type_name -> org.signal.chat.purchase.PaymentProvider - 15, // 25: org.signal.chat.purchase.PaymentRequired.charge_failure:type_name -> org.signal.chat.purchase.ChargeFailure - 31, // 26: org.signal.chat.purchase.SetSubscriptionLevelResponse.success:type_name -> org.signal.chat.purchase.SetSubscriptionLevelResponse.SetSubscriptionLevelResult - 40, // 27: org.signal.chat.purchase.SetSubscriptionLevelResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 38, // 28: org.signal.chat.purchase.SetSubscriptionLevelResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 41, // 29: org.signal.chat.purchase.SetSubscriptionLevelResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 30: org.signal.chat.purchase.SetSubscriptionLevelResponse.payment_method_not_set_up:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 31: org.signal.chat.purchase.SetSubscriptionLevelResponse.unsupported_operation:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 32: org.signal.chat.purchase.SetSubscriptionLevelResponse.unsupported_level:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 33: org.signal.chat.purchase.SetSubscriptionLevelResponse.unsupported_currency:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 34: org.signal.chat.purchase.SetSubscriptionLevelResponse.payment_requires_action:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 35: org.signal.chat.purchase.SetSubscriptionLevelResponse.invalid_level_transition:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 36: org.signal.chat.purchase.SetSubscriptionLevelResponse.invalid_idempotency_key:type_name -> org.signal.chat.errors.FailedPrecondition - 15, // 37: org.signal.chat.purchase.SetSubscriptionLevelResponse.charge_failure:type_name -> org.signal.chat.purchase.ChargeFailure - 32, // 38: org.signal.chat.purchase.SetIapSubscriptionRequest.app_store:type_name -> org.signal.chat.purchase.SetIapSubscriptionRequest.AppStorePurchase - 33, // 39: org.signal.chat.purchase.SetIapSubscriptionRequest.play_billing:type_name -> org.signal.chat.purchase.SetIapSubscriptionRequest.PlayBillingPurchase - 34, // 40: org.signal.chat.purchase.SetIapSubscriptionResponse.success:type_name -> org.signal.chat.purchase.SetIapSubscriptionResponse.SetIapSubscriptionResult - 40, // 41: org.signal.chat.purchase.SetIapSubscriptionResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 38, // 42: org.signal.chat.purchase.SetIapSubscriptionResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 41, // 43: org.signal.chat.purchase.SetIapSubscriptionResponse.subscription_processor_conflict:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 44: org.signal.chat.purchase.SetIapSubscriptionResponse.payment_required:type_name -> org.signal.chat.errors.FailedPrecondition - 41, // 45: org.signal.chat.purchase.SetIapSubscriptionResponse.invalid_transaction:type_name -> org.signal.chat.errors.FailedPrecondition - 35, // 46: org.signal.chat.purchase.GetReceiptCredentialsResponse.success:type_name -> org.signal.chat.purchase.GetReceiptCredentialsResponse.GetReceiptCredentialsResult - 40, // 47: org.signal.chat.purchase.GetReceiptCredentialsResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 38, // 48: org.signal.chat.purchase.GetReceiptCredentialsResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 41, // 49: org.signal.chat.purchase.GetReceiptCredentialsResponse.no_paid_invoice:type_name -> org.signal.chat.errors.FailedPrecondition - 16, // 50: org.signal.chat.purchase.GetReceiptCredentialsResponse.payment_required:type_name -> org.signal.chat.purchase.PaymentRequired - 41, // 51: org.signal.chat.purchase.GetReceiptCredentialsResponse.already_redeemed:type_name -> org.signal.chat.errors.FailedPrecondition - 36, // 52: org.signal.chat.purchase.GetSubscriptionInformationResponse.success:type_name -> org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription - 37, // 53: org.signal.chat.purchase.GetSubscriptionInformationResponse.no_subscription:type_name -> google.protobuf.Empty - 40, // 54: org.signal.chat.purchase.GetSubscriptionInformationResponse.subscriber_not_found:type_name -> org.signal.chat.errors.NotFound - 38, // 55: org.signal.chat.purchase.GetSubscriptionInformationResponse.subscriber_id_mismatch:type_name -> org.signal.chat.errors.FailedUnidentifiedAuthorization - 3, // 56: org.signal.chat.purchase.GetBankMandateRequest.bank_transfer_type:type_name -> org.signal.chat.purchase.BankTransferType - 0, // 57: org.signal.chat.purchase.CreatePaymentMethodResponse.CreatePaymentMethodResult.paymentProvider:type_name -> org.signal.chat.purchase.PaymentProvider - 2, // 58: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription.status:type_name -> org.signal.chat.purchase.SubscriptionStatus - 0, // 59: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription.processor:type_name -> org.signal.chat.purchase.PaymentProvider - 1, // 60: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription.payment_method:type_name -> org.signal.chat.purchase.PaymentMethod - 15, // 61: org.signal.chat.purchase.GetSubscriptionInformationResponse.Subscription.charge_failure:type_name -> org.signal.chat.purchase.ChargeFailure - 4, // 62: org.signal.chat.purchase.Subscriptions.UpdateSubscriber:input_type -> org.signal.chat.purchase.UpdateSubscriberRequest - 6, // 63: org.signal.chat.purchase.Subscriptions.DeleteSubscriber:input_type -> org.signal.chat.purchase.DeleteSubscriberRequest - 8, // 64: org.signal.chat.purchase.Subscriptions.CreatePaymentMethod:input_type -> org.signal.chat.purchase.CreatePaymentMethodRequest - 10, // 65: org.signal.chat.purchase.Subscriptions.CreatePayPalPaymentMethod:input_type -> org.signal.chat.purchase.CreatePayPalPaymentMethodRequest - 12, // 66: org.signal.chat.purchase.Subscriptions.SetDefaultPaymentMethod:input_type -> org.signal.chat.purchase.SetDefaultPaymentMethodRequest - 14, // 67: org.signal.chat.purchase.Subscriptions.SetSubscriptionLevel:input_type -> org.signal.chat.purchase.SetSubscriptionLevelRequest - 22, // 68: org.signal.chat.purchase.Subscriptions.GetSubscriptionInformation:input_type -> org.signal.chat.purchase.GetSubscriptionInformationRequest - 20, // 69: org.signal.chat.purchase.Subscriptions.GetReceiptCredentials:input_type -> org.signal.chat.purchase.GetReceiptCredentialsRequest - 18, // 70: org.signal.chat.purchase.Subscriptions.SetIapSubscription:input_type -> org.signal.chat.purchase.SetIapSubscriptionRequest - 24, // 71: org.signal.chat.purchase.Subscriptions.GetBankMandate:input_type -> org.signal.chat.purchase.GetBankMandateRequest - 5, // 72: org.signal.chat.purchase.Subscriptions.UpdateSubscriber:output_type -> org.signal.chat.purchase.UpdateSubscriberResponse - 7, // 73: org.signal.chat.purchase.Subscriptions.DeleteSubscriber:output_type -> org.signal.chat.purchase.DeleteSubscriberResponse - 9, // 74: org.signal.chat.purchase.Subscriptions.CreatePaymentMethod:output_type -> org.signal.chat.purchase.CreatePaymentMethodResponse - 11, // 75: org.signal.chat.purchase.Subscriptions.CreatePayPalPaymentMethod:output_type -> org.signal.chat.purchase.CreatePayPalPaymentMethodResponse - 13, // 76: org.signal.chat.purchase.Subscriptions.SetDefaultPaymentMethod:output_type -> org.signal.chat.purchase.SetDefaultPaymentMethodResponse - 17, // 77: org.signal.chat.purchase.Subscriptions.SetSubscriptionLevel:output_type -> org.signal.chat.purchase.SetSubscriptionLevelResponse - 23, // 78: org.signal.chat.purchase.Subscriptions.GetSubscriptionInformation:output_type -> org.signal.chat.purchase.GetSubscriptionInformationResponse - 21, // 79: org.signal.chat.purchase.Subscriptions.GetReceiptCredentials:output_type -> org.signal.chat.purchase.GetReceiptCredentialsResponse - 19, // 80: org.signal.chat.purchase.Subscriptions.SetIapSubscription:output_type -> org.signal.chat.purchase.SetIapSubscriptionResponse - 25, // 81: org.signal.chat.purchase.Subscriptions.GetBankMandate:output_type -> org.signal.chat.purchase.GetBankMandateResponse - 72, // [72:82] is the sub-list for method output_type - 62, // [62:72] is the sub-list for method input_type - 62, // [62:62] is the sub-list for extension type_name - 62, // [62:62] is the sub-list for extension extendee - 0, // [0:62] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_subscriptions_proto_init() } -func file_org_signal_chat_subscriptions_proto_init() { - if File_org_signal_chat_subscriptions_proto != nil { - return - } - file_org_signal_chat_subscriptions_proto_msgTypes[1].OneofWrappers = []any{ - (*UpdateSubscriberResponse_Success)(nil), - (*UpdateSubscriberResponse_SubscriberIdMismatch)(nil), - (*UpdateSubscriberResponse_PermitRejected)(nil), - } - file_org_signal_chat_subscriptions_proto_msgTypes[3].OneofWrappers = []any{ - (*DeleteSubscriberResponse_Success)(nil), - (*DeleteSubscriberResponse_SubscriberNotFound)(nil), - (*DeleteSubscriberResponse_CannotCancelSubscription)(nil), - } - file_org_signal_chat_subscriptions_proto_msgTypes[5].OneofWrappers = []any{ - (*CreatePaymentMethodResponse_Result)(nil), - (*CreatePaymentMethodResponse_SubscriberNotFound)(nil), - (*CreatePaymentMethodResponse_SubscriberIdMismatch)(nil), - (*CreatePaymentMethodResponse_SubscriptionProcessorConflict)(nil), - (*CreatePaymentMethodResponse_PermitRejected)(nil), - } - file_org_signal_chat_subscriptions_proto_msgTypes[7].OneofWrappers = []any{ - (*CreatePayPalPaymentMethodResponse_Result)(nil), - (*CreatePayPalPaymentMethodResponse_SubscriberNotFound)(nil), - (*CreatePayPalPaymentMethodResponse_SubscriberIdMismatch)(nil), - (*CreatePayPalPaymentMethodResponse_SubscriptionProcessorConflict)(nil), - } - file_org_signal_chat_subscriptions_proto_msgTypes[8].OneofWrappers = []any{ - (*SetDefaultPaymentMethodRequest_Stripe)(nil), - (*SetDefaultPaymentMethodRequest_Braintree)(nil), - (*SetDefaultPaymentMethodRequest_Sepa)(nil), - } - file_org_signal_chat_subscriptions_proto_msgTypes[9].OneofWrappers = []any{ - (*SetDefaultPaymentMethodResponse_Success)(nil), - (*SetDefaultPaymentMethodResponse_SubscriberNotFound)(nil), - (*SetDefaultPaymentMethodResponse_SubscriberIdMismatch)(nil), - (*SetDefaultPaymentMethodResponse_PaymentMethodNotSetUp)(nil), - (*SetDefaultPaymentMethodResponse_SubscriptionProcessorConflict)(nil), - } - file_org_signal_chat_subscriptions_proto_msgTypes[11].OneofWrappers = []any{} - file_org_signal_chat_subscriptions_proto_msgTypes[12].OneofWrappers = []any{} - file_org_signal_chat_subscriptions_proto_msgTypes[13].OneofWrappers = []any{ - (*SetSubscriptionLevelResponse_Success)(nil), - (*SetSubscriptionLevelResponse_SubscriberNotFound)(nil), - (*SetSubscriptionLevelResponse_SubscriberIdMismatch)(nil), - (*SetSubscriptionLevelResponse_SubscriptionProcessorConflict)(nil), - (*SetSubscriptionLevelResponse_PaymentMethodNotSetUp)(nil), - (*SetSubscriptionLevelResponse_UnsupportedOperation)(nil), - (*SetSubscriptionLevelResponse_UnsupportedLevel)(nil), - (*SetSubscriptionLevelResponse_UnsupportedCurrency)(nil), - (*SetSubscriptionLevelResponse_PaymentRequiresAction)(nil), - (*SetSubscriptionLevelResponse_InvalidLevelTransition)(nil), - (*SetSubscriptionLevelResponse_InvalidIdempotencyKey)(nil), - (*SetSubscriptionLevelResponse_ChargeFailure)(nil), - } - file_org_signal_chat_subscriptions_proto_msgTypes[14].OneofWrappers = []any{ - (*SetIapSubscriptionRequest_AppStore)(nil), - (*SetIapSubscriptionRequest_PlayBilling)(nil), - } - file_org_signal_chat_subscriptions_proto_msgTypes[15].OneofWrappers = []any{ - (*SetIapSubscriptionResponse_Success)(nil), - (*SetIapSubscriptionResponse_SubscriberNotFound)(nil), - (*SetIapSubscriptionResponse_SubscriberIdMismatch)(nil), - (*SetIapSubscriptionResponse_SubscriptionProcessorConflict)(nil), - (*SetIapSubscriptionResponse_PaymentRequired)(nil), - (*SetIapSubscriptionResponse_InvalidTransaction)(nil), - } - file_org_signal_chat_subscriptions_proto_msgTypes[17].OneofWrappers = []any{ - (*GetReceiptCredentialsResponse_Success)(nil), - (*GetReceiptCredentialsResponse_SubscriberNotFound)(nil), - (*GetReceiptCredentialsResponse_SubscriberIdMismatch)(nil), - (*GetReceiptCredentialsResponse_NoPaidInvoice)(nil), - (*GetReceiptCredentialsResponse_PaymentRequired)(nil), - (*GetReceiptCredentialsResponse_AlreadyRedeemed)(nil), - } - file_org_signal_chat_subscriptions_proto_msgTypes[19].OneofWrappers = []any{ - (*GetSubscriptionInformationResponse_Success)(nil), - (*GetSubscriptionInformationResponse_NoSubscription)(nil), - (*GetSubscriptionInformationResponse_SubscriberNotFound)(nil), - (*GetSubscriptionInformationResponse_SubscriberIdMismatch)(nil), - } - file_org_signal_chat_subscriptions_proto_msgTypes[32].OneofWrappers = []any{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_subscriptions_proto_rawDesc), len(file_org_signal_chat_subscriptions_proto_rawDesc)), - NumEnums: 4, - NumMessages: 33, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_org_signal_chat_subscriptions_proto_goTypes, - DependencyIndexes: file_org_signal_chat_subscriptions_proto_depIdxs, - EnumInfos: file_org_signal_chat_subscriptions_proto_enumTypes, - MessageInfos: file_org_signal_chat_subscriptions_proto_msgTypes, - }.Build() - File_org_signal_chat_subscriptions_proto = out.File - file_org_signal_chat_subscriptions_proto_goTypes = nil - file_org_signal_chat_subscriptions_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions_grpc.pb.go b/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions_grpc.pb.go deleted file mode 100644 index 5153be8..0000000 --- a/pkg/signalmeow/protobuf/rpc/subscriptions/subscriptions_grpc.pb.go +++ /dev/null @@ -1,601 +0,0 @@ -// -// Copyright 2026 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.6.2 -// - protoc v7.34.1 -// source: org/signal/chat/subscriptions.proto - -package subscriptions - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Subscriptions_UpdateSubscriber_FullMethodName = "/org.signal.chat.purchase.Subscriptions/UpdateSubscriber" - Subscriptions_DeleteSubscriber_FullMethodName = "/org.signal.chat.purchase.Subscriptions/DeleteSubscriber" - Subscriptions_CreatePaymentMethod_FullMethodName = "/org.signal.chat.purchase.Subscriptions/CreatePaymentMethod" - Subscriptions_CreatePayPalPaymentMethod_FullMethodName = "/org.signal.chat.purchase.Subscriptions/CreatePayPalPaymentMethod" - Subscriptions_SetDefaultPaymentMethod_FullMethodName = "/org.signal.chat.purchase.Subscriptions/SetDefaultPaymentMethod" - Subscriptions_SetSubscriptionLevel_FullMethodName = "/org.signal.chat.purchase.Subscriptions/SetSubscriptionLevel" - Subscriptions_GetSubscriptionInformation_FullMethodName = "/org.signal.chat.purchase.Subscriptions/GetSubscriptionInformation" - Subscriptions_GetReceiptCredentials_FullMethodName = "/org.signal.chat.purchase.Subscriptions/GetReceiptCredentials" - Subscriptions_SetIapSubscription_FullMethodName = "/org.signal.chat.purchase.Subscriptions/SetIapSubscription" - Subscriptions_GetBankMandate_FullMethodName = "/org.signal.chat.purchase.Subscriptions/GetBankMandate" -) - -// SubscriptionsClient is the client API for Subscriptions service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// # Service for creating donation subscriptions -// -// Configuration for subscription levels can be found in ProductConfiguration. -type SubscriptionsClient interface { - // Subscribers MUST periodically hit this endpoint to update the access time on the subscription record. Subscribers - // SHOULD attempt to make an update call approximately every 3 days. Not accessing this endpoint for an extended - // period of time will result in the subscription being canceled. - UpdateSubscriber(ctx context.Context, in *UpdateSubscriberRequest, opts ...grpc.CallOption) (*UpdateSubscriberResponse, error) - // Cancels any current subscription at the end of the current subscription period. - // - // Note: Apple IAP subscriptions do not support server-side cancellation, so this method should only be called after - // cancelling a subscription from storekit to keep server data up to date. - DeleteSubscriber(ctx context.Context, in *DeleteSubscriberRequest, opts ...grpc.CallOption) (*DeleteSubscriberResponse, error) - // Returns a client secret that can be used to set up a new payment method with the payment processor. - CreatePaymentMethod(ctx context.Context, in *CreatePaymentMethodRequest, opts ...grpc.CallOption) (*CreatePaymentMethodResponse, error) - // Returns a PayPal billing agreement approval URL and token that can be used to set up PayPal as a payment method. - CreatePayPalPaymentMethod(ctx context.Context, in *CreatePayPalPaymentMethodRequest, opts ...grpc.CallOption) (*CreatePayPalPaymentMethodResponse, error) - // Sets the default payment method for a subscriber. - SetDefaultPaymentMethod(ctx context.Context, in *SetDefaultPaymentMethodRequest, opts ...grpc.CallOption) (*SetDefaultPaymentMethodResponse, error) - // Sets the subscription level and currency for a subscriber. - SetSubscriptionLevel(ctx context.Context, in *SetSubscriptionLevelRequest, opts ...grpc.CallOption) (*SetSubscriptionLevelResponse, error) - // Returns information about the current subscription associated with the provided subscriberId if one exists. - // - // Although it uses [Stripe's values](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses), - // the status field in the response is generic, with [Braintree-specific values](https://developer.paypal.com/braintree/docs/guides/recurring-billing/overview#subscription-statuses) mapped - // to Stripe's. Since we don't support trials or unpaid subscriptions, the associated statuses will never be returned - // by the API. - GetSubscriptionInformation(ctx context.Context, in *GetSubscriptionInformationRequest, opts ...grpc.CallOption) (*GetSubscriptionInformationResponse, error) - // Create a receipt from a valid payment invoice that can be used to obtain an entitlement - // - // This request is repeatable so long as the ReceiptCredentialRequest remains the same. Clients should use the same - // ReceiptCredentialRequest value until they attempt to redeem the resulting ReceiptCredentialPresentation. After - // this point, the ReceiptCredentialRequest MUST NOT be reused or you may not be able to redeem a valid payment - // invoice. Clients SHOULD retry requests at this endpoint with the same ReceiptCredentialRequest value until - // receiving a response. After receiving a response, clients should then compute the ReceiptCredentialPresentation - // and redeem it at the receipt redemption endpoint. Once the first attempt is made there, the same - // ReceiptCredentialRequest MUST NOT be used again to request receipt credentials. - // - // Note that you may in fact redeem TWO or more invoices for the same ReceiptCredentialRequest while retrying this - // operation if a later invoice gets paid while you are retrying. However, the returned receipt is always for the - // latest invoice, so it will have the latest expiration possible and no entitlement time will be lost. The important - // thing is not to reuse ReceiptCredentialRequest after you have started attempting to redeem the associated - // ReceiptCredentialPresentation. Then you may produce a ReceiptCredentialPresentation for a later invoice that - // cannot be redeemed. - // - // Clients MUST validate that the generated receipt credential's level and expiration matches their expectations. - GetReceiptCredentials(ctx context.Context, in *GetReceiptCredentialsRequest, opts ...grpc.CallOption) (*GetReceiptCredentialsResponse, error) - // Set a token that represents an IAP subscription made with App Store/Google Play Billing. - // - // To set up an App Store subscription: - // 1. Create a subscriber with UpdateSubscriber (you must regularly refresh this subscriber) - // 2. [Create a subscription](https://developer.apple.com/documentation/storekit/in-app_purchase/) with the App Store - // directly via StoreKit and obtain a originalTransactionId. - // 3. Call this RPC with the originalTransactionId - // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the - // entitlement - // - // Play Billing: Set a purchaseToken that represents an IAP subscription made with Google Play Billing. - // - // To set up a subscription with Google Play Billing: - // 1. Create a subscriber with UpdateSubscriber (you must regularly refresh this subscriber) - // 2. [Create a subscription](https://developer.android.com/google/play/billing/integrate) with Google Play Billing - // directly and obtain a purchaseToken. Do not [acknowledge](https://developer.android.com/google/play/billing/integrate#subscriptions) - // the purchaseToken. - // 3. Call this RPC with the purchaseToken - // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the - // entitlement - // - // After calling this method, the payment is confirmed. Callers must durably store their subscriberId before calling - // this method to ensure their payment is tracked. - // - // Once a purchaseToken to is posted to a subscriberId, the same subscriberId must not be used with another payment - // method. A different playbilling purchaseToken can be posted to the same subscriberId, in this case the subscription - // associated with the old purchaseToken will be cancelled. - SetIapSubscription(ctx context.Context, in *SetIapSubscriptionRequest, opts ...grpc.CallOption) (*SetIapSubscriptionResponse, error) - // Returns a localized bank mandate for the specified bank transfer type - GetBankMandate(ctx context.Context, in *GetBankMandateRequest, opts ...grpc.CallOption) (*GetBankMandateResponse, error) -} - -type subscriptionsClient struct { - cc grpc.ClientConnInterface -} - -func NewSubscriptionsClient(cc grpc.ClientConnInterface) SubscriptionsClient { - return &subscriptionsClient{cc} -} - -func (c *subscriptionsClient) UpdateSubscriber(ctx context.Context, in *UpdateSubscriberRequest, opts ...grpc.CallOption) (*UpdateSubscriberResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(UpdateSubscriberResponse) - err := c.cc.Invoke(ctx, Subscriptions_UpdateSubscriber_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subscriptionsClient) DeleteSubscriber(ctx context.Context, in *DeleteSubscriberRequest, opts ...grpc.CallOption) (*DeleteSubscriberResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(DeleteSubscriberResponse) - err := c.cc.Invoke(ctx, Subscriptions_DeleteSubscriber_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subscriptionsClient) CreatePaymentMethod(ctx context.Context, in *CreatePaymentMethodRequest, opts ...grpc.CallOption) (*CreatePaymentMethodResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreatePaymentMethodResponse) - err := c.cc.Invoke(ctx, Subscriptions_CreatePaymentMethod_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subscriptionsClient) CreatePayPalPaymentMethod(ctx context.Context, in *CreatePayPalPaymentMethodRequest, opts ...grpc.CallOption) (*CreatePayPalPaymentMethodResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreatePayPalPaymentMethodResponse) - err := c.cc.Invoke(ctx, Subscriptions_CreatePayPalPaymentMethod_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subscriptionsClient) SetDefaultPaymentMethod(ctx context.Context, in *SetDefaultPaymentMethodRequest, opts ...grpc.CallOption) (*SetDefaultPaymentMethodResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetDefaultPaymentMethodResponse) - err := c.cc.Invoke(ctx, Subscriptions_SetDefaultPaymentMethod_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subscriptionsClient) SetSubscriptionLevel(ctx context.Context, in *SetSubscriptionLevelRequest, opts ...grpc.CallOption) (*SetSubscriptionLevelResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetSubscriptionLevelResponse) - err := c.cc.Invoke(ctx, Subscriptions_SetSubscriptionLevel_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subscriptionsClient) GetSubscriptionInformation(ctx context.Context, in *GetSubscriptionInformationRequest, opts ...grpc.CallOption) (*GetSubscriptionInformationResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetSubscriptionInformationResponse) - err := c.cc.Invoke(ctx, Subscriptions_GetSubscriptionInformation_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subscriptionsClient) GetReceiptCredentials(ctx context.Context, in *GetReceiptCredentialsRequest, opts ...grpc.CallOption) (*GetReceiptCredentialsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetReceiptCredentialsResponse) - err := c.cc.Invoke(ctx, Subscriptions_GetReceiptCredentials_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subscriptionsClient) SetIapSubscription(ctx context.Context, in *SetIapSubscriptionRequest, opts ...grpc.CallOption) (*SetIapSubscriptionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SetIapSubscriptionResponse) - err := c.cc.Invoke(ctx, Subscriptions_SetIapSubscription_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subscriptionsClient) GetBankMandate(ctx context.Context, in *GetBankMandateRequest, opts ...grpc.CallOption) (*GetBankMandateResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetBankMandateResponse) - err := c.cc.Invoke(ctx, Subscriptions_GetBankMandate_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SubscriptionsServer is the server API for Subscriptions service. -// All implementations must embed UnimplementedSubscriptionsServer -// for forward compatibility. -// -// # Service for creating donation subscriptions -// -// Configuration for subscription levels can be found in ProductConfiguration. -type SubscriptionsServer interface { - // Subscribers MUST periodically hit this endpoint to update the access time on the subscription record. Subscribers - // SHOULD attempt to make an update call approximately every 3 days. Not accessing this endpoint for an extended - // period of time will result in the subscription being canceled. - UpdateSubscriber(context.Context, *UpdateSubscriberRequest) (*UpdateSubscriberResponse, error) - // Cancels any current subscription at the end of the current subscription period. - // - // Note: Apple IAP subscriptions do not support server-side cancellation, so this method should only be called after - // cancelling a subscription from storekit to keep server data up to date. - DeleteSubscriber(context.Context, *DeleteSubscriberRequest) (*DeleteSubscriberResponse, error) - // Returns a client secret that can be used to set up a new payment method with the payment processor. - CreatePaymentMethod(context.Context, *CreatePaymentMethodRequest) (*CreatePaymentMethodResponse, error) - // Returns a PayPal billing agreement approval URL and token that can be used to set up PayPal as a payment method. - CreatePayPalPaymentMethod(context.Context, *CreatePayPalPaymentMethodRequest) (*CreatePayPalPaymentMethodResponse, error) - // Sets the default payment method for a subscriber. - SetDefaultPaymentMethod(context.Context, *SetDefaultPaymentMethodRequest) (*SetDefaultPaymentMethodResponse, error) - // Sets the subscription level and currency for a subscriber. - SetSubscriptionLevel(context.Context, *SetSubscriptionLevelRequest) (*SetSubscriptionLevelResponse, error) - // Returns information about the current subscription associated with the provided subscriberId if one exists. - // - // Although it uses [Stripe's values](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses), - // the status field in the response is generic, with [Braintree-specific values](https://developer.paypal.com/braintree/docs/guides/recurring-billing/overview#subscription-statuses) mapped - // to Stripe's. Since we don't support trials or unpaid subscriptions, the associated statuses will never be returned - // by the API. - GetSubscriptionInformation(context.Context, *GetSubscriptionInformationRequest) (*GetSubscriptionInformationResponse, error) - // Create a receipt from a valid payment invoice that can be used to obtain an entitlement - // - // This request is repeatable so long as the ReceiptCredentialRequest remains the same. Clients should use the same - // ReceiptCredentialRequest value until they attempt to redeem the resulting ReceiptCredentialPresentation. After - // this point, the ReceiptCredentialRequest MUST NOT be reused or you may not be able to redeem a valid payment - // invoice. Clients SHOULD retry requests at this endpoint with the same ReceiptCredentialRequest value until - // receiving a response. After receiving a response, clients should then compute the ReceiptCredentialPresentation - // and redeem it at the receipt redemption endpoint. Once the first attempt is made there, the same - // ReceiptCredentialRequest MUST NOT be used again to request receipt credentials. - // - // Note that you may in fact redeem TWO or more invoices for the same ReceiptCredentialRequest while retrying this - // operation if a later invoice gets paid while you are retrying. However, the returned receipt is always for the - // latest invoice, so it will have the latest expiration possible and no entitlement time will be lost. The important - // thing is not to reuse ReceiptCredentialRequest after you have started attempting to redeem the associated - // ReceiptCredentialPresentation. Then you may produce a ReceiptCredentialPresentation for a later invoice that - // cannot be redeemed. - // - // Clients MUST validate that the generated receipt credential's level and expiration matches their expectations. - GetReceiptCredentials(context.Context, *GetReceiptCredentialsRequest) (*GetReceiptCredentialsResponse, error) - // Set a token that represents an IAP subscription made with App Store/Google Play Billing. - // - // To set up an App Store subscription: - // 1. Create a subscriber with UpdateSubscriber (you must regularly refresh this subscriber) - // 2. [Create a subscription](https://developer.apple.com/documentation/storekit/in-app_purchase/) with the App Store - // directly via StoreKit and obtain a originalTransactionId. - // 3. Call this RPC with the originalTransactionId - // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the - // entitlement - // - // Play Billing: Set a purchaseToken that represents an IAP subscription made with Google Play Billing. - // - // To set up a subscription with Google Play Billing: - // 1. Create a subscriber with UpdateSubscriber (you must regularly refresh this subscriber) - // 2. [Create a subscription](https://developer.android.com/google/play/billing/integrate) with Google Play Billing - // directly and obtain a purchaseToken. Do not [acknowledge](https://developer.android.com/google/play/billing/integrate#subscriptions) - // the purchaseToken. - // 3. Call this RPC with the purchaseToken - // 4. Obtain a receipt via GetReceiptCredentials which can then be used to obtain the - // entitlement - // - // After calling this method, the payment is confirmed. Callers must durably store their subscriberId before calling - // this method to ensure their payment is tracked. - // - // Once a purchaseToken to is posted to a subscriberId, the same subscriberId must not be used with another payment - // method. A different playbilling purchaseToken can be posted to the same subscriberId, in this case the subscription - // associated with the old purchaseToken will be cancelled. - SetIapSubscription(context.Context, *SetIapSubscriptionRequest) (*SetIapSubscriptionResponse, error) - // Returns a localized bank mandate for the specified bank transfer type - GetBankMandate(context.Context, *GetBankMandateRequest) (*GetBankMandateResponse, error) - mustEmbedUnimplementedSubscriptionsServer() -} - -// UnimplementedSubscriptionsServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedSubscriptionsServer struct{} - -func (UnimplementedSubscriptionsServer) UpdateSubscriber(context.Context, *UpdateSubscriberRequest) (*UpdateSubscriberResponse, error) { - return nil, status.Error(codes.Unimplemented, "method UpdateSubscriber not implemented") -} -func (UnimplementedSubscriptionsServer) DeleteSubscriber(context.Context, *DeleteSubscriberRequest) (*DeleteSubscriberResponse, error) { - return nil, status.Error(codes.Unimplemented, "method DeleteSubscriber not implemented") -} -func (UnimplementedSubscriptionsServer) CreatePaymentMethod(context.Context, *CreatePaymentMethodRequest) (*CreatePaymentMethodResponse, error) { - return nil, status.Error(codes.Unimplemented, "method CreatePaymentMethod not implemented") -} -func (UnimplementedSubscriptionsServer) CreatePayPalPaymentMethod(context.Context, *CreatePayPalPaymentMethodRequest) (*CreatePayPalPaymentMethodResponse, error) { - return nil, status.Error(codes.Unimplemented, "method CreatePayPalPaymentMethod not implemented") -} -func (UnimplementedSubscriptionsServer) SetDefaultPaymentMethod(context.Context, *SetDefaultPaymentMethodRequest) (*SetDefaultPaymentMethodResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetDefaultPaymentMethod not implemented") -} -func (UnimplementedSubscriptionsServer) SetSubscriptionLevel(context.Context, *SetSubscriptionLevelRequest) (*SetSubscriptionLevelResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetSubscriptionLevel not implemented") -} -func (UnimplementedSubscriptionsServer) GetSubscriptionInformation(context.Context, *GetSubscriptionInformationRequest) (*GetSubscriptionInformationResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetSubscriptionInformation not implemented") -} -func (UnimplementedSubscriptionsServer) GetReceiptCredentials(context.Context, *GetReceiptCredentialsRequest) (*GetReceiptCredentialsResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetReceiptCredentials not implemented") -} -func (UnimplementedSubscriptionsServer) SetIapSubscription(context.Context, *SetIapSubscriptionRequest) (*SetIapSubscriptionResponse, error) { - return nil, status.Error(codes.Unimplemented, "method SetIapSubscription not implemented") -} -func (UnimplementedSubscriptionsServer) GetBankMandate(context.Context, *GetBankMandateRequest) (*GetBankMandateResponse, error) { - return nil, status.Error(codes.Unimplemented, "method GetBankMandate not implemented") -} -func (UnimplementedSubscriptionsServer) mustEmbedUnimplementedSubscriptionsServer() {} -func (UnimplementedSubscriptionsServer) testEmbeddedByValue() {} - -// UnsafeSubscriptionsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to SubscriptionsServer will -// result in compilation errors. -type UnsafeSubscriptionsServer interface { - mustEmbedUnimplementedSubscriptionsServer() -} - -func RegisterSubscriptionsServer(s grpc.ServiceRegistrar, srv SubscriptionsServer) { - // If the following call panics, it indicates UnimplementedSubscriptionsServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Subscriptions_ServiceDesc, srv) -} - -func _Subscriptions_UpdateSubscriber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateSubscriberRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubscriptionsServer).UpdateSubscriber(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Subscriptions_UpdateSubscriber_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubscriptionsServer).UpdateSubscriber(ctx, req.(*UpdateSubscriberRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Subscriptions_DeleteSubscriber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteSubscriberRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubscriptionsServer).DeleteSubscriber(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Subscriptions_DeleteSubscriber_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubscriptionsServer).DeleteSubscriber(ctx, req.(*DeleteSubscriberRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Subscriptions_CreatePaymentMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePaymentMethodRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubscriptionsServer).CreatePaymentMethod(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Subscriptions_CreatePaymentMethod_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubscriptionsServer).CreatePaymentMethod(ctx, req.(*CreatePaymentMethodRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Subscriptions_CreatePayPalPaymentMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePayPalPaymentMethodRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubscriptionsServer).CreatePayPalPaymentMethod(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Subscriptions_CreatePayPalPaymentMethod_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubscriptionsServer).CreatePayPalPaymentMethod(ctx, req.(*CreatePayPalPaymentMethodRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Subscriptions_SetDefaultPaymentMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetDefaultPaymentMethodRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubscriptionsServer).SetDefaultPaymentMethod(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Subscriptions_SetDefaultPaymentMethod_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubscriptionsServer).SetDefaultPaymentMethod(ctx, req.(*SetDefaultPaymentMethodRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Subscriptions_SetSubscriptionLevel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetSubscriptionLevelRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubscriptionsServer).SetSubscriptionLevel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Subscriptions_SetSubscriptionLevel_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubscriptionsServer).SetSubscriptionLevel(ctx, req.(*SetSubscriptionLevelRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Subscriptions_GetSubscriptionInformation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSubscriptionInformationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubscriptionsServer).GetSubscriptionInformation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Subscriptions_GetSubscriptionInformation_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubscriptionsServer).GetSubscriptionInformation(ctx, req.(*GetSubscriptionInformationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Subscriptions_GetReceiptCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetReceiptCredentialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubscriptionsServer).GetReceiptCredentials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Subscriptions_GetReceiptCredentials_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubscriptionsServer).GetReceiptCredentials(ctx, req.(*GetReceiptCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Subscriptions_SetIapSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetIapSubscriptionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubscriptionsServer).SetIapSubscription(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Subscriptions_SetIapSubscription_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubscriptionsServer).SetIapSubscription(ctx, req.(*SetIapSubscriptionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Subscriptions_GetBankMandate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBankMandateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubscriptionsServer).GetBankMandate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Subscriptions_GetBankMandate_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubscriptionsServer).GetBankMandate(ctx, req.(*GetBankMandateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Subscriptions_ServiceDesc is the grpc.ServiceDesc for Subscriptions service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Subscriptions_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "org.signal.chat.purchase.Subscriptions", - HandlerType: (*SubscriptionsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "UpdateSubscriber", - Handler: _Subscriptions_UpdateSubscriber_Handler, - }, - { - MethodName: "DeleteSubscriber", - Handler: _Subscriptions_DeleteSubscriber_Handler, - }, - { - MethodName: "CreatePaymentMethod", - Handler: _Subscriptions_CreatePaymentMethod_Handler, - }, - { - MethodName: "CreatePayPalPaymentMethod", - Handler: _Subscriptions_CreatePayPalPaymentMethod_Handler, - }, - { - MethodName: "SetDefaultPaymentMethod", - Handler: _Subscriptions_SetDefaultPaymentMethod_Handler, - }, - { - MethodName: "SetSubscriptionLevel", - Handler: _Subscriptions_SetSubscriptionLevel_Handler, - }, - { - MethodName: "GetSubscriptionInformation", - Handler: _Subscriptions_GetSubscriptionInformation_Handler, - }, - { - MethodName: "GetReceiptCredentials", - Handler: _Subscriptions_GetReceiptCredentials_Handler, - }, - { - MethodName: "SetIapSubscription", - Handler: _Subscriptions_SetIapSubscription_Handler, - }, - { - MethodName: "GetBankMandate", - Handler: _Subscriptions_GetBankMandate_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "org/signal/chat/subscriptions.proto", -} diff --git a/pkg/signalmeow/protobuf/rpc/tag/tag.pb.go b/pkg/signalmeow/protobuf/rpc/tag/tag.pb.go deleted file mode 100644 index bd79729..0000000 --- a/pkg/signalmeow/protobuf/rpc/tag/tag.pb.go +++ /dev/null @@ -1,110 +0,0 @@ -// -// Copyright 2025 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc v7.34.1 -// source: org/signal/chat/tag.proto - -package tag - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var file_org_signal_chat_tag_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 71000, - Name: "org.signal.chat.tag.reason", - Tag: "bytes,71000,opt,name=reason", - Filename: "org/signal/chat/tag.proto", - }, -} - -// Extension fields to descriptorpb.FieldOptions. -var ( - // Indicate that a message which includes this field (directly or indirectly) - // was generated for a particular reason. - // - // ``` - // import "org/signal/chat/tag.proto" - // - // message LookupThingResponse { - // oneof response { - // string thing = 1; - // Error not_found = 2 [(tag.reason) = "not_found"]; - // Error forbidden = 3 [(tag.reason) = "forbidden"]; - // } - // } - // - // ``` - // - // Metrics middleware may then inspect `LookupThingResponse` and tag responses - // with the provided reason. This is useful when multiple outcomes are - // potentially represented with a status = "OK" RPC response. - // - // Valid messages should only have a single reason set. If a message has - // multiple fields present that have a reason option set, no guarantees are - // made about the reason that is selected. - // - // optional string reason = 71000; - E_Reason = &file_org_signal_chat_tag_proto_extTypes[0] -) - -var File_org_signal_chat_tag_proto protoreflect.FileDescriptor - -const file_org_signal_chat_tag_proto_rawDesc = "" + - "\n" + - "\x19org/signal/chat/tag.proto\x12\x13org.signal.chat.tag\x1a google/protobuf/descriptor.proto::\n" + - "\x06reason\x12\x1d.google.protobuf.FieldOptions\x18ت\x04 \x01(\tR\x06reason\x88\x01\x01B\x02P\x01b\x06proto3" - -var file_org_signal_chat_tag_proto_goTypes = []any{ - (*descriptorpb.FieldOptions)(nil), // 0: google.protobuf.FieldOptions -} -var file_org_signal_chat_tag_proto_depIdxs = []int32{ - 0, // 0: org.signal.chat.tag.reason:extendee -> google.protobuf.FieldOptions - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 0, // [0:1] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_org_signal_chat_tag_proto_init() } -func file_org_signal_chat_tag_proto_init() { - if File_org_signal_chat_tag_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_tag_proto_rawDesc), len(file_org_signal_chat_tag_proto_rawDesc)), - NumEnums: 0, - NumMessages: 0, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_org_signal_chat_tag_proto_goTypes, - DependencyIndexes: file_org_signal_chat_tag_proto_depIdxs, - ExtensionInfos: file_org_signal_chat_tag_proto_extTypes, - }.Build() - File_org_signal_chat_tag_proto = out.File - file_org_signal_chat_tag_proto_goTypes = nil - file_org_signal_chat_tag_proto_depIdxs = nil -} diff --git a/pkg/signalmeow/protobuf/signalpb/DeviceName.proto b/pkg/signalmeow/protobuf/signalpb/DeviceName.proto deleted file mode 100644 index 7db04ed..0000000 --- a/pkg/signalmeow/protobuf/signalpb/DeviceName.proto +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (C) 2014-2016 Open Whisper Systems - * - * Licensed according to the LICENSE file in this repository. - */ - -syntax = "proto2"; - -package signalservice; - -option java_package = "org.signal.core.util.crypto"; - -message DeviceName { - optional bytes ephemeralPublic = 1; - optional bytes syntheticIv = 2; - optional bytes ciphertext = 3; -} diff --git a/pkg/signalmeow/protobuf/update-protos.sh b/pkg/signalmeow/protobuf/update-protos.sh index c1e3c71..d65567c 100755 --- a/pkg/signalmeow/protobuf/update-protos.sh +++ b/pkg/signalmeow/protobuf/update-protos.sh @@ -1,8 +1,8 @@ #!/bin/bash -cd $(dirname "$0") set -euo pipefail -ANDROID_GIT_REVISION=${1:-46d6eeb2f3d3e12e6938151a8dbd2a33b5604b1f} +ANDROID_GIT_REVISION=${1:-bc6114f6e0d3a4b1dcdc472331505f2644185264} +DESKTOP_GIT_REVISION=${1:-a9063ec0c3c1079072c1e30e0749c1ae8be5500a} update_proto() { case "$1" in @@ -11,25 +11,19 @@ update_proto() { prefix="lib/libsignal-service/src/main/protowire/" GIT_REVISION=$ANDROID_GIT_REVISION ;; - Signal-Android-Archive) + Signal-Android-App) REPO="Signal-Android" - prefix="lib/archive/src/main/protowire/" + prefix="app/src/main/protowire/" GIT_REVISION=$ANDROID_GIT_REVISION ;; - Signal-Android-Network) - REPO="Signal-Android" - prefix="core/network/src/main/protowire/" - GIT_REVISION=$ANDROID_GIT_REVISION - ;; - Signal-Android-Util) - REPO="Signal-Android" - prefix="core/util-jvm/src/main/protowire/" - GIT_REVISION=$ANDROID_GIT_REVISION + Signal-Desktop) + REPO="Signal-Desktop" + prefix="protos/" + GIT_REVISION=$DESKTOP_GIT_REVISION ;; esac - DIRNAME=${3:-signalpb} echo https://raw.githubusercontent.com/signalapp/${REPO}/${GIT_REVISION}/${prefix}${2} - curl -Lf https://raw.githubusercontent.com/signalapp/${REPO}/${GIT_REVISION}/${prefix}${2} -o ${DIRNAME}/${2} + curl -LOf https://raw.githubusercontent.com/signalapp/${REPO}/${GIT_REVISION}/${prefix}${2} } @@ -37,12 +31,14 @@ update_proto Signal-Android Groups.proto update_proto Signal-Android Provisioning.proto update_proto Signal-Android SignalService.proto update_proto Signal-Android StickerResources.proto -update_proto Signal-Android-Network WebSocketResources.proto +update_proto Signal-Android WebSocketResources.proto update_proto Signal-Android StorageService.proto -update_proto Signal-Android-Util DeviceName.proto -update_proto Signal-Android-Archive Backup.proto backuppb -cp -f ../../libsignalgo/libsignal/rust/net/src/proto/cds2.proto cds2pb/cds2.proto -cp -rf ../../libsignalgo/libsignal/rust/net/grpc/proto/org . -sed 's#TextSecure.proto#signalpb/SignalService.proto#' -i org/signal/chat/messages.proto -sed 's/textsecure.Envelope/signalservice.Envelope/' -i org/signal/chat/messages.proto +update_proto Signal-Android-App Backup.proto +mv Backup.proto backuppb/Backup.proto + +update_proto Signal-Desktop DeviceName.proto +# TODO this was moved to libsignal only +#update_proto Signal-Desktop UnidentifiedDelivery.proto +# Android has CDSI.proto too, but the types have more generic names (since android uses a different package name) +update_proto Signal-Desktop ContactDiscovery.proto diff --git a/pkg/signalmeow/provisioning.go b/pkg/signalmeow/provisioning.go index bba1411..48a8042 100644 --- a/pkg/signalmeow/provisioning.go +++ b/pkg/signalmeow/provisioning.go @@ -18,6 +18,7 @@ package signalmeow import ( "context" + "crypto/hmac" "encoding/base64" "encoding/json" "fmt" @@ -34,7 +35,7 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/store" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" @@ -76,15 +77,6 @@ type ProvisioningResponse struct { Err error } -type DeviceLinkError struct { - StatusCode int - Message string -} - -func (dle DeviceLinkError) Error() string { - return fmt.Sprintf("non-200 status code (%d) from devices response: %s", dle.StatusCode, dle.Message) -} - func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, deviceName string, allowBackup bool) chan ProvisioningResponse { log := zerolog.Ctx(ctx).With().Str("action", "perform provisioning").Logger() c := make(chan ProvisioningResponse, 4) @@ -174,19 +166,24 @@ func PerformProvisioning(ctx context.Context, deviceStore store.DeviceStore, dev DeviceID: deviceId, Number: *provisioningMessage.Number, Password: password, + MasterKey: provisioningMessage.GetMasterKey(), AccountEntropyPool: libsignalgo.AccountEntropyPool(provisioningMessage.GetAccountEntropyPool()), EphemeralBackupKey: libsignalgo.BytesToBackupKey(provisioningMessage.GetEphemeralBackupKey()), MediaRootBackupKey: libsignalgo.BytesToBackupKey(provisioningMessage.GetMediaRootBackupKey()), } if provisioningMessage.GetAccountEntropyPool() != "" { - data.MasterKey, err = libsignalgo.AccountEntropyPool(provisioningMessage.GetAccountEntropyPool()).DeriveSVRKey() + var masterKey []byte + masterKey, err = libsignalgo.AccountEntropyPool(provisioningMessage.GetAccountEntropyPool()).DeriveSVRKey() if err != nil { log.Err(err).Msg("Failed to derive master key from account entropy pool") } else { log.Debug().Msg("Derived master key from account entropy pool") } - } else { - log.Warn().Msg("No account entropy pool in provisioning message") + if data.MasterKey == nil { + data.MasterKey = masterKey + } else if !hmac.Equal(data.MasterKey, masterKey) { + log.Warn().Msg("Master key mismatch") + } } // Store the provisioning data @@ -277,7 +274,7 @@ func startProvisioning(ctx context.Context, ws *websocket.Conn, provisioningCiph return "", fmt.Errorf("failed to unmarshal provisioning UUID: %w", err) } - linkCapabilities := []string{"backup5"} + linkCapabilities := []string{"backup4,backup5"} if !allowBackup { linkCapabilities = []string{} } @@ -337,9 +334,8 @@ func continueProvisioning(ctx context.Context, ws *websocket.Conn, provisioningC } var signalCapabilities = map[string]any{ - "attachmentBackfill": true, - "spqr": true, - "usernameChangeSyncMessage": true, + "attachmentBackfill": true, + "spqr": true, } var signalCapabilitiesBody = exerrors.Must(json.Marshal(signalCapabilities)) @@ -450,9 +446,9 @@ func confirmDevice( return nil, fmt.Errorf("failed to read from websocket after devices call: %w", err) } - status := int(receivedMsg.GetResponse().GetStatus()) + status := int(*receivedMsg.Response.Status) if status < 200 || status >= 300 { - return nil, DeviceLinkError{StatusCode: status, Message: receivedMsg.GetResponse().GetMessage()} + return nil, fmt.Errorf("non-200 status code (%d) from devices response: %s", status, *receivedMsg.Response.Message) } // unmarshal JSON response into ConfirmDeviceResponse diff --git a/pkg/signalmeow/provisioning_cipher.go b/pkg/signalmeow/provisioning_cipher.go index b20beb0..8670274 100644 --- a/pkg/signalmeow/provisioning_cipher.go +++ b/pkg/signalmeow/provisioning_cipher.go @@ -29,7 +29,7 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" ) type ProvisioningCipher struct { diff --git a/pkg/signalmeow/pushreg.go b/pkg/signalmeow/pushreg.go index b912f0c..79d0318 100644 --- a/pkg/signalmeow/pushreg.go +++ b/pkg/signalmeow/pushreg.go @@ -21,7 +21,7 @@ import ( "encoding/json" "net/http" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" ) diff --git a/pkg/signalmeow/receiving.go b/pkg/signalmeow/receiving.go index 0254a21..45fafa5 100644 --- a/pkg/signalmeow/receiving.go +++ b/pkg/signalmeow/receiving.go @@ -34,7 +34,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/libsignalgo" "go.mau.fi/mautrix-signal/pkg/signalmeow/events" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" ) @@ -84,10 +84,6 @@ func (cli *Client) startWebsocketsInternal( loopCtx context.Context, loopCancel context.CancelFunc, err error, ) { - cli.GRPC, err = web.NewGRPCClient(cli.Store.BasicAuthCreds()) - if err != nil { - return - } loopCtx, loopCancel = context.WithCancel(ctx) unauthChan, err = cli.connectUnauthedWS(loopCtx) if err != nil { @@ -287,23 +283,26 @@ func (cli *Client) StartReceiveLoops(ctx context.Context) (chan SignalConnection func (cli *Client) ForceReconnect() { cli.AuthedWS.ForceReconnect() cli.UnauthedWS.ForceReconnect() - cli.GRPC.ResetConnectBackoff() } func (cli *Client) StopReceiveLoops() error { defer func() { cli.AuthedWS = nil cli.UnauthedWS = nil - cli.GRPC = nil }() authErr := cli.AuthedWS.Close() unauthErr := cli.UnauthedWS.Close() - grpcErr := cli.GRPC.Close() if cli.loopCancel != nil { cli.loopCancel() cli.loopWg.Wait() } - return errors.Join(authErr, unauthErr, grpcErr) + if authErr != nil { + return authErr + } + if unauthErr != nil { + return unauthErr + } + return nil } func (cli *Client) LastConnectionStatus() SignalConnectionStatus { @@ -319,7 +318,13 @@ func (cli *Client) ClearKeysAndDisconnect(ctx context.Context) error { clearErr2 := cli.Store.ClearPassword(ctx) stopLoopErr := cli.StopReceiveLoops() - return errors.Join(clearErr, clearErr2, stopLoopErr) + if clearErr != nil { + return clearErr + } + if clearErr2 != nil { + return clearErr2 + } + return stopLoopErr } func (cli *Client) incomingRequestHandler(ctx context.Context, req *signalpb.WebSocketRequestMessage) (*web.SimpleResponse, error) { @@ -352,7 +357,7 @@ func (cli *Client) incomingAPIMessageHandler(ctx context.Context, req *signalpb. return nil, err } log = log.With(). - Uint64("envelope_timestamp", envelope.GetClientTimestamp()). + Uint64("envelope_timestamp", envelope.GetTimestamp()). Uint64("server_timestamp", envelope.GetServerTimestamp()). Logger() ctx = log.WithContext(ctx) @@ -363,7 +368,7 @@ func (cli *Client) incomingAPIMessageHandler(ctx context.Context, req *signalpb. Str("source_service_id", envelope.GetSourceServiceId()). Hex("destination_service_id_bytes", envelope.GetDestinationServiceIdBinary()). Hex("source_service_id_bytes", envelope.GetSourceServiceIdBinary()). - Uint32("source_device_id", envelope.GetSourceDeviceId()). + Uint32("source_device_id", envelope.GetSourceDevice()). Object("parsed_destination_service_id", destinationServiceID). Object("parsed_source_service_id", sourceServiceID). Int32("envelope_type_id", int32(envelope.GetType())). @@ -409,12 +414,8 @@ func (cli *Client) handleDecryptedResult( return ctx.Err() } log := zerolog.Ctx(ctx) - handlerSuccess := true - defer func() { - if retErr == nil && !handlerSuccess { - retErr = ErrHandlerFailed - } - if result.CiphertextHash != nil && handlerSuccess { + if result.CiphertextHash != nil { + defer func() { err := cli.Store.EventBuffer.ClearBufferedEventPlaintext(ctx, *result.CiphertextHash) if err != nil { log.Err(err). @@ -425,10 +426,8 @@ func (cli *Client) handleDecryptedResult( Hex("ciphertext_hash", result.CiphertextHash[:]). Msg("Deleted event plaintext from buffer") } - } else if result.CiphertextHash != nil { - log.Warn().Msg("Not clearing buffered event plaintext due to handler failure") - } - }() + }() + } var theirServiceID libsignalgo.ServiceID var err error @@ -437,25 +436,31 @@ func (cli *Client) handleDecryptedResult( Bool("urgent", envelope.GetUrgent()). Stringer("content_hint", result.ContentHint). Uint64("server_ts", envelope.GetServerTimestamp()). - Uint64("client_ts", envelope.GetClientTimestamp()). + Uint64("client_ts", envelope.GetTimestamp()). Msg("No sender address received") return nil } else if theirServiceID, err = result.SenderAddress.NameServiceID(); err != nil { log.Warn(). Uint64("server_ts", envelope.GetServerTimestamp()). - Uint64("client_ts", envelope.GetClientTimestamp()). + Uint64("client_ts", envelope.GetTimestamp()). Msg("Failed to get sender name as service ID") return fmt.Errorf("failed to get sender name as service ID: %w", err) } else if theirServiceID.Type != libsignalgo.ServiceIDTypeACI { log.Warn(). Any("their_service_id", theirServiceID). Uint64("server_ts", envelope.GetServerTimestamp()). - Uint64("client_ts", envelope.GetClientTimestamp()). + Uint64("client_ts", envelope.GetTimestamp()). Msg("Dropping message from non-ACI sender") return nil } cli.Store.RecipientStore.MarkUnregistered(ctx, theirServiceID, false) + handlerSuccess := true + defer func() { + if retErr == nil && !handlerSuccess { + retErr = ErrHandlerFailed + } + }() // result.Err is set if there was an error during decryption and we // should notifiy the user that the message could not be decrypted if result.Err != nil { @@ -464,7 +469,7 @@ func (cli *Client) handleDecryptedResult( Bool("urgent", envelope.GetUrgent()). Stringer("content_hint", result.ContentHint). Uint64("server_ts", envelope.GetServerTimestamp()). - Uint64("client_ts", envelope.GetClientTimestamp()). + Uint64("client_ts", envelope.GetTimestamp()). Stringer("sender", theirServiceID). Msg("Ignoring already processed event") return nil @@ -473,23 +478,23 @@ func (cli *Client) handleDecryptedResult( Bool("urgent", envelope.GetUrgent()). Stringer("content_hint", result.ContentHint). Uint64("server_ts", envelope.GetServerTimestamp()). - Uint64("client_ts", envelope.GetClientTimestamp()). + Uint64("client_ts", envelope.GetTimestamp()). Stringer("sender", theirServiceID). Msg("Decryption error with known sender") // Only send decryption error event if the message was urgent, // to prevent spamming errors for typing notifications and whatnot if envelope.GetUrgent() && - result.ContentHint != libsignalgo.UnidentifiedSenderMessageContentHintImplicit && + result.ContentHint != signalpb.UnidentifiedSenderMessage_Message_IMPLICIT && !strings.Contains(result.Err.Error(), "message with old counter") { handlerSuccess = cli.handleEvent(&events.DecryptionError{ Sender: theirServiceID.UUID, Err: result.Err, - Timestamp: envelope.GetClientTimestamp(), + Timestamp: envelope.GetTimestamp(), }) } if result.Retriable { go func() { - err := cli.sendRetryRequest(ctx, result, envelope.GetClientTimestamp()) + err := cli.sendRetryRequest(ctx, result, envelope.GetTimestamp()) if err != nil { log.Err(err).Msg("Failed to send retry request in background") } @@ -501,15 +506,15 @@ func (cli *Client) handleDecryptedResult( return nil } - rawContent := result.Content - if rawContent == nil { + content := result.Content + if content == nil { log.Warn().Msg("Decrypted content is nil") return nil } deviceID, _ := result.SenderAddress.DeviceID() log.Trace(). - Any("raw_data", rawContent). + Any("raw_data", content). Stringer("sender", theirServiceID). Uint("sender_device", deviceID). Msg("Raw event data") @@ -526,10 +531,9 @@ func (cli *Client) handleDecryptedResult( } logEvt.Bool("unencrypted", result.Unencrypted).Msg("Decrypted message") - // Handle unencrypted types early and refuse any other unencrypted message - if rawContent.GetDecryptionErrorMessage() != nil { + if content.DecryptionErrorMessage != nil { handlerSuccess = true - dem, err := libsignalgo.DeserializeDecryptionErrorMessage(rawContent.GetDecryptionErrorMessage()) + dem, err := libsignalgo.DeserializeDecryptionErrorMessage(content.DecryptionErrorMessage) if err != nil { log.Warn().Err(err).Msg("Failed to unmarshal decryption error message") } else { @@ -547,9 +551,9 @@ func (cli *Client) handleDecryptedResult( } // If there's a sender key distribution message, process it - if rawContent.SenderKeyDistributionMessage != nil { + if content.GetSenderKeyDistributionMessage() != nil { log.Debug().Msg("content includes sender key distribution message") - skdm, err := libsignalgo.DeserializeSenderKeyDistributionMessage(rawContent.SenderKeyDistributionMessage) + skdm, err := libsignalgo.DeserializeSenderKeyDistributionMessage(content.GetSenderKeyDistributionMessage()) if err != nil { log.Err(err).Msg("DeserializeSenderKeyDistributionMessage error") return err @@ -566,7 +570,6 @@ func (cli *Client) handleDecryptedResult( } } - // If we're getting a message to our PNI, mark it as needing a PNI signature message on the next send if destinationServiceID == cli.Store.PNIServiceID() { _, err = cli.Store.RecipientStore.LoadAndUpdateRecipient(ctx, theirServiceID.UUID, uuid.Nil, func(recipient *types.Recipient) (changed bool, err error) { if recipient.Whitelisted == nil { @@ -586,100 +589,86 @@ func (cli *Client) handleDecryptedResult( } } - // If we receive a PNI signature message (because we sent to a PNI earlier), process it - if rawContent.PniSignatureMessage != nil { + if content.PniSignatureMessage != nil { log.Debug().Msg("Content includes PNI signature message") - err = cli.handlePNISignatureMessage(ctx, theirServiceID, rawContent.PniSignatureMessage) + err = cli.handlePNISignatureMessage(ctx, theirServiceID, content.PniSignatureMessage) if err != nil { log.Err(err). - Hex("pni_raw", rawContent.PniSignatureMessage.GetPni()). + Hex("pni_raw", content.PniSignatureMessage.GetPni()). Stringer("aci", theirServiceID.UUID). Msg("Failed to verify ACI-PNI mapping") } } + if content.SyncMessage != nil && theirServiceID == cli.Store.ACIServiceID() { + handlerSuccess = cli.handleSyncMessage(ctx, content.SyncMessage, envelope) + return nil + } + isBlocked, err := cli.Store.RecipientStore.IsBlocked(ctx, theirServiceID.UUID) if err != nil { log.Err(err).Stringer("sender", theirServiceID).Msg("Failed to check if sender is blocked") } var sendDeliveryReceipt bool - var deliveryReceiptTS uint64 - switch content := rawContent.Content.(type) { - case *signalpb.Content_SyncMessage: - if theirServiceID == cli.Store.ACIServiceID() { - handlerSuccess = cli.handleSyncMessage(ctx, content.SyncMessage, envelope) - } - return nil - case *signalpb.Content_DataMessage: + if content.DataMessage != nil { handlerSuccess, sendDeliveryReceipt = cli.incomingDataMessage( ctx, content.DataMessage, theirServiceID.UUID, theirServiceID, envelope.GetServerTimestamp(), isBlocked, ) - deliveryReceiptTS = content.DataMessage.GetTimestamp() - case *signalpb.Content_EditMessage: + } else if content.EditMessage != nil { handlerSuccess, sendDeliveryReceipt = cli.incomingEditMessage( ctx, content.EditMessage, theirServiceID.UUID, theirServiceID, envelope.GetServerTimestamp(), isBlocked, ) - deliveryReceiptTS = content.EditMessage.GetDataMessage().GetTimestamp() - case *signalpb.Content_ReceiptMessage: - if content.ReceiptMessage.GetType() == signalpb.ReceiptMessage_DELIVERY && theirServiceID == cli.Store.ACIServiceID() { + } + if sendDeliveryReceipt && handlerSuccess { + err = cli.sendDeliveryReceipts(ctx, []uint64{content.DataMessage.GetTimestamp()}, theirServiceID.UUID) + if err != nil { + log.Err(err).Msg("sendDeliveryReceipts error") + } + } + + if content.TypingMessage != nil && (!isBlocked || content.TypingMessage.GetGroupId() != nil) { + var groupID types.GroupIdentifier + if content.TypingMessage.GetGroupId() != nil { + gidBytes := content.TypingMessage.GetGroupId() + groupID = types.GroupIdentifier(base64.StdEncoding.EncodeToString(gidBytes)) + } + // No handler success check here, nobody cares if typing notifications are dropped + cli.handleEvent(&events.ChatEvent{ + Info: events.MessageInfo{ + Sender: theirServiceID.UUID, + ChatID: groupOrUserID(groupID, theirServiceID), + ServerTimestamp: envelope.GetServerTimestamp(), + }, + Event: content.TypingMessage, + }) + } + + // DM call message (group call is an opaque callMessage and a groupCallUpdate in a dataMessage) + if content.CallMessage != nil && (content.CallMessage.Offer != nil || content.CallMessage.Hangup != nil) && !isBlocked { + handlerSuccess = cli.handleEvent(&events.Call{ + Info: events.MessageInfo{ + Sender: theirServiceID.UUID, + ChatID: theirServiceID.String(), + ServerTimestamp: envelope.GetServerTimestamp(), + }, + // CallMessage doesn't have its own timestamp, use one from the envelope + Timestamp: envelope.GetTimestamp(), + IsRinging: content.CallMessage.Offer != nil, + }) && handlerSuccess + } + + // Read and delivery receipts + if content.ReceiptMessage != nil { + if content.GetReceiptMessage().GetType() == signalpb.ReceiptMessage_DELIVERY && theirServiceID == cli.Store.ACIServiceID() { // Ignore delivery receipts from other own devices return nil } handlerSuccess = cli.handleEvent(&events.Receipt{ Sender: theirServiceID.UUID, Content: content.ReceiptMessage, - }) - case *signalpb.Content_TypingMessage: - var groupID types.GroupIdentifier - if content.TypingMessage.GetGroupId() != nil { - gidBytes := content.TypingMessage.GetGroupId() - groupID = types.GroupIdentifier(base64.StdEncoding.EncodeToString(gidBytes)) - } - if !isBlocked || groupID != "" { - // No handler success check here, nobody cares if typing notifications are dropped - cli.handleEvent(&events.ChatEvent{ - Info: events.MessageInfo{ - Sender: theirServiceID.UUID, - ChatID: groupOrUserID(groupID, theirServiceID), - ServerTimestamp: envelope.GetServerTimestamp(), - }, - Event: content.TypingMessage, - }) - } - case *signalpb.Content_CallMessage: - if !isBlocked && (content.CallMessage.Offer != nil || content.CallMessage.Hangup != nil) { - handlerSuccess = cli.handleEvent(&events.Call{ - Info: events.MessageInfo{ - Sender: theirServiceID.UUID, - ChatID: theirServiceID.String(), - ServerTimestamp: envelope.GetServerTimestamp(), - }, - // CallMessage doesn't have its own timestamp, use one from the envelope - Timestamp: envelope.GetClientTimestamp(), - IsRinging: content.CallMessage.Offer != nil, - }) - } - case *signalpb.Content_DecryptionErrorMessage: - // These should've been handled earlier - log.Warn().Msg("Unexpected decryption error message content in decrypted message") - case *signalpb.Content_NullMessage: - // This is intentionally ignored - case *signalpb.Content_StoryMessage: - // This is also ignored for now - default: - if rawContent.PniSignatureMessage == nil && rawContent.SenderKeyDistributionMessage == nil { - log.Warn().Type("content_type", content).Msg("Unrecognized message content type") - } + }) && handlerSuccess } - - if sendDeliveryReceipt && handlerSuccess { - err = cli.sendDeliveryReceipts(ctx, []uint64{deliveryReceiptTS}, theirServiceID.UUID) - if err != nil { - log.Err(err).Msg("sendDeliveryReceipts error") - } - } - return nil } @@ -694,9 +683,9 @@ func (cli *Client) handleSyncMessage(ctx context.Context, msg *signalpb.SyncMess // TODO: handle more sync messages handlerSuccess = true log := zerolog.Ctx(ctx) - switch content := msg.Content.(type) { - case *signalpb.SyncMessage_Keys_: - aep := libsignalgo.AccountEntropyPool(content.Keys.GetAccountEntropyPool()) + if msg.Keys != nil { + aep := libsignalgo.AccountEntropyPool(msg.Keys.GetAccountEntropyPool()) + cli.Store.MasterKey = msg.Keys.GetMaster() if aep != "" { aepMasterKey, err := aep.DeriveSVRKey() if err != nil { @@ -719,65 +708,59 @@ func (cli *Client) handleSyncMessage(ctx context.Context, msg *signalpb.SyncMess log.Info().Msg("Received master key") go cli.SyncStorage(ctx) } - case *signalpb.SyncMessage_FetchLatest_: - switch content.FetchLatest.GetType() { - case signalpb.SyncMessage_FetchLatest_STORAGE_MANIFEST: - log.Debug().Msg("Received storage manifest fetch latest notice") - go cli.SyncStorage(ctx) - default: - log.Debug(). - Stringer("fetch_latest_type", content.FetchLatest.GetType()). - Msg("Received unknown fetch latest notice") + } else if msg.GetFetchLatest().GetType() == signalpb.SyncMessage_FetchLatest_STORAGE_MANIFEST { + log.Debug().Msg("Received storage manifest fetch latest notice") + go cli.SyncStorage(ctx) + } + syncSent := msg.GetSent() + if syncSent.GetMessage() != nil || syncSent.GetEditMessage() != nil { + syncDestinationServiceID, err := ParseStringOrBinaryServiceID(syncSent.GetDestinationServiceId(), syncSent.GetDestinationServiceIdBinary()) + if err != nil && !errors.Is(err, ErrEmptyUUIDInput) { + log.Err(err).Msg("Sync message destination parse error") } - case *signalpb.SyncMessage_Sent_: - syncSent := content.Sent - if syncSent.GetMessage() != nil || syncSent.GetEditMessage() != nil { - syncDestinationServiceID, err := ParseStringOrBinaryServiceID(syncSent.GetDestinationServiceId(), syncSent.GetDestinationServiceIdBinary()) - if err != nil && !errors.Is(err, ErrEmptyUUIDInput) { - log.Err(err).Msg("Sync message destination parse error") + if syncSent.GetDestinationE164() != "" && !syncDestinationServiceID.IsEmpty() { + aci, pni := syncDestinationServiceID.ToACIAndPNI() + _, err = cli.Store.RecipientStore.UpdateRecipientE164(ctx, aci, pni, syncSent.GetDestinationE164()) + if err != nil { + log.Err(err).Msg("Failed to update recipient E164 after receiving sync message") } - if syncSent.GetDestinationE164() != "" && !syncDestinationServiceID.IsEmpty() { - aci, pni := syncDestinationServiceID.ToACIAndPNI() - _, err = cli.Store.RecipientStore.UpdateRecipientE164(ctx, aci, pni, syncSent.GetDestinationE164()) - if err != nil { - log.Err(err).Msg("Failed to update recipient E164 after receiving sync message") - } + } + for _, unident := range syncSent.GetUnidentifiedStatus() { + serviceID, err := ParseStringOrBinaryServiceID(unident.GetDestinationServiceId(), unident.GetDestinationServiceIdBinary()) + if err != nil { + log.Err(err). + Str("destination_service_id", unident.GetDestinationServiceId()). + Hex("destination_service_id_bytes", unident.GetDestinationServiceIdBinary()). + Msg("Failed to parse destination service ID of unidentified send") + continue } - for _, unident := range syncSent.GetUnidentifiedStatus() { - serviceID, err := ParseStringOrBinaryServiceID(unident.GetDestinationServiceId(), unident.GetDestinationServiceIdBinary()) - if err != nil { - log.Err(err). - Str("destination_service_id", unident.GetDestinationServiceId()). - Hex("destination_service_id_bytes", unident.GetDestinationServiceIdBinary()). - Msg("Failed to parse destination service ID of unidentified send") - continue - } - changed, err := cli.saveSyncPNIIdentityKey(ctx, serviceID, unident.GetDestinationPniIdentityKey()) - if err != nil { - log.Err(err). - Stringer("destination_service_id", serviceID). - Msg("Failed to save PNI identity key from sync message") - } else if changed { - log.Debug(). - Stringer("destination_service_id", serviceID). - Msg("Saved new PNI identity key from sync message") - } + changed, err := cli.saveSyncPNIIdentityKey(ctx, serviceID, unident.GetDestinationPniIdentityKey()) + if err != nil { + log.Err(err). + Stringer("destination_service_id", serviceID). + Msg("Failed to save PNI identity key from sync message") + } else if changed { + log.Debug(). + Stringer("destination_service_id", serviceID). + Msg("Saved new PNI identity key from sync message") } + } - if syncDestinationServiceID.IsEmpty() && syncSent.GetMessage().GetGroupV2() == nil && syncSent.GetEditMessage().GetDataMessage().GetGroupV2() == nil { - log.Warn().Msg("sync message sent destination is nil") - } else if syncSent.Message != nil { - // TODO handle expiration start ts, and maybe the sync message ts? - cli.incomingDataMessage(ctx, syncSent.Message, cli.Store.ACI, syncDestinationServiceID, envelope.GetServerTimestamp(), false) - } else if syncSent.EditMessage != nil { - cli.incomingEditMessage(ctx, syncSent.EditMessage, cli.Store.ACI, syncDestinationServiceID, envelope.GetServerTimestamp(), false) - } + if syncDestinationServiceID.IsEmpty() && syncSent.GetMessage().GetGroupV2() == nil && syncSent.GetEditMessage().GetDataMessage().GetGroupV2() == nil { + log.Warn().Msg("sync message sent destination is nil") + } else if msg.Sent.Message != nil { + // TODO handle expiration start ts, and maybe the sync message ts? + cli.incomingDataMessage(ctx, msg.Sent.Message, cli.Store.ACI, syncDestinationServiceID, envelope.GetServerTimestamp(), false) + } else if msg.Sent.EditMessage != nil { + cli.incomingEditMessage(ctx, msg.Sent.EditMessage, cli.Store.ACI, syncDestinationServiceID, envelope.GetServerTimestamp(), false) } - case *signalpb.SyncMessage_Contacts_: + } + if msg.Contacts != nil { log.Debug().Msg("Recieved sync message contacts") - if content.Contacts.Blob != nil { + blob := msg.Contacts.Blob + if blob != nil { // TODO roundtrip via disk to save memory - contactsBytes, err := DownloadAttachmentWithPointer(ctx, content.Contacts.Blob, nil, nil) + contactsBytes, err := DownloadAttachmentWithPointer(ctx, blob, nil, nil) if err != nil { log.Err(err).Msg("Contacts Sync DownloadAttachment error") } @@ -790,7 +773,7 @@ func (cli *Client) handleSyncMessage(ctx context.Context, msg *signalpb.SyncMess convertedContacts := make([]*types.Recipient, 0, len(contacts)) err = cli.Store.DoContactTxn(ctx, func(ctx context.Context) error { for i, signalContact := range contacts { - if (signalContact.Aci == nil || *signalContact.Aci == "") && len(signalContact.AciBinary) != 16 { + if signalContact.Aci == nil || *signalContact.Aci == "" { // TODO lookup PNI via CDSI and store that when ACI is missing? log.Info(). Any("contact", signalContact). @@ -813,14 +796,22 @@ func (cli *Client) handleSyncMessage(ctx context.Context, msg *signalpb.SyncMess }) } } - case *signalpb.SyncMessage_DeleteForMe_: - handlerSuccess = cli.handleEvent(&events.DeleteForMe{ - Timestamp: envelope.GetClientTimestamp(), - SyncMessage_DeleteForMe: content.DeleteForMe, + } + if msg.Read != nil { + handlerSuccess = cli.handleEvent(&events.ReadSelf{ + Timestamp: envelope.GetTimestamp(), + Messages: msg.GetRead(), }) - case *signalpb.SyncMessage_MessageRequestResponse_: - aciUUID, _ := ParseStringOrBinaryUUID(content.MessageRequestResponse.GetThreadAci(), content.MessageRequestResponse.GetThreadAciBinary()) - if aciUUID != uuid.Nil && content.MessageRequestResponse.GetType() == signalpb.SyncMessage_MessageRequestResponse_ACCEPT { + } + if msg.DeleteForMe != nil { + handlerSuccess = cli.handleEvent(&events.DeleteForMe{ + Timestamp: envelope.GetTimestamp(), + SyncMessage_DeleteForMe: msg.DeleteForMe, + }) + } + if msg.MessageRequestResponse != nil { + aciUUID, _ := ParseStringOrBinaryUUID(msg.MessageRequestResponse.GetThreadAci(), msg.MessageRequestResponse.GetThreadAciBinary()) + if aciUUID != uuid.Nil && msg.MessageRequestResponse.GetType() == signalpb.SyncMessage_MessageRequestResponse_ACCEPT { _, err := cli.Store.RecipientStore.LoadAndUpdateRecipient(ctx, aciUUID, uuid.Nil, func(recipient *types.Recipient) (changed bool, err error) { changed = !ptr.Val(recipient.Whitelisted) || recipient.NeedsPNISignature recipient.Whitelisted = ptr.Ptr(true) @@ -832,23 +823,16 @@ func (cli *Client) handleSyncMessage(ctx context.Context, msg *signalpb.SyncMess } } var groupID *libsignalgo.GroupIdentifier - if len(content.MessageRequestResponse.GroupId) == libsignalgo.GroupIdentifierLength { - groupID = (*libsignalgo.GroupIdentifier)(content.MessageRequestResponse.GroupId) + if len(msg.MessageRequestResponse.GroupId) == libsignalgo.GroupIdentifierLength { + groupID = (*libsignalgo.GroupIdentifier)(msg.MessageRequestResponse.GroupId) } handlerSuccess = cli.handleEvent(&events.MessageRequestResponse{ - Timestamp: envelope.GetClientTimestamp(), + Timestamp: envelope.GetTimestamp(), ThreadACI: aciUUID, GroupID: groupID, - Type: content.MessageRequestResponse.GetType(), - Raw: content.MessageRequestResponse, + Type: msg.MessageRequestResponse.GetType(), + Raw: msg.MessageRequestResponse, }) - default: - if msg.Read != nil { - handlerSuccess = cli.handleEvent(&events.ReadSelf{ - Timestamp: envelope.GetClientTimestamp(), - Messages: msg.Read, - }) - } } return } diff --git a/pkg/signalmeow/receiving_decrypt.go b/pkg/signalmeow/receiving_decrypt.go index 7d3c1a3..958f84f 100644 --- a/pkg/signalmeow/receiving_decrypt.go +++ b/pkg/signalmeow/receiving_decrypt.go @@ -29,7 +29,7 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/store" ) @@ -37,7 +37,7 @@ type DecryptionResult struct { SenderAddress *libsignalgo.Address CiphertextHash *[32]byte Content *signalpb.Content - ContentHint libsignalgo.UnidentifiedSenderMessageContentHint + ContentHint signalpb.UnidentifiedSenderMessage_Message_ContentHint Err error GroupID *libsignalgo.GroupIdentifier Unencrypted bool @@ -64,14 +64,14 @@ func (cli *Client) decryptEnvelope( } return result - case signalpb.Envelope_PREKEY_MESSAGE, signalpb.Envelope_DOUBLE_RATCHET: - sender, err := sourceServiceID.Address(uint(envelope.GetSourceDeviceId())) + case signalpb.Envelope_PREKEY_BUNDLE, signalpb.Envelope_CIPHERTEXT: + sender, err := sourceServiceID.Address(uint(envelope.GetSourceDevice())) if err != nil { return DecryptionResult{Err: fmt.Errorf("failed to wrap address: %v", err)} } var result *DecryptionResult var bundleType string - if *envelope.Type == signalpb.Envelope_PREKEY_MESSAGE { + if *envelope.Type == signalpb.Envelope_PREKEY_BUNDLE { result, err = cli.prekeyDecrypt(ctx, destinationServiceID, sender, envelope.Content, envelope.GetServerTimestamp()) bundleType = "prekey bundle" } else { @@ -90,7 +90,7 @@ func (cli *Client) decryptEnvelope( return *result case signalpb.Envelope_PLAINTEXT_CONTENT: - addr, err := sourceServiceID.Address(uint(envelope.GetSourceDeviceId())) + addr, err := sourceServiceID.Address(uint(envelope.GetSourceDevice())) if err != nil { return DecryptionResult{Err: fmt.Errorf("failed to wrap address: %v", err)} } @@ -100,13 +100,16 @@ func (cli *Client) decryptEnvelope( } return DecryptionResult{ SenderAddress: addr, - Content: &signalpb.Content{Content: &signalpb.Content_DecryptionErrorMessage{DecryptionErrorMessage: content}}, + Content: &signalpb.Content{DecryptionErrorMessage: content}, Unencrypted: true, } case signalpb.Envelope_SERVER_DELIVERY_RECEIPT: return DecryptionResult{Err: fmt.Errorf("server delivery receipt envelopes are not yet supported")} + case signalpb.Envelope_SENDERKEY_MESSAGE: + return DecryptionResult{Err: fmt.Errorf("senderkey message envelopes are not yet supported")} + case signalpb.Envelope_UNKNOWN: return DecryptionResult{Err: fmt.Errorf("unknown envelope type")} @@ -185,17 +188,12 @@ func (cli *Client) prekeyDecrypt( if is == nil { return nil, fmt.Errorf("no identity store found for %s", destination) } - destinationAddress, err := destination.Address(uint(cli.Store.DeviceID)) - if err != nil { - return nil, fmt.Errorf("failed to get own/destination address: %w", err) - } plaintext, ciphertextHash, err := cli.bufferedDecryptTxn(ctx, encryptedContent, serverTimestamp, func(ctx context.Context) ([]byte, error) { return libsignalgo.DecryptPreKey( ctx, preKeyMessage, sender, - destinationAddress, ss, is, pks, @@ -243,16 +241,11 @@ func (cli *Client) decryptCiphertextEnvelope( if identityStore == nil { return nil, fmt.Errorf("no identity store for destination service ID %s", destinationServiceID) } - destinationAddress, err := destinationServiceID.Address(uint(cli.Store.DeviceID)) - if err != nil { - return nil, fmt.Errorf("failed to get own address: %w", err) - } plaintext, ciphertextHash, err := cli.bufferedDecryptTxn(ctx, ciphertext, serverTimestamp, func(ctx context.Context) ([]byte, error) { return libsignalgo.Decrypt( ctx, message, senderAddress, - destinationAddress, sessionStore, identityStore, ) @@ -344,7 +337,7 @@ func (cli *Client) decryptUnidentifiedSenderEnvelope(ctx context.Context, destin if err != nil { return result, fmt.Errorf("failed to get group ID: %w", err) } - result.ContentHint = contentHint + result.ContentHint = signalpb.UnidentifiedSenderMessage_Message_ContentHint(contentHint) senderUUID, err := senderCertificate.GetSenderUUID() if err != nil { return result, fmt.Errorf("failed to get sender UUID: %w", err) @@ -401,16 +394,14 @@ func (cli *Client) decryptUnidentifiedSenderEnvelope(ctx context.Context, destin } result.Unencrypted = true result.Content = &signalpb.Content{ - Content: &signalpb.Content_DecryptionErrorMessage{ - DecryptionErrorMessage: usmcContents, - }, + DecryptionErrorMessage: usmcContents, } return result, err default: return result, fmt.Errorf("unsupported sealed sender message type %d", messageType) } if err != nil { - result.Retriable = result.ContentHint == libsignalgo.UnidentifiedSenderMessageContentHintResendable + result.Retriable = result.ContentHint == signalpb.UnidentifiedSenderMessage_Message_RESENDABLE return result, err } resultPtr.GroupID = result.GroupID diff --git a/pkg/signalmeow/retry.go b/pkg/signalmeow/retry.go index 0faf04a..2c89ecc 100644 --- a/pkg/signalmeow/retry.go +++ b/pkg/signalmeow/retry.go @@ -19,15 +19,13 @@ package signalmeow import ( "context" "fmt" - "math/rand/v2" "slices" "time" "github.com/rs/zerolog" - "go.mau.fi/util/random" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" ) @@ -65,9 +63,7 @@ func (cli *Client) sendRetryRequest(ctx context.Context, result DecryptionResult return fmt.Errorf("failed to create ciphertext message from plaintext content: %w", err) } _, err = cli.sendContent(ctx, serviceID, uint64(time.Now().UnixMilli()), &signalpb.Content{ - Content: &signalpb.Content_DecryptionErrorMessage{ - DecryptionErrorMessage: demBytes, - }, + DecryptionErrorMessage: demBytes, }, 0, true, result.GroupID, ctm) if err != nil { return fmt.Errorf("failed to send decryption error message: %w", err) @@ -186,11 +182,7 @@ func (cli *Client) handleRetryRequest( Msg("Not responding to decryption error message") return nil } - retryContent.Content = &signalpb.Content_NullMessage{ - NullMessage: &signalpb.NullMessage{ - Padding: random.Bytes(rand.IntN(511) + 1), - }, - } + retryContent.NullMessage = &signalpb.NullMessage{} } responseTimestamp := uint64(time.Now().UnixMilli()) if cacheHit { diff --git a/pkg/signalmeow/senderkey.go b/pkg/signalmeow/senderkey.go index 6e2c2da..48a3203 100644 --- a/pkg/signalmeow/senderkey.go +++ b/pkg/signalmeow/senderkey.go @@ -32,7 +32,7 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/store" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" @@ -180,14 +180,6 @@ func (cli *Client) sendToGroupWithSenderKey( } ssCiphertext, err := cli.encryptWithSenderKey(ctx, groupID, ski.DistributionID, myAddress, senderKeyRecipients, content) if err != nil { - if errors.Is(err, libsignalgo.ErrorCodeSessionNotFound) { - log.Warn().Err(err).Msg("Got session not found error for group send from libsignal, resetting session and retrying") - if err = cli.Store.SenderKeyStore.DeleteSenderKeyInfo(ctx, groupIDStr); err != nil { - return nil, fmt.Errorf("failed to delete sender key info: %w", err) - } - doUnlock() - return cli.sendToGroupWithSenderKey(ctx, groupID, allRecipients, sec, content, messageTimestamp, retries+1) - } return nil, err } for recipientID := range ski.SharedWith { diff --git a/pkg/signalmeow/sending.go b/pkg/signalmeow/sending.go index 8852197..568b4d4 100644 --- a/pkg/signalmeow/sending.go +++ b/pkg/signalmeow/sending.go @@ -22,7 +22,6 @@ import ( "encoding/json" "errors" "fmt" - "math/rand/v2" "net/http" "strconv" "strings" @@ -32,11 +31,10 @@ import ( "github.com/rs/zerolog" "go.mau.fi/util/exfmt" "go.mau.fi/util/ptr" - "go.mau.fi/util/random" "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" ) @@ -173,10 +171,6 @@ func (cli *Client) buildMessagesToSend( } else if len(sessions) == 0 { return nil, fmt.Errorf("no sessions found for recipient %s", recipient.String()) } - localAddress, err := cli.Store.ACIServiceID().Address(uint(cli.Store.DeviceID)) - if err != nil { - return nil, fmt.Errorf("failed to get own address: %w", err) - } messages := make([]MyMessage, 0, len(sessions)) for _, tuple := range sessions { @@ -199,7 +193,7 @@ func (cli *Client) buildMessagesToSend( includeE164 := groupID == nil && cli.Store.AccountRecord.GetPhoneNumberSharingMode() == signalpb.AccountRecord_EVERYBODY envelopeType, encryptedPayload, err := cli.buildMessageToSend( - ctx, tuple.Address, localAddress, paddedMessage, getContentHint(content), ctmOverride, groupID, includeE164, unauthenticated, + ctx, tuple.Address, paddedMessage, getContentHint(content), ctmOverride, groupID, includeE164, unauthenticated, ) if err != nil { return nil, err @@ -224,9 +218,11 @@ func (cli *Client) buildMessagesToSend( func ctmTypeToEnvelopeType(ctmType libsignalgo.CiphertextMessageType) signalpb.Envelope_Type { switch ctmType { case libsignalgo.CiphertextMessageTypeWhisper: - return signalpb.Envelope_DOUBLE_RATCHET // 2 -> 1 + return signalpb.Envelope_CIPHERTEXT // 2 -> 1 case libsignalgo.CiphertextMessageTypePreKey: - return signalpb.Envelope_PREKEY_MESSAGE // 3 -> 3 + return signalpb.Envelope_PREKEY_BUNDLE // 3 -> 3 + case libsignalgo.CiphertextMessageTypeSenderKey: + return signalpb.Envelope_SENDERKEY_MESSAGE // 7 -> 7 case libsignalgo.CiphertextMessageTypePlaintext: return signalpb.Envelope_PLAINTEXT_CONTENT // 8 -> 8 default: @@ -236,7 +232,7 @@ func ctmTypeToEnvelopeType(ctmType libsignalgo.CiphertextMessageType) signalpb.E func (cli *Client) buildMessageToSend( ctx context.Context, - recipientAddress, localAddress *libsignalgo.Address, + recipientAddress *libsignalgo.Address, paddedMessage []byte, contentHint libsignalgo.UnidentifiedSenderMessageContentHint, ciphertextMessage *libsignalgo.CiphertextMessage, @@ -248,7 +244,6 @@ func (cli *Client) buildMessageToSend( ctx, paddedMessage, recipientAddress, - localAddress, cli.Store.ACISessionStore, cli.Store.ACIIdentityStore, ) @@ -302,21 +297,11 @@ type SendResult interface { func (gmsr *GroupMessageSendResult) isSendResult() {} func (smsr *SendMessageResult) isSendResult() {} -func WrapSyncMessage(content *signalpb.SyncMessage) *signalpb.Content { - content.Padding = random.Bytes(rand.IntN(511) + 1) +func contentFromDataMessage(dataMessage *signalpb.DataMessage) *signalpb.Content { return &signalpb.Content{ - Content: &signalpb.Content_SyncMessage{SyncMessage: content}, + DataMessage: dataMessage, } } - -func syncSentMessage(sent *signalpb.SyncMessage_Sent) *signalpb.Content { - return WrapSyncMessage(&signalpb.SyncMessage{ - Content: &signalpb.SyncMessage_Sent_{ - Sent: sent, - }, - }) -} - func syncMessageFromGroupDataMessage(dataMessage *signalpb.DataMessage, results []SuccessfulSendResult) *signalpb.Content { unidentifiedStatuses := []*signalpb.SyncMessage_Sent_UnidentifiedDeliveryStatus{} for _, result := range results { @@ -325,14 +310,17 @@ func syncMessageFromGroupDataMessage(dataMessage *signalpb.DataMessage, results Unidentified: &result.Unidentified, }) } - return syncSentMessage(&signalpb.SyncMessage_Sent{ - Message: dataMessage, - Timestamp: dataMessage.Timestamp, - UnidentifiedStatus: unidentifiedStatuses, - ExpirationStartTimestamp: ptr.Ptr(uint64(time.Now().UnixMilli())), - }) + return &signalpb.Content{ + SyncMessage: &signalpb.SyncMessage{ + Sent: &signalpb.SyncMessage_Sent{ + Message: dataMessage, + Timestamp: dataMessage.Timestamp, + UnidentifiedStatus: unidentifiedStatuses, + ExpirationStartTimestamp: ptr.Ptr(uint64(time.Now().UnixMilli())), + }, + }, + } } - func syncMessageFromGroupEditMessage(editMessage *signalpb.EditMessage, results []SuccessfulSendResult) *signalpb.Content { unidentifiedStatuses := []*signalpb.SyncMessage_Sent_UnidentifiedDeliveryStatus{} for _, result := range results { @@ -341,50 +329,70 @@ func syncMessageFromGroupEditMessage(editMessage *signalpb.EditMessage, results Unidentified: &result.Unidentified, }) } - return syncSentMessage(&signalpb.SyncMessage_Sent{ - EditMessage: editMessage, - Timestamp: editMessage.GetDataMessage().Timestamp, - UnidentifiedStatus: unidentifiedStatuses, - ExpirationStartTimestamp: ptr.Ptr(uint64(time.Now().UnixMilli())), - }) + return &signalpb.Content{ + SyncMessage: &signalpb.SyncMessage{ + Sent: &signalpb.SyncMessage_Sent{ + EditMessage: editMessage, + Timestamp: editMessage.GetDataMessage().Timestamp, + UnidentifiedStatus: unidentifiedStatuses, + ExpirationStartTimestamp: ptr.Ptr(uint64(time.Now().UnixMilli())), + }, + }, + } } func syncMessageFromSoloDataMessage(dataMessage *signalpb.DataMessage, result SuccessfulSendResult) *signalpb.Content { - return syncSentMessage(&signalpb.SyncMessage_Sent{ - Message: dataMessage, - DestinationE164: result.RecipientE164, - DestinationServiceIdBinary: result.Recipient.Bytes(), - Timestamp: dataMessage.Timestamp, - ExpirationStartTimestamp: ptr.Ptr(uint64(time.Now().UnixMilli())), - UnidentifiedStatus: []*signalpb.SyncMessage_Sent_UnidentifiedDeliveryStatus{ - { + return &signalpb.Content{ + SyncMessage: &signalpb.SyncMessage{ + Sent: &signalpb.SyncMessage_Sent{ + Message: dataMessage, + DestinationE164: result.RecipientE164, DestinationServiceIdBinary: result.Recipient.Bytes(), - Unidentified: &result.Unidentified, - DestinationPniIdentityKey: result.DestinationPNIIdentityKey.TrySerialize(), + Timestamp: dataMessage.Timestamp, + ExpirationStartTimestamp: ptr.Ptr(uint64(time.Now().UnixMilli())), + UnidentifiedStatus: []*signalpb.SyncMessage_Sent_UnidentifiedDeliveryStatus{ + { + DestinationServiceIdBinary: result.Recipient.Bytes(), + Unidentified: &result.Unidentified, + DestinationPniIdentityKey: result.DestinationPNIIdentityKey.TrySerialize(), + }, + }, }, }, - }) + } } func syncMessageFromSoloEditMessage(editMessage *signalpb.EditMessage, result SuccessfulSendResult) *signalpb.Content { - return syncSentMessage(&signalpb.SyncMessage_Sent{ - EditMessage: editMessage, - DestinationE164: result.RecipientE164, - DestinationServiceIdBinary: result.Recipient.Bytes(), - Timestamp: editMessage.DataMessage.Timestamp, - ExpirationStartTimestamp: ptr.Ptr(uint64(time.Now().UnixMilli())), - UnidentifiedStatus: []*signalpb.SyncMessage_Sent_UnidentifiedDeliveryStatus{ - { + return &signalpb.Content{ + SyncMessage: &signalpb.SyncMessage{ + Sent: &signalpb.SyncMessage_Sent{ + EditMessage: editMessage, + DestinationE164: result.RecipientE164, DestinationServiceIdBinary: result.Recipient.Bytes(), - Unidentified: &result.Unidentified, - DestinationPniIdentityKey: result.DestinationPNIIdentityKey.TrySerialize(), + Timestamp: editMessage.DataMessage.Timestamp, + ExpirationStartTimestamp: ptr.Ptr(uint64(time.Now().UnixMilli())), + UnidentifiedStatus: []*signalpb.SyncMessage_Sent_UnidentifiedDeliveryStatus{ + { + DestinationServiceIdBinary: result.Recipient.Bytes(), + Unidentified: &result.Unidentified, + DestinationPniIdentityKey: result.DestinationPNIIdentityKey.TrySerialize(), + }, + }, }, }, - }) + } } func syncMessageFromReadReceiptMessage(ctx context.Context, receiptMessage *signalpb.ReceiptMessage, messageSender libsignalgo.ServiceID) *signalpb.Content { - if *receiptMessage.Type != signalpb.ReceiptMessage_READ || messageSender.Type != libsignalgo.ServiceIDTypeACI { + if *receiptMessage.Type != signalpb.ReceiptMessage_READ { + zerolog.Ctx(ctx).Warn(). + Any("receipt_message_type", receiptMessage.Type). + Msg("syncMessageFromReadReceiptMessage called with non-read receipt message") + return nil + } else if messageSender.Type != libsignalgo.ServiceIDTypeACI { + zerolog.Ctx(ctx).Warn(). + Stringer("message_sender", messageSender). + Msg("syncMessageFromReadReceiptMessage called with non-ACI message sender") return nil } read := []*signalpb.SyncMessage_Read{} @@ -394,9 +402,11 @@ func syncMessageFromReadReceiptMessage(ctx context.Context, receiptMessage *sign SenderAci: proto.String(messageSender.UUID.String()), }) } - return WrapSyncMessage(&signalpb.SyncMessage{ - Read: read, - }) + return &signalpb.Content{ + SyncMessage: &signalpb.SyncMessage{ + Read: read, + }, + } } func (cli *Client) SendContactSyncRequest(ctx context.Context) error { @@ -412,13 +422,13 @@ func (cli *Client) SendContactSyncRequest(ctx context.Context) error { } cli.LastContactRequestTime = time.Now() - _, err := cli.sendContent(ctx, cli.Store.ACIServiceID(), uint64(time.Now().UnixMilli()), WrapSyncMessage(&signalpb.SyncMessage{ - Content: &signalpb.SyncMessage_Request_{ + _, err := cli.sendContent(ctx, cli.Store.ACIServiceID(), uint64(time.Now().UnixMilli()), &signalpb.Content{ + SyncMessage: &signalpb.SyncMessage{ Request: &signalpb.SyncMessage_Request{ Type: signalpb.SyncMessage_Request_CONTACTS.Enum(), }, }, - }), 0, false, nil, nil) + }, 0, false, nil, nil) if err != nil { log.Err(err).Msg("Failed to send contact sync request message to myself") return err @@ -432,13 +442,13 @@ func (cli *Client) SendStorageMasterKeyRequest(ctx context.Context) error { Logger() ctx = log.WithContext(ctx) - _, err := cli.sendContent(ctx, cli.Store.ACIServiceID(), uint64(time.Now().UnixMilli()), WrapSyncMessage(&signalpb.SyncMessage{ - Content: &signalpb.SyncMessage_Request_{ + _, err := cli.sendContent(ctx, cli.Store.ACIServiceID(), uint64(time.Now().UnixMilli()), &signalpb.Content{ + SyncMessage: &signalpb.SyncMessage{ Request: &signalpb.SyncMessage_Request{ Type: signalpb.SyncMessage_Request_KEYS.Enum(), }, }, - }), 0, false, nil, nil) + }, 0, false, nil, nil) if err != nil { log.Err(err).Msg("Failed to send key sync request message to myself") return err @@ -458,47 +468,38 @@ func TypingMessage(isTyping bool) *signalpb.Content { } else { action = signalpb.TypingMessage_STOPPED } + tm := &signalpb.TypingMessage{ + Timestamp: ×tamp, + Action: &action, + } return &signalpb.Content{ - Content: &signalpb.Content_TypingMessage{ - TypingMessage: &signalpb.TypingMessage{ - Timestamp: ×tamp, - Action: &action, - }, - }, + TypingMessage: tm, } } func DeliveredReceiptMessageForTimestamps(timestamps []uint64) *signalpb.Content { + rm := &signalpb.ReceiptMessage{ + Timestamp: timestamps, + Type: signalpb.ReceiptMessage_DELIVERY.Enum(), + } return &signalpb.Content{ - Content: &signalpb.Content_ReceiptMessage{ - ReceiptMessage: &signalpb.ReceiptMessage{ - Timestamp: timestamps, - Type: signalpb.ReceiptMessage_DELIVERY.Enum(), - }, - }, + ReceiptMessage: rm, } } func ReadReceptMessageForTimestamps(timestamps []uint64) *signalpb.Content { + rm := &signalpb.ReceiptMessage{ + Timestamp: timestamps, + Type: signalpb.ReceiptMessage_READ.Enum(), + } return &signalpb.Content{ - Content: &signalpb.Content_ReceiptMessage{ - ReceiptMessage: &signalpb.ReceiptMessage{ - Timestamp: timestamps, - Type: signalpb.ReceiptMessage_READ.Enum(), - }, - }, + ReceiptMessage: rm, } } -func WrapDataMessage(dm *signalpb.DataMessage) *signalpb.Content { +func wrapDataMessageInContent(dm *signalpb.DataMessage) *signalpb.Content { return &signalpb.Content{ - Content: &signalpb.Content_DataMessage{DataMessage: dm}, - } -} - -func WrapEditMessage(dm *signalpb.EditMessage) *signalpb.Content { - return &signalpb.Content{ - Content: &signalpb.Content_EditMessage{EditMessage: dm}, + DataMessage: dm, } } @@ -525,7 +526,7 @@ func (cli *Client) SendGroupUpdate(ctx context.Context, group *Group, groupConte Timestamp: ×tamp, GroupV2: groupContext, } - content := WrapDataMessage(dm) + content := wrapDataMessageInContent(dm) var recipients []libsignalgo.ServiceID for _, member := range group.Members { serviceID := member.UserServiceID() @@ -563,14 +564,13 @@ func (cli *Client) SendGroupMessage(ctx context.Context, gid types.GroupIdentifi return nil, err } var messageTimestamp uint64 - switch content := content.Content.(type) { - case *signalpb.Content_DataMessage: + if content.GetDataMessage() != nil { messageTimestamp = content.DataMessage.GetTimestamp() content.DataMessage.GroupV2 = groupMetadataForDataMessage(*group) - case *signalpb.Content_EditMessage: + } else if content.GetEditMessage().GetDataMessage() != nil { messageTimestamp = content.EditMessage.DataMessage.GetTimestamp() content.EditMessage.DataMessage.GroupV2 = groupMetadataForDataMessage(*group) - case *signalpb.Content_TypingMessage: + } else if content.GetTypingMessage() != nil { messageTimestamp = content.TypingMessage.GetTimestamp() groupIDBytes, err := group.GroupIdentifier.Bytes() if err != nil { @@ -606,7 +606,7 @@ func (cli *Client) sendToGroup( FailedToSendTo: []FailedSendResult{}, } } - if content.GetTypingMessage() != nil { + if content.TypingMessage != nil { // Never send typing messages via fallback path return result, nil } @@ -648,16 +648,15 @@ func (cli *Client) sendToGroup( func (cli *Client) sendGroupSyncCopy( ctx context.Context, - rawContent *signalpb.Content, + content *signalpb.Content, messageTimestamp uint64, result *GroupMessageSendResult, groupID *libsignalgo.GroupIdentifier, ) { var syncContent *signalpb.Content - switch content := rawContent.Content.(type) { - case *signalpb.Content_DataMessage: + if content.GetDataMessage() != nil { syncContent = syncMessageFromGroupDataMessage(content.DataMessage, result.SuccessfullySentTo) - case *signalpb.Content_EditMessage: + } else if content.GetEditMessage() != nil { syncContent = syncMessageFromGroupEditMessage(content.EditMessage, result.SuccessfullySentTo) } if syncContent != nil { @@ -668,17 +667,16 @@ func (cli *Client) sendGroupSyncCopy( } } -func (cli *Client) sendSyncCopy(ctx context.Context, rawContent *signalpb.Content, messageTS uint64, result *SuccessfulSendResult) bool { +func (cli *Client) sendSyncCopy(ctx context.Context, content *signalpb.Content, messageTS uint64, result *SuccessfulSendResult) bool { var syncContent *signalpb.Content - switch content := rawContent.Content.(type) { - case *signalpb.Content_DataMessage: + if content.GetDataMessage() != nil { syncContent = syncMessageFromSoloDataMessage(content.DataMessage, *result) - case *signalpb.Content_EditMessage: + } else if content.GetEditMessage() != nil { syncContent = syncMessageFromSoloEditMessage(content.EditMessage, *result) - case *signalpb.Content_ReceiptMessage: + } else if content.GetReceiptMessage().GetType() == signalpb.ReceiptMessage_READ { syncContent = syncMessageFromReadReceiptMessage(ctx, content.ReceiptMessage, result.Recipient) - case *signalpb.Content_SyncMessage: - syncContent = rawContent + } else if content.GetSyncMessage() != nil { + syncContent = content } if syncContent != nil { _, selfSendErr := cli.sendContent(ctx, cli.Store.ACIServiceID(), messageTS, syncContent, 0, true, nil, nil) @@ -694,25 +692,22 @@ func (cli *Client) sendSyncCopy(ctx context.Context, rawContent *signalpb.Conten func (cli *Client) SendMessage(ctx context.Context, recipientID libsignalgo.ServiceID, content *signalpb.Content) SendMessageResult { // Assemble the content to send var messageTimestamp uint64 - switch realContent := content.Content.(type) { - case *signalpb.Content_DataMessage: - messageTimestamp = *realContent.DataMessage.Timestamp - case *signalpb.Content_EditMessage: - messageTimestamp = *realContent.EditMessage.DataMessage.Timestamp - case *signalpb.Content_TypingMessage: - messageTimestamp = *realContent.TypingMessage.Timestamp - case *signalpb.Content_SyncMessage, - *signalpb.Content_NullMessage, - *signalpb.Content_ReceiptMessage, - *signalpb.Content_DecryptionErrorMessage: + switch { + case content.DataMessage != nil: + messageTimestamp = *content.DataMessage.Timestamp + case content.EditMessage != nil: + messageTimestamp = *content.EditMessage.DataMessage.Timestamp + case content.TypingMessage != nil: + messageTimestamp = *content.TypingMessage.Timestamp + case content.SyncMessage != nil, + content.NullMessage != nil, + content.ReceiptMessage != nil, + content.PniSignatureMessage != nil, + content.SenderKeyDistributionMessage != nil, + content.DecryptionErrorMessage != nil: messageTimestamp = currentMessageTimestamp() - case *signalpb.Content_StoryMessage: - // not yet supported default: - if content.SenderKeyDistributionMessage == nil && content.PniSignatureMessage == nil { - panic(fmt.Errorf("unsupported payload in SendMessage")) - } - messageTimestamp = currentMessageTimestamp() + panic(fmt.Errorf("unsupported payload in SendMessage")) } var aci, pni uuid.UUID if recipientID.Type == libsignalgo.ServiceIDTypeACI { @@ -720,7 +715,7 @@ func (cli *Client) SendMessage(ctx context.Context, recipientID libsignalgo.Serv } else if recipientID.Type == libsignalgo.ServiceIDTypePNI { pni = recipientID.UUID } - isTypingOrReceipt := content.GetTypingMessage() != nil || content.GetReceiptMessage() != nil + isTypingOrReceipt := content.TypingMessage != nil || content.ReceiptMessage != nil recipientData, err := cli.Store.RecipientStore.LoadAndUpdateRecipient(ctx, aci, pni, func(recipientData *types.Recipient) (changed bool, err error) { if content.GetDataMessage().GetFlags() == uint32(signalpb.DataMessage_PROFILE_KEY_UPDATE) { recipientData.Whitelisted = ptr.Ptr(true) @@ -758,7 +753,7 @@ func (cli *Client) SendMessage(ctx context.Context, recipientID libsignalgo.Serv cli.sendSyncCopy(ctx, content, messageTimestamp, &res) } return SendMessageResult{WasSuccessful: true, SuccessfulSendResult: res} - } else if content.GetTypingMessage() != nil && cli.Store.DeviceData.AccountRecord != nil && !cli.Store.DeviceData.AccountRecord.GetTypingIndicators() { + } else if content.TypingMessage != nil && cli.Store.DeviceData.AccountRecord != nil && !cli.Store.DeviceData.AccountRecord.GetTypingIndicators() { zerolog.Ctx(ctx).Debug().Msg("Not sending typing message as typing indicators are disabled") res := SuccessfulSendResult{Recipient: recipientID} return SendMessageResult{WasSuccessful: true, SuccessfulSendResult: res} @@ -770,7 +765,7 @@ func (cli *Client) SendMessage(ctx context.Context, recipientID libsignalgo.Serv return SendMessageResult{WasSuccessful: true, SuccessfulSendResult: res} } - isDeliveryReceipt := content.GetReceiptMessage() != nil && content.GetReceiptMessage().GetType() == signalpb.ReceiptMessage_DELIVERY + isDeliveryReceipt := content.ReceiptMessage != nil && content.GetReceiptMessage().GetType() == signalpb.ReceiptMessage_DELIVERY if recipientID == cli.Store.ACIServiceID() && !isDeliveryReceipt { res := SuccessfulSendResult{ Recipient: recipientID, @@ -824,38 +819,25 @@ func currentMessageTimestamp() uint64 { } func isSyncMessageUrgent(content *signalpb.SyncMessage) bool { - switch content.Content.(type) { - case *signalpb.SyncMessage_Request_, - *signalpb.SyncMessage_Sent_: - return true - default: - return false - } + return content.Sent != nil || content.Request != nil } -func isUrgent(rawContent *signalpb.Content) bool { - switch content := rawContent.Content.(type) { - case *signalpb.Content_SyncMessage: - return isSyncMessageUrgent(content.SyncMessage) - case *signalpb.Content_DataMessage, - *signalpb.Content_EditMessage, - *signalpb.Content_CallMessage, - *signalpb.Content_StoryMessage: - return true - default: - return false - } +func isUrgent(content *signalpb.Content) bool { + return content.DataMessage != nil || + content.CallMessage != nil || + content.StoryMessage != nil || + content.EditMessage != nil || + (content.SyncMessage != nil && isSyncMessageUrgent(content.SyncMessage)) } -func getContentHint(rawContent *signalpb.Content) libsignalgo.UnidentifiedSenderMessageContentHint { - switch rawContent.Content.(type) { - case *signalpb.Content_DataMessage, *signalpb.Content_EditMessage: +func getContentHint(content *signalpb.Content) libsignalgo.UnidentifiedSenderMessageContentHint { + if content.DataMessage != nil || content.EditMessage != nil { return libsignalgo.UnidentifiedSenderMessageContentHintResendable - case *signalpb.Content_TypingMessage, *signalpb.Content_ReceiptMessage: - return libsignalgo.UnidentifiedSenderMessageContentHintImplicit - default: - return libsignalgo.UnidentifiedSenderMessageContentHintDefault } + if content.TypingMessage != nil || content.ReceiptMessage != nil { + return libsignalgo.UnidentifiedSenderMessageContentHintImplicit + } + return libsignalgo.UnidentifiedSenderMessageContentHintDefault } func (cli *Client) sendContent( @@ -876,12 +858,12 @@ func (cli *Client) sendContent( ctx = log.WithContext(ctx) // If it's a data message, add our profile key - if content.GetDataMessage() != nil && content.GetDataMessage().ProfileKey == nil { + if content.DataMessage != nil && content.DataMessage.ProfileKey == nil { profileKey, err := cli.ProfileKeyForSignalID(ctx, cli.Store.ACI) if err != nil { log.Err(err).Msg("Error getting profile key, not adding to outgoing message") } else { - content.GetDataMessage().ProfileKey = profileKey.Slice() + content.DataMessage.ProfileKey = profileKey.Slice() } } @@ -960,6 +942,7 @@ func (cli *Client) sendContent( Uint64("response_id", *response.Id). Uint32("response_status", *response.Status). Logger() + ctx = log.WithContext(ctx) if json.Valid(response.GetBody()) { log.Debug().RawJSON("response_body", response.GetBody()).Msg("DEBUG: message send response data") } else { diff --git a/pkg/signalmeow/sticker.go b/pkg/signalmeow/sticker.go deleted file mode 100644 index e1364b1..0000000 --- a/pkg/signalmeow/sticker.go +++ /dev/null @@ -1,251 +0,0 @@ -// mautrix-signal - A Matrix-signal puppeting bridge. -// Copyright (C) 2026 Tulir Asokan -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package signalmeow - -import ( - "bytes" - "context" - "crypto/hkdf" - "crypto/sha256" - "encoding/hex" - "errors" - "fmt" - "io" - "mime/multipart" - "net/http" - "net/textproto" - "sync" - - "go.mau.fi/util/exerrors" - "go.mau.fi/util/random" - "golang.org/x/sync/semaphore" - "google.golang.org/protobuf/proto" - - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" - "go.mau.fi/mautrix-signal/pkg/signalmeow/web" -) - -func DownloadStickerPackManifest(ctx context.Context, packID, packKey []byte) (*signalpb.Pack, error) { - if len(packID) != 16 { - return nil, fmt.Errorf("invalid pack ID length: %d", len(packID)) - } - resp, err := downloadStickerData(ctx, fmt.Sprintf("/stickers/%x/manifest.proto", packID), packKey) - if err != nil { - return nil, err - } - var pack signalpb.Pack - err = proto.Unmarshal(resp, &pack) - if err != nil { - return nil, fmt.Errorf("failed to unmarshal decrypted manifest: %w", err) - } - return &pack, nil -} - -func DownloadStickerPackItem(ctx context.Context, packID, packKey []byte, stickerID uint32) ([]byte, error) { - if len(packID) != 16 { - return nil, fmt.Errorf("invalid pack ID length: %d", len(packID)) - } - return downloadStickerData(ctx, fmt.Sprintf("/stickers/%x/full/%d", packID, stickerID), packKey) -} - -func downloadStickerData(ctx context.Context, path string, packKey []byte) ([]byte, error) { - if len(packKey) != 32 { - return nil, fmt.Errorf("invalid pack key length: %d", len(packKey)) - } - var body, decrypted []byte - resp, err := web.SendHTTPRequest(ctx, web.CDN1Hostname, http.MethodGet, path, nil) - defer web.CloseBody(resp) - if err != nil { - return nil, fmt.Errorf("failed to make request: %w", err) - } else if resp.StatusCode != http.StatusOK { - return nil, fmt.Errorf("unexpected status code %d", resp.StatusCode) - } else if body, err = io.ReadAll(resp.Body); err != nil { - return nil, fmt.Errorf("failed to read response: %w", err) - } else if decrypted, err = decryptSticker(packKey, body); err != nil { - return nil, fmt.Errorf("failed to decrypt response: %w", err) - } else { - return decrypted, nil - } -} - -type stickerUploadAttributes struct { - ACL string `json:"acl"` - Algorithm string `json:"algorithm"` - Credential string `json:"credential"` - Date string `json:"date"` - ID int `json:"id"` - Key string `json:"key"` - Policy string `json:"policy"` - Signature string `json:"signature"` -} - -func (sua *stickerUploadAttributes) makeFormBody(encryptedData []byte) (*web.HTTPReqOpt, error) { - var buf bytes.Buffer - writer := multipart.NewWriter(&buf) - var closed bool - // This isn't necessary in practice, just do it to avoid linter warnings - defer func() { - if !closed { - _ = writer.Close() - } - }() - fields := map[string]string{ - "key": sua.Key, - "acl": sua.ACL, - "policy": sua.Policy, - "x-amz-algorithm": sua.Algorithm, - "x-amz-credential": sua.Credential, - "x-amz-date": sua.Date, - "Content-Type": "application/octet-stream", - } - for key, value := range fields { - err := writer.WriteField(key, value) - if err != nil { - return nil, fmt.Errorf("failed to write multipart field %s: %w", key, err) - } - } - filePart, err := writer.CreatePart(textproto.MIMEHeader{ - "Content-Type": []string{"application/octet-stream"}, - "Content-Disposition": []string{`form-data; name="file"`}, - }) - if err != nil { - return nil, fmt.Errorf("failed to create multipart file part: %w", err) - } - _, err = filePart.Write(encryptedData) - if err != nil { - return nil, fmt.Errorf("failed to write file data to multipart body: %w", err) - } - err = writer.Close() - if err != nil { - return nil, fmt.Errorf("failed to close multipart writer: %w", err) - } - closed = true - return &web.HTTPReqOpt{ - Body: buf.Bytes(), - ContentType: web.ContentType(writer.FormDataContentType()), - }, nil -} - -func (sua *stickerUploadAttributes) upload(ctx context.Context, packKey, fileData []byte) error { - encryptedData, err := macAndAESEncrypt(fileData, deriveStickerPackKey(packKey)) - if err != nil { - return fmt.Errorf("failed to encrypt sticker data: %w", err) - } - req, err := sua.makeFormBody(encryptedData) - if err != nil { - return fmt.Errorf("failed to prepare request: %w", err) - } - resp, err := web.SendHTTPRequest(ctx, web.CDN1Hostname, http.MethodPost, "/", req) - if err != nil { - return err - } - _ = resp.Body.Close() - if resp.StatusCode < 200 || resp.StatusCode >= 300 { - return fmt.Errorf("unexpected status code %d", resp.StatusCode) - } - return nil -} - -func (sua *stickerUploadAttributes) uploadAsync( - ctx context.Context, - packKey []byte, - getFileData func(context.Context) ([]byte, error), - sema *semaphore.Weighted, - done func(), - onError func(error), -) { - defer done() - err := sema.Acquire(ctx, 1) - if err != nil { - return - } - defer sema.Release(1) - fileData, err := getFileData(ctx) - if err == nil { - err = sua.upload(ctx, packKey, fileData) - } - if err != nil { - onError(err) - } -} - -type stickerPackUploadAttributes struct { - PackID string `json:"packId"` - Manifest *stickerUploadAttributes `json:"manifest"` - Stickers []*stickerUploadAttributes `json:"stickers"` -} - -var StickerUploadParallelism = 4 - -func (cli *Client) UploadStickerPack(ctx context.Context, pack *signalpb.Pack, stickerData []func(context.Context) ([]byte, error)) (packID, packKey []byte, err error) { - for i, sticker := range pack.Stickers { - if sticker.GetId() >= uint32(len(stickerData)) { - return nil, nil, fmt.Errorf("sticker ID %d at index %d is out of bounds, only %d sticker blobs provided", sticker.GetId(), i, len(stickerData)) - } - } - marshaledPack, err := proto.Marshal(pack) - if err != nil { - return nil, nil, fmt.Errorf("failed to marshal pack: %w", err) - } - packKey = random.Bytes(32) - resp, err := cli.AuthedWS.SendRequest(ctx, http.MethodGet, fmt.Sprintf("/v1/sticker/pack/form/%d", len(stickerData)), nil, nil) - if err != nil { - return nil, nil, fmt.Errorf("failed to get upload form: %w", err) - } - var packAttributes stickerPackUploadAttributes - err = web.DecodeWSResponseBody(ctx, &packAttributes, resp) - if err != nil { - return nil, nil, fmt.Errorf("failed to decode pack attributes: %w", err) - } - if len(packAttributes.Stickers) != len(stickerData) { - return nil, nil, fmt.Errorf("expected %d sticker upload attribute sets, got %d", len(stickerData), len(packAttributes.Stickers)) - } - packID, err = hex.DecodeString(packAttributes.PackID) - if err != nil { - return nil, nil, fmt.Errorf("invalid pack ID in response: %w", err) - } - err = packAttributes.Manifest.upload(ctx, packKey, marshaledPack) - if err != nil { - return nil, nil, fmt.Errorf("failed to upload manifest: %w", err) - } - var wg sync.WaitGroup - wg.Add(len(packAttributes.Stickers)) - sema := semaphore.NewWeighted(int64(StickerUploadParallelism)) - var errorList []error - var errorLock sync.Mutex - for i, attrs := range packAttributes.Stickers { - go attrs.uploadAsync(ctx, packKey, stickerData[i], sema, wg.Done, func(err error) { - errorLock.Lock() - errorList = append(errorList, fmt.Errorf("failed to upload sticker #%d: %w", i+1, err)) - errorLock.Unlock() - }) - } - wg.Wait() - err = ctx.Err() - if err == nil { - err = errors.Join(errorList...) - } - return -} - -func decryptSticker(packKey, ciphertext []byte) ([]byte, error) { - return macAndAESDecrypt(ciphertext, deriveStickerPackKey(packKey)) -} - -func deriveStickerPackKey(key []byte) []byte { - return exerrors.Must(hkdf.Key(sha256.New, key, make([]byte, 32), "Sticker Pack", 2*32)) -} diff --git a/pkg/signalmeow/storageservice.go b/pkg/signalmeow/storageservice.go index df26a8d..fcf6848 100644 --- a/pkg/signalmeow/storageservice.go +++ b/pkg/signalmeow/storageservice.go @@ -37,7 +37,7 @@ import ( "go.mau.fi/mautrix-signal/pkg/libsignalgo" "go.mau.fi/mautrix-signal/pkg/signalmeow/events" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/types" "go.mau.fi/mautrix-signal/pkg/signalmeow/web" ) @@ -66,14 +66,12 @@ func (cli *Client) processStorageInTxn(ctx context.Context, update *StorageUpdat switch data := record.StorageRecord.GetRecord().(type) { case *signalpb.StorageRecord_Contact: log.Trace().Any("contact_record", data.Contact).Msg("Handling contact record") - aci, _ := ParseStringOrBinaryUUID(data.Contact.Aci, data.Contact.AciBinary) - pni, _ := ParseStringOrBinaryUUID(data.Contact.Pni, data.Contact.PniBinary) + aci, _ := uuid.Parse(data.Contact.Aci) + pni, _ := uuid.Parse(data.Contact.Pni) if aci == uuid.Nil && pni == uuid.Nil { log.Warn(). Str("raw_aci", data.Contact.Aci). Str("raw_pni", data.Contact.Pni). - Hex("raw_aci_binary", data.Contact.AciBinary). - Hex("raw_pni_binary", data.Contact.PniBinary). Str("raw_e164", data.Contact.E164). Msg("Storage service has contact record with no ACI or PNI") continue @@ -137,12 +135,6 @@ func (cli *Client) processStorageInTxn(ctx context.Context, update *StorageUpdat case *signalpb.StorageRecord_Account: log.Trace().Any("account_record", data.Account).Msg("Found account record") cli.Store.AccountRecord = data.Account - if len(data.Account.ProfileKey) == libsignalgo.ProfileKeyLength { - err := cli.Store.RecipientStore.StoreProfileKey(ctx, cli.Store.ACI, libsignalgo.ProfileKey(data.Account.ProfileKey)) - if err != nil { - return fmt.Errorf("failed to store own profile key: %w", err) - } - } err := cli.Store.DeviceStore.PutDevice(ctx, &cli.Store.DeviceData) if err != nil { return fmt.Errorf("failed to save device after receiving account record: %w", err) diff --git a/pkg/signalmeow/store/container.go b/pkg/signalmeow/store/container.go index d1c670a..e6335e5 100644 --- a/pkg/signalmeow/store/container.go +++ b/pkg/signalmeow/store/container.go @@ -12,7 +12,7 @@ import ( "google.golang.org/protobuf/proto" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/store/upgrades" ) diff --git a/pkg/signalmeow/store/device.go b/pkg/signalmeow/store/device.go index 3b6ebe5..e72c04f 100644 --- a/pkg/signalmeow/store/device.go +++ b/pkg/signalmeow/store/device.go @@ -10,7 +10,7 @@ import ( "go.mau.fi/util/dbutil" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" ) type sqlStore struct { diff --git a/pkg/signalmeow/store/upgrades/16-remove-extra-prekeys.go b/pkg/signalmeow/store/upgrades/16-remove-extra-prekeys.go index 44c70c2..5046abf 100644 --- a/pkg/signalmeow/store/upgrades/16-remove-extra-prekeys.go +++ b/pkg/signalmeow/store/upgrades/16-remove-extra-prekeys.go @@ -58,22 +58,24 @@ func deleteExtraPrekeys(ctx context.Context, db *dbutil.Database, selectQuery, d return nil } -var upgradeV16 = dbutil.WrapUpgrade(-1, 16, 13, "Remove extra prekeys", dbutil.TxnModeOn, func(ctx context.Context, db *dbutil.Database) error { - err := deleteExtraPrekeys(ctx, db, ` - SELECT account_id, service_id, COUNT(*), MAX(key_id) FROM signalmeow_pre_keys WHERE is_signed=false GROUP BY 1, 2 - `, ` - DELETE FROM signalmeow_pre_keys WHERE account_id=$1 AND service_id=$2 AND is_signed=false AND key_id<$3 - `) - if err != nil { - return fmt.Errorf("failed to process EC: %w", err) - } - err = deleteExtraPrekeys(ctx, db, ` - SELECT account_id, service_id, COUNT(*), MAX(key_id) FROM signalmeow_kyber_pre_keys WHERE is_last_resort=false GROUP BY 1, 2 - `, ` - DELETE FROM signalmeow_kyber_pre_keys WHERE account_id=$1 AND service_id=$2 AND is_last_resort=false AND key_id<$3 - `) - if err != nil { - return fmt.Errorf("failed to process kyber: %w", err) - } - return nil -}) +func init() { + Table.Register(-1, 16, 13, "Remove extra prekeys", dbutil.TxnModeOn, func(ctx context.Context, db *dbutil.Database) error { + err := deleteExtraPrekeys(ctx, db, ` + SELECT account_id, service_id, COUNT(*), MAX(key_id) FROM signalmeow_pre_keys WHERE is_signed=false GROUP BY 1, 2 + `, ` + DELETE FROM signalmeow_pre_keys WHERE account_id=$1 AND service_id=$2 AND is_signed=false AND key_id<$3 + `) + if err != nil { + return fmt.Errorf("failed to process EC: %w", err) + } + err = deleteExtraPrekeys(ctx, db, ` + SELECT account_id, service_id, COUNT(*), MAX(key_id) FROM signalmeow_kyber_pre_keys WHERE is_last_resort=false GROUP BY 1, 2 + `, ` + DELETE FROM signalmeow_kyber_pre_keys WHERE account_id=$1 AND service_id=$2 AND is_last_resort=false AND key_id<$3 + `) + if err != nil { + return fmt.Errorf("failed to process kyber: %w", err) + } + return nil + }) +} diff --git a/pkg/signalmeow/store/upgrades/20-fix-backup-chat-columns.go b/pkg/signalmeow/store/upgrades/20-fix-backup-chat-columns.go index 1313f11..d409fe6 100644 --- a/pkg/signalmeow/store/upgrades/20-fix-backup-chat-columns.go +++ b/pkg/signalmeow/store/upgrades/20-fix-backup-chat-columns.go @@ -22,13 +22,15 @@ import ( "go.mau.fi/util/dbutil" ) -var upgradeV20 = dbutil.WrapUpgrade(-1, 20, 13, "Add missing columns for backup chat table", dbutil.TxnModeOn, func(ctx context.Context, db *dbutil.Database) (err error) { - var exists bool - if exists, err = db.ColumnExists(ctx, "signalmeow_backup_chat", "latest_message_id"); err == nil && !exists { - _, err = db.Exec(ctx, ` - ALTER TABLE signalmeow_backup_chat ADD COLUMN latest_message_id BIGINT; - ALTER TABLE signalmeow_backup_chat ADD COLUMN total_message_count INTEGER; - `) - } - return -}) +func init() { + Table.Register(-1, 20, 13, "Add missing columns for backup chat table", dbutil.TxnModeOn, func(ctx context.Context, db *dbutil.Database) (err error) { + var exists bool + if exists, err = db.ColumnExists(ctx, "signalmeow_backup_chat", "latest_message_id"); err == nil && !exists { + _, err = db.Exec(ctx, ` + ALTER TABLE signalmeow_backup_chat ADD COLUMN latest_message_id BIGINT; + ALTER TABLE signalmeow_backup_chat ADD COLUMN total_message_count INTEGER; + `) + } + return + }) +} diff --git a/pkg/signalmeow/store/upgrades/upgrades.go b/pkg/signalmeow/store/upgrades/upgrades.go index f9e6350..19a6414 100644 --- a/pkg/signalmeow/store/upgrades/upgrades.go +++ b/pkg/signalmeow/store/upgrades/upgrades.go @@ -22,11 +22,11 @@ import ( "go.mau.fi/util/dbutil" ) +var Table dbutil.UpgradeTable + //go:embed *.sql var rawUpgrades embed.FS -var Table = dbutil.BuildUpgradeTable(). - WithFS(rawUpgrades). - With(upgradeV16). - With(upgradeV20). - Finish() +func init() { + Table.RegisterFS(rawUpgrades) +} diff --git a/pkg/signalmeow/web/grpc.go b/pkg/signalmeow/web/grpc.go deleted file mode 100644 index fb7cf7c..0000000 --- a/pkg/signalmeow/web/grpc.go +++ /dev/null @@ -1,169 +0,0 @@ -// mautrix-signal - A Matrix-signal puppeting bridge. -// Copyright (C) 2026 Tulir Asokan -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package web - -import ( - "context" - "encoding/base64" - "errors" - - "google.golang.org/grpc" - "google.golang.org/grpc/credentials" - - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/account" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/attachments" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/backups" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/call_quality" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/calling" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/challenge" - scredentials "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/credentials" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/device" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/donations" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/keys" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/login_purchase" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/messages" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/one_time_donations" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/payments" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/product_configuration" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/profile" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/remote_configuration" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/subscriptions" -) - -type GRPCAuthHeader struct { - value string -} - -var _ credentials.PerRPCCredentials = (*GRPCAuthHeader)(nil) - -func basicAuth(username, password string) string { - auth := username + ":" + password - return base64.StdEncoding.EncodeToString([]byte(auth)) -} - -func (a *GRPCAuthHeader) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) { - return map[string]string{ - "authorization": a.value, - }, nil -} - -func (a *GRPCAuthHeader) RequireTransportSecurity() bool { - return true -} - -type GRPCClient struct { - AuthConn *grpc.ClientConn - UnauthConn *grpc.ClientConn - - Accounts account.AccountsClient - Attachments attachments.AttachmentsClient - Backups backups.BackupsClient - Calling calling.CallingClient - Challenge challenge.ChallengeClient - Credentials scredentials.CredentialsClient - Devices device.DevicesClient - Donations donations.DonationsClient - Keys keys.KeysClient - Messages messages.MessagesClient - Payments payments.PaymentsClient - Profile profile.ProfileClient - RemoteConfiguration remote_configuration.RemoteConfigurationClient - - AccountsAnonymous account.AccountsAnonymousClient - BackupsAnonymous backups.BackupsAnonymousClient - CredentialsAnonymous scredentials.CredentialsAnonymousClient - KeysAnonymous keys.KeysAnonymousClient - MessagesAnonymous messages.MessagesAnonymousClient - ProfileAnonymous profile.ProfileAnonymousClient - CallQuality call_quality.CallQualityClient - LoginPurchase login_purchase.LoginPurchaseClient - OneTimeDonations one_time_donations.OneTimeDonationsClient - ProductConfiguration product_configuration.ProductConfigurationClient - Subscriptions subscriptions.SubscriptionsClient -} - -func (gc *GRPCClient) Close() error { - if gc == nil { - return nil - } - return errors.Join( - gc.AuthConn.Close(), - gc.UnauthConn.Close(), - ) -} - -func (gc *GRPCClient) ResetConnectBackoff() { - if gc == nil { - return - } - gc.AuthConn.ResetConnectBackoff() - gc.UnauthConn.ResetConnectBackoff() -} - -const GRPCTarget = "dns://grpc.chat.signal.org:443" - -func NewGRPCClient(username, password string) (*GRPCClient, error) { - grpcTLSConfig := credentials.NewTLS(SignalTLSConfig) - authConn, err := grpc.NewClient( - GRPCTarget, - grpc.WithUserAgent(UserAgent), - grpc.WithTransportCredentials(grpcTLSConfig), - grpc.WithPerRPCCredentials(&GRPCAuthHeader{value: "Basic " + basicAuth(username, password)}), - ) - if err != nil { - return nil, err - } - unauthConn, err := grpc.NewClient( - GRPCTarget, - grpc.WithUserAgent(UserAgent), - grpc.WithTransportCredentials(grpcTLSConfig), - ) - if err != nil { - _ = authConn.Close() - return nil, err - } - return &GRPCClient{ - AuthConn: authConn, - UnauthConn: unauthConn, - - Accounts: account.NewAccountsClient(authConn), - Attachments: attachments.NewAttachmentsClient(authConn), - Backups: backups.NewBackupsClient(authConn), - Calling: calling.NewCallingClient(authConn), - Challenge: challenge.NewChallengeClient(authConn), - Credentials: scredentials.NewCredentialsClient(authConn), - Devices: device.NewDevicesClient(authConn), - Donations: donations.NewDonationsClient(authConn), - Keys: keys.NewKeysClient(authConn), - Messages: messages.NewMessagesClient(authConn), - Payments: payments.NewPaymentsClient(authConn), - Profile: profile.NewProfileClient(authConn), - RemoteConfiguration: remote_configuration.NewRemoteConfigurationClient(authConn), - - AccountsAnonymous: account.NewAccountsAnonymousClient(unauthConn), - BackupsAnonymous: backups.NewBackupsAnonymousClient(unauthConn), - CredentialsAnonymous: scredentials.NewCredentialsAnonymousClient(unauthConn), - KeysAnonymous: keys.NewKeysAnonymousClient(unauthConn), - MessagesAnonymous: messages.NewMessagesAnonymousClient(unauthConn), - ProfileAnonymous: profile.NewProfileAnonymousClient(unauthConn), - CallQuality: call_quality.NewCallQualityClient(unauthConn), - LoginPurchase: login_purchase.NewLoginPurchaseClient(unauthConn), - OneTimeDonations: one_time_donations.NewOneTimeDonationsClient(unauthConn), - ProductConfiguration: product_configuration.NewProductConfigurationClient(unauthConn), - Subscriptions: subscriptions.NewSubscriptionsClient(unauthConn), - }, nil -} diff --git a/pkg/signalmeow/web/signal-root-ed25519.crt.der b/pkg/signalmeow/web/signal-root-ed25519.crt.der deleted file mode 100644 index 131e23d..0000000 Binary files a/pkg/signalmeow/web/signal-root-ed25519.crt.der and /dev/null differ diff --git a/pkg/signalmeow/web/signalwebsocket.go b/pkg/signalmeow/web/signalwebsocket.go index 3231322..a2153a1 100644 --- a/pkg/signalmeow/web/signalwebsocket.go +++ b/pkg/signalmeow/web/signalwebsocket.go @@ -33,7 +33,7 @@ import ( "github.com/rs/zerolog" "go.mau.fi/util/exsync" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" "go.mau.fi/mautrix-signal/pkg/signalmeow/wspb" ) @@ -616,12 +616,13 @@ func (s *SignalWebsocket) SendRequest( Path: &path, Body: body, Headers: headerArray, - }, 0) + }, time.Now(), 0) } func (s *SignalWebsocket) sendRequestInternal( ctx context.Context, request *signalpb.WebSocketRequestMessage, + startTime time.Time, retryCount int, ) (*signalpb.WebSocketResponseMessage, error) { if s.basicAuth != nil { @@ -631,7 +632,7 @@ func (s *SignalWebsocket) sendRequestInternal( err := s.pushOutgoing(ctx, SignalWebsocketSendMessage{ RequestMessage: request, ResponseChannel: responseChannel, - RequestTime: time.Now(), + RequestTime: startTime, }) if err != nil { return nil, err @@ -656,7 +657,7 @@ func (s *SignalWebsocket) sendRequestInternal( } } zerolog.Ctx(ctx).Warn().Int("retry_count", retryCount).Msg("Received nil response, retrying recursively") - return s.sendRequestInternal(ctx, request, retryCount+1) + return s.sendRequestInternal(ctx, request, startTime, retryCount+1) } return response, nil } diff --git a/pkg/signalmeow/web/web.go b/pkg/signalmeow/web/web.go index c5a0e12..d0fcd01 100644 --- a/pkg/signalmeow/web/web.go +++ b/pkg/signalmeow/web/web.go @@ -28,13 +28,11 @@ import ( "net/http" "runtime" "strings" - "time" "github.com/rs/zerolog" - "go.mau.fi/util/exerrors" "go.mau.fi/mautrix-signal/pkg/libsignalgo" - "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb" + signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf" ) var BaseUserAgent = "libsignal/" + libsignalgo.Version + " go/" + strings.TrimPrefix(runtime.Version(), "go") @@ -58,15 +56,8 @@ var CDNHosts = []string{ //go:embed signal-root.crt.der var signalRootCertBytes []byte - -//go:embed signal-root-ed25519.crt.der -var signalEd25519CertBytes []byte - var SignalCertPool = x509.NewCertPool() -var SignalTLSConfig = &tls.Config{ - RootCAs: SignalCertPool, - MinVersion: tls.VersionTLS13, -} +var SignalTLSConfig = &tls.Config{RootCAs: SignalCertPool} var signalTransport = &http.Transport{ ForceAttemptHTTP2: true, TLSClientConfig: SignalTLSConfig, @@ -76,8 +67,11 @@ var SignalHTTPClient = &http.Client{ } func init() { - SignalCertPool.AddCert(exerrors.Must(x509.ParseCertificate(signalRootCertBytes))) - SignalCertPool.AddCert(exerrors.Must(x509.ParseCertificate(signalEd25519CertBytes))) + cert, err := x509.ParseCertificate(signalRootCertBytes) + if err != nil { + panic(err) + } + SignalCertPool.AddCert(cert) } type ContentType string @@ -135,7 +129,6 @@ func SendHTTPRequest(ctx context.Context, host, method, path string, opt *HTTPRe } else { req.Header.Set("Content-Type", string(ContentTypeJSON)) } - req.ContentLength = int64(len(opt.Body)) req.Header.Set("Content-Length", fmt.Sprintf("%d", len(opt.Body))) req.Header.Set("User-Agent", UserAgent) req.Header.Set("X-Signal-Agent", SignalAgent) @@ -146,14 +139,12 @@ func SendHTTPRequest(ctx context.Context, host, method, path string, opt *HTTPRe httpReqCounter++ log = log.With().Int("request_number", httpReqCounter).Logger() log.Trace().Msg("Sending HTTP request") - start := time.Now() resp, err := SignalHTTPClient.Do(req) - dur := time.Since(start) if err != nil { - log.Err(err).Dur("duration", dur).Msg("Error sending request") + log.Err(err).Msg("Error sending request") return nil, err } - log.Debug().Int("status_code", resp.StatusCode).Dur("duration", dur).Msg("Received HTTP response") + log.Debug().Int("status_code", resp.StatusCode).Msg("received HTTP response") return resp, nil }