@sats-connect/core 0.0.11-4781818 → 0.0.11-6fcd68a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +11 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -162,7 +162,7 @@ interface RequestOptions<Payload extends RequestPayload, Response> {
|
|
|
162
162
|
declare const rpcRequestMessageSchema: v.ObjectSchema<{
|
|
163
163
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
164
164
|
readonly method: v.StringSchema<undefined>;
|
|
165
|
-
readonly params: v.OptionalSchema<v.UnionSchema<[v.ArraySchema<v.UnknownSchema, undefined>, v.LooseObjectSchema<{}, undefined>], undefined>, never>;
|
|
165
|
+
readonly params: v.OptionalSchema<v.UnionSchema<[v.ArraySchema<v.UnknownSchema, undefined>, v.LooseObjectSchema<{}, undefined>, v.NullSchema<undefined>], undefined>, never>;
|
|
166
166
|
readonly id: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.NullSchema<undefined>], undefined>, never>;
|
|
167
167
|
}, undefined>;
|
|
168
168
|
type RpcRequestMessage = v.InferOutput<typeof rpcRequestMessageSchema>;
|
package/dist/index.mjs
CHANGED
|
@@ -9,7 +9,17 @@ var BitcoinNetworkType = /* @__PURE__ */ ((BitcoinNetworkType2) => {
|
|
|
9
9
|
var rpcRequestMessageSchema = v.object({
|
|
10
10
|
jsonrpc: v.literal("2.0"),
|
|
11
11
|
method: v.string(),
|
|
12
|
-
params: v.optional(
|
|
12
|
+
params: v.optional(
|
|
13
|
+
v.union([
|
|
14
|
+
v.array(v.unknown()),
|
|
15
|
+
v.looseObject({}),
|
|
16
|
+
// Note: This is to support current incorrect usage of RPC 2.0. Params need
|
|
17
|
+
// to be either an array or an object when provided. Changing this now would
|
|
18
|
+
// be a breaking change, so accepting null values for now. Tracking in
|
|
19
|
+
// https://linear.app/xverseapp/issue/ENG-4538.
|
|
20
|
+
v.null()
|
|
21
|
+
])
|
|
22
|
+
),
|
|
13
23
|
id: v.optional(v.union([v.string(), v.number(), v.null()]))
|
|
14
24
|
});
|
|
15
25
|
var RpcErrorCode = /* @__PURE__ */ ((RpcErrorCode2) => {
|