@develit-services/blockchain 0.8.0 → 0.8.1
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 +35 -1
- package/dist/export/worker.d.cts +2 -1
- package/dist/export/worker.d.mts +2 -1
- package/dist/export/worker.d.ts +2 -1
- package/dist/export/worker.mjs +35 -1
- package/dist/shared/blockchain.BFesyGyk.d.mts +110 -0
- package/dist/shared/blockchain.B_9YwgFd.mjs +76 -0
- package/dist/shared/blockchain.Bq5JL2Nn.d.cts +110 -0
- package/dist/shared/blockchain.C0wB1XUE.cjs +83 -0
- package/dist/shared/blockchain.C1uxxlk3.d.ts +110 -0
- package/dist/types.cjs +3 -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
- package/dist/shared/blockchain.4Hzh__vM.d.ts +0 -61
- package/dist/shared/blockchain.B49xpPZ0.cjs +0 -36
- package/dist/shared/blockchain.BDDFE27V.d.mts +0 -61
- package/dist/shared/blockchain.B_Tqqlia.mjs +0 -31
- package/dist/shared/blockchain.DbsOmkkX.d.cts +0 -61
package/dist/export/worker.cjs
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
6
6
|
const viem = require('viem');
|
|
7
7
|
const drizzle = require('../shared/blockchain.DN735AwB.cjs');
|
|
8
|
-
const syncAddress = require('../shared/blockchain.
|
|
8
|
+
const syncAddress = require('../shared/blockchain.C0wB1XUE.cjs');
|
|
9
9
|
const cloudflare_workers = require('cloudflare:workers');
|
|
10
10
|
const d1 = require('drizzle-orm/d1');
|
|
11
11
|
require('../shared/blockchain.BBvwu2_7.cjs');
|
|
@@ -85,6 +85,20 @@ class AlchemyConnector extends IBlockchainConnector {
|
|
|
85
85
|
}
|
|
86
86
|
return receipt;
|
|
87
87
|
}
|
|
88
|
+
async getBlock({
|
|
89
|
+
blockHash,
|
|
90
|
+
blockNumber,
|
|
91
|
+
blockTag
|
|
92
|
+
}) {
|
|
93
|
+
const client = this.createClient();
|
|
94
|
+
const [block, error] = await backendSdk.useResult(
|
|
95
|
+
blockHash !== void 0 ? client.getBlock({ blockHash }) : blockNumber !== void 0 ? client.getBlock({ blockNumber }) : client.getBlock({ blockTag: blockTag ?? "finalized" })
|
|
96
|
+
);
|
|
97
|
+
if (error || !block) {
|
|
98
|
+
throw error;
|
|
99
|
+
}
|
|
100
|
+
return block;
|
|
101
|
+
}
|
|
88
102
|
}
|
|
89
103
|
|
|
90
104
|
var __defProp = Object.defineProperty;
|
|
@@ -135,6 +149,23 @@ let BlockchainServiceBase = class extends backendSdk.develitWorker(
|
|
|
135
149
|
}
|
|
136
150
|
);
|
|
137
151
|
}
|
|
152
|
+
async getBlock(input) {
|
|
153
|
+
return this.handleAction(
|
|
154
|
+
{ data: input, schema: syncAddress.getBlockInputSchema },
|
|
155
|
+
{ successMessage: "Block retrieved successfully." },
|
|
156
|
+
async ({ blockHash, blockNumber, blockTag }) => {
|
|
157
|
+
const rpcUrl = (await this.env.SECRETS_STORE.get({
|
|
158
|
+
secretName: "BLOCKCHAIN_SERVICE_RPC_URL"
|
|
159
|
+
})).data?.secretValue || "";
|
|
160
|
+
const connector = new AlchemyConnector({ rpcUrl });
|
|
161
|
+
return connector.getBlock({
|
|
162
|
+
blockHash,
|
|
163
|
+
blockNumber,
|
|
164
|
+
blockTag
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
}
|
|
138
169
|
};
|
|
139
170
|
__decorateClass([
|
|
140
171
|
backendSdk.action("sync-address")
|
|
@@ -142,6 +173,9 @@ __decorateClass([
|
|
|
142
173
|
__decorateClass([
|
|
143
174
|
backendSdk.action("get-transaction")
|
|
144
175
|
], BlockchainServiceBase.prototype, "getTransaction", 1);
|
|
176
|
+
__decorateClass([
|
|
177
|
+
backendSdk.action("get-block")
|
|
178
|
+
], BlockchainServiceBase.prototype, "getBlock", 1);
|
|
145
179
|
BlockchainServiceBase = __decorateClass([
|
|
146
180
|
backendSdk.service("blockchain")
|
|
147
181
|
], BlockchainServiceBase);
|
package/dist/export/worker.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
2
|
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
-
import { t as tables, S as SyncAddressInput, a as SyncAddressOutput, G as GetTransactionInput, b as GetTransactionOutput } from '../shared/blockchain.
|
|
3
|
+
import { t as tables, S as SyncAddressInput, a as SyncAddressOutput, G as GetTransactionInput, b as GetTransactionOutput, c as GetBlockInput, d as GetBlockOutput } from '../shared/blockchain.Bq5JL2Nn.cjs';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
6
6
|
import 'zod';
|
|
@@ -13,6 +13,7 @@ declare class BlockchainServiceBase extends BlockchainServiceBase_base {
|
|
|
13
13
|
constructor(ctx: ExecutionContext, env: BlockchainEnv);
|
|
14
14
|
syncAddress(input: SyncAddressInput): Promise<IRPCResponse<SyncAddressOutput>>;
|
|
15
15
|
getTransaction(input: GetTransactionInput): Promise<IRPCResponse<GetTransactionOutput>>;
|
|
16
|
+
getBlock(input: GetBlockInput): Promise<IRPCResponse<GetBlockOutput>>;
|
|
16
17
|
}
|
|
17
18
|
declare function defineBlockchainService(): new (ctx: ExecutionContext, env: BlockchainEnv) => BlockchainServiceBase;
|
|
18
19
|
|
package/dist/export/worker.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
2
|
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
-
import { t as tables, S as SyncAddressInput, a as SyncAddressOutput, G as GetTransactionInput, b as GetTransactionOutput } from '../shared/blockchain.
|
|
3
|
+
import { t as tables, S as SyncAddressInput, a as SyncAddressOutput, G as GetTransactionInput, b as GetTransactionOutput, c as GetBlockInput, d as GetBlockOutput } from '../shared/blockchain.BFesyGyk.mjs';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
6
6
|
import 'zod';
|
|
@@ -13,6 +13,7 @@ declare class BlockchainServiceBase extends BlockchainServiceBase_base {
|
|
|
13
13
|
constructor(ctx: ExecutionContext, env: BlockchainEnv);
|
|
14
14
|
syncAddress(input: SyncAddressInput): Promise<IRPCResponse<SyncAddressOutput>>;
|
|
15
15
|
getTransaction(input: GetTransactionInput): Promise<IRPCResponse<GetTransactionOutput>>;
|
|
16
|
+
getBlock(input: GetBlockInput): Promise<IRPCResponse<GetBlockOutput>>;
|
|
16
17
|
}
|
|
17
18
|
declare function defineBlockchainService(): new (ctx: ExecutionContext, env: BlockchainEnv) => BlockchainServiceBase;
|
|
18
19
|
|
package/dist/export/worker.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
2
|
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
-
import { t as tables, S as SyncAddressInput, a as SyncAddressOutput, G as GetTransactionInput, b as GetTransactionOutput } from '../shared/blockchain.
|
|
3
|
+
import { t as tables, S as SyncAddressInput, a as SyncAddressOutput, G as GetTransactionInput, b as GetTransactionOutput, c as GetBlockInput, d as GetBlockOutput } from '../shared/blockchain.C1uxxlk3.js';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
6
6
|
import 'zod';
|
|
@@ -13,6 +13,7 @@ declare class BlockchainServiceBase extends BlockchainServiceBase_base {
|
|
|
13
13
|
constructor(ctx: ExecutionContext, env: BlockchainEnv);
|
|
14
14
|
syncAddress(input: SyncAddressInput): Promise<IRPCResponse<SyncAddressOutput>>;
|
|
15
15
|
getTransaction(input: GetTransactionInput): Promise<IRPCResponse<GetTransactionOutput>>;
|
|
16
|
+
getBlock(input: GetBlockInput): Promise<IRPCResponse<GetBlockOutput>>;
|
|
16
17
|
}
|
|
17
18
|
declare function defineBlockchainService(): new (ctx: ExecutionContext, env: BlockchainEnv) => BlockchainServiceBase;
|
|
18
19
|
|
package/dist/export/worker.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useResult, createInternalError, develitWorker, action, service } from '@develit-io/backend-sdk';
|
|
2
2
|
import { createPublicClient, http } from 'viem';
|
|
3
3
|
import { t as tables } from '../shared/blockchain.0tUJ62WT.mjs';
|
|
4
|
-
import { s as syncAddressInputSchema,
|
|
4
|
+
import { s as syncAddressInputSchema, b as getTransactionInputSchema, g as getBlockInputSchema } from '../shared/blockchain.B_9YwgFd.mjs';
|
|
5
5
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
6
6
|
import { drizzle } from 'drizzle-orm/d1';
|
|
7
7
|
import '../shared/blockchain._wwKu1qP.mjs';
|
|
@@ -81,6 +81,20 @@ class AlchemyConnector extends IBlockchainConnector {
|
|
|
81
81
|
}
|
|
82
82
|
return receipt;
|
|
83
83
|
}
|
|
84
|
+
async getBlock({
|
|
85
|
+
blockHash,
|
|
86
|
+
blockNumber,
|
|
87
|
+
blockTag
|
|
88
|
+
}) {
|
|
89
|
+
const client = this.createClient();
|
|
90
|
+
const [block, error] = await useResult(
|
|
91
|
+
blockHash !== void 0 ? client.getBlock({ blockHash }) : blockNumber !== void 0 ? client.getBlock({ blockNumber }) : client.getBlock({ blockTag: blockTag ?? "finalized" })
|
|
92
|
+
);
|
|
93
|
+
if (error || !block) {
|
|
94
|
+
throw error;
|
|
95
|
+
}
|
|
96
|
+
return block;
|
|
97
|
+
}
|
|
84
98
|
}
|
|
85
99
|
|
|
86
100
|
var __defProp = Object.defineProperty;
|
|
@@ -131,6 +145,23 @@ let BlockchainServiceBase = class extends develitWorker(
|
|
|
131
145
|
}
|
|
132
146
|
);
|
|
133
147
|
}
|
|
148
|
+
async getBlock(input) {
|
|
149
|
+
return this.handleAction(
|
|
150
|
+
{ data: input, schema: getBlockInputSchema },
|
|
151
|
+
{ successMessage: "Block retrieved successfully." },
|
|
152
|
+
async ({ blockHash, blockNumber, blockTag }) => {
|
|
153
|
+
const rpcUrl = (await this.env.SECRETS_STORE.get({
|
|
154
|
+
secretName: "BLOCKCHAIN_SERVICE_RPC_URL"
|
|
155
|
+
})).data?.secretValue || "";
|
|
156
|
+
const connector = new AlchemyConnector({ rpcUrl });
|
|
157
|
+
return connector.getBlock({
|
|
158
|
+
blockHash,
|
|
159
|
+
blockNumber,
|
|
160
|
+
blockTag
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
}
|
|
134
165
|
};
|
|
135
166
|
__decorateClass([
|
|
136
167
|
action("sync-address")
|
|
@@ -138,6 +169,9 @@ __decorateClass([
|
|
|
138
169
|
__decorateClass([
|
|
139
170
|
action("get-transaction")
|
|
140
171
|
], BlockchainServiceBase.prototype, "getTransaction", 1);
|
|
172
|
+
__decorateClass([
|
|
173
|
+
action("get-block")
|
|
174
|
+
], BlockchainServiceBase.prototype, "getBlock", 1);
|
|
141
175
|
BlockchainServiceBase = __decorateClass([
|
|
142
176
|
service("blockchain")
|
|
143
177
|
], BlockchainServiceBase);
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { s as schema } from './blockchain.Cx60lJ0c.mjs';
|
|
3
|
+
|
|
4
|
+
declare const getBlockInputSchema: z.ZodObject<{
|
|
5
|
+
blockTag: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
latest: "latest";
|
|
7
|
+
earliest: "earliest";
|
|
8
|
+
pending: "pending";
|
|
9
|
+
safe: "safe";
|
|
10
|
+
finalized: "finalized";
|
|
11
|
+
}>>;
|
|
12
|
+
blockNumber: z.ZodOptional<z.ZodBigInt>;
|
|
13
|
+
blockHash: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
declare const getBlockOutputSchema: z.ZodObject<{
|
|
16
|
+
baseFeePerGas: z.ZodNullable<z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>>;
|
|
17
|
+
blobGasUsed: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
18
|
+
difficulty: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
19
|
+
excessBlobGas: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
20
|
+
extraData: z.ZodString;
|
|
21
|
+
gasLimit: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
22
|
+
gasUsed: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
23
|
+
hash: z.ZodNullable<z.ZodString>;
|
|
24
|
+
logsBloom: z.ZodNullable<z.ZodString>;
|
|
25
|
+
miner: z.ZodString;
|
|
26
|
+
mixHash: z.ZodString;
|
|
27
|
+
nonce: z.ZodNullable<z.ZodString>;
|
|
28
|
+
number: z.ZodNullable<z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>>;
|
|
29
|
+
parentBeaconBlockRoot: z.ZodOptional<z.ZodString>;
|
|
30
|
+
parentHash: z.ZodString;
|
|
31
|
+
receiptsRoot: z.ZodString;
|
|
32
|
+
sealFields: z.ZodArray<z.ZodString>;
|
|
33
|
+
sha3Uncles: z.ZodString;
|
|
34
|
+
size: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
35
|
+
stateRoot: z.ZodString;
|
|
36
|
+
timestamp: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
37
|
+
totalDifficulty: z.ZodNullable<z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>>;
|
|
38
|
+
transactions: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
39
|
+
transactionsRoot: z.ZodString;
|
|
40
|
+
uncles: z.ZodArray<z.ZodString>;
|
|
41
|
+
withdrawals: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
42
|
+
index: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
43
|
+
validatorIndex: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
44
|
+
address: z.ZodString;
|
|
45
|
+
amount: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
46
|
+
}, z.core.$strip>>>;
|
|
47
|
+
withdrawalsRoot: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
interface GetBlockInput extends z.infer<typeof getBlockInputSchema> {
|
|
50
|
+
}
|
|
51
|
+
type GetBlockOutput = z.infer<typeof getBlockOutputSchema>;
|
|
52
|
+
|
|
53
|
+
declare const getTransactionInputSchema: z.ZodObject<{
|
|
54
|
+
txHash: z.ZodString;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
declare const getTransactionOutputSchema: z.ZodObject<{
|
|
57
|
+
hash: z.ZodString;
|
|
58
|
+
from: z.ZodString;
|
|
59
|
+
to: z.ZodNullable<z.ZodString>;
|
|
60
|
+
value: z.ZodString;
|
|
61
|
+
blockNumber: z.ZodNullable<z.ZodString>;
|
|
62
|
+
blockHash: z.ZodNullable<z.ZodString>;
|
|
63
|
+
gasPrice: z.ZodNullable<z.ZodString>;
|
|
64
|
+
gas: z.ZodString;
|
|
65
|
+
nonce: z.ZodNumber;
|
|
66
|
+
transactionIndex: z.ZodNullable<z.ZodNumber>;
|
|
67
|
+
status: z.ZodEnum<{
|
|
68
|
+
pending: "pending";
|
|
69
|
+
success: "success";
|
|
70
|
+
reverted: "reverted";
|
|
71
|
+
}>;
|
|
72
|
+
gasUsed: z.ZodNullable<z.ZodString>;
|
|
73
|
+
timestamp: z.ZodNullable<z.ZodNumber>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
interface GetTransactionInput extends z.infer<typeof getTransactionInputSchema> {
|
|
76
|
+
}
|
|
77
|
+
type GetTransactionOutput = z.infer<typeof getTransactionOutputSchema>;
|
|
78
|
+
|
|
79
|
+
declare const syncAddressInputSchema: z.ZodObject<{
|
|
80
|
+
addressId: z.ZodString;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
declare const syncAddressOutputSchema: z.ZodObject<{
|
|
83
|
+
instanceId: z.ZodString;
|
|
84
|
+
details: z.ZodObject<{
|
|
85
|
+
status: z.ZodEnum<{
|
|
86
|
+
unknown: "unknown";
|
|
87
|
+
queued: "queued";
|
|
88
|
+
running: "running";
|
|
89
|
+
paused: "paused";
|
|
90
|
+
errored: "errored";
|
|
91
|
+
terminated: "terminated";
|
|
92
|
+
complete: "complete";
|
|
93
|
+
waiting: "waiting";
|
|
94
|
+
waitingForPause: "waitingForPause";
|
|
95
|
+
}>;
|
|
96
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
97
|
+
message: z.ZodString;
|
|
98
|
+
name: z.ZodOptional<z.ZodString>;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
interface SyncAddressInput extends z.infer<typeof syncAddressInputSchema> {
|
|
104
|
+
}
|
|
105
|
+
type SyncAddressOutput = z.infer<typeof syncAddressOutputSchema>;
|
|
106
|
+
|
|
107
|
+
declare const tables: typeof schema;
|
|
108
|
+
|
|
109
|
+
export { getBlockOutputSchema as e, getTransactionInputSchema as f, getBlockInputSchema as g, getTransactionOutputSchema as h, syncAddressOutputSchema as i, syncAddressInputSchema as s, tables as t };
|
|
110
|
+
export type { GetTransactionInput as G, SyncAddressInput as S, SyncAddressOutput as a, GetTransactionOutput as b, GetBlockInput as c, GetBlockOutput as d };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { workflowInstanceStatusSchema } from '@develit-io/backend-sdk';
|
|
3
|
+
|
|
4
|
+
const getBlockInputSchema = z.object({
|
|
5
|
+
blockTag: z.enum(["latest", "earliest", "pending", "safe", "finalized"]).optional(),
|
|
6
|
+
blockNumber: z.bigint().optional(),
|
|
7
|
+
blockHash: z.string().regex(/^0x[0-9a-fA-F]{64}$/).optional()
|
|
8
|
+
});
|
|
9
|
+
const Hex = z.string().regex(/^0x[0-9a-fA-F]*$/);
|
|
10
|
+
const Hash = z.string().regex(/^0x[0-9a-fA-F]{64}$/);
|
|
11
|
+
const Address = z.string().regex(/^0x[0-9a-fA-F]{40}$/);
|
|
12
|
+
const quantity = z.union([z.bigint(), z.string(), z.number()]);
|
|
13
|
+
const Withdrawal = z.object({
|
|
14
|
+
index: quantity,
|
|
15
|
+
validatorIndex: quantity,
|
|
16
|
+
address: Address,
|
|
17
|
+
amount: quantity
|
|
18
|
+
});
|
|
19
|
+
const getBlockOutputSchema = z.object({
|
|
20
|
+
baseFeePerGas: quantity.nullable(),
|
|
21
|
+
blobGasUsed: quantity,
|
|
22
|
+
difficulty: quantity,
|
|
23
|
+
excessBlobGas: quantity,
|
|
24
|
+
extraData: Hex,
|
|
25
|
+
gasLimit: quantity,
|
|
26
|
+
gasUsed: quantity,
|
|
27
|
+
hash: Hash.nullable(),
|
|
28
|
+
logsBloom: Hex.nullable(),
|
|
29
|
+
miner: Address,
|
|
30
|
+
mixHash: Hash,
|
|
31
|
+
nonce: Hex.nullable(),
|
|
32
|
+
number: quantity.nullable(),
|
|
33
|
+
parentBeaconBlockRoot: Hex.optional(),
|
|
34
|
+
parentHash: Hash,
|
|
35
|
+
receiptsRoot: Hex,
|
|
36
|
+
sealFields: z.array(Hex),
|
|
37
|
+
sha3Uncles: Hash,
|
|
38
|
+
size: quantity,
|
|
39
|
+
stateRoot: Hex,
|
|
40
|
+
timestamp: quantity,
|
|
41
|
+
totalDifficulty: quantity.nullable(),
|
|
42
|
+
transactions: z.array(z.union([Hash, z.record(z.string(), z.unknown())])),
|
|
43
|
+
transactionsRoot: Hash,
|
|
44
|
+
uncles: z.array(Hash),
|
|
45
|
+
withdrawals: z.array(Withdrawal).optional(),
|
|
46
|
+
withdrawalsRoot: Hex.optional()
|
|
47
|
+
});
|
|
48
|
+
|
|
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
|
+
const syncAddressInputSchema = z.object({
|
|
69
|
+
addressId: z.string()
|
|
70
|
+
});
|
|
71
|
+
const syncAddressOutputSchema = z.object({
|
|
72
|
+
instanceId: z.string(),
|
|
73
|
+
details: workflowInstanceStatusSchema
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export { getBlockOutputSchema as a, getTransactionInputSchema as b, getTransactionOutputSchema as c, syncAddressOutputSchema as d, getBlockInputSchema as g, syncAddressInputSchema as s };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { s as schema } from './blockchain.Cx60lJ0c.cjs';
|
|
3
|
+
|
|
4
|
+
declare const getBlockInputSchema: z.ZodObject<{
|
|
5
|
+
blockTag: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
latest: "latest";
|
|
7
|
+
earliest: "earliest";
|
|
8
|
+
pending: "pending";
|
|
9
|
+
safe: "safe";
|
|
10
|
+
finalized: "finalized";
|
|
11
|
+
}>>;
|
|
12
|
+
blockNumber: z.ZodOptional<z.ZodBigInt>;
|
|
13
|
+
blockHash: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
declare const getBlockOutputSchema: z.ZodObject<{
|
|
16
|
+
baseFeePerGas: z.ZodNullable<z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>>;
|
|
17
|
+
blobGasUsed: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
18
|
+
difficulty: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
19
|
+
excessBlobGas: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
20
|
+
extraData: z.ZodString;
|
|
21
|
+
gasLimit: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
22
|
+
gasUsed: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
23
|
+
hash: z.ZodNullable<z.ZodString>;
|
|
24
|
+
logsBloom: z.ZodNullable<z.ZodString>;
|
|
25
|
+
miner: z.ZodString;
|
|
26
|
+
mixHash: z.ZodString;
|
|
27
|
+
nonce: z.ZodNullable<z.ZodString>;
|
|
28
|
+
number: z.ZodNullable<z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>>;
|
|
29
|
+
parentBeaconBlockRoot: z.ZodOptional<z.ZodString>;
|
|
30
|
+
parentHash: z.ZodString;
|
|
31
|
+
receiptsRoot: z.ZodString;
|
|
32
|
+
sealFields: z.ZodArray<z.ZodString>;
|
|
33
|
+
sha3Uncles: z.ZodString;
|
|
34
|
+
size: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
35
|
+
stateRoot: z.ZodString;
|
|
36
|
+
timestamp: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
37
|
+
totalDifficulty: z.ZodNullable<z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>>;
|
|
38
|
+
transactions: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
39
|
+
transactionsRoot: z.ZodString;
|
|
40
|
+
uncles: z.ZodArray<z.ZodString>;
|
|
41
|
+
withdrawals: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
42
|
+
index: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
43
|
+
validatorIndex: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
44
|
+
address: z.ZodString;
|
|
45
|
+
amount: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
46
|
+
}, z.core.$strip>>>;
|
|
47
|
+
withdrawalsRoot: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
interface GetBlockInput extends z.infer<typeof getBlockInputSchema> {
|
|
50
|
+
}
|
|
51
|
+
type GetBlockOutput = z.infer<typeof getBlockOutputSchema>;
|
|
52
|
+
|
|
53
|
+
declare const getTransactionInputSchema: z.ZodObject<{
|
|
54
|
+
txHash: z.ZodString;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
declare const getTransactionOutputSchema: z.ZodObject<{
|
|
57
|
+
hash: z.ZodString;
|
|
58
|
+
from: z.ZodString;
|
|
59
|
+
to: z.ZodNullable<z.ZodString>;
|
|
60
|
+
value: z.ZodString;
|
|
61
|
+
blockNumber: z.ZodNullable<z.ZodString>;
|
|
62
|
+
blockHash: z.ZodNullable<z.ZodString>;
|
|
63
|
+
gasPrice: z.ZodNullable<z.ZodString>;
|
|
64
|
+
gas: z.ZodString;
|
|
65
|
+
nonce: z.ZodNumber;
|
|
66
|
+
transactionIndex: z.ZodNullable<z.ZodNumber>;
|
|
67
|
+
status: z.ZodEnum<{
|
|
68
|
+
pending: "pending";
|
|
69
|
+
success: "success";
|
|
70
|
+
reverted: "reverted";
|
|
71
|
+
}>;
|
|
72
|
+
gasUsed: z.ZodNullable<z.ZodString>;
|
|
73
|
+
timestamp: z.ZodNullable<z.ZodNumber>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
interface GetTransactionInput extends z.infer<typeof getTransactionInputSchema> {
|
|
76
|
+
}
|
|
77
|
+
type GetTransactionOutput = z.infer<typeof getTransactionOutputSchema>;
|
|
78
|
+
|
|
79
|
+
declare const syncAddressInputSchema: z.ZodObject<{
|
|
80
|
+
addressId: z.ZodString;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
declare const syncAddressOutputSchema: z.ZodObject<{
|
|
83
|
+
instanceId: z.ZodString;
|
|
84
|
+
details: z.ZodObject<{
|
|
85
|
+
status: z.ZodEnum<{
|
|
86
|
+
unknown: "unknown";
|
|
87
|
+
queued: "queued";
|
|
88
|
+
running: "running";
|
|
89
|
+
paused: "paused";
|
|
90
|
+
errored: "errored";
|
|
91
|
+
terminated: "terminated";
|
|
92
|
+
complete: "complete";
|
|
93
|
+
waiting: "waiting";
|
|
94
|
+
waitingForPause: "waitingForPause";
|
|
95
|
+
}>;
|
|
96
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
97
|
+
message: z.ZodString;
|
|
98
|
+
name: z.ZodOptional<z.ZodString>;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
interface SyncAddressInput extends z.infer<typeof syncAddressInputSchema> {
|
|
104
|
+
}
|
|
105
|
+
type SyncAddressOutput = z.infer<typeof syncAddressOutputSchema>;
|
|
106
|
+
|
|
107
|
+
declare const tables: typeof schema;
|
|
108
|
+
|
|
109
|
+
export { getBlockOutputSchema as e, getTransactionInputSchema as f, getBlockInputSchema as g, getTransactionOutputSchema as h, syncAddressOutputSchema as i, syncAddressInputSchema as s, tables as t };
|
|
110
|
+
export type { GetTransactionInput as G, SyncAddressInput as S, SyncAddressOutput as a, GetTransactionOutput as b, GetBlockInput as c, GetBlockOutput as d };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const zod = require('zod');
|
|
4
|
+
const backendSdk = require('@develit-io/backend-sdk');
|
|
5
|
+
|
|
6
|
+
const getBlockInputSchema = zod.z.object({
|
|
7
|
+
blockTag: zod.z.enum(["latest", "earliest", "pending", "safe", "finalized"]).optional(),
|
|
8
|
+
blockNumber: zod.z.bigint().optional(),
|
|
9
|
+
blockHash: zod.z.string().regex(/^0x[0-9a-fA-F]{64}$/).optional()
|
|
10
|
+
});
|
|
11
|
+
const Hex = zod.z.string().regex(/^0x[0-9a-fA-F]*$/);
|
|
12
|
+
const Hash = zod.z.string().regex(/^0x[0-9a-fA-F]{64}$/);
|
|
13
|
+
const Address = zod.z.string().regex(/^0x[0-9a-fA-F]{40}$/);
|
|
14
|
+
const quantity = zod.z.union([zod.z.bigint(), zod.z.string(), zod.z.number()]);
|
|
15
|
+
const Withdrawal = zod.z.object({
|
|
16
|
+
index: quantity,
|
|
17
|
+
validatorIndex: quantity,
|
|
18
|
+
address: Address,
|
|
19
|
+
amount: quantity
|
|
20
|
+
});
|
|
21
|
+
const getBlockOutputSchema = zod.z.object({
|
|
22
|
+
baseFeePerGas: quantity.nullable(),
|
|
23
|
+
blobGasUsed: quantity,
|
|
24
|
+
difficulty: quantity,
|
|
25
|
+
excessBlobGas: quantity,
|
|
26
|
+
extraData: Hex,
|
|
27
|
+
gasLimit: quantity,
|
|
28
|
+
gasUsed: quantity,
|
|
29
|
+
hash: Hash.nullable(),
|
|
30
|
+
logsBloom: Hex.nullable(),
|
|
31
|
+
miner: Address,
|
|
32
|
+
mixHash: Hash,
|
|
33
|
+
nonce: Hex.nullable(),
|
|
34
|
+
number: quantity.nullable(),
|
|
35
|
+
parentBeaconBlockRoot: Hex.optional(),
|
|
36
|
+
parentHash: Hash,
|
|
37
|
+
receiptsRoot: Hex,
|
|
38
|
+
sealFields: zod.z.array(Hex),
|
|
39
|
+
sha3Uncles: Hash,
|
|
40
|
+
size: quantity,
|
|
41
|
+
stateRoot: Hex,
|
|
42
|
+
timestamp: quantity,
|
|
43
|
+
totalDifficulty: quantity.nullable(),
|
|
44
|
+
transactions: zod.z.array(zod.z.union([Hash, zod.z.record(zod.z.string(), zod.z.unknown())])),
|
|
45
|
+
transactionsRoot: Hash,
|
|
46
|
+
uncles: zod.z.array(Hash),
|
|
47
|
+
withdrawals: zod.z.array(Withdrawal).optional(),
|
|
48
|
+
withdrawalsRoot: Hex.optional()
|
|
49
|
+
});
|
|
50
|
+
|
|
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
|
+
const syncAddressInputSchema = zod.z.object({
|
|
71
|
+
addressId: zod.z.string()
|
|
72
|
+
});
|
|
73
|
+
const syncAddressOutputSchema = zod.z.object({
|
|
74
|
+
instanceId: zod.z.string(),
|
|
75
|
+
details: backendSdk.workflowInstanceStatusSchema
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
exports.getBlockInputSchema = getBlockInputSchema;
|
|
79
|
+
exports.getBlockOutputSchema = getBlockOutputSchema;
|
|
80
|
+
exports.getTransactionInputSchema = getTransactionInputSchema;
|
|
81
|
+
exports.getTransactionOutputSchema = getTransactionOutputSchema;
|
|
82
|
+
exports.syncAddressInputSchema = syncAddressInputSchema;
|
|
83
|
+
exports.syncAddressOutputSchema = syncAddressOutputSchema;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { s as schema } from './blockchain.Cx60lJ0c.js';
|
|
3
|
+
|
|
4
|
+
declare const getBlockInputSchema: z.ZodObject<{
|
|
5
|
+
blockTag: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
latest: "latest";
|
|
7
|
+
earliest: "earliest";
|
|
8
|
+
pending: "pending";
|
|
9
|
+
safe: "safe";
|
|
10
|
+
finalized: "finalized";
|
|
11
|
+
}>>;
|
|
12
|
+
blockNumber: z.ZodOptional<z.ZodBigInt>;
|
|
13
|
+
blockHash: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
declare const getBlockOutputSchema: z.ZodObject<{
|
|
16
|
+
baseFeePerGas: z.ZodNullable<z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>>;
|
|
17
|
+
blobGasUsed: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
18
|
+
difficulty: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
19
|
+
excessBlobGas: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
20
|
+
extraData: z.ZodString;
|
|
21
|
+
gasLimit: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
22
|
+
gasUsed: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
23
|
+
hash: z.ZodNullable<z.ZodString>;
|
|
24
|
+
logsBloom: z.ZodNullable<z.ZodString>;
|
|
25
|
+
miner: z.ZodString;
|
|
26
|
+
mixHash: z.ZodString;
|
|
27
|
+
nonce: z.ZodNullable<z.ZodString>;
|
|
28
|
+
number: z.ZodNullable<z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>>;
|
|
29
|
+
parentBeaconBlockRoot: z.ZodOptional<z.ZodString>;
|
|
30
|
+
parentHash: z.ZodString;
|
|
31
|
+
receiptsRoot: z.ZodString;
|
|
32
|
+
sealFields: z.ZodArray<z.ZodString>;
|
|
33
|
+
sha3Uncles: z.ZodString;
|
|
34
|
+
size: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
35
|
+
stateRoot: z.ZodString;
|
|
36
|
+
timestamp: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
37
|
+
totalDifficulty: z.ZodNullable<z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>>;
|
|
38
|
+
transactions: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
39
|
+
transactionsRoot: z.ZodString;
|
|
40
|
+
uncles: z.ZodArray<z.ZodString>;
|
|
41
|
+
withdrawals: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
42
|
+
index: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
43
|
+
validatorIndex: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
44
|
+
address: z.ZodString;
|
|
45
|
+
amount: z.ZodUnion<readonly [z.ZodBigInt, z.ZodString, z.ZodNumber]>;
|
|
46
|
+
}, z.core.$strip>>>;
|
|
47
|
+
withdrawalsRoot: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
interface GetBlockInput extends z.infer<typeof getBlockInputSchema> {
|
|
50
|
+
}
|
|
51
|
+
type GetBlockOutput = z.infer<typeof getBlockOutputSchema>;
|
|
52
|
+
|
|
53
|
+
declare const getTransactionInputSchema: z.ZodObject<{
|
|
54
|
+
txHash: z.ZodString;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
declare const getTransactionOutputSchema: z.ZodObject<{
|
|
57
|
+
hash: z.ZodString;
|
|
58
|
+
from: z.ZodString;
|
|
59
|
+
to: z.ZodNullable<z.ZodString>;
|
|
60
|
+
value: z.ZodString;
|
|
61
|
+
blockNumber: z.ZodNullable<z.ZodString>;
|
|
62
|
+
blockHash: z.ZodNullable<z.ZodString>;
|
|
63
|
+
gasPrice: z.ZodNullable<z.ZodString>;
|
|
64
|
+
gas: z.ZodString;
|
|
65
|
+
nonce: z.ZodNumber;
|
|
66
|
+
transactionIndex: z.ZodNullable<z.ZodNumber>;
|
|
67
|
+
status: z.ZodEnum<{
|
|
68
|
+
pending: "pending";
|
|
69
|
+
success: "success";
|
|
70
|
+
reverted: "reverted";
|
|
71
|
+
}>;
|
|
72
|
+
gasUsed: z.ZodNullable<z.ZodString>;
|
|
73
|
+
timestamp: z.ZodNullable<z.ZodNumber>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
interface GetTransactionInput extends z.infer<typeof getTransactionInputSchema> {
|
|
76
|
+
}
|
|
77
|
+
type GetTransactionOutput = z.infer<typeof getTransactionOutputSchema>;
|
|
78
|
+
|
|
79
|
+
declare const syncAddressInputSchema: z.ZodObject<{
|
|
80
|
+
addressId: z.ZodString;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
declare const syncAddressOutputSchema: z.ZodObject<{
|
|
83
|
+
instanceId: z.ZodString;
|
|
84
|
+
details: z.ZodObject<{
|
|
85
|
+
status: z.ZodEnum<{
|
|
86
|
+
unknown: "unknown";
|
|
87
|
+
queued: "queued";
|
|
88
|
+
running: "running";
|
|
89
|
+
paused: "paused";
|
|
90
|
+
errored: "errored";
|
|
91
|
+
terminated: "terminated";
|
|
92
|
+
complete: "complete";
|
|
93
|
+
waiting: "waiting";
|
|
94
|
+
waitingForPause: "waitingForPause";
|
|
95
|
+
}>;
|
|
96
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
97
|
+
message: z.ZodString;
|
|
98
|
+
name: z.ZodOptional<z.ZodString>;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
interface SyncAddressInput extends z.infer<typeof syncAddressInputSchema> {
|
|
104
|
+
}
|
|
105
|
+
type SyncAddressOutput = z.infer<typeof syncAddressOutputSchema>;
|
|
106
|
+
|
|
107
|
+
declare const tables: typeof schema;
|
|
108
|
+
|
|
109
|
+
export { getBlockOutputSchema as e, getTransactionInputSchema as f, getBlockInputSchema as g, getTransactionOutputSchema as h, syncAddressOutputSchema as i, syncAddressInputSchema as s, tables as t };
|
|
110
|
+
export type { 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,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const syncAddress = require('./shared/blockchain.
|
|
3
|
+
const syncAddress = require('./shared/blockchain.C0wB1XUE.cjs');
|
|
4
4
|
require('zod');
|
|
5
5
|
require('@develit-io/backend-sdk');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
exports.getBlockInputSchema = syncAddress.getBlockInputSchema;
|
|
10
|
+
exports.getBlockOutputSchema = syncAddress.getBlockOutputSchema;
|
|
9
11
|
exports.getTransactionInputSchema = syncAddress.getTransactionInputSchema;
|
|
10
12
|
exports.getTransactionOutputSchema = syncAddress.getTransactionOutputSchema;
|
|
11
13
|
exports.syncAddressInputSchema = syncAddress.syncAddressInputSchema;
|
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 { G as GetTransactionInput, b as GetTransactionOutput, S as SyncAddressInput, a as SyncAddressOutput, g as getTransactionInputSchema,
|
|
3
|
+
import { t as tables } from './shared/blockchain.Bq5JL2Nn.cjs';
|
|
4
|
+
export { c as GetBlockInput, d as GetBlockOutput, G as GetTransactionInput, b as GetTransactionOutput, S as SyncAddressInput, a as SyncAddressOutput, g as getBlockInputSchema, e as getBlockOutputSchema, f as getTransactionInputSchema, h as getTransactionOutputSchema, s as syncAddressInputSchema, i as syncAddressOutputSchema } from './shared/blockchain.Bq5JL2Nn.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 { G as GetTransactionInput, b as GetTransactionOutput, S as SyncAddressInput, a as SyncAddressOutput, g as getTransactionInputSchema,
|
|
3
|
+
import { t as tables } from './shared/blockchain.BFesyGyk.mjs';
|
|
4
|
+
export { c as GetBlockInput, d as GetBlockOutput, G as GetTransactionInput, b as GetTransactionOutput, S as SyncAddressInput, a as SyncAddressOutput, g as getBlockInputSchema, e as getBlockOutputSchema, f as getTransactionInputSchema, h as getTransactionOutputSchema, s as syncAddressInputSchema, i as syncAddressOutputSchema } from './shared/blockchain.BFesyGyk.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 { G as GetTransactionInput, b as GetTransactionOutput, S as SyncAddressInput, a as SyncAddressOutput, g as getTransactionInputSchema,
|
|
3
|
+
import { t as tables } from './shared/blockchain.C1uxxlk3.js';
|
|
4
|
+
export { c as GetBlockInput, d as GetBlockOutput, G as GetTransactionInput, b as GetTransactionOutput, S as SyncAddressInput, a as SyncAddressOutput, g as getBlockInputSchema, e as getBlockOutputSchema, f as getTransactionInputSchema, h as getTransactionOutputSchema, s as syncAddressInputSchema, i as syncAddressOutputSchema } from './shared/blockchain.C1uxxlk3.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
|
|
1
|
+
export { g as getBlockInputSchema, a as getBlockOutputSchema, b as getTransactionInputSchema, c as getTransactionOutputSchema, s as syncAddressInputSchema, d as syncAddressOutputSchema } from './shared/blockchain.B_9YwgFd.mjs';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import '@develit-io/backend-sdk';
|
package/package.json
CHANGED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { s as schema } from './blockchain.Cx60lJ0c.js';
|
|
3
|
-
|
|
4
|
-
declare const getTransactionInputSchema: z.ZodObject<{
|
|
5
|
-
txHash: z.ZodString;
|
|
6
|
-
}, z.core.$strip>;
|
|
7
|
-
declare const getTransactionOutputSchema: z.ZodObject<{
|
|
8
|
-
hash: z.ZodString;
|
|
9
|
-
from: z.ZodString;
|
|
10
|
-
to: z.ZodNullable<z.ZodString>;
|
|
11
|
-
value: z.ZodString;
|
|
12
|
-
blockNumber: z.ZodNullable<z.ZodString>;
|
|
13
|
-
blockHash: z.ZodNullable<z.ZodString>;
|
|
14
|
-
gasPrice: z.ZodNullable<z.ZodString>;
|
|
15
|
-
gas: z.ZodString;
|
|
16
|
-
nonce: z.ZodNumber;
|
|
17
|
-
transactionIndex: z.ZodNullable<z.ZodNumber>;
|
|
18
|
-
status: z.ZodEnum<{
|
|
19
|
-
success: "success";
|
|
20
|
-
reverted: "reverted";
|
|
21
|
-
pending: "pending";
|
|
22
|
-
}>;
|
|
23
|
-
gasUsed: z.ZodNullable<z.ZodString>;
|
|
24
|
-
timestamp: z.ZodNullable<z.ZodNumber>;
|
|
25
|
-
}, z.core.$strip>;
|
|
26
|
-
interface GetTransactionInput extends z.infer<typeof getTransactionInputSchema> {
|
|
27
|
-
}
|
|
28
|
-
type GetTransactionOutput = z.infer<typeof getTransactionOutputSchema>;
|
|
29
|
-
|
|
30
|
-
declare const syncAddressInputSchema: z.ZodObject<{
|
|
31
|
-
addressId: z.ZodString;
|
|
32
|
-
}, z.core.$strip>;
|
|
33
|
-
declare const syncAddressOutputSchema: z.ZodObject<{
|
|
34
|
-
instanceId: z.ZodString;
|
|
35
|
-
details: z.ZodObject<{
|
|
36
|
-
status: z.ZodEnum<{
|
|
37
|
-
unknown: "unknown";
|
|
38
|
-
queued: "queued";
|
|
39
|
-
running: "running";
|
|
40
|
-
paused: "paused";
|
|
41
|
-
errored: "errored";
|
|
42
|
-
terminated: "terminated";
|
|
43
|
-
complete: "complete";
|
|
44
|
-
waiting: "waiting";
|
|
45
|
-
waitingForPause: "waitingForPause";
|
|
46
|
-
}>;
|
|
47
|
-
error: z.ZodOptional<z.ZodObject<{
|
|
48
|
-
message: z.ZodString;
|
|
49
|
-
name: z.ZodOptional<z.ZodString>;
|
|
50
|
-
}, z.core.$strip>>;
|
|
51
|
-
output: z.ZodOptional<z.ZodUnknown>;
|
|
52
|
-
}, z.core.$strip>;
|
|
53
|
-
}, z.core.$strip>;
|
|
54
|
-
interface SyncAddressInput extends z.infer<typeof syncAddressInputSchema> {
|
|
55
|
-
}
|
|
56
|
-
type SyncAddressOutput = z.infer<typeof syncAddressOutputSchema>;
|
|
57
|
-
|
|
58
|
-
declare const tables: typeof schema;
|
|
59
|
-
|
|
60
|
-
export { getTransactionOutputSchema as c, syncAddressOutputSchema as d, getTransactionInputSchema as g, syncAddressInputSchema as s, tables as t };
|
|
61
|
-
export type { GetTransactionInput as G, SyncAddressInput as S, SyncAddressOutput as a, GetTransactionOutput as b };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const zod = require('zod');
|
|
4
|
-
const backendSdk = require('@develit-io/backend-sdk');
|
|
5
|
-
|
|
6
|
-
const getTransactionInputSchema = zod.z.object({
|
|
7
|
-
txHash: zod.z.string()
|
|
8
|
-
});
|
|
9
|
-
const getTransactionOutputSchema = zod.z.object({
|
|
10
|
-
hash: zod.z.string(),
|
|
11
|
-
from: zod.z.string(),
|
|
12
|
-
to: zod.z.string().nullable(),
|
|
13
|
-
value: zod.z.string(),
|
|
14
|
-
blockNumber: zod.z.string().nullable(),
|
|
15
|
-
blockHash: zod.z.string().nullable(),
|
|
16
|
-
gasPrice: zod.z.string().nullable(),
|
|
17
|
-
gas: zod.z.string(),
|
|
18
|
-
nonce: zod.z.number(),
|
|
19
|
-
transactionIndex: zod.z.number().nullable(),
|
|
20
|
-
status: zod.z.enum(["success", "reverted", "pending"]),
|
|
21
|
-
gasUsed: zod.z.string().nullable(),
|
|
22
|
-
timestamp: zod.z.number().nullable()
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const syncAddressInputSchema = zod.z.object({
|
|
26
|
-
addressId: zod.z.string()
|
|
27
|
-
});
|
|
28
|
-
const syncAddressOutputSchema = zod.z.object({
|
|
29
|
-
instanceId: zod.z.string(),
|
|
30
|
-
details: backendSdk.workflowInstanceStatusSchema
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
exports.getTransactionInputSchema = getTransactionInputSchema;
|
|
34
|
-
exports.getTransactionOutputSchema = getTransactionOutputSchema;
|
|
35
|
-
exports.syncAddressInputSchema = syncAddressInputSchema;
|
|
36
|
-
exports.syncAddressOutputSchema = syncAddressOutputSchema;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { s as schema } from './blockchain.Cx60lJ0c.mjs';
|
|
3
|
-
|
|
4
|
-
declare const getTransactionInputSchema: z.ZodObject<{
|
|
5
|
-
txHash: z.ZodString;
|
|
6
|
-
}, z.core.$strip>;
|
|
7
|
-
declare const getTransactionOutputSchema: z.ZodObject<{
|
|
8
|
-
hash: z.ZodString;
|
|
9
|
-
from: z.ZodString;
|
|
10
|
-
to: z.ZodNullable<z.ZodString>;
|
|
11
|
-
value: z.ZodString;
|
|
12
|
-
blockNumber: z.ZodNullable<z.ZodString>;
|
|
13
|
-
blockHash: z.ZodNullable<z.ZodString>;
|
|
14
|
-
gasPrice: z.ZodNullable<z.ZodString>;
|
|
15
|
-
gas: z.ZodString;
|
|
16
|
-
nonce: z.ZodNumber;
|
|
17
|
-
transactionIndex: z.ZodNullable<z.ZodNumber>;
|
|
18
|
-
status: z.ZodEnum<{
|
|
19
|
-
success: "success";
|
|
20
|
-
reverted: "reverted";
|
|
21
|
-
pending: "pending";
|
|
22
|
-
}>;
|
|
23
|
-
gasUsed: z.ZodNullable<z.ZodString>;
|
|
24
|
-
timestamp: z.ZodNullable<z.ZodNumber>;
|
|
25
|
-
}, z.core.$strip>;
|
|
26
|
-
interface GetTransactionInput extends z.infer<typeof getTransactionInputSchema> {
|
|
27
|
-
}
|
|
28
|
-
type GetTransactionOutput = z.infer<typeof getTransactionOutputSchema>;
|
|
29
|
-
|
|
30
|
-
declare const syncAddressInputSchema: z.ZodObject<{
|
|
31
|
-
addressId: z.ZodString;
|
|
32
|
-
}, z.core.$strip>;
|
|
33
|
-
declare const syncAddressOutputSchema: z.ZodObject<{
|
|
34
|
-
instanceId: z.ZodString;
|
|
35
|
-
details: z.ZodObject<{
|
|
36
|
-
status: z.ZodEnum<{
|
|
37
|
-
unknown: "unknown";
|
|
38
|
-
queued: "queued";
|
|
39
|
-
running: "running";
|
|
40
|
-
paused: "paused";
|
|
41
|
-
errored: "errored";
|
|
42
|
-
terminated: "terminated";
|
|
43
|
-
complete: "complete";
|
|
44
|
-
waiting: "waiting";
|
|
45
|
-
waitingForPause: "waitingForPause";
|
|
46
|
-
}>;
|
|
47
|
-
error: z.ZodOptional<z.ZodObject<{
|
|
48
|
-
message: z.ZodString;
|
|
49
|
-
name: z.ZodOptional<z.ZodString>;
|
|
50
|
-
}, z.core.$strip>>;
|
|
51
|
-
output: z.ZodOptional<z.ZodUnknown>;
|
|
52
|
-
}, z.core.$strip>;
|
|
53
|
-
}, z.core.$strip>;
|
|
54
|
-
interface SyncAddressInput extends z.infer<typeof syncAddressInputSchema> {
|
|
55
|
-
}
|
|
56
|
-
type SyncAddressOutput = z.infer<typeof syncAddressOutputSchema>;
|
|
57
|
-
|
|
58
|
-
declare const tables: typeof schema;
|
|
59
|
-
|
|
60
|
-
export { getTransactionOutputSchema as c, syncAddressOutputSchema as d, getTransactionInputSchema as g, syncAddressInputSchema as s, tables as t };
|
|
61
|
-
export type { GetTransactionInput as G, SyncAddressInput as S, SyncAddressOutput as a, GetTransactionOutput as b };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { workflowInstanceStatusSchema } from '@develit-io/backend-sdk';
|
|
3
|
-
|
|
4
|
-
const getTransactionInputSchema = z.object({
|
|
5
|
-
txHash: z.string()
|
|
6
|
-
});
|
|
7
|
-
const getTransactionOutputSchema = z.object({
|
|
8
|
-
hash: z.string(),
|
|
9
|
-
from: z.string(),
|
|
10
|
-
to: z.string().nullable(),
|
|
11
|
-
value: z.string(),
|
|
12
|
-
blockNumber: z.string().nullable(),
|
|
13
|
-
blockHash: z.string().nullable(),
|
|
14
|
-
gasPrice: z.string().nullable(),
|
|
15
|
-
gas: z.string(),
|
|
16
|
-
nonce: z.number(),
|
|
17
|
-
transactionIndex: z.number().nullable(),
|
|
18
|
-
status: z.enum(["success", "reverted", "pending"]),
|
|
19
|
-
gasUsed: z.string().nullable(),
|
|
20
|
-
timestamp: z.number().nullable()
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const syncAddressInputSchema = z.object({
|
|
24
|
-
addressId: z.string()
|
|
25
|
-
});
|
|
26
|
-
const syncAddressOutputSchema = z.object({
|
|
27
|
-
instanceId: z.string(),
|
|
28
|
-
details: workflowInstanceStatusSchema
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export { getTransactionOutputSchema as a, syncAddressOutputSchema as b, getTransactionInputSchema as g, syncAddressInputSchema as s };
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { s as schema } from './blockchain.Cx60lJ0c.cjs';
|
|
3
|
-
|
|
4
|
-
declare const getTransactionInputSchema: z.ZodObject<{
|
|
5
|
-
txHash: z.ZodString;
|
|
6
|
-
}, z.core.$strip>;
|
|
7
|
-
declare const getTransactionOutputSchema: z.ZodObject<{
|
|
8
|
-
hash: z.ZodString;
|
|
9
|
-
from: z.ZodString;
|
|
10
|
-
to: z.ZodNullable<z.ZodString>;
|
|
11
|
-
value: z.ZodString;
|
|
12
|
-
blockNumber: z.ZodNullable<z.ZodString>;
|
|
13
|
-
blockHash: z.ZodNullable<z.ZodString>;
|
|
14
|
-
gasPrice: z.ZodNullable<z.ZodString>;
|
|
15
|
-
gas: z.ZodString;
|
|
16
|
-
nonce: z.ZodNumber;
|
|
17
|
-
transactionIndex: z.ZodNullable<z.ZodNumber>;
|
|
18
|
-
status: z.ZodEnum<{
|
|
19
|
-
success: "success";
|
|
20
|
-
reverted: "reverted";
|
|
21
|
-
pending: "pending";
|
|
22
|
-
}>;
|
|
23
|
-
gasUsed: z.ZodNullable<z.ZodString>;
|
|
24
|
-
timestamp: z.ZodNullable<z.ZodNumber>;
|
|
25
|
-
}, z.core.$strip>;
|
|
26
|
-
interface GetTransactionInput extends z.infer<typeof getTransactionInputSchema> {
|
|
27
|
-
}
|
|
28
|
-
type GetTransactionOutput = z.infer<typeof getTransactionOutputSchema>;
|
|
29
|
-
|
|
30
|
-
declare const syncAddressInputSchema: z.ZodObject<{
|
|
31
|
-
addressId: z.ZodString;
|
|
32
|
-
}, z.core.$strip>;
|
|
33
|
-
declare const syncAddressOutputSchema: z.ZodObject<{
|
|
34
|
-
instanceId: z.ZodString;
|
|
35
|
-
details: z.ZodObject<{
|
|
36
|
-
status: z.ZodEnum<{
|
|
37
|
-
unknown: "unknown";
|
|
38
|
-
queued: "queued";
|
|
39
|
-
running: "running";
|
|
40
|
-
paused: "paused";
|
|
41
|
-
errored: "errored";
|
|
42
|
-
terminated: "terminated";
|
|
43
|
-
complete: "complete";
|
|
44
|
-
waiting: "waiting";
|
|
45
|
-
waitingForPause: "waitingForPause";
|
|
46
|
-
}>;
|
|
47
|
-
error: z.ZodOptional<z.ZodObject<{
|
|
48
|
-
message: z.ZodString;
|
|
49
|
-
name: z.ZodOptional<z.ZodString>;
|
|
50
|
-
}, z.core.$strip>>;
|
|
51
|
-
output: z.ZodOptional<z.ZodUnknown>;
|
|
52
|
-
}, z.core.$strip>;
|
|
53
|
-
}, z.core.$strip>;
|
|
54
|
-
interface SyncAddressInput extends z.infer<typeof syncAddressInputSchema> {
|
|
55
|
-
}
|
|
56
|
-
type SyncAddressOutput = z.infer<typeof syncAddressOutputSchema>;
|
|
57
|
-
|
|
58
|
-
declare const tables: typeof schema;
|
|
59
|
-
|
|
60
|
-
export { getTransactionOutputSchema as c, syncAddressOutputSchema as d, getTransactionInputSchema as g, syncAddressInputSchema as s, tables as t };
|
|
61
|
-
export type { GetTransactionInput as G, SyncAddressInput as S, SyncAddressOutput as a, GetTransactionOutput as b };
|