diff --git a/package-lock.json b/package-lock.json index c1f943c..f04e265 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@sats-connect/core", - "version": "0.1.1", + "version": "0.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@sats-connect/core", - "version": "0.1.1", + "version": "0.1.2", "license": "ISC", "dependencies": { "axios": "1.6.8", diff --git a/package.json b/package.json index 7b60173..7d38a14 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sats-connect/core", - "version": "0.1.1", + "version": "0.1.2", "main": "dist/index.mjs", "module": "dist/index.mjs", "types": "dist/index.d.mts", diff --git a/src/request/types/index.ts b/src/request/types/index.ts index 8b212fa..081e108 100644 --- a/src/request/types/index.ts +++ b/src/request/types/index.ts @@ -1,5 +1,5 @@ import type * as BtcMethods from './btcMethods'; -import { GetInscriptions } from './ordinalsMethods'; +import { GetInscriptions, SendInscriptions } from './ordinalsMethods'; import type * as RunesMethods from './runesMethods'; import type * as StxMethods from './stxMethods'; import type * as WalletMethods from './walletMethods'; @@ -44,6 +44,7 @@ export type RunesRequestMethod = keyof RunesRequests; export interface OrdinalsRequests { ord_getInscriptions: GetInscriptions; + ord_sendInscriptions: SendInscriptions; } export type OrdinalsRequestMethod = keyof OrdinalsRequests; diff --git a/src/request/types/ordinalsMethods.ts b/src/request/types/ordinalsMethods.ts index 8e20250..089c105 100644 --- a/src/request/types/ordinalsMethods.ts +++ b/src/request/types/ordinalsMethods.ts @@ -39,3 +39,29 @@ export type GetInscriptions = MethodParamsAndResult< v.InferOutput, v.InferOutput >; + +export const sendInscriptionsMethodName = 'ord_sendInscriptions'; +export const sendInscriptionsParamsSchema = v.object({ + transfers: v.array( + v.object({ + address: v.string(), + inscriptionId: v.string(), + }) + ), +}); +export const sendInscriptionsResultSchema = v.object({ + txid: v.string(), +}); +export const sendInscriptionsSchema = v.object({ + ...rpcRequestMessageSchema.entries, + ...v.object({ + method: v.literal(sendInscriptionsMethodName), + params: sendInscriptionsParamsSchema, + id: v.string(), + }).entries, +}); + +export type SendInscriptions = MethodParamsAndResult< + v.InferOutput, + v.InferOutput +>;