From 573add867435c79e746ed6aa96dfb0a9eeddefd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Bardaj=C3=AD=20Puig?= Date: Thu, 27 Jun 2024 09:09:48 +0100 Subject: [PATCH] Rename method names --- src/request/types/walletMethods.ts | 32 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/request/types/walletMethods.ts b/src/request/types/walletMethods.ts index c6b6684..e8b7e75 100644 --- a/src/request/types/walletMethods.ts +++ b/src/request/types/walletMethods.ts @@ -1,34 +1,34 @@ import { MethodParamsAndResult, rpcRequestMessageSchema } from '../../types'; import * as v from 'valibot'; -export const connectMethodName = 'wallet_connect'; -export const connectParamsSchema = v.undefined(); -export const connectResultSchema = v.literal(true); -export const connectRequestMessageSchema = v.object({ +export const grantPermissionsMethodName = 'wallet_grantPermissions'; +export const grantPermissionsParamsSchema = v.undefined(); +export const grantPermissionsResultSchema = v.literal(true); +export const grantPermissionsRequestMessageSchema = v.object({ ...rpcRequestMessageSchema.entries, ...v.object({ - method: v.literal(connectMethodName), - params: connectParamsSchema, + method: v.literal(grantPermissionsMethodName), + params: grantPermissionsParamsSchema, id: v.string(), }).entries, }); export type Connect = MethodParamsAndResult< - v.InferOutput, - v.InferOutput + v.InferOutput, + v.InferOutput >; -export const disconnectMethodName = 'wallet_disconnect'; -export const disconnectParamsSchema = v.undefined(); -export const disconnectResultSchema = v.literal(true); -export const disconnectRequestMessageSchema = v.object({ +export const revokePermissionsMethodName = 'wallet_revokePermissions'; +export const revokePermissionsParamsSchema = v.undefined(); +export const revokePermissionsResultSchema = v.literal(true); +export const revokePermissionsRequestMessageSchema = v.object({ ...rpcRequestMessageSchema.entries, ...v.object({ - method: v.literal(disconnectMethodName), - params: disconnectParamsSchema, + method: v.literal(revokePermissionsMethodName), + params: revokePermissionsParamsSchema, id: v.string(), }).entries, }); export type Disconnect = MethodParamsAndResult< - v.InferOutput, - v.InferOutput + v.InferOutput, + v.InferOutput >;