Skip to content

Commit f76ac12

Browse files
committed
chore: fetch updated protos
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent c3eeff9 commit f76ac12

15 files changed

Lines changed: 91 additions & 59 deletions

File tree

service/protos/src/main/proto/account/v1/account_service.proto

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,18 @@ service Account {
2828
rpc LinkAdditionalAccounts(LinkAdditionalAccountsRequest) returns (LinkAdditionalAccountsResponse);
2929
}
3030

31-
32-
3331
message IsCodeAccountRequest {
3432
// The owner account to check against.
35-
common.v1.SolanaAccountId owner = 1;
33+
common.v1.SolanaAccountId owner = 1;
3634

3735

3836
// The signature is of serialize(IsCodeAccountRequest) without this field set
3937
// using the private key of the owner account. This provides an authentication
4038
// mechanism to the RPC.
41-
common.v1.Signature signature = 2;
39+
common.v1.Signature signature = 2;
4240

4341
}
4442

45-
46-
4743
message IsCodeAccountResponse {
4844
Result result = 1;
4945
enum Result {
@@ -54,62 +50,50 @@ message IsCodeAccountResponse {
5450
// The account exists, but at least one timelock account is unlocked.
5551
UNLOCKED_TIMELOCK_ACCOUNT = 2;
5652
}
57-
58-
5953
}
6054

61-
62-
6355
message GetTokenAccountInfosRequest {
6456
// The owner account, which can also be thought of as a parent account for this
6557
// RPC that links to one or more token accounts.
66-
common.v1.SolanaAccountId owner = 1;
58+
common.v1.SolanaAccountId owner = 1;
6759

6860

6961
// The signature is of serialize(GetTokenAccountInfosRequest) without this field set
7062
// using the private key of the owner account. This provides an authentication
7163
// mechanism to the RPC.
72-
common.v1.Signature signature = 2;
64+
common.v1.Signature signature = 2;
7365

7466
}
7567

76-
77-
7868
message GetTokenAccountInfosResponse {
7969
Result result = 1;
8070
enum Result {
8171
OK = 0;
8272
NOT_FOUND = 1;
8373
}
8474

85-
86-
8775
map<string, TokenAccountInfo> token_account_infos = 2;
8876
}
8977

90-
91-
9278
message LinkAdditionalAccountsRequest {
9379
// The owner account to link to
94-
common.v1.SolanaAccountId owner = 1;
80+
common.v1.SolanaAccountId owner = 1;
9581

9682

9783
// The authority account derived off the user's 12 words, which contains
9884
// the USDC ATA (and potentially others in the future) that will be used
9985
// in swaps.
100-
common.v1.SolanaAccountId swap_authority = 2;
86+
common.v1.SolanaAccountId swap_authority = 2;
10187

10288

10389
// Signature values for each account provided in this request. Each signature
10490
// must be generated without this array set. The expected ordering of signatures:
10591
// 1. owner
10692
// 2. swap_authority
107-
repeated common.v1.Signature signatures = 3;
93+
repeated common.v1.Signature signatures = 3 ;
10894

10995
}
11096

111-
112-
11397
message LinkAdditionalAccountsResponse {
11498
Result result = 1;
11599
enum Result {
@@ -121,15 +105,11 @@ message LinkAdditionalAccountsResponse {
121105
// An account being linked is not valid
122106
INVALID_ACCOUNT = 2;
123107
}
124-
125-
126108
}
127109

128-
129-
130110
message TokenAccountInfo {
131111
// The token account's address
132-
common.v1.SolanaAccountId address = 1;
112+
common.v1.SolanaAccountId address = 1;
133113

134114

135115
// The owner of the token account, which can also be thought of as a parent
@@ -143,7 +123,7 @@ message TokenAccountInfo {
143123
common.v1.SolanaAccountId authority = 3;
144124

145125
// The type of token account, which infers its intended use.
146-
common.v1.AccountType account_type = 4;
126+
common.v1.AccountType account_type = 4;
147127

148128

149129
// The account's derivation index for applicable account types. When this field
@@ -164,8 +144,6 @@ message TokenAccountInfo {
164144
BALANCE_SOURCE_CACHE = 2;
165145
}
166146

167-
168-
169147
// The balance in quarks, as observed by Code. This may not reflect the value
170148
// on the blockchain and could be non-zero even if the account hasn't been created.
171149
// Use balance_source to determine how this value was calculated.
@@ -197,8 +175,6 @@ message TokenAccountInfo {
197175
MANAGEMENT_STATE_CLOSED = 7;
198176
}
199177

200-
201-
202178
// The state of the account on the blockchain.
203179
BlockchainState blockchain_state = 9;
204180
enum BlockchainState {
@@ -211,8 +187,6 @@ message TokenAccountInfo {
211187
BLOCKCHAIN_STATE_EXISTS = 2;
212188
}
213189

214-
215-
216190
// For temporary incoming accounts only. Flag indicates whether client must
217191
// actively try rotating it by issuing a ReceivePaymentsPrivately intent. In
218192
// general, clients should wait as long as possible until this flag is true
@@ -235,8 +209,6 @@ message TokenAccountInfo {
235209
CLAIM_STATE_EXPIRED = 3;
236210
}
237211

238-
239-
240212
// For account types used as an intermediary for sending money between two
241213
// users (eg. REMOTE_SEND_GIFT_CARD), this represents the original exchange
242214
// data used to fund the account. Over time, this value will become stale:
@@ -265,5 +237,3 @@ message TokenAccountInfo {
265237
// the tiem created on the blockchain.
266238
google.protobuf.Timestamp created_at = 17;
267239
}
268-
269-

service/protos/src/main/proto/badge/v1/badge_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ option go_package = "github.com/code-payments/code-protobuf-api/generated/go/bad
44
option java_package = "com.codeinc.gen.badge.v1";
55
option objc_class_prefix = "CPBBadgeV1";
66
import "common/v1/model.proto";
7+
78
service Badge {
89
// ResetBadgeCount resets an owner account's app icon badge count back to zero
910
rpc ResetBadgeCount(ResetBadgeCountRequest) returns (ResetBadgeCountResponse);

service/protos/src/main/proto/chat/v1/chat_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ option objc_class_prefix = "CPBChatV1";
66
import "common/v1/model.proto";
77
import "transaction/v2/transaction_service.proto";
88
import "google/protobuf/timestamp.proto";
9+
910
// Deprecated: Use the v2 service
1011
service Chat {
1112
// GetChats gets the set of chats for an owner account

service/protos/src/main/proto/chat/v2/chat_service.proto

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ option objc_class_prefix = "CPBChatV2";
66
import "common/v1/model.proto";
77
import "transaction/v2/transaction_service.proto";
88
import "google/protobuf/timestamp.proto";
9+
910
service Chat {
1011
// GetChats gets the set of chats for an owner account using a paged API.
1112
// This RPC is aware of all identities tied to the owner account.
@@ -143,28 +144,50 @@ message StreamChatEventsResponse {
143144
message StartChatRequest {
144145
common.v1.SolanaAccountId owner = 1;
145146
common.v1.Signature signature = 2;
147+
ChatMemberIdentity self = 3;
146148
oneof parameters {
147-
StartTipChatParameters tip_chat = 3;
149+
StartTwoWayChatParameters two_way_chat = 4;
148150
// GroupChatParameters group_chat = 4;
149151
}
150152
}
151-
// Starts a two-way chat between a tipper and tippee. Chat members are
152-
// inferred from the 12 word public keys involved in the intent. Only
153-
// the tippee can start the chat, and the tipper is anonymous if this
154-
// is the first between the involved Code users.
155-
message StartTipChatParameters {
156-
// The tip's intent ID, which can be extracted from the reference in
157-
// an ExchangeDataContent message content where the verb is RECEIVED_TIP.
158-
common.v1.IntentId intent_id = 1;
153+
// StartTwoWayChatParameters contains the parameters required to start
154+
// or recover a two way chat between the caller and the specified 'other_user'.
155+
//
156+
// The 'other_user' is currently the 'tip_address', normally retrieved from
157+
// user.Identity.GetTwitterUser(username).
158+
message StartTwoWayChatParameters {
159+
// The account id of the user the caller wishes to chat with.
160+
//
161+
// This will be the `tip` (or equivalent) address.
162+
common.v1.SolanaAccountId other_user = 1;
163+
// The intent_id of the payment that initiated the chat/friendship.
164+
//
165+
// This field is optional. It is used as an optimization when the server has not
166+
// yet observed the establishment of a friendship. In this case, the server will
167+
// use the provided intent_id to verify the friendship.
168+
//
169+
// This is most likely to occur when initiating a chat with a user for the first
170+
// time.
171+
common.v1.IntentId intent_id = 2;
172+
// The identity of the other user.
173+
//
174+
// Note: This can/should be removed with proper intent plumbing.
175+
ChatMemberIdentity identity = 3;
159176
}
160177
message StartChatResponse {
161178
Result result = 1;
162179
enum Result {
163-
OK = 0;
164-
DENIED = 1;
180+
OK = 0;
181+
// DENIED indicates the caller is not allowed to start/join the chat.
182+
DENIED = 1;
183+
// INVALID_PRAMETER indicates one of the parameters is invalid.
165184
INVALID_PARAMETER = 2;
185+
// PENDING indicates that the payment (for chat) intent is pending confirmation
186+
// before the service will permit the creation of the chat. This can happen in
187+
// cases where the block chain is particularly slow (beyond our RPC timeouts).
188+
PENDING = 3;
166189
}
167-
// The chat to use if the RPC was successful
190+
// The chat to use if the RPC was successful.
168191
ChatMetadata chat = 2;
169192
}
170193
message SendMessageRequest {

service/protos/src/main/proto/common/v1/model.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ option java_package = "com.codeinc.gen.common.v1";
55
option objc_class_prefix = "CPBCommonV1";
66
import "google/protobuf/duration.proto";
77
import "google/protobuf/timestamp.proto";
8+
89
// AccountType associates a type to an account, which infers how an account is used
910
// within the Code ecosystem.
1011
enum AccountType {

service/protos/src/main/proto/contact/v1/contact_list_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ option go_package = "github.com/code-payments/code-protobuf-api/generated/go/con
44
option java_package = "com.codeinc.gen.contact.v1";
55
option objc_class_prefix = "CPBContactV1";
66
import "common/v1/model.proto";
7+
78
service ContactList {
89
// AddContacts adds a batch of contacts to a user's contact list
910
rpc AddContacts(AddContactsRequest) returns (AddContactsResponse);

service/protos/src/main/proto/currency/v1/currency_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package code.currency.v1;
33
option go_package = "github.com/code-payments/code-protobuf-api/generated/go/currency/v1;currency";
44
option java_package = "com.codeinc.gen.currency.v1";
55
option objc_class_prefix = "CPBCurrencyV1";
6+
67
import "google/protobuf/timestamp.proto";
78
service Currency {
89
// GetAllRates returns the exchange rates for Kin against all available currencies

service/protos/src/main/proto/device/v1/device_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ option go_package = "github.com/code-payments/code-protobuf-api/generated/go/dev
44
option java_package = "com.codeinc.gen.device.v1";
55
option objc_class_prefix = "CPBDevicetV1";
66
import "common/v1/model.proto";
7+
78
service Device {
89
// RegisterLoggedInAccounts registers a set of owner accounts logged for
910
// an app install. Currently, a single login is enforced per app install.

service/protos/src/main/proto/invite/v2/invite_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ option go_package = "github.com/code-payments/code-protobuf-api/generated/go/inv
44
option java_package = "com.codeinc.gen.invite.v2";
55
option objc_class_prefix = "CPBInviteV2";
66
import "common/v1/model.proto";
7+
78
service Invite {
89
// GetInviteCount gets the number of invites that a user can send out.
910
rpc GetInviteCount(GetInviteCountRequest) returns (GetInviteCountResponse);

service/protos/src/main/proto/messaging/v1/messaging_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ option java_package = "com.codeinc.gen.messaging.v1";
55
option objc_class_prefix = "CPBMessagingV1";
66
import "common/v1/model.proto";
77
import "transaction/v2/transaction_service.proto";
8+
89
import "google/protobuf/timestamp.proto";
910
service Messaging {
1011
// OpenMessageStream opens a stream of messages. Messages are routed using the

0 commit comments

Comments
 (0)