@develit-services/blockchain 0.7.0 → 0.7.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/database/schema.cjs +2 -1
- package/dist/database/schema.d.cts +1 -1
- package/dist/database/schema.d.mts +1 -1
- package/dist/database/schema.d.ts +1 -1
- package/dist/database/schema.mjs +1 -1
- package/dist/export/worker.cjs +10 -8
- package/dist/export/worker.d.cts +3 -5
- package/dist/export/worker.d.mts +3 -5
- package/dist/export/worker.d.ts +3 -5
- package/dist/export/worker.mjs +9 -7
- package/dist/export/workflows.cjs +124 -45
- package/dist/export/workflows.mjs +125 -46
- package/dist/export/wrangler.cjs +8 -0
- package/dist/export/wrangler.d.cts +7 -1
- package/dist/export/wrangler.d.mts +7 -1
- package/dist/export/wrangler.d.ts +7 -1
- package/dist/export/wrangler.mjs +8 -0
- package/dist/shared/blockchain.0tUJ62WT.mjs +6 -0
- package/dist/shared/{blockchain.DskfTOau.d.cts → blockchain.4Hzh__vM.d.ts} +26 -3
- package/dist/shared/{blockchain.AQv3PaVU.cjs → blockchain.B49xpPZ0.cjs} +3 -2
- package/dist/shared/blockchain.BBvwu2_7.cjs +39 -0
- package/dist/shared/{blockchain.DskfTOau.d.mts → blockchain.BDDFE27V.d.mts} +26 -3
- package/dist/shared/{blockchain.CNVF0KXj.mjs → blockchain.B_Tqqlia.mjs} +3 -2
- package/dist/shared/{blockchain.DQEKAvxx.d.ts → blockchain.C1Jdisxn.d.cts} +9 -1
- package/dist/shared/{blockchain.DQEKAvxx.d.cts → blockchain.C1Jdisxn.d.mts} +9 -1
- package/dist/shared/{blockchain.DQEKAvxx.d.mts → blockchain.C1Jdisxn.d.ts} +9 -1
- package/dist/shared/blockchain.Cx60lJ0c.d.cts +566 -0
- package/dist/shared/blockchain.Cx60lJ0c.d.mts +566 -0
- package/dist/shared/blockchain.Cx60lJ0c.d.ts +566 -0
- package/dist/shared/blockchain.DN735AwB.cjs +8 -0
- package/dist/shared/{blockchain.DskfTOau.d.ts → blockchain.DbsOmkkX.d.cts} +26 -3
- package/dist/shared/blockchain._wwKu1qP.mjs +35 -0
- package/dist/types.cjs +2 -1
- package/dist/types.d.cts +35 -2
- package/dist/types.d.mts +35 -2
- package/dist/types.d.ts +35 -2
- package/dist/types.mjs +2 -1
- package/package.json +1 -1
- package/dist/shared/blockchain.DmhmTTL_.mjs +0 -17
- package/dist/shared/blockchain.JxC5JMLI.cjs +0 -20
- package/dist/shared/blockchain.f4eN2PFQ.d.cts +0 -97
- package/dist/shared/blockchain.f4eN2PFQ.d.mts +0 -97
- package/dist/shared/blockchain.f4eN2PFQ.d.ts +0 -97
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as BlockchainServiceWranglerConfig } from '../shared/blockchain.C1Jdisxn.mjs';
|
|
2
2
|
|
|
3
3
|
declare function defineBlockchainServiceWrangler(config: BlockchainServiceWranglerConfig): {
|
|
4
4
|
services: {
|
|
@@ -16,6 +16,12 @@ declare function defineBlockchainServiceWrangler(config: BlockchainServiceWrangl
|
|
|
16
16
|
name: string;
|
|
17
17
|
class_name: string;
|
|
18
18
|
}[];
|
|
19
|
+
queues: {
|
|
20
|
+
producers: {
|
|
21
|
+
binding: string;
|
|
22
|
+
queue: string;
|
|
23
|
+
}[];
|
|
24
|
+
};
|
|
19
25
|
env: Record<string, unknown>;
|
|
20
26
|
$schema: string;
|
|
21
27
|
name: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as BlockchainServiceWranglerConfig } from '../shared/blockchain.C1Jdisxn.js';
|
|
2
2
|
|
|
3
3
|
declare function defineBlockchainServiceWrangler(config: BlockchainServiceWranglerConfig): {
|
|
4
4
|
services: {
|
|
@@ -16,6 +16,12 @@ declare function defineBlockchainServiceWrangler(config: BlockchainServiceWrangl
|
|
|
16
16
|
name: string;
|
|
17
17
|
class_name: string;
|
|
18
18
|
}[];
|
|
19
|
+
queues: {
|
|
20
|
+
producers: {
|
|
21
|
+
binding: string;
|
|
22
|
+
queue: string;
|
|
23
|
+
}[];
|
|
24
|
+
};
|
|
19
25
|
env: Record<string, unknown>;
|
|
20
26
|
$schema: string;
|
|
21
27
|
name: string;
|
package/dist/export/wrangler.mjs
CHANGED
|
@@ -28,6 +28,14 @@ function defineBlockchainServiceWrangler(config) {
|
|
|
28
28
|
class_name: "BlockchainSyncAddressTransactions"
|
|
29
29
|
}
|
|
30
30
|
],
|
|
31
|
+
queues: {
|
|
32
|
+
producers: [
|
|
33
|
+
{
|
|
34
|
+
binding: envs.local.queues.producers.bus.binding,
|
|
35
|
+
queue: `${project}-${envs.local.queues.producers.bus.queue}`
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
31
39
|
env: {}
|
|
32
40
|
};
|
|
33
41
|
for (const [envName, envCfg] of Object.entries(envs).filter(
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { s as schema } from './blockchain.Cx60lJ0c.js';
|
|
2
3
|
|
|
3
4
|
declare const getTransactionInputSchema: z.ZodObject<{
|
|
4
5
|
txHash: z.ZodString;
|
|
@@ -29,10 +30,32 @@ type GetTransactionOutput = z.infer<typeof getTransactionOutputSchema>;
|
|
|
29
30
|
declare const syncAddressInputSchema: z.ZodObject<{
|
|
30
31
|
addressId: z.ZodString;
|
|
31
32
|
}, z.core.$strip>;
|
|
32
|
-
declare const syncAddressOutputSchema: z.ZodObject<{
|
|
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>;
|
|
33
54
|
interface SyncAddressInput extends z.infer<typeof syncAddressInputSchema> {
|
|
34
55
|
}
|
|
35
56
|
type SyncAddressOutput = z.infer<typeof syncAddressOutputSchema>;
|
|
36
57
|
|
|
37
|
-
|
|
38
|
-
|
|
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,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
|
+
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
5
|
|
|
5
6
|
const getTransactionInputSchema = zod.z.object({
|
|
6
7
|
txHash: zod.z.string()
|
|
@@ -25,8 +26,8 @@ const syncAddressInputSchema = zod.z.object({
|
|
|
25
26
|
addressId: zod.z.string()
|
|
26
27
|
});
|
|
27
28
|
const syncAddressOutputSchema = zod.z.object({
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
instanceId: zod.z.string(),
|
|
30
|
+
details: backendSdk.workflowInstanceStatusSchema
|
|
30
31
|
});
|
|
31
32
|
|
|
32
33
|
exports.getTransactionInputSchema = getTransactionInputSchema;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
|
+
const sqliteCore = require('drizzle-orm/sqlite-core');
|
|
5
|
+
|
|
6
|
+
const address = sqliteCore.sqliteTable("address", {
|
|
7
|
+
...backendSdk.base,
|
|
8
|
+
number: sqliteCore.text("number").notNull(),
|
|
9
|
+
chain: sqliteCore.text("chain").notNull(),
|
|
10
|
+
syncIntervalS: sqliteCore.integer("sync_interval_s").notNull().default(600),
|
|
11
|
+
lastSyncAt: sqliteCore.integer("last_sync_at", { mode: "timestamp_ms" }),
|
|
12
|
+
lastSyncMetadata: sqliteCore.text("last_sync_metadata", {
|
|
13
|
+
mode: "json"
|
|
14
|
+
}).$type()
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const transaction = sqliteCore.sqliteTable("transaction", {
|
|
18
|
+
...backendSdk.base,
|
|
19
|
+
hash: sqliteCore.text("hash"),
|
|
20
|
+
from: sqliteCore.text("from"),
|
|
21
|
+
to: sqliteCore.text("to"),
|
|
22
|
+
value: sqliteCore.text("value"),
|
|
23
|
+
blockNumber: sqliteCore.text("blockNumber"),
|
|
24
|
+
blockHash: sqliteCore.text("blockHash"),
|
|
25
|
+
gasUsed: sqliteCore.text("gasUsed"),
|
|
26
|
+
gasPrice: sqliteCore.text("gasPrice"),
|
|
27
|
+
timestamp: sqliteCore.integer("timestamp"),
|
|
28
|
+
status: sqliteCore.text("status")
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const schema = {
|
|
32
|
+
__proto__: null,
|
|
33
|
+
address: address,
|
|
34
|
+
transaction: transaction
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
exports.address = address;
|
|
38
|
+
exports.schema = schema;
|
|
39
|
+
exports.transaction = transaction;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { s as schema } from './blockchain.Cx60lJ0c.mjs';
|
|
2
3
|
|
|
3
4
|
declare const getTransactionInputSchema: z.ZodObject<{
|
|
4
5
|
txHash: z.ZodString;
|
|
@@ -29,10 +30,32 @@ type GetTransactionOutput = z.infer<typeof getTransactionOutputSchema>;
|
|
|
29
30
|
declare const syncAddressInputSchema: z.ZodObject<{
|
|
30
31
|
addressId: z.ZodString;
|
|
31
32
|
}, z.core.$strip>;
|
|
32
|
-
declare const syncAddressOutputSchema: z.ZodObject<{
|
|
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>;
|
|
33
54
|
interface SyncAddressInput extends z.infer<typeof syncAddressInputSchema> {
|
|
34
55
|
}
|
|
35
56
|
type SyncAddressOutput = z.infer<typeof syncAddressOutputSchema>;
|
|
36
57
|
|
|
37
|
-
|
|
38
|
-
|
|
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,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { workflowInstanceStatusSchema } from '@develit-io/backend-sdk';
|
|
2
3
|
|
|
3
4
|
const getTransactionInputSchema = z.object({
|
|
4
5
|
txHash: z.string()
|
|
@@ -23,8 +24,8 @@ const syncAddressInputSchema = z.object({
|
|
|
23
24
|
addressId: z.string()
|
|
24
25
|
});
|
|
25
26
|
const syncAddressOutputSchema = z.object({
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
instanceId: z.string(),
|
|
28
|
+
details: workflowInstanceStatusSchema
|
|
28
29
|
});
|
|
29
30
|
|
|
30
31
|
export { getTransactionOutputSchema as a, syncAddressOutputSchema as b, getTransactionInputSchema as g, syncAddressInputSchema as s };
|
|
@@ -2,6 +2,14 @@ interface BlockchainServiceEnvironmentConfig {
|
|
|
2
2
|
d1: {
|
|
3
3
|
id: string;
|
|
4
4
|
};
|
|
5
|
+
queues: {
|
|
6
|
+
producers: {
|
|
7
|
+
bus: {
|
|
8
|
+
binding: string;
|
|
9
|
+
queue: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
5
13
|
}
|
|
6
14
|
interface BlockchainServiceWranglerConfig {
|
|
7
15
|
project: string;
|
|
@@ -14,4 +22,4 @@ interface BlockchainServiceWranglerConfig {
|
|
|
14
22
|
interface BlockchainServiceEnv extends BlockchainEnv {
|
|
15
23
|
}
|
|
16
24
|
|
|
17
|
-
export type {
|
|
25
|
+
export type { BlockchainServiceWranglerConfig as B, BlockchainServiceEnv as a, BlockchainServiceEnvironmentConfig as b };
|
|
@@ -2,6 +2,14 @@ interface BlockchainServiceEnvironmentConfig {
|
|
|
2
2
|
d1: {
|
|
3
3
|
id: string;
|
|
4
4
|
};
|
|
5
|
+
queues: {
|
|
6
|
+
producers: {
|
|
7
|
+
bus: {
|
|
8
|
+
binding: string;
|
|
9
|
+
queue: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
5
13
|
}
|
|
6
14
|
interface BlockchainServiceWranglerConfig {
|
|
7
15
|
project: string;
|
|
@@ -14,4 +22,4 @@ interface BlockchainServiceWranglerConfig {
|
|
|
14
22
|
interface BlockchainServiceEnv extends BlockchainEnv {
|
|
15
23
|
}
|
|
16
24
|
|
|
17
|
-
export type {
|
|
25
|
+
export type { BlockchainServiceWranglerConfig as B, BlockchainServiceEnv as a, BlockchainServiceEnvironmentConfig as b };
|
|
@@ -2,6 +2,14 @@ interface BlockchainServiceEnvironmentConfig {
|
|
|
2
2
|
d1: {
|
|
3
3
|
id: string;
|
|
4
4
|
};
|
|
5
|
+
queues: {
|
|
6
|
+
producers: {
|
|
7
|
+
bus: {
|
|
8
|
+
binding: string;
|
|
9
|
+
queue: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
5
13
|
}
|
|
6
14
|
interface BlockchainServiceWranglerConfig {
|
|
7
15
|
project: string;
|
|
@@ -14,4 +22,4 @@ interface BlockchainServiceWranglerConfig {
|
|
|
14
22
|
interface BlockchainServiceEnv extends BlockchainEnv {
|
|
15
23
|
}
|
|
16
24
|
|
|
17
|
-
export type {
|
|
25
|
+
export type { BlockchainServiceWranglerConfig as B, BlockchainServiceEnv as a, BlockchainServiceEnvironmentConfig as b };
|