Skip to content

Commit 4eaa16c

Browse files
authored
protocol (keybase#11747)
1 parent 9d185ca commit 4eaa16c

13 files changed

Lines changed: 207 additions & 14 deletions

File tree

‎.gitattributes‎

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
1-
# Declare files that will always have CRLF line endings on checkout.
2-
*.sln text eol=crlf
3-
*.cmd text eol=crlf
4-
*.bat text eol=crlf
5-
*.js linguist-language=JSX
6-
shared/actions/*-gen.js linguist-generated=true
7-
shared/flow-typed/* linguist-generated=true
8-
shared/constants/types/rpc*.js linguist-generated=true
9-
protocol/js/rpc*.js linguist-generated=true
10-
shared/common-adapters/icon.constants.js linguist-generated=true
11-
shared/images/iconfont/kb-icomoon-project-app.json linguist-generated=true
12-
shared/images/iconfont/*.svg linguist-generated=true
13-
*.snap linguist-generated=true
14-
*.json linguist-language=JSON5
1+
# Declare files that will always have CRLF line endings on checkout.
2+
*.sln text eol=crlf
3+
*.cmd text eol=crlf
4+
*.bat text eol=crlf
5+
*.js linguist-language=JSX
6+
*.json linguist-language=JSON5
7+
*.snap linguist-generated=true
8+
shared/actions/*-gen.js linguist-generated=true
9+
shared/flow-typed/* linguist-generated=true
10+
shared/constants/types/rpc*.js linguist-generated=true
11+
shared/common-adapters/icon.constants.js linguist-generated=true
12+
shared/images/iconfont/kb-icomoon-project-app.json linguist-generated=true
13+
shared/images/iconfont/*.svg linguist-generated=true
14+
protocol/js/rpc*.js linguist-generated=true
15+
protocol/json/keybase1/*.json linguist-generated=true
16+
protocol/json/chat1/*.json linguist-generated=true
17+
protocol/json/stellar1/*.json linguist-generated=true
18+
go/protocol/keybase1/*.go linguist-generated=true
19+
go/protocol/chat1/*.go linguist-generated=true
20+
go/protocol/stellar1/*.go linguist-generated=true
21+
go/protocol/keybase1/extras.go linguist-generated=false
22+
go/protocol/chat1/extras.go linguist-generated=false
23+
go/protocol/stellar1/extras.go linguist-generated=false

‎go/protocol/keybase1/teams.go‎

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎go/protocol/stellar1/common.go‎

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎go/protocol/stellar1/extras.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ func (a AccountID) Eq(b AccountID) bool {
6060
return a == b
6161
}
6262

63+
func (a AccountID) IsNil() bool {
64+
return len(a) == 0
65+
}
66+
6367
func (a AccountID) LossyAbbreviation() string {
6468
if len(a) != 56 {
6569
return "[invalid account id]"

‎go/protocol/stellar1/remote.go‎

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎protocol/avdl/keybase1/teams.avdl‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ protocol teams {
2323
STELLAR_RELAY_6
2424
}
2525

26+
enum TeamStatus {
27+
NONE_0,
28+
LIVE_1,
29+
DELETED_2,
30+
ABANDONED_3
31+
}
32+
2633
// PerTeamKeyGeneration describes the generation of the secret.
2734
// The sequence starts at 1.
2835
@typedef("int")

‎protocol/avdl/stellar1/common.avdl‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ protocol common {
4747
TransactionID stellarID;
4848
}
4949

50+
record RelayClaimResult {
51+
// tx ID of the submitted claim tx (not the fund tx)
52+
TransactionID claimStellarID;
53+
}
54+
5055
// A note encrypted for one or two keybase users.
5156
// Decrypts to a NoteContents.
5257
record EncryptedNote {

‎protocol/avdl/stellar1/remote.avdl‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ protocol remote {
2525
string signedTransaction; // Funding tx
2626
}
2727

28+
record RelayClaimPost {
29+
KeybaseTransactionID keybaseID;
30+
RelayDirection dir;
31+
string signedTransaction; // Claim or yank tx
32+
}
33+
2834
record PaymentSummary {
2935
// One or the other or both.
3036
union { null, PaymentSummaryStellar } stellar; // Info from stellar network
@@ -71,6 +77,8 @@ protocol remote {
7177

7278
PaymentResult submitRelayPayment(keybase1.UserVersion caller, PaymentRelayPost payment);
7379

80+
RelayClaimResult submitRelayClaim(keybase1.UserVersion caller, RelayClaimPost claim);
81+
7482
// ask the stellar network whether the master key for the account has power
7583
boolean isMasterKeyActive(keybase1.UserVersion caller, AccountID accountID);
7684

‎protocol/js/rpc-gen.js‎

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎protocol/json/keybase1/teams.json‎

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)