From 543b43d52c534e0c6725aae7e76f9480a1a2e6cd Mon Sep 17 00:00:00 2001 From: Mahmoud Aboelenein Date: Wed, 24 Jul 2024 13:56:23 +0300 Subject: [PATCH] naming changes --- src/request/types/runesMethods.ts | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/request/types/runesMethods.ts b/src/request/types/runesMethods.ts index eac8371..79cd0a6 100644 --- a/src/request/types/runesMethods.ts +++ b/src/request/types/runesMethods.ts @@ -113,18 +113,27 @@ export type GetRunesBalance = MethodParamsAndResult< v.InferOutput >; -export const RuneTransferRecipientsSchema = v.array( - v.object({ - runeName: v.string(), - amount: v.string(), - address: v.string(), - }) -); -export const TransferRunesMethodName = 'runes_transfer'; -export const TransferRunesParamsSchema = v.object({ - recipients: RuneTransferRecipientsSchema, +export const transferRunesMethodName = 'runes_transfer'; +export const transferRunesParamsSchema = v.object({ + recipients: v.array( + v.object({ + runeName: v.string(), + amount: v.string(), + address: v.string(), + }) + ), +}); + +export const transferRunesSchema = v.object({ + ...rpcRequestMessageSchema.entries, + ...v.object({ + method: v.literal(transferRunesMethodName), + params: transferRunesParamsSchema, + id: v.string(), + }).entries, }); -export type TransferRunesParams = v.InferOutput; + +export type TransferRunesParams = v.InferOutput; export const TransferRunesResultSchema = v.object({ txid: v.string(), });