Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: properly name request structs
  • Loading branch information
ccharly committed Dec 4, 2025
commit 085b7f9854b26a85013d63d0341b941829a79e5f
14 changes: 8 additions & 6 deletions packages/keyring-api/src/api/v2/keyring-rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ const CommonHeader = {
// ----------------------------------------------------------------------------
// Get accounts

export const GetAccountsV2Struct = object({
export const GetAccountsV2RequestStruct = object({
...CommonHeader,
method: literal(`${KeyringRpcV2Method.GetAccounts}`),
});

export type GetAccountsV2Request = Infer<typeof GetAccountsV2Struct>;
export type GetAccountsV2Request = Infer<typeof GetAccountsV2RequestStruct>;

export const GetAccountsV2ResponseStruct = array(KeyringAccountStruct);

Expand All @@ -61,15 +61,15 @@ export type GetAccountsV2Response = Infer<typeof GetAccountsV2ResponseStruct>;
// ----------------------------------------------------------------------------
// Get account

export const GetAccountV2Struct = object({
export const GetAccountV2RequestStruct = object({
...CommonHeader,
method: literal(`${KeyringRpcV2Method.GetAccount}`),
params: object({
id: UuidStruct,
}),
});

export type GetAccountV2Request = Infer<typeof GetAccountV2Struct>;
export type GetAccountV2Request = Infer<typeof GetAccountV2RequestStruct>;

export const GetAccountV2ResponseStruct = KeyringAccountStruct;

Expand All @@ -78,13 +78,15 @@ export type GetAccountV2Response = Infer<typeof GetAccountV2ResponseStruct>;
// ----------------------------------------------------------------------------
// Create accounts

export const CreateAccountsV2Struct = object({
export const CreateAccountsV2RequestStruct = object({
...CommonHeader,
method: literal(`${KeyringRpcV2Method.CreateAccounts}`),
params: CreateAccountOptionsStruct,
});

export type CreateAccountsV2Request = Infer<typeof CreateAccountsV2Struct>;
export type CreateAccountsV2Request = Infer<
typeof CreateAccountsV2RequestStruct
>;

export const CreateAccountsV2ResponseStruct = array(KeyringAccountStruct);

Expand Down