@develit-services/blockchain 0.12.0 → 1.0.0
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 +0 -5
- package/dist/export/worker.d.cts +2 -6
- package/dist/export/worker.d.mts +3 -5
- package/dist/export/worker.d.ts +2 -6
- package/dist/export/worker.mjs +1 -3
- package/dist/export/workflows.cjs +1 -1
- package/dist/export/workflows.mjs +1 -1
- package/dist/types.d.cts +2 -2
- package/dist/types.d.mts +2 -2
- package/dist/types.d.ts +2 -2
- package/package.json +4 -4
- package/dist/shared/{blockchain.C8acDQuh.d.mts → blockchain.BQ6UGj4I.d.mts} +2 -2
- package/dist/shared/{blockchain.Z_R-J9qs.d.cts → blockchain.Dzf9Wl8D.d.cts} +2 -2
- package/dist/shared/{blockchain.BL2AlFRD.d.ts → blockchain.HRS0o16z.d.ts} +2 -2
package/dist/export/worker.cjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
6
4
|
const blockchain = require('../shared/blockchain.BUnmkBag.cjs');
|
|
7
5
|
const address = require('../shared/blockchain.BVya3Mud.cjs');
|
|
@@ -125,7 +123,4 @@ function defineBlockchainService() {
|
|
|
125
123
|
};
|
|
126
124
|
}
|
|
127
125
|
|
|
128
|
-
const BlockchainService = defineBlockchainService();
|
|
129
|
-
|
|
130
|
-
exports.default = BlockchainService;
|
|
131
126
|
exports.defineBlockchainService = defineBlockchainService;
|
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, c as GetDecimalsInput, d as GetDecimalsOutput, e as GetBlockInput, f as GetBlockOutput } from '../shared/blockchain.
|
|
3
|
+
import { t as tables, S as SyncAddressInput, a as SyncAddressOutput, G as GetTransactionInput, b as GetTransactionOutput, c as GetDecimalsInput, d as GetDecimalsOutput, e as GetBlockInput, f as GetBlockOutput } from '../shared/blockchain.Dzf9Wl8D.cjs';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
6
6
|
import 'zod';
|
|
@@ -16,10 +16,6 @@ declare class BlockchainServiceBase extends BlockchainServiceBase_base {
|
|
|
16
16
|
getDecimals(input: GetDecimalsInput): Promise<IRPCResponse<GetDecimalsOutput>>;
|
|
17
17
|
getBlock(input: GetBlockInput): Promise<IRPCResponse<GetBlockOutput>>;
|
|
18
18
|
}
|
|
19
|
-
declare function defineBlockchainService():
|
|
19
|
+
declare function defineBlockchainService(): typeof BlockchainServiceBase;
|
|
20
20
|
|
|
21
|
-
declare const _default: new (ctx: ExecutionContext, env: BlockchainEnv) => WorkerEntrypoint<BlockchainEnv>;
|
|
22
|
-
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
export = _default;
|
|
25
21
|
export { defineBlockchainService };
|
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, c as GetDecimalsInput, d as GetDecimalsOutput, e as GetBlockInput, f as GetBlockOutput } from '../shared/blockchain.
|
|
3
|
+
import { t as tables, S as SyncAddressInput, a as SyncAddressOutput, G as GetTransactionInput, b as GetTransactionOutput, c as GetDecimalsInput, d as GetDecimalsOutput, e as GetBlockInput, f as GetBlockOutput } from '../shared/blockchain.BQ6UGj4I.mjs';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
6
6
|
import 'zod';
|
|
@@ -16,8 +16,6 @@ declare class BlockchainServiceBase extends BlockchainServiceBase_base {
|
|
|
16
16
|
getDecimals(input: GetDecimalsInput): Promise<IRPCResponse<GetDecimalsOutput>>;
|
|
17
17
|
getBlock(input: GetBlockInput): Promise<IRPCResponse<GetBlockOutput>>;
|
|
18
18
|
}
|
|
19
|
-
declare function defineBlockchainService():
|
|
19
|
+
declare function defineBlockchainService(): typeof BlockchainServiceBase;
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export { _default as default, defineBlockchainService };
|
|
21
|
+
export { defineBlockchainService };
|
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, c as GetDecimalsInput, d as GetDecimalsOutput, e as GetBlockInput, f as GetBlockOutput } from '../shared/blockchain.
|
|
3
|
+
import { t as tables, S as SyncAddressInput, a as SyncAddressOutput, G as GetTransactionInput, b as GetTransactionOutput, c as GetDecimalsInput, d as GetDecimalsOutput, e as GetBlockInput, f as GetBlockOutput } from '../shared/blockchain.HRS0o16z.js';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
6
6
|
import 'zod';
|
|
@@ -16,10 +16,6 @@ declare class BlockchainServiceBase extends BlockchainServiceBase_base {
|
|
|
16
16
|
getDecimals(input: GetDecimalsInput): Promise<IRPCResponse<GetDecimalsOutput>>;
|
|
17
17
|
getBlock(input: GetBlockInput): Promise<IRPCResponse<GetBlockOutput>>;
|
|
18
18
|
}
|
|
19
|
-
declare function defineBlockchainService():
|
|
19
|
+
declare function defineBlockchainService(): typeof BlockchainServiceBase;
|
|
20
20
|
|
|
21
|
-
declare const _default: new (ctx: ExecutionContext, env: BlockchainEnv) => WorkerEntrypoint<BlockchainEnv>;
|
|
22
|
-
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
export = _default;
|
|
25
21
|
export { defineBlockchainService };
|
package/dist/export/worker.mjs
CHANGED
|
@@ -157,7 +157,7 @@ class BlockchainSyncAddressTxs extends cloudflare_workers.WorkflowEntrypoint {
|
|
|
157
157
|
metadata: {
|
|
158
158
|
correlationId: backendSdk.uuidv4(),
|
|
159
159
|
entityId: backendSdk.uuidv4(),
|
|
160
|
-
timestamp:
|
|
160
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
161
161
|
}
|
|
162
162
|
}));
|
|
163
163
|
const lastSyncMetadata = {
|
|
@@ -155,7 +155,7 @@ class BlockchainSyncAddressTxs extends WorkflowEntrypoint {
|
|
|
155
155
|
metadata: {
|
|
156
156
|
correlationId: uuidv4(),
|
|
157
157
|
entityId: uuidv4(),
|
|
158
|
-
timestamp:
|
|
158
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
159
159
|
}
|
|
160
160
|
}));
|
|
161
161
|
const lastSyncMetadata = {
|
package/dist/types.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { C as CHAIN_KEYS, a as CREDENTIALS_TYPES, b as CredentialsType, L as LastSyncMetadata } from './shared/blockchain.BioJdfy8.cjs';
|
|
2
2
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
3
|
-
import { t as tables } from './shared/blockchain.
|
|
4
|
-
export { C as Chain, e as GetBlockInput, f as GetBlockOutput, c as GetDecimalsInput, d as GetDecimalsOutput, G as GetTransactionInput, b as GetTransactionOutput, M as MAINNET_CHAIN_TYPE, S as SyncAddressInput, a as SyncAddressOutput, T as TESTNET_CHAIN_TYPE, g as chainSchema, h as getBlockInputSchema, i as getBlockOutputSchema, j as getDecimalsInputSchema, k as getDecimalsOutputSchema, l as getTransactionInputSchema, m as getTransactionOutputSchema, s as syncAddressInputSchema, n as syncAddressOutputSchema } from './shared/blockchain.
|
|
3
|
+
import { t as tables } from './shared/blockchain.Dzf9Wl8D.cjs';
|
|
4
|
+
export { C as Chain, e as GetBlockInput, f as GetBlockOutput, c as GetDecimalsInput, d as GetDecimalsOutput, G as GetTransactionInput, b as GetTransactionOutput, M as MAINNET_CHAIN_TYPE, S as SyncAddressInput, a as SyncAddressOutput, T as TESTNET_CHAIN_TYPE, g as chainSchema, h as getBlockInputSchema, i as getBlockOutputSchema, j as getDecimalsInputSchema, k as getDecimalsOutputSchema, l as getTransactionInputSchema, m as getTransactionOutputSchema, s as syncAddressInputSchema, n as syncAddressOutputSchema } from './shared/blockchain.Dzf9Wl8D.cjs';
|
|
5
5
|
import { InferInsertModel, InferSelectModel } from 'drizzle-orm';
|
|
6
6
|
export { a as BlockchainServiceEnv, b as BlockchainServiceEnvironmentConfig, B as BlockchainServiceWranglerConfig } from './shared/blockchain.CVKUvfyj.cjs';
|
|
7
7
|
import 'drizzle-orm/sqlite-core';
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { C as CHAIN_KEYS, a as CREDENTIALS_TYPES, b as CredentialsType, L as LastSyncMetadata } from './shared/blockchain.BioJdfy8.mjs';
|
|
2
2
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
3
|
-
import { t as tables } from './shared/blockchain.
|
|
4
|
-
export { C as Chain, e as GetBlockInput, f as GetBlockOutput, c as GetDecimalsInput, d as GetDecimalsOutput, G as GetTransactionInput, b as GetTransactionOutput, M as MAINNET_CHAIN_TYPE, S as SyncAddressInput, a as SyncAddressOutput, T as TESTNET_CHAIN_TYPE, g as chainSchema, h as getBlockInputSchema, i as getBlockOutputSchema, j as getDecimalsInputSchema, k as getDecimalsOutputSchema, l as getTransactionInputSchema, m as getTransactionOutputSchema, s as syncAddressInputSchema, n as syncAddressOutputSchema } from './shared/blockchain.
|
|
3
|
+
import { t as tables } from './shared/blockchain.BQ6UGj4I.mjs';
|
|
4
|
+
export { C as Chain, e as GetBlockInput, f as GetBlockOutput, c as GetDecimalsInput, d as GetDecimalsOutput, G as GetTransactionInput, b as GetTransactionOutput, M as MAINNET_CHAIN_TYPE, S as SyncAddressInput, a as SyncAddressOutput, T as TESTNET_CHAIN_TYPE, g as chainSchema, h as getBlockInputSchema, i as getBlockOutputSchema, j as getDecimalsInputSchema, k as getDecimalsOutputSchema, l as getTransactionInputSchema, m as getTransactionOutputSchema, s as syncAddressInputSchema, n as syncAddressOutputSchema } from './shared/blockchain.BQ6UGj4I.mjs';
|
|
5
5
|
import { InferInsertModel, InferSelectModel } from 'drizzle-orm';
|
|
6
6
|
export { a as BlockchainServiceEnv, b as BlockchainServiceEnvironmentConfig, B as BlockchainServiceWranglerConfig } from './shared/blockchain.CVKUvfyj.mjs';
|
|
7
7
|
import 'drizzle-orm/sqlite-core';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { C as CHAIN_KEYS, a as CREDENTIALS_TYPES, b as CredentialsType, L as LastSyncMetadata } from './shared/blockchain.BioJdfy8.js';
|
|
2
2
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
3
|
-
import { t as tables } from './shared/blockchain.
|
|
4
|
-
export { C as Chain, e as GetBlockInput, f as GetBlockOutput, c as GetDecimalsInput, d as GetDecimalsOutput, G as GetTransactionInput, b as GetTransactionOutput, M as MAINNET_CHAIN_TYPE, S as SyncAddressInput, a as SyncAddressOutput, T as TESTNET_CHAIN_TYPE, g as chainSchema, h as getBlockInputSchema, i as getBlockOutputSchema, j as getDecimalsInputSchema, k as getDecimalsOutputSchema, l as getTransactionInputSchema, m as getTransactionOutputSchema, s as syncAddressInputSchema, n as syncAddressOutputSchema } from './shared/blockchain.
|
|
3
|
+
import { t as tables } from './shared/blockchain.HRS0o16z.js';
|
|
4
|
+
export { C as Chain, e as GetBlockInput, f as GetBlockOutput, c as GetDecimalsInput, d as GetDecimalsOutput, G as GetTransactionInput, b as GetTransactionOutput, M as MAINNET_CHAIN_TYPE, S as SyncAddressInput, a as SyncAddressOutput, T as TESTNET_CHAIN_TYPE, g as chainSchema, h as getBlockInputSchema, i as getBlockOutputSchema, j as getDecimalsInputSchema, k as getDecimalsOutputSchema, l as getTransactionInputSchema, m as getTransactionOutputSchema, s as syncAddressInputSchema, n as syncAddressOutputSchema } from './shared/blockchain.HRS0o16z.js';
|
|
5
5
|
import { InferInsertModel, InferSelectModel } from 'drizzle-orm';
|
|
6
6
|
export { a as BlockchainServiceEnv, b as BlockchainServiceEnvironmentConfig, B as BlockchainServiceWranglerConfig } from './shared/blockchain.CVKUvfyj.js';
|
|
7
7
|
import 'drizzle-orm/sqlite-core';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@develit-services/blockchain",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"author": "Develit.io s.r.o.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
],
|
|
37
37
|
"scripts": {
|
|
38
38
|
"db:init": "wrangler d1 execute develit-blockchain --local --persist-to ../../.wrangler/state --command=\"SELECT 'Creating database...' AS status;\"",
|
|
39
|
-
"db:generate": "
|
|
40
|
-
"db:migrate": "
|
|
41
|
-
"db:explore": "
|
|
39
|
+
"db:generate": "drizzle-kit generate",
|
|
40
|
+
"db:migrate": "drizzle-kit migrate",
|
|
41
|
+
"db:explore": "drizzle-kit studio",
|
|
42
42
|
"dev": "wrangler dev --port 9231 --persist-to ../../.wrangler/state -c ./wrangler.jsonc -c ../../apps/secrets-store/wrangler.jsonc",
|
|
43
43
|
"wrangler:generate": "bunx develit wrangler:generate --types",
|
|
44
44
|
"types": "bash typegen.sh",
|
|
@@ -17,9 +17,9 @@ declare const getBlockInputSchema: z.ZodObject<{
|
|
|
17
17
|
SEPOLIA: "SEPOLIA";
|
|
18
18
|
}>;
|
|
19
19
|
blockTag: z.ZodOptional<z.ZodEnum<{
|
|
20
|
+
pending: "pending";
|
|
20
21
|
latest: "latest";
|
|
21
22
|
earliest: "earliest";
|
|
22
|
-
pending: "pending";
|
|
23
23
|
safe: "safe";
|
|
24
24
|
finalized: "finalized";
|
|
25
25
|
}>>;
|
|
@@ -134,9 +134,9 @@ declare const getTransactionOutputSchema: z.ZodObject<{
|
|
|
134
134
|
nonce: z.ZodNumber;
|
|
135
135
|
transactionIndex: z.ZodNullable<z.ZodNumber>;
|
|
136
136
|
status: z.ZodEnum<{
|
|
137
|
-
pending: "pending";
|
|
138
137
|
success: "success";
|
|
139
138
|
reverted: "reverted";
|
|
139
|
+
pending: "pending";
|
|
140
140
|
}>;
|
|
141
141
|
gasUsed: z.ZodNullable<z.ZodString>;
|
|
142
142
|
timestamp: z.ZodNullable<z.ZodNumber>;
|
|
@@ -17,9 +17,9 @@ declare const getBlockInputSchema: z.ZodObject<{
|
|
|
17
17
|
SEPOLIA: "SEPOLIA";
|
|
18
18
|
}>;
|
|
19
19
|
blockTag: z.ZodOptional<z.ZodEnum<{
|
|
20
|
+
pending: "pending";
|
|
20
21
|
latest: "latest";
|
|
21
22
|
earliest: "earliest";
|
|
22
|
-
pending: "pending";
|
|
23
23
|
safe: "safe";
|
|
24
24
|
finalized: "finalized";
|
|
25
25
|
}>>;
|
|
@@ -134,9 +134,9 @@ declare const getTransactionOutputSchema: z.ZodObject<{
|
|
|
134
134
|
nonce: z.ZodNumber;
|
|
135
135
|
transactionIndex: z.ZodNullable<z.ZodNumber>;
|
|
136
136
|
status: z.ZodEnum<{
|
|
137
|
-
pending: "pending";
|
|
138
137
|
success: "success";
|
|
139
138
|
reverted: "reverted";
|
|
139
|
+
pending: "pending";
|
|
140
140
|
}>;
|
|
141
141
|
gasUsed: z.ZodNullable<z.ZodString>;
|
|
142
142
|
timestamp: z.ZodNullable<z.ZodNumber>;
|
|
@@ -17,9 +17,9 @@ declare const getBlockInputSchema: z.ZodObject<{
|
|
|
17
17
|
SEPOLIA: "SEPOLIA";
|
|
18
18
|
}>;
|
|
19
19
|
blockTag: z.ZodOptional<z.ZodEnum<{
|
|
20
|
+
pending: "pending";
|
|
20
21
|
latest: "latest";
|
|
21
22
|
earliest: "earliest";
|
|
22
|
-
pending: "pending";
|
|
23
23
|
safe: "safe";
|
|
24
24
|
finalized: "finalized";
|
|
25
25
|
}>>;
|
|
@@ -134,9 +134,9 @@ declare const getTransactionOutputSchema: z.ZodObject<{
|
|
|
134
134
|
nonce: z.ZodNumber;
|
|
135
135
|
transactionIndex: z.ZodNullable<z.ZodNumber>;
|
|
136
136
|
status: z.ZodEnum<{
|
|
137
|
-
pending: "pending";
|
|
138
137
|
success: "success";
|
|
139
138
|
reverted: "reverted";
|
|
139
|
+
pending: "pending";
|
|
140
140
|
}>;
|
|
141
141
|
gasUsed: z.ZodNullable<z.ZodString>;
|
|
142
142
|
timestamp: z.ZodNullable<z.ZodNumber>;
|