mirror of
https://github.com/mautrix/signal.git
synced 2026-09-15 23:32:03 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2dbf8c051e | ||
|
|
74df702870 | ||
|
|
0981c89556 | ||
|
|
68d1d756bc | ||
|
|
4bbf143b1a | ||
|
|
3ee213518c | ||
|
|
f629397f45 | ||
|
|
6983c5ac68 | ||
|
|
268b4dbd33 | ||
|
|
4d2ea8381f | ||
|
|
43415e309b | ||
|
|
017e4b87dd | ||
|
|
210f3f2e0b | ||
|
|
5962e497e9 |
||
|
|
92d237af93 | ||
|
|
ee281f5a14 |
147 changed files with 40072 additions and 2824 deletions
16
.github/workflows/go.yml
vendored
16
.github/workflows/go.yml
vendored
|
|
@ -11,14 +11,14 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
go-version: ["1.25", "1.26"]
|
go-version: ["1.26", "1.27"]
|
||||||
name: Lint ${{ matrix.go-version == '1.26' && '(latest)' || '(old)' }}
|
name: Lint ${{ matrix.go-version == '1.27' && '(latest)' || '(old)' }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v6
|
uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
cache: true
|
cache: true
|
||||||
|
|
@ -40,14 +40,14 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
go-version: ["1.25", "1.26"]
|
go-version: ["1.26", "1.27"]
|
||||||
name: Test ${{ matrix.go-version == '1.26' && '(latest)' || '(old)' }}
|
name: Test ${{ matrix.go-version == '1.27' && '(latest)' || '(old)' }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v6
|
uses: actions/setup-go@v7
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
cache: true
|
cache: true
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,12 @@
|
||||||
|
# v26.09 (unreleased)
|
||||||
|
|
||||||
|
* 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
|
# v26.08
|
||||||
|
|
||||||
* Updated libsignal to v0.100.0
|
* Updated libsignal to v0.100.0
|
||||||
|
|
|
||||||
1
CONTRIBUTING.md
Normal file
1
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
See <https://docs.mau.fi/bridges/general/contributing.html>
|
||||||
10
go.mod
10
go.mod
|
|
@ -1,8 +1,8 @@
|
||||||
module go.mau.fi/mautrix-signal
|
module go.mau.fi/mautrix-signal
|
||||||
|
|
||||||
go 1.25.0
|
go 1.26.0
|
||||||
|
|
||||||
toolchain go1.26.6
|
toolchain go1.27.0
|
||||||
|
|
||||||
tool go.mau.fi/util/cmd/maubuild
|
tool go.mau.fi/util/cmd/maubuild
|
||||||
|
|
||||||
|
|
@ -14,14 +14,15 @@ require (
|
||||||
github.com/rs/zerolog v1.35.1
|
github.com/rs/zerolog v1.35.1
|
||||||
github.com/stretchr/testify v1.11.1
|
github.com/stretchr/testify v1.11.1
|
||||||
github.com/tidwall/gjson v1.19.0
|
github.com/tidwall/gjson v1.19.0
|
||||||
go.mau.fi/util v0.10.0
|
go.mau.fi/util v0.10.1-0.20260820140024-eb612d936fde
|
||||||
golang.org/x/crypto v0.55.0
|
golang.org/x/crypto v0.55.0
|
||||||
golang.org/x/exp v0.0.0-20260813180055-c1d0aacb2297
|
golang.org/x/exp v0.0.0-20260813180055-c1d0aacb2297
|
||||||
golang.org/x/net v0.58.0
|
golang.org/x/net v0.58.0
|
||||||
golang.org/x/sync v0.22.0
|
golang.org/x/sync v0.22.0
|
||||||
|
google.golang.org/grpc v1.83.2
|
||||||
google.golang.org/protobuf v1.36.12
|
google.golang.org/protobuf v1.36.12
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
maunium.net/go/mautrix v0.30.0
|
maunium.net/go/mautrix v0.30.1-0.20260902205252-fb57ac367acd
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
|
@ -46,6 +47,7 @@ require (
|
||||||
golang.org/x/mod v0.40.0 // indirect
|
golang.org/x/mod v0.40.0 // indirect
|
||||||
golang.org/x/sys v0.47.0 // indirect
|
golang.org/x/sys v0.47.0 // indirect
|
||||||
golang.org/x/text v0.41.0 // indirect
|
golang.org/x/text v0.41.0 // indirect
|
||||||
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
|
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
|
||||||
maunium.net/go/mauflag v1.0.0 // indirect
|
maunium.net/go/mauflag v1.0.0 // indirect
|
||||||
|
|
|
||||||
34
go.sum
34
go.sum
|
|
@ -2,6 +2,8 @@ filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo=
|
||||||
filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc=
|
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 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU=
|
||||||
github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU=
|
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 h1:6B2JPeOGlpff2Uz6vOEH1Vzpi0iUz20A+lPVhPHtNUA=
|
||||||
github.com/coder/websocket v1.8.15/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
|
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 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA=
|
||||||
|
|
@ -11,6 +13,12 @@ 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/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 h1:4N8wnS3f1hNHSmFD5zgFkWCyA4L1kCDkImPAtK7D6tg=
|
||||||
github.com/emersion/go-vcard v0.0.0-20241024213814-c9703dde27ff/go.mod h1:HMJKR5wlh/ziNp+sHEDV2ltblO4JD2+IdDOWtGcQBTM=
|
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/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
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/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||||
|
|
@ -61,10 +69,22 @@ 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/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=
|
||||||
github.com/yuin/goldmark v1.8.5 h1:r6N5afV5qj/5S4UTch8agZHJ8UxNCMwX7WjkkJam2NA=
|
github.com/yuin/goldmark v1.8.5 h1:r6N5afV5qj/5S4UTch8agZHJ8UxNCMwX7WjkkJam2NA=
|
||||||
github.com/yuin/goldmark v1.8.5/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg=
|
github.com/yuin/goldmark v1.8.5/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg=
|
||||||
go.mau.fi/util v0.10.0 h1:vH9IXZmfBKa96p47HxrVqEPkrj02zDJg3o4EF172+Lk=
|
go.mau.fi/util v0.10.1-0.20260820140024-eb612d936fde h1:eMHY9dMDkNuDMWhfTbMZHbbsxj7G6mfujjKei1HaFQM=
|
||||||
go.mau.fi/util v0.10.0/go.mod h1:uZwpm9sK4wO2Qqy+t6QoVq29szMsRxWXp9/BkQLG4xk=
|
go.mau.fi/util v0.10.1-0.20260820140024-eb612d936fde/go.mod h1:z0ZZNt4hq3FZbUKnunexE/QscCx7VkLvQSvtggc/aE8=
|
||||||
go.mau.fi/zeroconfig v0.2.0 h1:e/OGEERqVRRKlgaro7E6bh8xXiKFSXB3eNNIud7FUjU=
|
go.mau.fi/zeroconfig v0.2.0 h1:e/OGEERqVRRKlgaro7E6bh8xXiKFSXB3eNNIud7FUjU=
|
||||||
go.mau.fi/zeroconfig v0.2.0/go.mod h1:J0Vn0prHNOm493oZoQ84kq83ZaNCYZnq+noI1b1eN8w=
|
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.55.0 h1:+KWHjbgOaAQ66dh/YlkZKHlz9ZUlq61AFirAR9ntP8M=
|
golang.org/x/crypto v0.55.0 h1:+KWHjbgOaAQ66dh/YlkZKHlz9ZUlq61AFirAR9ntP8M=
|
||||||
golang.org/x/crypto v0.55.0/go.mod h1:uq0V9dE/fzQuJtbnL+2EhWOE63vo164FY8xqEnV9xis=
|
golang.org/x/crypto v0.55.0/go.mod h1:uq0V9dE/fzQuJtbnL+2EhWOE63vo164FY8xqEnV9xis=
|
||||||
golang.org/x/exp v0.0.0-20260813180055-c1d0aacb2297 h1:YXnL44eJ77R+ji4/ooy8UsXIhz+lbi2Qgdlc8iRN0gY=
|
golang.org/x/exp v0.0.0-20260813180055-c1d0aacb2297 h1:YXnL44eJ77R+ji4/ooy8UsXIhz+lbi2Qgdlc8iRN0gY=
|
||||||
|
|
@ -80,6 +100,12 @@ golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
|
||||||
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||||
golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8=
|
golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8=
|
||||||
golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M=
|
golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M=
|
||||||
|
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 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc=
|
||||||
google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
|
@ -91,5 +117,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
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 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M=
|
||||||
maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA=
|
maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA=
|
||||||
maunium.net/go/mautrix v0.30.0 h1:bad+q7w5tLqiHpr+oUxVI+8m8ePbV3AvoFKg2jQzPyo=
|
maunium.net/go/mautrix v0.30.1-0.20260902205252-fb57ac367acd h1:qIDhvKX4DADO5MzZIyPiGhLdjp9ODBdfvFV7U6YmTgA=
|
||||||
maunium.net/go/mautrix v0.30.0/go.mod h1:bb0gjxbTFOqTaAYKGw5E7j9XROUR2Sl1Etm3IbmYXbo=
|
maunium.net/go/mautrix v0.30.1-0.20260902205252-fb57ac367acd/go.mod h1:Y02sBiAvfEVqK24bwVGCprmLATRZ7prWel3ZpB413e0=
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ import (
|
||||||
"go.mau.fi/mautrix-signal/pkg/libsignalgo"
|
"go.mau.fi/mautrix-signal/pkg/libsignalgo"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalid"
|
"go.mau.fi/mautrix-signal/pkg/signalid"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow"
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
@ -185,11 +185,22 @@ func (s *SignalClient) HandleMatrixEdit(ctx context.Context, msg *bridgev2.Matri
|
||||||
msg.EditTarget.Metadata = &signalid.MessageMetadata{ContainsAttachments: len(converted.Attachments) > 0}
|
msg.EditTarget.Metadata = &signalid.MessageMetadata{ContainsAttachments: len(converted.Attachments) > 0}
|
||||||
msg.EditTarget.EditCount++
|
msg.EditTarget.EditCount++
|
||||||
if prevID != msg.EditTarget.ID {
|
if prevID != msg.EditTarget.ID {
|
||||||
err = s.Main.Bridge.DB.Message.Update(ctx, msg.EditTarget)
|
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 {
|
if err != nil {
|
||||||
zerolog.Ctx(ctx).Err(err).Msg("Failed to save message after editing")
|
zerolog.Ctx(ctx).Err(err).
|
||||||
} else {
|
Str("prev_message_id", string(prevID)).
|
||||||
saveEditStub(ctx, s.Main.Bridge, prevID, msg.EditTarget)
|
Str("message_id", string(msg.EditTarget.ID)).
|
||||||
|
Msg("Failed to save message after editing")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
@ -198,7 +209,7 @@ func (s *SignalClient) HandleMatrixEdit(ctx context.Context, msg *bridgev2.Matri
|
||||||
// saveEditStub saves a placeholder message row pointing at the pre-edit ID of a message, such that
|
// 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
|
// 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.
|
// 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) {
|
func saveEditStub(ctx context.Context, bridge *bridgev2.Bridge, prevID networkid.MessageID, target *database.Message) error {
|
||||||
stub := &database.Message{
|
stub := &database.Message{
|
||||||
ID: prevID,
|
ID: prevID,
|
||||||
PartID: editStubPartID,
|
PartID: editStubPartID,
|
||||||
|
|
@ -208,13 +219,7 @@ func saveEditStub(ctx context.Context, bridge *bridgev2.Bridge, prevID networkid
|
||||||
Timestamp: target.Timestamp,
|
Timestamp: target.Timestamp,
|
||||||
}
|
}
|
||||||
stub.SetFakeMXID()
|
stub.SetFakeMXID()
|
||||||
err := bridge.DB.Message.Insert(ctx, stub)
|
return bridge.DB.Message.Insert(ctx, stub)
|
||||||
if err != nil {
|
|
||||||
zerolog.Ctx(ctx).Warn().Err(err).
|
|
||||||
Str("prev_message_id", string(prevID)).
|
|
||||||
Str("message_id", string(target.ID)).
|
|
||||||
Msg("Failed to save stub row for pre-edit message ID")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SignalClient) PreHandleMatrixReaction(ctx context.Context, msg *bridgev2.MatrixReaction) (bridgev2.MatrixReactionPreResponse, error) {
|
func (s *SignalClient) PreHandleMatrixReaction(ctx context.Context, msg *bridgev2.MatrixReaction) (bridgev2.MatrixReactionPreResponse, error) {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ import (
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalid"
|
"go.mau.fi/mautrix-signal/pkg/signalid"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow/events"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/events"
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow/types"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,7 @@ func (aes *AES256_GCM_SIV) Decrypt(ciphertext, nonce, associatedData []byte) ([]
|
||||||
BytesToBuffer(nonce),
|
BytesToBuffer(nonce),
|
||||||
BytesToBuffer(associatedData),
|
BytesToBuffer(associatedData),
|
||||||
)
|
)
|
||||||
|
runtime.KeepAlive(aes)
|
||||||
if signalFfiError != nil {
|
if signalFfiError != nil {
|
||||||
return nil, wrapError(signalFfiError)
|
return nil, wrapError(signalFfiError)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,10 @@ import (
|
||||||
// type AuthCredential [181]byte
|
// type AuthCredential [181]byte
|
||||||
// type AuthCredentialResponse [361]byte
|
// type AuthCredentialResponse [361]byte
|
||||||
const AuthCredentialWithPniLength = 265
|
const AuthCredentialWithPniLength = 265
|
||||||
|
const AuthCredentialWithPniResponseLength = 425
|
||||||
|
|
||||||
type AuthCredentialWithPni [AuthCredentialWithPniLength]byte
|
type AuthCredentialWithPni [AuthCredentialWithPniLength]byte
|
||||||
type AuthCredentialWithPniResponse [425]byte
|
type AuthCredentialWithPniResponse [AuthCredentialWithPniResponseLength]byte
|
||||||
type AuthCredentialPresentation []byte
|
type AuthCredentialPresentation []byte
|
||||||
|
|
||||||
func (ac *AuthCredentialWithPni) Slice() []byte {
|
func (ac *AuthCredentialWithPni) Slice() []byte {
|
||||||
|
|
@ -68,6 +69,9 @@ func ReceiveAuthCredentialWithPni(
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewAuthCredentialWithPniResponse(b []byte) (*AuthCredentialWithPniResponse, error) {
|
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)
|
borrowedBuffer := BytesToBuffer(b)
|
||||||
signalFfiError := C.signal_auth_credential_with_pni_response_check_valid_contents(borrowedBuffer)
|
signalFfiError := C.signal_auth_credential_with_pni_response_check_valid_contents(borrowedBuffer)
|
||||||
if signalFfiError != nil {
|
if signalFfiError != nil {
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,14 @@ package libsignalgo
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"runtime"
|
"runtime"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
func BorrowedMutableBuffer(length int) C.SignalBorrowedMutableBuffer {
|
func BorrowedMutableBuffer(length int) C.SignalBorrowedMutableBuffer {
|
||||||
|
if length <= 0 {
|
||||||
|
return C.SignalBorrowedMutableBuffer{}
|
||||||
|
}
|
||||||
data := make([]byte, length)
|
data := make([]byte, length)
|
||||||
return C.SignalBorrowedMutableBuffer{
|
return C.SignalBorrowedMutableBuffer{
|
||||||
base: (*C.uchar)(unsafe.Pointer(&data[0])),
|
base: (*C.uchar)(unsafe.Pointer(&data[0])),
|
||||||
|
|
@ -48,10 +50,9 @@ func ManyBytesToBuffer[T ~[]byte](datas []T) (C.SignalBorrowedSliceOfBuffers, fu
|
||||||
buffers := make([]C.SignalBorrowedBuffer, len(datas))
|
buffers := make([]C.SignalBorrowedBuffer, len(datas))
|
||||||
var pinner runtime.Pinner
|
var pinner runtime.Pinner
|
||||||
for i, data := range datas {
|
for i, data := range datas {
|
||||||
if len(data) == 0 {
|
if len(data) > 0 {
|
||||||
panic(fmt.Errorf("empty slice passed to ManyBytesToBuffer at index %d", i))
|
pinner.Pin(&data[0])
|
||||||
}
|
}
|
||||||
pinner.Pin(&data[0])
|
|
||||||
buffers[i] = BytesToBuffer(data)
|
buffers[i] = BytesToBuffer(data)
|
||||||
}
|
}
|
||||||
return C.SignalBorrowedSliceOfBuffers{
|
return C.SignalBorrowedSliceOfBuffers{
|
||||||
|
|
|
||||||
|
|
@ -4,3 +4,9 @@ package libsignalgo
|
||||||
#cgo LDFLAGS: -lsignal_ffi -ldl -lm -lz -lstdc++
|
#cgo LDFLAGS: -lsignal_ffi -ldl -lm -lz -lstdc++
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go.mau.fi/mautrix-signal/pkg/libsignalgo/signalversion"
|
||||||
|
)
|
||||||
|
|
||||||
|
const Version = signalversion.Version
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ func NewCiphertextMessage(plaintext *PlaintextContent) (*CiphertextMessage, erro
|
||||||
&ciphertextMessage,
|
&ciphertextMessage,
|
||||||
plaintext.constPtr(),
|
plaintext.constPtr(),
|
||||||
)
|
)
|
||||||
|
runtime.KeepAlive(plaintext)
|
||||||
if signalFfiError != nil {
|
if signalFfiError != nil {
|
||||||
return nil, wrapError(signalFfiError)
|
return nil, wrapError(signalFfiError)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,8 @@ func NewFingerprint(iterations, version FingerprintVersion, localIdentifier []by
|
||||||
BytesToBuffer(remoteIdentifier),
|
BytesToBuffer(remoteIdentifier),
|
||||||
remoteKey.constPtr(),
|
remoteKey.constPtr(),
|
||||||
)
|
)
|
||||||
|
runtime.KeepAlive(localKey)
|
||||||
|
runtime.KeepAlive(remoteKey)
|
||||||
if signalFfiError != nil {
|
if signalFfiError != nil {
|
||||||
return nil, wrapError(signalFfiError)
|
return nil, wrapError(signalFfiError)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,13 @@ func (gser GroupSendEndorsementsResponse) ReceiveWithServiceIDs(
|
||||||
memberEndorsements[member] = endorsements[i]
|
memberEndorsements[member] = endorsements[i]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
combined, err := GroupSendEndorsementCombine(endorsements...)
|
nonEmptyEndorsements := make([]GroupSendEndorsement, 0, len(endorsements))
|
||||||
|
for _, endorsement := range endorsements {
|
||||||
|
if len(endorsement) > 0 {
|
||||||
|
nonEmptyEndorsements = append(nonEmptyEndorsements, endorsement)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
combined, err := GroupSendEndorsementCombine(nonEmptyEndorsements...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, memberEndorsements, err
|
return nil, memberEndorsements, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 857c4dca03537dc5e395a5e1eda6bf18f59c3601
|
Subproject commit 8fc2113bda042fc972a166a24b974b0d34155c6c
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -19,8 +19,8 @@ package libsignalgo
|
||||||
/*
|
/*
|
||||||
#include <./libsignal-ffi.h>
|
#include <./libsignal-ffi.h>
|
||||||
|
|
||||||
extern void signal_log_callback(void *ctx, SignalLogLevel level, SignalCStringPtr file, uint32_t line, SignalCStringPtr message);
|
extern int signal_log_callback(void *ctx, SignalLogLevel level, SignalCStringPtr file, uint32_t line, SignalCStringPtr message);
|
||||||
extern void signal_log_flush_callback(void *ctx);
|
extern int signal_log_flush_callback(void *ctx);
|
||||||
extern void signal_log_destroy_callback(void *ctx);
|
extern void signal_log_destroy_callback(void *ctx);
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
|
@ -32,13 +32,15 @@ import (
|
||||||
var ffiLogger Logger
|
var ffiLogger Logger
|
||||||
|
|
||||||
//export signal_log_callback
|
//export signal_log_callback
|
||||||
func signal_log_callback(ctx unsafe.Pointer, level C.SignalLogLevel, file C.SignalCStringPtr, line C.uint32_t, message C.SignalCStringPtr) {
|
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))
|
ffiLogger.Log(LogLevel(int(level)), CopyCStringToString(file), uint(line), CopyCStringToString(message))
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
//export signal_log_flush_callback
|
//export signal_log_flush_callback
|
||||||
func signal_log_flush_callback(ctx unsafe.Pointer) {
|
func signal_log_flush_callback(ctx unsafe.Pointer) C.int {
|
||||||
ffiLogger.Flush()
|
ffiLogger.Flush()
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
//export signal_log_destroy_callback
|
//export signal_log_destroy_callback
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ func Encrypt(ctx context.Context, plaintext []byte, forAddress, localAddress *Ad
|
||||||
)
|
)
|
||||||
runtime.KeepAlive(plaintext)
|
runtime.KeepAlive(plaintext)
|
||||||
runtime.KeepAlive(forAddress)
|
runtime.KeepAlive(forAddress)
|
||||||
|
runtime.KeepAlive(localAddress)
|
||||||
if signalFfiError != nil {
|
if signalFfiError != nil {
|
||||||
return nil, callbackCtx.wrapError(signalFfiError)
|
return nil, callbackCtx.wrapError(signalFfiError)
|
||||||
}
|
}
|
||||||
|
|
@ -63,6 +64,7 @@ func Decrypt(ctx context.Context, message *Message, fromAddress, localAddress *A
|
||||||
)
|
)
|
||||||
runtime.KeepAlive(message)
|
runtime.KeepAlive(message)
|
||||||
runtime.KeepAlive(fromAddress)
|
runtime.KeepAlive(fromAddress)
|
||||||
|
runtime.KeepAlive(localAddress)
|
||||||
if signalFfiError != nil {
|
if signalFfiError != nil {
|
||||||
return nil, callbackCtx.wrapError(signalFfiError)
|
return nil, callbackCtx.wrapError(signalFfiError)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@ func (bk *MessageBackupKey) GetHMACKey() ([MessageBackupKeyBytesLength]byte, err
|
||||||
out.cFixedArray(),
|
out.cFixedArray(),
|
||||||
bk.constPtr(),
|
bk.constPtr(),
|
||||||
)
|
)
|
||||||
|
runtime.KeepAlive(bk)
|
||||||
if signalFfiError != nil {
|
if signalFfiError != nil {
|
||||||
return [MessageBackupKeyBytesLength]byte(out), wrapError(signalFfiError)
|
return [MessageBackupKeyBytesLength]byte(out), wrapError(signalFfiError)
|
||||||
}
|
}
|
||||||
|
|
@ -101,6 +102,7 @@ func (bk *MessageBackupKey) GetAESKey() ([MessageBackupKeyBytesLength]byte, erro
|
||||||
out.cFixedArray(),
|
out.cFixedArray(),
|
||||||
bk.constPtr(),
|
bk.constPtr(),
|
||||||
)
|
)
|
||||||
|
runtime.KeepAlive(bk)
|
||||||
if signalFfiError != nil {
|
if signalFfiError != nil {
|
||||||
return [MessageBackupKeyBytesLength]byte(out), wrapError(signalFfiError)
|
return [MessageBackupKeyBytesLength]byte(out), wrapError(signalFfiError)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ func DecryptPreKey(ctx context.Context, preKeyMessage *PreKeyMessage, fromAddres
|
||||||
)
|
)
|
||||||
runtime.KeepAlive(preKeyMessage)
|
runtime.KeepAlive(preKeyMessage)
|
||||||
runtime.KeepAlive(fromAddress)
|
runtime.KeepAlive(fromAddress)
|
||||||
|
runtime.KeepAlive(localAddress)
|
||||||
if signalFfiError != nil {
|
if signalFfiError != nil {
|
||||||
return nil, callbackCtx.wrapError(signalFfiError)
|
return nil, callbackCtx.wrapError(signalFfiError)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ func ProcessPreKeyBundle(ctx context.Context, bundle *PreKeyBundle, forAddress,
|
||||||
)
|
)
|
||||||
runtime.KeepAlive(bundle)
|
runtime.KeepAlive(bundle)
|
||||||
runtime.KeepAlive(forAddress)
|
runtime.KeepAlive(forAddress)
|
||||||
|
runtime.KeepAlive(localAddress)
|
||||||
return callbackCtx.wrapError(signalFfiError)
|
return callbackCtx.wrapError(signalFfiError)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -118,10 +119,10 @@ func (pkb *PreKeyBundle) constPtr() C.SignalConstPointerPreKeyBundle {
|
||||||
func (pkb *PreKeyBundle) Clone() (*PreKeyBundle, error) {
|
func (pkb *PreKeyBundle) Clone() (*PreKeyBundle, error) {
|
||||||
var cloned C.SignalMutPointerPreKeyBundle
|
var cloned C.SignalMutPointerPreKeyBundle
|
||||||
signalFfiError := C.signal_pre_key_bundle_clone(&cloned, pkb.constPtr())
|
signalFfiError := C.signal_pre_key_bundle_clone(&cloned, pkb.constPtr())
|
||||||
|
runtime.KeepAlive(pkb)
|
||||||
if signalFfiError != nil {
|
if signalFfiError != nil {
|
||||||
return nil, wrapError(signalFfiError)
|
return nil, wrapError(signalFfiError)
|
||||||
}
|
}
|
||||||
runtime.KeepAlive(pkb)
|
|
||||||
return wrapPreKeyBundle(cloned.raw), nil
|
return wrapPreKeyBundle(cloned.raw), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -137,9 +138,9 @@ func (pkb *PreKeyBundle) CancelFinalizer() {
|
||||||
func (pkb *PreKeyBundle) GetIdentityKey() (*IdentityKey, error) {
|
func (pkb *PreKeyBundle) GetIdentityKey() (*IdentityKey, error) {
|
||||||
var pk C.SignalMutPointerPublicKey
|
var pk C.SignalMutPointerPublicKey
|
||||||
signalFfiError := C.signal_pre_key_bundle_get_identity_key(&pk, pkb.constPtr())
|
signalFfiError := C.signal_pre_key_bundle_get_identity_key(&pk, pkb.constPtr())
|
||||||
|
runtime.KeepAlive(pkb)
|
||||||
if signalFfiError != nil {
|
if signalFfiError != nil {
|
||||||
return nil, wrapError(signalFfiError)
|
return nil, wrapError(signalFfiError)
|
||||||
}
|
}
|
||||||
runtime.KeepAlive(pkb)
|
|
||||||
return NewIdentityKeyFromPublicKey(wrapPublicKey(pk.raw))
|
return NewIdentityKeyFromPublicKey(wrapPublicKey(pk.raw))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ import "C"
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"runtime"
|
"runtime"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
|
|
@ -163,6 +164,8 @@ func (pk *ProfileKey) DeriveAccessKey() (*AccessKey, error) {
|
||||||
return &result, nil
|
return &result, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ExpiringProfileKeyCredentialResponseLength = 497
|
||||||
|
|
||||||
type ProfileKeyCredentialRequestContext [473]byte
|
type ProfileKeyCredentialRequestContext [473]byte
|
||||||
type ProfileKeyCredentialRequest = fixedArray329
|
type ProfileKeyCredentialRequest = fixedArray329
|
||||||
type ProfileKeyCredentialResponse []byte
|
type ProfileKeyCredentialResponse []byte
|
||||||
|
|
@ -214,6 +217,9 @@ func (p *ProfileKeyCredentialRequestContext) ProfileKeyCredentialRequestContextG
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewExpiringProfileKeyCredentialResponse(b []byte) (*ExpiringProfileKeyCredentialResponse, error) {
|
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)
|
borrowedBuffer := BytesToBuffer(b)
|
||||||
signalFfiError := C.signal_expiring_profile_key_credential_response_check_valid_contents(borrowedBuffer)
|
signalFfiError := C.signal_expiring_profile_key_credential_response_check_valid_contents(borrowedBuffer)
|
||||||
runtime.KeepAlive(b)
|
runtime.KeepAlive(b)
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,19 @@ const (
|
||||||
UnidentifiedSenderMessageContentHintImplicit UnidentifiedSenderMessageContentHint = 2
|
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 {
|
type UnidentifiedSenderMessageContent struct {
|
||||||
nc noCopy
|
nc noCopy
|
||||||
ptr *C.SignalUnidentifiedSenderMessageContent
|
ptr *C.SignalUnidentifiedSenderMessageContent
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,7 @@ func (sc *SenderCertificate) Validate(trustRoots []*PublicKey, ts time.Time) (bo
|
||||||
C.uint64_t(ts.UnixMilli()),
|
C.uint64_t(ts.UnixMilli()),
|
||||||
)
|
)
|
||||||
runtime.KeepAlive(sc)
|
runtime.KeepAlive(sc)
|
||||||
|
runtime.KeepAlive(trustRoots)
|
||||||
runtime.KeepAlive(constRoots)
|
runtime.KeepAlive(constRoots)
|
||||||
if signalFfiError != nil {
|
if signalFfiError != nil {
|
||||||
return false, wrapError(signalFfiError)
|
return false, wrapError(signalFfiError)
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ func (sc *SenderKeyDistributionMessage) CancelFinalizer() {
|
||||||
func (sc *SenderKeyDistributionMessage) Serialize() ([]byte, error) {
|
func (sc *SenderKeyDistributionMessage) Serialize() ([]byte, error) {
|
||||||
var serialized C.SignalOwnedBuffer = C.SignalOwnedBuffer{}
|
var serialized C.SignalOwnedBuffer = C.SignalOwnedBuffer{}
|
||||||
signalFfiError := C.signal_sender_key_distribution_message_serialize(&serialized, sc.constPtr())
|
signalFfiError := C.signal_sender_key_distribution_message_serialize(&serialized, sc.constPtr())
|
||||||
|
runtime.KeepAlive(sc)
|
||||||
if signalFfiError != nil {
|
if signalFfiError != nil {
|
||||||
return nil, wrapError(signalFfiError)
|
return nil, wrapError(signalFfiError)
|
||||||
}
|
}
|
||||||
|
|
@ -116,6 +117,7 @@ func (sc *SenderKeyDistributionMessage) Process(ctx context.Context, sender *Add
|
||||||
callbackCtx.wrapSenderKeyStore(store),
|
callbackCtx.wrapSenderKeyStore(store),
|
||||||
)
|
)
|
||||||
runtime.KeepAlive(sender)
|
runtime.KeepAlive(sender)
|
||||||
|
runtime.KeepAlive(sc)
|
||||||
if signalFfiError != nil {
|
if signalFfiError != nil {
|
||||||
return callbackCtx.wrapError(signalFfiError)
|
return callbackCtx.wrapError(signalFfiError)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
5
pkg/libsignalgo/signalversion/version.go
Normal file
5
pkg/libsignalgo/signalversion/version.go
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
// Generated by update-ffi.sh; DO NOT EDIT.
|
||||||
|
|
||||||
|
package signalversion
|
||||||
|
|
||||||
|
const Version = "v0.102.2"
|
||||||
|
|
@ -7,4 +7,4 @@ cargo build -p libsignal-ffi --release
|
||||||
cd ..
|
cd ..
|
||||||
mv libsignal/target/release/libsignal_ffi.a .
|
mv libsignal/target/release/libsignal_ffi.a .
|
||||||
cp libsignal/swift/Sources/SignalFfi/signal_ffi.h libsignal-ffi.h
|
cp libsignal/swift/Sources/SignalFfi/signal_ffi.h libsignal-ffi.h
|
||||||
chown 1000:1000 libsignal_ffi.a libsignal-ffi.h version.go
|
chown 1000:1000 libsignal_ffi.a libsignal-ffi.h
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
docker run --rm -itv $(pwd):/data rust:1-alpine /data/update-ffi-docker-inner.sh
|
docker run --rm -itv $(pwd):/data rust:1-alpine /data/update-ffi-docker-inner.sh
|
||||||
|
|
||||||
echo "// Generated by update-ffi.sh; DO NOT EDIT." > version.go
|
echo "// Generated by update-ffi.sh; DO NOT EDIT." > signalversion/version.go
|
||||||
echo >> version.go
|
echo >> signalversion/version.go
|
||||||
echo "package libsignalgo" >> version.go
|
echo "package signalversion" >> signalversion/version.go
|
||||||
echo >> version.go
|
echo >> signalversion/version.go
|
||||||
cd libsignal
|
cd libsignal
|
||||||
echo "const Version = \"$(git describe --tags --always)\"" >> ../version.go
|
echo "const Version = \"$(git describe --tags --always)\"" >> ../signalversion/version.go
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,10 @@ if [ ! -d "$LIBSIGNAL_DIRECTORY" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "// Generated by update-ffi.sh; DO NOT EDIT." > version.go
|
echo "// Generated by update-ffi.sh; DO NOT EDIT." > signalversion/version.go
|
||||||
echo >> version.go
|
echo >> signalversion/version.go
|
||||||
echo "package libsignalgo" >> version.go
|
echo "package signalversion" >> signalversion/version.go
|
||||||
echo >> version.go
|
echo >> signalversion/version.go
|
||||||
|
|
||||||
# Store the current working directory
|
# Store the current working directory
|
||||||
ORIGINAL_DIR="$(pwd)"
|
ORIGINAL_DIR="$(pwd)"
|
||||||
|
|
@ -23,7 +23,7 @@ ORIGINAL_DIR="$(pwd)"
|
||||||
# Navigate to libsignal directory
|
# Navigate to libsignal directory
|
||||||
cd "$LIBSIGNAL_DIRECTORY"
|
cd "$LIBSIGNAL_DIRECTORY"
|
||||||
|
|
||||||
echo "const Version = \"$(git describe --tags --always)\"" >> ../version.go
|
echo "const Version = \"$(git describe --tags --always)\"" >> ../signalversion/version.go
|
||||||
|
|
||||||
# Build libsignal
|
# Build libsignal
|
||||||
cargo build -p libsignal-ffi --release
|
cargo build -p libsignal-ffi --release
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
// Generated by update-ffi.sh; DO NOT EDIT.
|
|
||||||
|
|
||||||
package libsignalgo
|
|
||||||
|
|
||||||
const Version = "v0.100.0"
|
|
||||||
|
|
@ -35,7 +35,7 @@ import (
|
||||||
"go.mau.fi/mautrix-signal/pkg/msgconv/matrixfmt"
|
"go.mau.fi/mautrix-signal/pkg/msgconv/matrixfmt"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalid"
|
"go.mau.fi/mautrix-signal/pkg/signalid"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow"
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (mc *MessageConverter) ToSignal(
|
func (mc *MessageConverter) ToSignal(
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ import (
|
||||||
"go.mau.fi/util/exslices"
|
"go.mau.fi/util/exslices"
|
||||||
"go.mau.fi/util/ptr"
|
"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/backuppb"
|
||||||
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func boolToInt(b bool) int {
|
func boolToInt(b bool) int {
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ import (
|
||||||
"go.mau.fi/mautrix-signal/pkg/msgconv/signalfmt"
|
"go.mau.fi/mautrix-signal/pkg/msgconv/signalfmt"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalid"
|
"go.mau.fi/mautrix-signal/pkg/signalid"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow"
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import (
|
||||||
|
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalid"
|
"go.mau.fi/mautrix-signal/pkg/signalid"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow"
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
const StickerSourceID = "signal"
|
const StickerSourceID = "signal"
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ import (
|
||||||
|
|
||||||
"maunium.net/go/mautrix/event"
|
"maunium.net/go/mautrix/event"
|
||||||
|
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Parse(ctx context.Context, parser *HTMLParser, content *event.MessageEventContent) (string, []*signalpb.BodyRange) {
|
func Parse(ctx context.Context, parser *HTMLParser, content *event.MessageEventContent) (string, []*signalpb.BodyRange) {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ import (
|
||||||
"maunium.net/go/mautrix/event"
|
"maunium.net/go/mautrix/event"
|
||||||
"maunium.net/go/mautrix/id"
|
"maunium.net/go/mautrix/id"
|
||||||
|
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UserInfo struct {
|
type UserInfo struct {
|
||||||
|
|
@ -86,6 +86,9 @@ func Parse(ctx context.Context, message string, ranges []*signalpb.BodyRange, pa
|
||||||
Start: int(*r.Start),
|
Start: int(*r.Start),
|
||||||
Length: int(*r.Length),
|
Length: int(*r.Length),
|
||||||
}.TruncateEnd(maxLength)
|
}.TruncateEnd(maxLength)
|
||||||
|
if br.Start >= maxLength {
|
||||||
|
continue
|
||||||
|
}
|
||||||
var mentionACI uuid.UUID
|
var mentionACI uuid.UUID
|
||||||
switch rv := r.GetAssociatedValue().(type) {
|
switch rv := r.GetAssociatedValue().(type) {
|
||||||
case *signalpb.BodyRange_Style_:
|
case *signalpb.BodyRange_Style_:
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ import (
|
||||||
"maunium.net/go/mautrix/id"
|
"maunium.net/go/mautrix/id"
|
||||||
|
|
||||||
"go.mau.fi/mautrix-signal/pkg/msgconv/signalfmt"
|
"go.mau.fi/mautrix-signal/pkg/msgconv/signalfmt"
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
var realUser = uuid.New()
|
var realUser = uuid.New()
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ import (
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BodyRangeValue interface {
|
type BodyRangeValue interface {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import (
|
||||||
|
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BodyRange struct {
|
type BodyRange struct {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ import (
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
"maunium.net/go/mautrix/event"
|
"maunium.net/go/mautrix/event"
|
||||||
|
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (mc *MessageConverter) convertURLPreviewsToBeeper(ctx context.Context, preview []*signalpb.Preview, attMap AttachmentMap) []*event.BeeperLinkPreview {
|
func (mc *MessageConverter) convertURLPreviewsToBeeper(ctx context.Context, preview []*signalpb.Preview, attMap AttachmentMap) []*event.BeeperLinkPreview {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ import (
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
"go.mau.fi/mautrix-signal/pkg/libsignalgo"
|
"go.mau.fi/mautrix-signal/pkg/libsignalgo"
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow/types"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/types"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow/web"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/web"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ import (
|
||||||
|
|
||||||
"go.mau.fi/mautrix-signal/pkg/libsignalgo"
|
"go.mau.fi/mautrix-signal/pkg/libsignalgo"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow/events"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/events"
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow/store"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/store"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow/types"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/types"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow/web"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/web"
|
||||||
|
|
@ -55,6 +55,7 @@ type Client struct {
|
||||||
|
|
||||||
AuthedWS *web.SignalWebsocket
|
AuthedWS *web.SignalWebsocket
|
||||||
UnauthedWS *web.SignalWebsocket
|
UnauthedWS *web.SignalWebsocket
|
||||||
|
GRPC *web.GRPCClient
|
||||||
lastConnectionStatus SignalConnectionStatus
|
lastConnectionStatus SignalConnectionStatus
|
||||||
|
|
||||||
loopCancel context.CancelFunc
|
loopCancel context.CancelFunc
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ import (
|
||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow/types"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ import (
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
"go.mau.fi/mautrix-signal/pkg/libsignalgo"
|
"go.mau.fi/mautrix-signal/pkg/libsignalgo"
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func hmacSHA256(key, input []byte) []byte {
|
func hmacSHA256(key, input []byte) []byte {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import (
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
|
||||||
"go.mau.fi/mautrix-signal/pkg/libsignalgo"
|
"go.mau.fi/mautrix-signal/pkg/libsignalgo"
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow/types"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ import (
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
"go.mau.fi/mautrix-signal/pkg/libsignalgo"
|
"go.mau.fi/mautrix-signal/pkg/libsignalgo"
|
||||||
signalpb "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/signalpb"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow/types"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/types"
|
||||||
"go.mau.fi/mautrix-signal/pkg/signalmeow/web"
|
"go.mau.fi/mautrix-signal/pkg/signalmeow/web"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
// 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;
|
|
||||||
}
|
|
||||||
635
pkg/signalmeow/protobuf/UnidentifiedDelivery.pb.go
generated
635
pkg/signalmeow/protobuf/UnidentifiedDelivery.pb.go
generated
|
|
@ -1,635 +0,0 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
||||||
// versions:
|
|
||||||
// protoc-gen-go v1.36.11
|
|
||||||
// protoc v7.34.1
|
|
||||||
// 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
|
|
||||||
}
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
// 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;
|
|
||||||
}
|
|
||||||
1061
pkg/signalmeow/protobuf/backuppb/Backup.pb.go
generated
1061
pkg/signalmeow/protobuf/backuppb/Backup.pb.go
generated
File diff suppressed because it is too large
Load diff
BIN
pkg/signalmeow/protobuf/backuppb/Backup.pb.raw
generated
BIN
pkg/signalmeow/protobuf/backuppb/Backup.pb.raw
generated
Binary file not shown.
|
|
@ -103,6 +103,12 @@ message AccountData {
|
||||||
}
|
}
|
||||||
|
|
||||||
message AccountSettings {
|
message AccountSettings {
|
||||||
|
enum UnreadBadgeType {
|
||||||
|
UNKNOWN_BADGE_TYPE = 0; // Interpret as "Unread messages"
|
||||||
|
UNREAD_MESSAGES = 1;
|
||||||
|
UNREAD_CHATS = 2;
|
||||||
|
}
|
||||||
|
|
||||||
bool readReceipts = 1;
|
bool readReceipts = 1;
|
||||||
bool sealedSenderIndicators = 2;
|
bool sealedSenderIndicators = 2;
|
||||||
bool typingIndicators = 3;
|
bool typingIndicators = 3;
|
||||||
|
|
@ -136,6 +142,14 @@ message AccountData {
|
||||||
bool allowSealedSenderFromAnyone = 30;
|
bool allowSealedSenderFromAnyone = 30;
|
||||||
bool allowAutomaticKeyVerification = 31;
|
bool allowAutomaticKeyVerification = 31;
|
||||||
bool hasSeenAdminDeleteEducationDialog = 32;
|
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 {
|
message SubscriberData {
|
||||||
|
|
@ -272,6 +286,7 @@ message Contact {
|
||||||
string systemNickname = 20;
|
string systemNickname = 20;
|
||||||
optional AvatarColor avatarColor = 21;
|
optional AvatarColor avatarColor = 21;
|
||||||
optional bytes keyTransparencyData = 22;
|
optional bytes keyTransparencyData = 22;
|
||||||
|
uint64 blockedAtTimestamp = 23; // if `blocked` is true, 0 means unknown block time
|
||||||
}
|
}
|
||||||
|
|
||||||
message Group {
|
message Group {
|
||||||
|
|
@ -288,6 +303,7 @@ message Group {
|
||||||
GroupSnapshot snapshot = 5;
|
GroupSnapshot snapshot = 5;
|
||||||
bool blocked = 6;
|
bool blocked = 6;
|
||||||
optional AvatarColor avatarColor = 7;
|
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.
|
// These are simply plaintext copies of the groups proto from Groups.proto.
|
||||||
// They should be kept completely in-sync with Groups.proto.
|
// They should be kept completely in-sync with Groups.proto.
|
||||||
|
|
@ -385,9 +401,13 @@ message Chat {
|
||||||
optional uint64 expirationTimerMs = 5;
|
optional uint64 expirationTimerMs = 5;
|
||||||
optional uint64 muteUntilMs = 6; // INT64_MAX (2^63 - 1) = "always muted".
|
optional uint64 muteUntilMs = 6; // INT64_MAX (2^63 - 1) = "always muted".
|
||||||
bool markedUnread = 7;
|
bool markedUnread = 7;
|
||||||
bool dontNotifyForMentionsIfMuted = 8;
|
bool dontNotifyForMentionsIfMuted = 8; // will be deprecated in favor of [notifyForMentionsIfMuted]
|
||||||
ChatStyle style = 9;
|
ChatStyle style = 9;
|
||||||
uint32 expireTimerVersion = 10;
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,18 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
PKG_IMPORT_PATH="go.mau.fi/mautrix-signal/pkg/signalmeow/signalpb"
|
cd $(dirname "$0")
|
||||||
for file in *.proto
|
BASE_IMPORT_PATH="go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf"
|
||||||
do
|
opts=()
|
||||||
# Requires https://go-review.googlesource.com/c/protobuf/+/369634
|
for file in */*.proto; do
|
||||||
protoc --go_out=. \
|
opts+=("--go_opt=M${file}=${BASE_IMPORT_PATH}/$(dirname "$file")")
|
||||||
--go_opt=M${file}=$PKG_IMPORT_PATH \
|
opts+=("--go-grpc_opt=M${file}=${BASE_IMPORT_PATH}/$(dirname "$file")")
|
||||||
--go_opt=paths=source_relative \
|
|
||||||
$file
|
|
||||||
done
|
done
|
||||||
protoc --go_out=. \
|
for file in org/signal/chat/*.proto; do
|
||||||
--go_opt=Mbackuppb/Backup.proto=$PKG_IMPORT_PATH/backuppb \
|
file_without_ext=$(basename "$file" .proto)
|
||||||
--go_opt=paths=source_relative \
|
opts+=("--go_opt=M${file}=${BASE_IMPORT_PATH}/rpc/${file_without_ext}")
|
||||||
backuppb/Backup.proto
|
opts+=("--go-grpc_opt=M${file}=${BASE_IMPORT_PATH}/rpc/${file_without_ext}")
|
||||||
protoc --go_out=. \
|
done
|
||||||
--go_opt=Mcds2pb/cds2.proto=$PKG_IMPORT_PATH/cds2pb \
|
protoc --go_out=. --go-grpc_out=. \
|
||||||
--go_opt=paths=source_relative \
|
--go_opt=module=$BASE_IMPORT_PATH \
|
||||||
cds2pb/cds2.proto
|
--go-grpc_opt=module=$BASE_IMPORT_PATH "${opts[@]}" \
|
||||||
|
*/*.proto org/signal/chat/*.proto
|
||||||
pre-commit run -a
|
pre-commit run -a
|
||||||
|
|
|
||||||
608
pkg/signalmeow/protobuf/org/signal/chat/account.proto
Normal file
608
pkg/signalmeow/protobuf/org/signal/chat/account.proto
Normal file
|
|
@ -0,0 +1,608 @@
|
||||||
|
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<uint32, common.EcSignedPreKey> 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<uint32, common.KemSignedPreKey> 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<uint32, uint32> 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<int32, TotpKeyMetadata> 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 {
|
||||||
|
}
|
||||||
58
pkg/signalmeow/protobuf/org/signal/chat/attachments.proto
Normal file
58
pkg/signalmeow/protobuf/org/signal/chat/attachments.proto
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
554
pkg/signalmeow/protobuf/org/signal/chat/backups.proto
Normal file
554
pkg/signalmeow/protobuf/org/signal/chat/backups.proto
Normal file
|
|
@ -0,0 +1,554 @@
|
||||||
|
/*
|
||||||
|
* 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<int64, common.ZkCredential> 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<int64, common.ZkCredential> 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<string, string> 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;
|
||||||
|
}
|
||||||
118
pkg/signalmeow/protobuf/org/signal/chat/call_quality.proto
Normal file
118
pkg/signalmeow/protobuf/org/signal/chat/call_quality.proto
Normal file
|
|
@ -0,0 +1,118 @@
|
||||||
|
/*
|
||||||
|
* 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 {
|
||||||
|
}
|
||||||
64
pkg/signalmeow/protobuf/org/signal/chat/calling.proto
Normal file
64
pkg/signalmeow/protobuf/org/signal/chat/calling.proto
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
52
pkg/signalmeow/protobuf/org/signal/chat/challenge.proto
Normal file
52
pkg/signalmeow/protobuf/org/signal/chat/challenge.proto
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
176
pkg/signalmeow/protobuf/org/signal/chat/common.proto
Normal file
176
pkg/signalmeow/protobuf/org/signal/chat/common.proto
Normal file
|
|
@ -0,0 +1,176 @@
|
||||||
|
/*
|
||||||
|
* 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<string, string> 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;
|
||||||
|
}
|
||||||
166
pkg/signalmeow/protobuf/org/signal/chat/credentials.proto
Normal file
166
pkg/signalmeow/protobuf/org/signal/chat/credentials.proto
Normal file
|
|
@ -0,0 +1,166 @@
|
||||||
|
/*
|
||||||
|
* 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<string, AuthCheckResult> 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;
|
||||||
|
}
|
||||||
138
pkg/signalmeow/protobuf/org/signal/chat/device.proto
Normal file
138
pkg/signalmeow/protobuf/org/signal/chat/device.proto
Normal file
|
|
@ -0,0 +1,138 @@
|
||||||
|
/*
|
||||||
|
* 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 {}
|
||||||
59
pkg/signalmeow/protobuf/org/signal/chat/donations.proto
Normal file
59
pkg/signalmeow/protobuf/org/signal/chat/donations.proto
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
34
pkg/signalmeow/protobuf/org/signal/chat/errors.proto
Normal file
34
pkg/signalmeow/protobuf/org/signal/chat/errors.proto
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
236
pkg/signalmeow/protobuf/org/signal/chat/keys.proto
Normal file
236
pkg/signalmeow/protobuf/org/signal/chat/keys.proto
Normal file
|
|
@ -0,0 +1,236 @@
|
||||||
|
/*
|
||||||
|
* 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<uint32, DevicePreKeyBundle> 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;
|
||||||
|
}
|
||||||
65
pkg/signalmeow/protobuf/org/signal/chat/login_purchase.proto
Normal file
65
pkg/signalmeow/protobuf/org/signal/chat/login_purchase.proto
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
/*
|
||||||
|
* 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"];
|
||||||
|
}
|
||||||
|
}
|
||||||
437
pkg/signalmeow/protobuf/org/signal/chat/messages.proto
Normal file
437
pkg/signalmeow/protobuf/org/signal/chat/messages.proto
Normal file
|
|
@ -0,0 +1,437 @@
|
||||||
|
/*
|
||||||
|
* 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<uint32, Message> 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;
|
||||||
|
}
|
||||||
169
pkg/signalmeow/protobuf/org/signal/chat/one_time_donations.proto
Normal file
169
pkg/signalmeow/protobuf/org/signal/chat/one_time_donations.proto
Normal file
|
|
@ -0,0 +1,169 @@
|
||||||
|
/*
|
||||||
|
* 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"];
|
||||||
|
}
|
||||||
|
}
|
||||||
37
pkg/signalmeow/protobuf/org/signal/chat/payments.proto
Normal file
37
pkg/signalmeow/protobuf/org/signal/chat/payments.proto
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* 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<string, string> conversions = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64 timestamp = 1;
|
||||||
|
|
||||||
|
repeated CurrencyConversionEntity currencies = 2;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
/*
|
||||||
|
* 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<string, CurrencyConfiguration> currencies = 1;
|
||||||
|
// Map of numeric donation level IDs to level-specific badge configuration
|
||||||
|
map<uint64, LevelConfiguration> 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<uint64, AmountList> one_time = 2;
|
||||||
|
// Map of subscription level IDs to the amount charged
|
||||||
|
map<uint64, string> subscription = 3;
|
||||||
|
// Map of backup subscription level IDs to the amount charged
|
||||||
|
map<uint64, string> 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<uint64, BackupLevelConfiguration> 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;
|
||||||
|
}
|
||||||
406
pkg/signalmeow/protobuf/org/signal/chat/profile.proto
Normal file
406
pkg/signalmeow/protobuf/org/signal/chat/profile.proto
Normal file
|
|
@ -0,0 +1,406 @@
|
||||||
|
/*
|
||||||
|
* 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"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
/*
|
||||||
|
* 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<string, string> 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<string, common.Badge> 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;
|
||||||
|
}
|
||||||
258
pkg/signalmeow/protobuf/org/signal/chat/require.proto
Normal file
258
pkg/signalmeow/protobuf/org/signal/chat/require.proto
Normal file
|
|
@ -0,0 +1,258 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
441
pkg/signalmeow/protobuf/org/signal/chat/subscriptions.proto
Normal file
441
pkg/signalmeow/protobuf/org/signal/chat/subscriptions.proto
Normal file
|
|
@ -0,0 +1,441 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
38
pkg/signalmeow/protobuf/org/signal/chat/tag.proto
Normal file
38
pkg/signalmeow/protobuf/org/signal/chat/tag.proto
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
4186
pkg/signalmeow/protobuf/rpc/account/account.pb.go
generated
Normal file
4186
pkg/signalmeow/protobuf/rpc/account/account.pb.go
generated
Normal file
File diff suppressed because it is too large
Load diff
1231
pkg/signalmeow/protobuf/rpc/account/account_grpc.pb.go
generated
Normal file
1231
pkg/signalmeow/protobuf/rpc/account/account_grpc.pb.go
generated
Normal file
File diff suppressed because it is too large
Load diff
357
pkg/signalmeow/protobuf/rpc/attachments/attachments.pb.go
generated
Normal file
357
pkg/signalmeow/protobuf/rpc/attachments/attachments.pb.go
generated
Normal file
|
|
@ -0,0 +1,357 @@
|
||||||
|
//
|
||||||
|
// 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
|
||||||
|
}
|
||||||
167
pkg/signalmeow/protobuf/rpc/attachments/attachments_grpc.pb.go
generated
Normal file
167
pkg/signalmeow/protobuf/rpc/attachments/attachments_grpc.pb.go
generated
Normal file
|
|
@ -0,0 +1,167 @@
|
||||||
|
//
|
||||||
|
// 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",
|
||||||
|
}
|
||||||
3268
pkg/signalmeow/protobuf/rpc/backups/backups.pb.go
generated
Normal file
3268
pkg/signalmeow/protobuf/rpc/backups/backups.pb.go
generated
Normal file
File diff suppressed because it is too large
Load diff
878
pkg/signalmeow/protobuf/rpc/backups/backups_grpc.pb.go
generated
Normal file
878
pkg/signalmeow/protobuf/rpc/backups/backups_grpc.pb.go
generated
Normal file
|
|
@ -0,0 +1,878 @@
|
||||||
|
//
|
||||||
|
// 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",
|
||||||
|
}
|
||||||
426
pkg/signalmeow/protobuf/rpc/call_quality/call_quality.pb.go
generated
Normal file
426
pkg/signalmeow/protobuf/rpc/call_quality/call_quality.pb.go
generated
Normal file
|
|
@ -0,0 +1,426 @@
|
||||||
|
//
|
||||||
|
// 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
|
||||||
|
}
|
||||||
131
pkg/signalmeow/protobuf/rpc/call_quality/call_quality_grpc.pb.go
generated
Normal file
131
pkg/signalmeow/protobuf/rpc/call_quality/call_quality_grpc.pb.go
generated
Normal file
|
|
@ -0,0 +1,131 @@
|
||||||
|
//
|
||||||
|
// 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",
|
||||||
|
}
|
||||||
379
pkg/signalmeow/protobuf/rpc/calling/calling.pb.go
generated
Normal file
379
pkg/signalmeow/protobuf/rpc/calling/calling.pb.go
generated
Normal file
|
|
@ -0,0 +1,379 @@
|
||||||
|
//
|
||||||
|
// 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
|
||||||
|
}
|
||||||
133
pkg/signalmeow/protobuf/rpc/calling/calling_grpc.pb.go
generated
Normal file
133
pkg/signalmeow/protobuf/rpc/calling/calling_grpc.pb.go
generated
Normal file
|
|
@ -0,0 +1,133 @@
|
||||||
|
//
|
||||||
|
// 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",
|
||||||
|
}
|
||||||
333
pkg/signalmeow/protobuf/rpc/challenge/challenge.pb.go
generated
Normal file
333
pkg/signalmeow/protobuf/rpc/challenge/challenge.pb.go
generated
Normal file
|
|
@ -0,0 +1,333 @@
|
||||||
|
//
|
||||||
|
// 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
|
||||||
|
}
|
||||||
133
pkg/signalmeow/protobuf/rpc/challenge/challenge_grpc.pb.go
generated
Normal file
133
pkg/signalmeow/protobuf/rpc/challenge/challenge_grpc.pb.go
generated
Normal file
|
|
@ -0,0 +1,133 @@
|
||||||
|
//
|
||||||
|
// 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",
|
||||||
|
}
|
||||||
986
pkg/signalmeow/protobuf/rpc/common/common.pb.go
generated
Normal file
986
pkg/signalmeow/protobuf/rpc/common/common.pb.go
generated
Normal file
|
|
@ -0,0 +1,986 @@
|
||||||
|
//
|
||||||
|
// 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
|
||||||
|
}
|
||||||
855
pkg/signalmeow/protobuf/rpc/credentials/credentials.pb.go
generated
Normal file
855
pkg/signalmeow/protobuf/rpc/credentials/credentials.pb.go
generated
Normal file
|
|
@ -0,0 +1,855 @@
|
||||||
|
//
|
||||||
|
// 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
|
||||||
|
}
|
||||||
377
pkg/signalmeow/protobuf/rpc/credentials/credentials_grpc.pb.go
generated
Normal file
377
pkg/signalmeow/protobuf/rpc/credentials/credentials_grpc.pb.go
generated
Normal file
|
|
@ -0,0 +1,377 @@
|
||||||
|
//
|
||||||
|
// 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",
|
||||||
|
}
|
||||||
922
pkg/signalmeow/protobuf/rpc/device/device.pb.go
generated
Normal file
922
pkg/signalmeow/protobuf/rpc/device/device.pb.go
generated
Normal file
|
|
@ -0,0 +1,922 @@
|
||||||
|
//
|
||||||
|
// 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
|
||||||
|
}
|
||||||
349
pkg/signalmeow/protobuf/rpc/device/device_grpc.pb.go
generated
Normal file
349
pkg/signalmeow/protobuf/rpc/device/device_grpc.pb.go
generated
Normal file
|
|
@ -0,0 +1,349 @@
|
||||||
|
//
|
||||||
|
// 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",
|
||||||
|
}
|
||||||
373
pkg/signalmeow/protobuf/rpc/donations/donations.pb.go
generated
Normal file
373
pkg/signalmeow/protobuf/rpc/donations/donations.pb.go
generated
Normal file
|
|
@ -0,0 +1,373 @@
|
||||||
|
//
|
||||||
|
// 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
|
||||||
|
}
|
||||||
177
pkg/signalmeow/protobuf/rpc/donations/donations_grpc.pb.go
generated
Normal file
177
pkg/signalmeow/protobuf/rpc/donations/donations_grpc.pb.go
generated
Normal file
|
|
@ -0,0 +1,177 @@
|
||||||
|
//
|
||||||
|
// 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",
|
||||||
|
}
|
||||||
269
pkg/signalmeow/protobuf/rpc/errors/errors.pb.go
generated
Normal file
269
pkg/signalmeow/protobuf/rpc/errors/errors.pb.go
generated
Normal file
|
|
@ -0,0 +1,269 @@
|
||||||
|
//
|
||||||
|
// 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
|
||||||
|
}
|
||||||
1217
pkg/signalmeow/protobuf/rpc/keys/keys.pb.go
generated
Normal file
1217
pkg/signalmeow/protobuf/rpc/keys/keys.pb.go
generated
Normal file
File diff suppressed because it is too large
Load diff
524
pkg/signalmeow/protobuf/rpc/keys/keys_grpc.pb.go
generated
Normal file
524
pkg/signalmeow/protobuf/rpc/keys/keys_grpc.pb.go
generated
Normal file
|
|
@ -0,0 +1,524 @@
|
||||||
|
//
|
||||||
|
// 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",
|
||||||
|
}
|
||||||
378
pkg/signalmeow/protobuf/rpc/login_purchase/login_purchase.pb.go
generated
Normal file
378
pkg/signalmeow/protobuf/rpc/login_purchase/login_purchase.pb.go
generated
Normal file
|
|
@ -0,0 +1,378 @@
|
||||||
|
//
|
||||||
|
// 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
|
||||||
|
}
|
||||||
135
pkg/signalmeow/protobuf/rpc/login_purchase/login_purchase_grpc.pb.go
generated
Normal file
135
pkg/signalmeow/protobuf/rpc/login_purchase/login_purchase_grpc.pb.go
generated
Normal file
|
|
@ -0,0 +1,135 @@
|
||||||
|
//
|
||||||
|
// 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",
|
||||||
|
}
|
||||||
1986
pkg/signalmeow/protobuf/rpc/messages/messages.pb.go
generated
Normal file
1986
pkg/signalmeow/protobuf/rpc/messages/messages.pb.go
generated
Normal file
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue