Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/rpc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@code-wallet/rpc",
"version": "1.0.2",
"version": "1.1.0",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @generated by protoc-gen-connect-es v0.11.0 with parameter "target=ts"
// @generated by protoc-gen-connect-es v0.13.0 with parameter "target=ts"
// @generated from file account/v1/account_service.proto (package code.account.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck
Expand Down Expand Up @@ -26,8 +26,8 @@ export const Account = {
kind: MethodKind.Unary,
},
/**
* GetTokenAccountInfos returns information about token accounts relevant to
* the owner account.
* GetTokenAccountInfos returns token account metadata relevant to the Code owner
* account.
*
* @generated from rpc code.account.v1.Account.GetTokenAccountInfos
*/
Expand Down
51 changes: 42 additions & 9 deletions packages/rpc/src/generated/account/v1/account_service_pb.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// @generated by protoc-gen-es v1.3.0 with parameter "target=ts"
// @generated by protoc-gen-es v1.4.2 with parameter "target=ts"
// @generated from file account/v1/account_service.proto (package code.account.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
import { AccountType, Signature, SolanaAccountId } from "../../common/v1/model_pb";
import { AccountType, Relationship, Signature, SolanaAccountId } from "../../common/v1/model_pb";
import { ExchangeData } from "../../transaction/v2/transaction_service_pb";

/**
Expand Down Expand Up @@ -113,7 +113,7 @@ export enum IsCodeAccountResponse_Result {
NOT_FOUND = 1,

/**
* The account exists, but at least one timelock account is unlocked
* The account exists, but at least one timelock account is unlocked.
*
* @generated from enum value: UNLOCKED_TIMELOCK_ACCOUNT = 2;
*/
Expand Down Expand Up @@ -291,9 +291,9 @@ export class TokenAccountInfo extends Message<TokenAccountInfo> {
balanceSource = TokenAccountInfo_BalanceSource.UNKNOWN;

/**
* The Kin balance in quarks, as observed by Code. This may not reflect the
* value on the blockchain and could be non-zero even if the account hasn't
* been created. Use balance_source to determine how this value was calculated.
* The balance in quarks, as observed by Code. This may not reflect the value
* on the blockchain and could be non-zero even if the account hasn't been created.
* Use balance_source to determine how this value was calculated.
*
* @generated from field: uint64 balance = 7;
*/
Expand All @@ -315,9 +315,9 @@ export class TokenAccountInfo extends Message<TokenAccountInfo> {

/**
* For temporary incoming accounts only. Flag indicates whether client must
* actively try rotating it by issuing a ReceivePayments intent. In general,
* clients should wait as long as possible until this flag is true or requiring
* the funds to send their next payment.
* actively try rotating it by issuing a ReceivePaymentsPrivately intent. In
* general, clients should wait as long as possible until this flag is true
* or requiring the funds to send their next payment.
*
* @generated from field: bool must_rotate = 10;
*/
Expand Down Expand Up @@ -345,6 +345,35 @@ export class TokenAccountInfo extends Message<TokenAccountInfo> {
*/
originalExchangeData?: ExchangeData;

/**
* The token account's mint
*
* @generated from field: code.common.v1.SolanaAccountId mint = 13;
*/
mint?: SolanaAccountId;

/**
* The number of decimals configured for the mint
*
* @generated from field: uint32 mint_decimals = 14;
*/
mintDecimals = 0;

/**
* User-friendly display name for the mint
*
* @generated from field: string mint_display_name = 15;
*/
mintDisplayName = "";

/**
* The relationship with a third party that this account has established with.
* This only applies to relevant account types (eg. RELATIONSHIP).
*
* @generated from field: code.common.v1.Relationship relationship = 16;
*/
relationship?: Relationship;

constructor(data?: PartialMessage<TokenAccountInfo>) {
super();
proto3.util.initPartial(data, this);
Expand All @@ -365,6 +394,10 @@ export class TokenAccountInfo extends Message<TokenAccountInfo> {
{ no: 10, name: "must_rotate", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 11, name: "claim_state", kind: "enum", T: proto3.getEnumType(TokenAccountInfo_ClaimState) },
{ no: 12, name: "original_exchange_data", kind: "message", T: ExchangeData },
{ no: 13, name: "mint", kind: "message", T: SolanaAccountId },
{ no: 14, name: "mint_decimals", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
{ no: 15, name: "mint_display_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 16, name: "relationship", kind: "message", T: Relationship },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TokenAccountInfo {
Expand Down
28 changes: 28 additions & 0 deletions packages/rpc/src/generated/badge/v1/badge_service_connect.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// @generated by protoc-gen-connect-es v0.13.0 with parameter "target=ts"
// @generated from file badge/v1/badge_service.proto (package code.badge.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import { ResetBadgeCountRequest, ResetBadgeCountResponse } from "./badge_service_pb";
import { MethodKind } from "@bufbuild/protobuf";

/**
* @generated from service code.badge.v1.Badge
*/
export const Badge = {
typeName: "code.badge.v1.Badge",
methods: {
/**
* ResetBadgeCount resets an owner account's app icon badge count back to zero
*
* @generated from rpc code.badge.v1.Badge.ResetBadgeCount
*/
resetBadgeCount: {
name: "ResetBadgeCount",
I: ResetBadgeCountRequest,
O: ResetBadgeCountResponse,
kind: MethodKind.Unary,
},
}
} as const;

109 changes: 109 additions & 0 deletions packages/rpc/src/generated/badge/v1/badge_service_pb.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
// @generated by protoc-gen-es v1.4.2 with parameter "target=ts"
// @generated from file badge/v1/badge_service.proto (package code.badge.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import { Signature, SolanaAccountId } from "../../common/v1/model_pb";

/**
* @generated from message code.badge.v1.ResetBadgeCountRequest
*/
export class ResetBadgeCountRequest extends Message<ResetBadgeCountRequest> {
/**
* The owner account to clear badge count
*
* @generated from field: code.common.v1.SolanaAccountId owner = 1;
*/
owner?: SolanaAccountId;

/**
* The signature is of serialize(ResetBadgeCountRequest) without this field set
* using the private key of the owner account. This provides an authentication
* mechanism to the RPC.
*
* @generated from field: code.common.v1.Signature signature = 2;
*/
signature?: Signature;

constructor(data?: PartialMessage<ResetBadgeCountRequest>) {
super();
proto3.util.initPartial(data, this);
}

static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "code.badge.v1.ResetBadgeCountRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "owner", kind: "message", T: SolanaAccountId },
{ no: 2, name: "signature", kind: "message", T: Signature },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ResetBadgeCountRequest {
return new ResetBadgeCountRequest().fromBinary(bytes, options);
}

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ResetBadgeCountRequest {
return new ResetBadgeCountRequest().fromJson(jsonValue, options);
}

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ResetBadgeCountRequest {
return new ResetBadgeCountRequest().fromJsonString(jsonString, options);
}

static equals(a: ResetBadgeCountRequest | PlainMessage<ResetBadgeCountRequest> | undefined, b: ResetBadgeCountRequest | PlainMessage<ResetBadgeCountRequest> | undefined): boolean {
return proto3.util.equals(ResetBadgeCountRequest, a, b);
}
}

/**
* @generated from message code.badge.v1.ResetBadgeCountResponse
*/
export class ResetBadgeCountResponse extends Message<ResetBadgeCountResponse> {
/**
* @generated from field: code.badge.v1.ResetBadgeCountResponse.Result result = 1;
*/
result = ResetBadgeCountResponse_Result.OK;

constructor(data?: PartialMessage<ResetBadgeCountResponse>) {
super();
proto3.util.initPartial(data, this);
}

static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "code.badge.v1.ResetBadgeCountResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "result", kind: "enum", T: proto3.getEnumType(ResetBadgeCountResponse_Result) },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ResetBadgeCountResponse {
return new ResetBadgeCountResponse().fromBinary(bytes, options);
}

static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ResetBadgeCountResponse {
return new ResetBadgeCountResponse().fromJson(jsonValue, options);
}

static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ResetBadgeCountResponse {
return new ResetBadgeCountResponse().fromJsonString(jsonString, options);
}

static equals(a: ResetBadgeCountResponse | PlainMessage<ResetBadgeCountResponse> | undefined, b: ResetBadgeCountResponse | PlainMessage<ResetBadgeCountResponse> | undefined): boolean {
return proto3.util.equals(ResetBadgeCountResponse, a, b);
}
}

/**
* @generated from enum code.badge.v1.ResetBadgeCountResponse.Result
*/
export enum ResetBadgeCountResponse_Result {
/**
* @generated from enum value: OK = 0;
*/
OK = 0,
}
// Retrieve enum metadata with: proto3.getEnumType(ResetBadgeCountResponse_Result)
proto3.util.setEnumType(ResetBadgeCountResponse_Result, "code.badge.v1.ResetBadgeCountResponse.Result", [
{ no: 0, name: "OK" },
]);

2 changes: 2 additions & 0 deletions packages/rpc/src/generated/badge/v1/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './badge_service_connect';
export * from './badge_service_pb';
72 changes: 72 additions & 0 deletions packages/rpc/src/generated/chat/v1/chat_service_connect.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// @generated by protoc-gen-connect-es v0.13.0 with parameter "target=ts"
// @generated from file chat/v1/chat_service.proto (package code.chat.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import { AdvancePointerRequest, AdvancePointerResponse, GetChatsRequest, GetChatsResponse, GetMessagesRequest, GetMessagesResponse, SetMuteStateRequest, SetMuteStateResponse, SetSubscriptionStateRequest, SetSubscriptionStateResponse } from "./chat_service_pb";
import { MethodKind } from "@bufbuild/protobuf";

/**
* @generated from service code.chat.v1.Chat
*/
export const Chat = {
typeName: "code.chat.v1.Chat",
methods: {
/**
* GetChats gets the set of chats for an owner account
*
* @generated from rpc code.chat.v1.Chat.GetChats
*/
getChats: {
name: "GetChats",
I: GetChatsRequest,
O: GetChatsResponse,
kind: MethodKind.Unary,
},
/**
* GetMessages gets the set of messages for a chat
*
* @generated from rpc code.chat.v1.Chat.GetMessages
*/
getMessages: {
name: "GetMessages",
I: GetMessagesRequest,
O: GetMessagesResponse,
kind: MethodKind.Unary,
},
/**
* AdvancePointer advances a pointer in chat history
*
* @generated from rpc code.chat.v1.Chat.AdvancePointer
*/
advancePointer: {
name: "AdvancePointer",
I: AdvancePointerRequest,
O: AdvancePointerResponse,
kind: MethodKind.Unary,
},
/**
* SetMuteState configures the mute state of a chat
*
* @generated from rpc code.chat.v1.Chat.SetMuteState
*/
setMuteState: {
name: "SetMuteState",
I: SetMuteStateRequest,
O: SetMuteStateResponse,
kind: MethodKind.Unary,
},
/**
* SetSubscriptionState configures the susbscription state of a chat
*
* @generated from rpc code.chat.v1.Chat.SetSubscriptionState
*/
setSubscriptionState: {
name: "SetSubscriptionState",
I: SetSubscriptionStateRequest,
O: SetSubscriptionStateResponse,
kind: MethodKind.Unary,
},
}
} as const;

Loading