@develit-services/blockchain 0.8.1 → 0.8.2
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/export/worker.cjs +537 -15
- package/dist/export/worker.d.cts +1 -1
- package/dist/export/worker.d.mts +1 -1
- package/dist/export/worker.d.ts +1 -1
- package/dist/export/worker.mjs +537 -15
- package/dist/shared/{blockchain.C1uxxlk3.d.ts → blockchain.5Ld6uEay.d.ts} +32 -4
- package/dist/shared/{blockchain.C0wB1XUE.cjs → blockchain.BBjLLe8v.cjs} +31 -19
- package/dist/shared/{blockchain.Bq5JL2Nn.d.cts → blockchain.CtIjPvX8.d.cts} +32 -4
- package/dist/shared/{blockchain.B_9YwgFd.mjs → blockchain.DTJULMBV.mjs} +31 -20
- package/dist/shared/{blockchain.BFesyGyk.d.mts → blockchain.DZbyq0JM.d.mts} +32 -4
- package/dist/types.cjs +2 -1
- package/dist/types.d.cts +2 -2
- package/dist/types.d.mts +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/types.mjs +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,37 @@
|
|
|
3
3
|
const zod = require('zod');
|
|
4
4
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
5
5
|
|
|
6
|
+
const chainSchema = zod.z.enum([
|
|
7
|
+
"ARBITRUM",
|
|
8
|
+
"AVALANCHE",
|
|
9
|
+
"BASE",
|
|
10
|
+
"ETHEREUM",
|
|
11
|
+
"GNOSIS",
|
|
12
|
+
"OPTIMISM",
|
|
13
|
+
"SCROLL"
|
|
14
|
+
]);
|
|
15
|
+
const getTransactionInputSchema = zod.z.object({
|
|
16
|
+
chain: chainSchema,
|
|
17
|
+
txHash: zod.z.string()
|
|
18
|
+
});
|
|
19
|
+
const getTransactionOutputSchema = zod.z.object({
|
|
20
|
+
hash: zod.z.string(),
|
|
21
|
+
from: zod.z.string(),
|
|
22
|
+
to: zod.z.string().nullable(),
|
|
23
|
+
value: zod.z.string(),
|
|
24
|
+
blockNumber: zod.z.string().nullable(),
|
|
25
|
+
blockHash: zod.z.string().nullable(),
|
|
26
|
+
gasPrice: zod.z.string().nullable(),
|
|
27
|
+
gas: zod.z.string(),
|
|
28
|
+
nonce: zod.z.number(),
|
|
29
|
+
transactionIndex: zod.z.number().nullable(),
|
|
30
|
+
status: zod.z.enum(["success", "reverted", "pending"]),
|
|
31
|
+
gasUsed: zod.z.string().nullable(),
|
|
32
|
+
timestamp: zod.z.number().nullable()
|
|
33
|
+
});
|
|
34
|
+
|
|
6
35
|
const getBlockInputSchema = zod.z.object({
|
|
36
|
+
chain: chainSchema,
|
|
7
37
|
blockTag: zod.z.enum(["latest", "earliest", "pending", "safe", "finalized"]).optional(),
|
|
8
38
|
blockNumber: zod.z.bigint().optional(),
|
|
9
39
|
blockHash: zod.z.string().regex(/^0x[0-9a-fA-F]{64}$/).optional()
|
|
@@ -48,25 +78,6 @@ const getBlockOutputSchema = zod.z.object({
|
|
|
48
78
|
withdrawalsRoot: Hex.optional()
|
|
49
79
|
});
|
|
50
80
|
|
|
51
|
-
const getTransactionInputSchema = zod.z.object({
|
|
52
|
-
txHash: zod.z.string()
|
|
53
|
-
});
|
|
54
|
-
const getTransactionOutputSchema = zod.z.object({
|
|
55
|
-
hash: zod.z.string(),
|
|
56
|
-
from: zod.z.string(),
|
|
57
|
-
to: zod.z.string().nullable(),
|
|
58
|
-
value: zod.z.string(),
|
|
59
|
-
blockNumber: zod.z.string().nullable(),
|
|
60
|
-
blockHash: zod.z.string().nullable(),
|
|
61
|
-
gasPrice: zod.z.string().nullable(),
|
|
62
|
-
gas: zod.z.string(),
|
|
63
|
-
nonce: zod.z.number(),
|
|
64
|
-
transactionIndex: zod.z.number().nullable(),
|
|
65
|
-
status: zod.z.enum(["success", "reverted", "pending"]),
|
|
66
|
-
gasUsed: zod.z.string().nullable(),
|
|
67
|
-
timestamp: zod.z.number().nullable()
|
|
68
|
-
});
|
|
69
|
-
|
|
70
81
|
const syncAddressInputSchema = zod.z.object({
|
|
71
82
|
addressId: zod.z.string()
|
|
72
83
|
});
|
|
@@ -75,6 +86,7 @@ const syncAddressOutputSchema = zod.z.object({
|
|
|
75
86
|
details: backendSdk.workflowInstanceStatusSchema
|
|
76
87
|
});
|
|
77
88
|
|
|
89
|
+
exports.chainSchema = chainSchema;
|
|
78
90
|
exports.getBlockInputSchema = getBlockInputSchema;
|
|
79
91
|
exports.getBlockOutputSchema = getBlockOutputSchema;
|
|
80
92
|
exports.getTransactionInputSchema = getTransactionInputSchema;
|
|
@@ -2,10 +2,19 @@ import { z } from 'zod';
|
|
|
2
2
|
import { s as schema } from './blockchain.Cx60lJ0c.cjs';
|
|
3
3
|
|
|
4
4
|
declare const getBlockInputSchema: z.ZodObject<{
|
|
5
|
+
chain: z.ZodEnum<{
|
|
6
|
+
ARBITRUM: "ARBITRUM";
|
|
7
|
+
AVALANCHE: "AVALANCHE";
|
|
8
|
+
BASE: "BASE";
|
|
9
|
+
ETHEREUM: "ETHEREUM";
|
|
10
|
+
GNOSIS: "GNOSIS";
|
|
11
|
+
OPTIMISM: "OPTIMISM";
|
|
12
|
+
SCROLL: "SCROLL";
|
|
13
|
+
}>;
|
|
5
14
|
blockTag: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
pending: "pending";
|
|
6
16
|
latest: "latest";
|
|
7
17
|
earliest: "earliest";
|
|
8
|
-
pending: "pending";
|
|
9
18
|
safe: "safe";
|
|
10
19
|
finalized: "finalized";
|
|
11
20
|
}>>;
|
|
@@ -50,7 +59,26 @@ interface GetBlockInput extends z.infer<typeof getBlockInputSchema> {
|
|
|
50
59
|
}
|
|
51
60
|
type GetBlockOutput = z.infer<typeof getBlockOutputSchema>;
|
|
52
61
|
|
|
62
|
+
declare const chainSchema: z.ZodEnum<{
|
|
63
|
+
ARBITRUM: "ARBITRUM";
|
|
64
|
+
AVALANCHE: "AVALANCHE";
|
|
65
|
+
BASE: "BASE";
|
|
66
|
+
ETHEREUM: "ETHEREUM";
|
|
67
|
+
GNOSIS: "GNOSIS";
|
|
68
|
+
OPTIMISM: "OPTIMISM";
|
|
69
|
+
SCROLL: "SCROLL";
|
|
70
|
+
}>;
|
|
71
|
+
type Chain = z.infer<typeof chainSchema>;
|
|
53
72
|
declare const getTransactionInputSchema: z.ZodObject<{
|
|
73
|
+
chain: z.ZodEnum<{
|
|
74
|
+
ARBITRUM: "ARBITRUM";
|
|
75
|
+
AVALANCHE: "AVALANCHE";
|
|
76
|
+
BASE: "BASE";
|
|
77
|
+
ETHEREUM: "ETHEREUM";
|
|
78
|
+
GNOSIS: "GNOSIS";
|
|
79
|
+
OPTIMISM: "OPTIMISM";
|
|
80
|
+
SCROLL: "SCROLL";
|
|
81
|
+
}>;
|
|
54
82
|
txHash: z.ZodString;
|
|
55
83
|
}, z.core.$strip>;
|
|
56
84
|
declare const getTransactionOutputSchema: z.ZodObject<{
|
|
@@ -65,9 +93,9 @@ declare const getTransactionOutputSchema: z.ZodObject<{
|
|
|
65
93
|
nonce: z.ZodNumber;
|
|
66
94
|
transactionIndex: z.ZodNullable<z.ZodNumber>;
|
|
67
95
|
status: z.ZodEnum<{
|
|
68
|
-
pending: "pending";
|
|
69
96
|
success: "success";
|
|
70
97
|
reverted: "reverted";
|
|
98
|
+
pending: "pending";
|
|
71
99
|
}>;
|
|
72
100
|
gasUsed: z.ZodNullable<z.ZodString>;
|
|
73
101
|
timestamp: z.ZodNullable<z.ZodNumber>;
|
|
@@ -106,5 +134,5 @@ type SyncAddressOutput = z.infer<typeof syncAddressOutputSchema>;
|
|
|
106
134
|
|
|
107
135
|
declare const tables: typeof schema;
|
|
108
136
|
|
|
109
|
-
export {
|
|
110
|
-
export type { GetTransactionInput as G, SyncAddressInput as S, SyncAddressOutput as a, GetTransactionOutput as b, GetBlockInput as c, GetBlockOutput as d };
|
|
137
|
+
export { chainSchema as e, getBlockOutputSchema as f, getBlockInputSchema as g, getTransactionInputSchema as h, getTransactionOutputSchema as i, syncAddressOutputSchema as j, syncAddressInputSchema as s, tables as t };
|
|
138
|
+
export type { Chain as C, GetTransactionInput as G, SyncAddressInput as S, SyncAddressOutput as a, GetTransactionOutput as b, GetBlockInput as c, GetBlockOutput as d };
|
|
@@ -1,7 +1,37 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { workflowInstanceStatusSchema } from '@develit-io/backend-sdk';
|
|
3
3
|
|
|
4
|
+
const chainSchema = z.enum([
|
|
5
|
+
"ARBITRUM",
|
|
6
|
+
"AVALANCHE",
|
|
7
|
+
"BASE",
|
|
8
|
+
"ETHEREUM",
|
|
9
|
+
"GNOSIS",
|
|
10
|
+
"OPTIMISM",
|
|
11
|
+
"SCROLL"
|
|
12
|
+
]);
|
|
13
|
+
const getTransactionInputSchema = z.object({
|
|
14
|
+
chain: chainSchema,
|
|
15
|
+
txHash: z.string()
|
|
16
|
+
});
|
|
17
|
+
const getTransactionOutputSchema = z.object({
|
|
18
|
+
hash: z.string(),
|
|
19
|
+
from: z.string(),
|
|
20
|
+
to: z.string().nullable(),
|
|
21
|
+
value: z.string(),
|
|
22
|
+
blockNumber: z.string().nullable(),
|
|
23
|
+
blockHash: z.string().nullable(),
|
|
24
|
+
gasPrice: z.string().nullable(),
|
|
25
|
+
gas: z.string(),
|
|
26
|
+
nonce: z.number(),
|
|
27
|
+
transactionIndex: z.number().nullable(),
|
|
28
|
+
status: z.enum(["success", "reverted", "pending"]),
|
|
29
|
+
gasUsed: z.string().nullable(),
|
|
30
|
+
timestamp: z.number().nullable()
|
|
31
|
+
});
|
|
32
|
+
|
|
4
33
|
const getBlockInputSchema = z.object({
|
|
34
|
+
chain: chainSchema,
|
|
5
35
|
blockTag: z.enum(["latest", "earliest", "pending", "safe", "finalized"]).optional(),
|
|
6
36
|
blockNumber: z.bigint().optional(),
|
|
7
37
|
blockHash: z.string().regex(/^0x[0-9a-fA-F]{64}$/).optional()
|
|
@@ -46,25 +76,6 @@ const getBlockOutputSchema = z.object({
|
|
|
46
76
|
withdrawalsRoot: Hex.optional()
|
|
47
77
|
});
|
|
48
78
|
|
|
49
|
-
const getTransactionInputSchema = z.object({
|
|
50
|
-
txHash: z.string()
|
|
51
|
-
});
|
|
52
|
-
const getTransactionOutputSchema = z.object({
|
|
53
|
-
hash: z.string(),
|
|
54
|
-
from: z.string(),
|
|
55
|
-
to: z.string().nullable(),
|
|
56
|
-
value: z.string(),
|
|
57
|
-
blockNumber: z.string().nullable(),
|
|
58
|
-
blockHash: z.string().nullable(),
|
|
59
|
-
gasPrice: z.string().nullable(),
|
|
60
|
-
gas: z.string(),
|
|
61
|
-
nonce: z.number(),
|
|
62
|
-
transactionIndex: z.number().nullable(),
|
|
63
|
-
status: z.enum(["success", "reverted", "pending"]),
|
|
64
|
-
gasUsed: z.string().nullable(),
|
|
65
|
-
timestamp: z.number().nullable()
|
|
66
|
-
});
|
|
67
|
-
|
|
68
79
|
const syncAddressInputSchema = z.object({
|
|
69
80
|
addressId: z.string()
|
|
70
81
|
});
|
|
@@ -73,4 +84,4 @@ const syncAddressOutputSchema = z.object({
|
|
|
73
84
|
details: workflowInstanceStatusSchema
|
|
74
85
|
});
|
|
75
86
|
|
|
76
|
-
export { getBlockOutputSchema as a, getTransactionInputSchema as b,
|
|
87
|
+
export { getBlockOutputSchema as a, getTransactionInputSchema as b, chainSchema as c, getTransactionOutputSchema as d, syncAddressOutputSchema as e, getBlockInputSchema as g, syncAddressInputSchema as s };
|
|
@@ -2,10 +2,19 @@ import { z } from 'zod';
|
|
|
2
2
|
import { s as schema } from './blockchain.Cx60lJ0c.mjs';
|
|
3
3
|
|
|
4
4
|
declare const getBlockInputSchema: z.ZodObject<{
|
|
5
|
+
chain: z.ZodEnum<{
|
|
6
|
+
ARBITRUM: "ARBITRUM";
|
|
7
|
+
AVALANCHE: "AVALANCHE";
|
|
8
|
+
BASE: "BASE";
|
|
9
|
+
ETHEREUM: "ETHEREUM";
|
|
10
|
+
GNOSIS: "GNOSIS";
|
|
11
|
+
OPTIMISM: "OPTIMISM";
|
|
12
|
+
SCROLL: "SCROLL";
|
|
13
|
+
}>;
|
|
5
14
|
blockTag: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
pending: "pending";
|
|
6
16
|
latest: "latest";
|
|
7
17
|
earliest: "earliest";
|
|
8
|
-
pending: "pending";
|
|
9
18
|
safe: "safe";
|
|
10
19
|
finalized: "finalized";
|
|
11
20
|
}>>;
|
|
@@ -50,7 +59,26 @@ interface GetBlockInput extends z.infer<typeof getBlockInputSchema> {
|
|
|
50
59
|
}
|
|
51
60
|
type GetBlockOutput = z.infer<typeof getBlockOutputSchema>;
|
|
52
61
|
|
|
62
|
+
declare const chainSchema: z.ZodEnum<{
|
|
63
|
+
ARBITRUM: "ARBITRUM";
|
|
64
|
+
AVALANCHE: "AVALANCHE";
|
|
65
|
+
BASE: "BASE";
|
|
66
|
+
ETHEREUM: "ETHEREUM";
|
|
67
|
+
GNOSIS: "GNOSIS";
|
|
68
|
+
OPTIMISM: "OPTIMISM";
|
|
69
|
+
SCROLL: "SCROLL";
|
|
70
|
+
}>;
|
|
71
|
+
type Chain = z.infer<typeof chainSchema>;
|
|
53
72
|
declare const getTransactionInputSchema: z.ZodObject<{
|
|
73
|
+
chain: z.ZodEnum<{
|
|
74
|
+
ARBITRUM: "ARBITRUM";
|
|
75
|
+
AVALANCHE: "AVALANCHE";
|
|
76
|
+
BASE: "BASE";
|
|
77
|
+
ETHEREUM: "ETHEREUM";
|
|
78
|
+
GNOSIS: "GNOSIS";
|
|
79
|
+
OPTIMISM: "OPTIMISM";
|
|
80
|
+
SCROLL: "SCROLL";
|
|
81
|
+
}>;
|
|
54
82
|
txHash: z.ZodString;
|
|
55
83
|
}, z.core.$strip>;
|
|
56
84
|
declare const getTransactionOutputSchema: z.ZodObject<{
|
|
@@ -65,9 +93,9 @@ declare const getTransactionOutputSchema: z.ZodObject<{
|
|
|
65
93
|
nonce: z.ZodNumber;
|
|
66
94
|
transactionIndex: z.ZodNullable<z.ZodNumber>;
|
|
67
95
|
status: z.ZodEnum<{
|
|
68
|
-
pending: "pending";
|
|
69
96
|
success: "success";
|
|
70
97
|
reverted: "reverted";
|
|
98
|
+
pending: "pending";
|
|
71
99
|
}>;
|
|
72
100
|
gasUsed: z.ZodNullable<z.ZodString>;
|
|
73
101
|
timestamp: z.ZodNullable<z.ZodNumber>;
|
|
@@ -106,5 +134,5 @@ type SyncAddressOutput = z.infer<typeof syncAddressOutputSchema>;
|
|
|
106
134
|
|
|
107
135
|
declare const tables: typeof schema;
|
|
108
136
|
|
|
109
|
-
export {
|
|
110
|
-
export type { GetTransactionInput as G, SyncAddressInput as S, SyncAddressOutput as a, GetTransactionOutput as b, GetBlockInput as c, GetBlockOutput as d };
|
|
137
|
+
export { chainSchema as e, getBlockOutputSchema as f, getBlockInputSchema as g, getTransactionInputSchema as h, getTransactionOutputSchema as i, syncAddressOutputSchema as j, syncAddressInputSchema as s, tables as t };
|
|
138
|
+
export type { Chain as C, GetTransactionInput as G, SyncAddressInput as S, SyncAddressOutput as a, GetTransactionOutput as b, GetBlockInput as c, GetBlockOutput as d };
|
package/dist/types.cjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const syncAddress = require('./shared/blockchain.
|
|
3
|
+
const syncAddress = require('./shared/blockchain.BBjLLe8v.cjs');
|
|
4
4
|
require('zod');
|
|
5
5
|
require('@develit-io/backend-sdk');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
exports.chainSchema = syncAddress.chainSchema;
|
|
9
10
|
exports.getBlockInputSchema = syncAddress.getBlockInputSchema;
|
|
10
11
|
exports.getBlockOutputSchema = syncAddress.getBlockOutputSchema;
|
|
11
12
|
exports.getTransactionInputSchema = syncAddress.getTransactionInputSchema;
|
package/dist/types.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { L as LastSyncMetadata } from './shared/blockchain.Cx60lJ0c.cjs';
|
|
2
2
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
3
|
-
import { t as tables } from './shared/blockchain.
|
|
4
|
-
export { c as GetBlockInput, d as GetBlockOutput, G as GetTransactionInput, b as GetTransactionOutput, S as SyncAddressInput, a as SyncAddressOutput, g as getBlockInputSchema,
|
|
3
|
+
import { t as tables } from './shared/blockchain.CtIjPvX8.cjs';
|
|
4
|
+
export { C as Chain, c as GetBlockInput, d as GetBlockOutput, G as GetTransactionInput, b as GetTransactionOutput, S as SyncAddressInput, a as SyncAddressOutput, e as chainSchema, g as getBlockInputSchema, f as getBlockOutputSchema, h as getTransactionInputSchema, i as getTransactionOutputSchema, s as syncAddressInputSchema, j as syncAddressOutputSchema } from './shared/blockchain.CtIjPvX8.cjs';
|
|
5
5
|
import { InferInsertModel, InferSelectModel } from 'drizzle-orm';
|
|
6
6
|
export { a as BlockchainServiceEnv, b as BlockchainServiceEnvironmentConfig, B as BlockchainServiceWranglerConfig } from './shared/blockchain.C1Jdisxn.cjs';
|
|
7
7
|
import 'drizzle-orm/sqlite-core';
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { L as LastSyncMetadata } from './shared/blockchain.Cx60lJ0c.mjs';
|
|
2
2
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
3
|
-
import { t as tables } from './shared/blockchain.
|
|
4
|
-
export { c as GetBlockInput, d as GetBlockOutput, G as GetTransactionInput, b as GetTransactionOutput, S as SyncAddressInput, a as SyncAddressOutput, g as getBlockInputSchema,
|
|
3
|
+
import { t as tables } from './shared/blockchain.DZbyq0JM.mjs';
|
|
4
|
+
export { C as Chain, c as GetBlockInput, d as GetBlockOutput, G as GetTransactionInput, b as GetTransactionOutput, S as SyncAddressInput, a as SyncAddressOutput, e as chainSchema, g as getBlockInputSchema, f as getBlockOutputSchema, h as getTransactionInputSchema, i as getTransactionOutputSchema, s as syncAddressInputSchema, j as syncAddressOutputSchema } from './shared/blockchain.DZbyq0JM.mjs';
|
|
5
5
|
import { InferInsertModel, InferSelectModel } from 'drizzle-orm';
|
|
6
6
|
export { a as BlockchainServiceEnv, b as BlockchainServiceEnvironmentConfig, B as BlockchainServiceWranglerConfig } from './shared/blockchain.C1Jdisxn.mjs';
|
|
7
7
|
import 'drizzle-orm/sqlite-core';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { L as LastSyncMetadata } from './shared/blockchain.Cx60lJ0c.js';
|
|
2
2
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
3
|
-
import { t as tables } from './shared/blockchain.
|
|
4
|
-
export { c as GetBlockInput, d as GetBlockOutput, G as GetTransactionInput, b as GetTransactionOutput, S as SyncAddressInput, a as SyncAddressOutput, g as getBlockInputSchema,
|
|
3
|
+
import { t as tables } from './shared/blockchain.5Ld6uEay.js';
|
|
4
|
+
export { C as Chain, c as GetBlockInput, d as GetBlockOutput, G as GetTransactionInput, b as GetTransactionOutput, S as SyncAddressInput, a as SyncAddressOutput, e as chainSchema, g as getBlockInputSchema, f as getBlockOutputSchema, h as getTransactionInputSchema, i as getTransactionOutputSchema, s as syncAddressInputSchema, j as syncAddressOutputSchema } from './shared/blockchain.5Ld6uEay.js';
|
|
5
5
|
import { InferInsertModel, InferSelectModel } from 'drizzle-orm';
|
|
6
6
|
export { a as BlockchainServiceEnv, b as BlockchainServiceEnvironmentConfig, B as BlockchainServiceWranglerConfig } from './shared/blockchain.C1Jdisxn.js';
|
|
7
7
|
import 'drizzle-orm/sqlite-core';
|
package/dist/types.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { g as getBlockInputSchema, a as getBlockOutputSchema, b as getTransactionInputSchema,
|
|
1
|
+
export { c as chainSchema, g as getBlockInputSchema, a as getBlockOutputSchema, b as getTransactionInputSchema, d as getTransactionOutputSchema, s as syncAddressInputSchema, e as syncAddressOutputSchema } from './shared/blockchain.DTJULMBV.mjs';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import '@develit-io/backend-sdk';
|