@vbyte/btc-dev 1.0.14 → 1.0.15
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/main.cjs +4 -4
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +4 -4
- package/dist/module.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/dist/schema/tx.d.ts +11 -11
- package/dist/schema/tx.js +4 -4
- package/dist/script.js +1 -1
- package/dist/script.js.map +1 -1
- package/package.json +1 -1
- package/src/schema/tx.ts +8 -6
package/dist/package.json
CHANGED
package/dist/schema/tx.d.ts
CHANGED
|
@@ -195,8 +195,8 @@ export declare const vin_template: z.ZodObject<{
|
|
|
195
195
|
witness?: string[] | undefined;
|
|
196
196
|
}>;
|
|
197
197
|
export declare const tx_template: z.ZodObject<{
|
|
198
|
-
version: z.
|
|
199
|
-
vin: z.
|
|
198
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
199
|
+
vin: z.ZodArray<z.ZodObject<{
|
|
200
200
|
txid: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
201
201
|
vout: z.ZodNumber;
|
|
202
202
|
} & {
|
|
@@ -237,8 +237,8 @@ export declare const tx_template: z.ZodObject<{
|
|
|
237
237
|
} | null | undefined;
|
|
238
238
|
script_sig?: string | null | undefined;
|
|
239
239
|
witness?: string[] | undefined;
|
|
240
|
-
}>, "many"
|
|
241
|
-
vout: z.
|
|
240
|
+
}>, "many">;
|
|
241
|
+
vout: z.ZodArray<z.ZodObject<{
|
|
242
242
|
script_pk: z.ZodEffects<z.ZodString, string, string>;
|
|
243
243
|
} & {
|
|
244
244
|
value: z.ZodUnion<[z.ZodNumber, z.ZodBigInt]>;
|
|
@@ -248,10 +248,9 @@ export declare const tx_template: z.ZodObject<{
|
|
|
248
248
|
}, {
|
|
249
249
|
value: number | bigint;
|
|
250
250
|
script_pk: string;
|
|
251
|
-
}>, "many"
|
|
251
|
+
}>, "many">;
|
|
252
252
|
locktime: z.ZodOptional<z.ZodNumber>;
|
|
253
253
|
}, "strip", z.ZodTypeAny, {
|
|
254
|
-
version: number;
|
|
255
254
|
vout: {
|
|
256
255
|
value: number | bigint;
|
|
257
256
|
script_pk: string;
|
|
@@ -268,14 +267,14 @@ export declare const tx_template: z.ZodObject<{
|
|
|
268
267
|
script_sig?: string | null | undefined;
|
|
269
268
|
witness?: string[] | undefined;
|
|
270
269
|
}[];
|
|
270
|
+
version?: number | undefined;
|
|
271
271
|
locktime?: number | undefined;
|
|
272
272
|
}, {
|
|
273
|
-
|
|
274
|
-
vout?: {
|
|
273
|
+
vout: {
|
|
275
274
|
value: number | bigint;
|
|
276
275
|
script_pk: string;
|
|
277
|
-
}[]
|
|
278
|
-
vin
|
|
276
|
+
}[];
|
|
277
|
+
vin: {
|
|
279
278
|
txid: string;
|
|
280
279
|
vout: number;
|
|
281
280
|
sequence?: string | number | undefined;
|
|
@@ -286,6 +285,7 @@ export declare const tx_template: z.ZodObject<{
|
|
|
286
285
|
} | null | undefined;
|
|
287
286
|
script_sig?: string | null | undefined;
|
|
288
287
|
witness?: string[] | undefined;
|
|
289
|
-
}[]
|
|
288
|
+
}[];
|
|
289
|
+
version?: number | undefined;
|
|
290
290
|
locktime?: number | undefined;
|
|
291
291
|
}>;
|
package/dist/schema/tx.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { hex, hex32, uint } from '@vbyte/micro-lib/schema';
|
|
3
|
-
const sats = z.bigint().
|
|
3
|
+
const sats = z.bigint().min(0n).max(2100000000000000n);
|
|
4
4
|
export const tx_output = z.object({
|
|
5
5
|
value: sats,
|
|
6
6
|
script_pk: hex,
|
|
@@ -31,8 +31,8 @@ export const vin_template = tx_input.extend({
|
|
|
31
31
|
witness: z.array(hex).optional(),
|
|
32
32
|
});
|
|
33
33
|
export const tx_template = z.object({
|
|
34
|
-
version: uint.
|
|
35
|
-
vin: z.array(vin_template)
|
|
36
|
-
vout: z.array(vout_template)
|
|
34
|
+
version: uint.optional(),
|
|
35
|
+
vin: z.array(vin_template),
|
|
36
|
+
vout: z.array(vout_template),
|
|
37
37
|
locktime: uint.optional(),
|
|
38
38
|
});
|