Skip to content

Commit

Permalink
add type RpcMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
KartikSoneji committed Apr 20, 2024
1 parent 3bf1f75 commit 8bc335d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/lib/types/all-methods.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/**
* @typedef {{
* name: string;
* defaultParams: Record<string, string | number | object>;
* optionalParams?: [] | Record<string, string | number | boolean | null>;
* paramsFormat: "object" | "array" | "none";
* paramsStructure?: string[];
* }} RpcMethod
*/

/** @type Record<string, RpcMethod> */
export const methods = {
getAccountInfo: {
defaultParams: {
Expand Down
2 changes: 2 additions & 0 deletions src/lib/types/method-dev.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/** @typedef {import("./all-methods").RpcMethod} RpcMethod */
/** @type Record<string, RpcMethod> */
export const methods = {
getAsset: {
defaultParams: {
Expand Down

0 comments on commit 8bc335d

Please sign in to comment.