@develit-services/blockchain 0.8.3 → 0.8.5

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.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const database_schema = require('../shared/blockchain.CbmnjjFl.cjs');
3
+ const database_schema = require('../shared/blockchain.ZJPECySM.cjs');
4
4
  require('@develit-io/backend-sdk');
5
5
  require('drizzle-orm/sqlite-core');
6
6
  require('../shared/blockchain.Cjq9eH7Z.cjs');
@@ -1,4 +1,4 @@
1
- export { a as address, b as addressCredentials, t as tokens, c as transaction } from '../shared/blockchain._nv3VxNA.mjs';
1
+ export { a as address, b as addressCredentials, t as tokens, c as transaction } from '../shared/blockchain.BKGlFbOW.mjs';
2
2
  import '@develit-io/backend-sdk';
3
3
  import 'drizzle-orm/sqlite-core';
4
4
  import '../shared/blockchain.CKh8Fs7w.mjs';
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const backendSdk = require('@develit-io/backend-sdk');
6
- const blockchain = require('../shared/blockchain.BUbQBxqd.cjs');
6
+ const blockchain = require('../shared/blockchain.JBv4ipVR.cjs');
7
7
  const syncAddress = require('../shared/blockchain.Cjq9eH7Z.cjs');
8
8
  const cloudflare_workers = require('cloudflare:workers');
9
9
  const d1 = require('drizzle-orm/d1');
10
- require('../shared/blockchain.CbmnjjFl.cjs');
10
+ require('../shared/blockchain.ZJPECySM.cjs');
11
11
  require('drizzle-orm/sqlite-core');
12
12
  require('drizzle-orm');
13
13
  require('viem');
@@ -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 GetBlockInput, d as GetBlockOutput } from '../shared/blockchain.CaPQzwns.cjs';
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.Br6esGv4.cjs';
4
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
5
  import { DrizzleD1Database } from 'drizzle-orm/d1';
6
6
  import 'zod';
@@ -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 GetBlockInput, d as GetBlockOutput } from '../shared/blockchain.CvNI0YTF.mjs';
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.DcWSUM60.mjs';
4
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
5
  import { DrizzleD1Database } from 'drizzle-orm/d1';
6
6
  import 'zod';
@@ -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 GetBlockInput, d as GetBlockOutput } from '../shared/blockchain.7cRY-udH.js';
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.DurPotrN.js';
4
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
5
  import { DrizzleD1Database } from 'drizzle-orm/d1';
6
6
  import 'zod';
@@ -1,9 +1,9 @@
1
1
  import { develitWorker, action, service } from '@develit-io/backend-sdk';
2
- import { t as tables, i as initiateConnector } from '../shared/blockchain.BhDiNGPI.mjs';
2
+ import { t as tables, i as initiateConnector } from '../shared/blockchain.wsLSmIaf.mjs';
3
3
  import { s as syncAddressInputSchema, d as getTransactionInputSchema, g as getBlockInputSchema } from '../shared/blockchain.CKh8Fs7w.mjs';
4
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
5
  import { drizzle } from 'drizzle-orm/d1';
6
- import '../shared/blockchain._nv3VxNA.mjs';
6
+ import '../shared/blockchain.BKGlFbOW.mjs';
7
7
  import 'drizzle-orm/sqlite-core';
8
8
  import 'drizzle-orm';
9
9
  import 'viem';
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  const backendSdk = require('@develit-io/backend-sdk');
4
- const blockchain = require('../shared/blockchain.BUbQBxqd.cjs');
4
+ const blockchain = require('../shared/blockchain.JBv4ipVR.cjs');
5
5
  const drizzleOrm = require('drizzle-orm');
6
6
  const cloudflare_workers = require('cloudflare:workers');
7
7
  const cloudflare_workflows = require('cloudflare:workflows');
8
8
  const d1 = require('drizzle-orm/d1');
9
- require('../shared/blockchain.CbmnjjFl.cjs');
9
+ require('../shared/blockchain.ZJPECySM.cjs');
10
10
  require('drizzle-orm/sqlite-core');
11
11
  require('../shared/blockchain.Cjq9eH7Z.cjs');
12
12
  require('zod');
@@ -51,7 +51,7 @@ const getContractAddresses = async (db, { connector }) => {
51
51
 
52
52
  const createTransactionCommand = (db, { transaction }) => {
53
53
  const id = backendSdk.uuidv4();
54
- const command = db.insert(blockchain.tables.transaction).values({ ...transaction, id }).returning();
54
+ const command = db.insert(blockchain.tables.transaction).values({ ...transaction, id }).onConflictDoNothing().returning();
55
55
  return { command };
56
56
  };
57
57
 
@@ -64,7 +64,7 @@ function pushToQueue(queue, message) {
64
64
  }))
65
65
  );
66
66
  }
67
- class BlockchainSyncAddressTransactions extends cloudflare_workers.WorkflowEntrypoint {
67
+ class BlockchainSyncAddressTxs extends cloudflare_workers.WorkflowEntrypoint {
68
68
  async run(event, step) {
69
69
  const { addressId } = event.payload;
70
70
  const db = d1.drizzle(this.env.BLOCKCHAIN_D1, { schema: blockchain.tables });
@@ -80,7 +80,10 @@ class BlockchainSyncAddressTransactions extends cloudflare_workers.WorkflowEntry
80
80
  `Blockchain address not found: ${addressId}.`
81
81
  );
82
82
  }
83
- return address2;
83
+ return {
84
+ ...address2,
85
+ lastSyncBlock: address2.lastSyncBlock?.toString() ?? null
86
+ };
84
87
  });
85
88
  if (!address.lastSyncAt) {
86
89
  throw new cloudflare_workflows.NonRetryableError(
@@ -88,7 +91,7 @@ class BlockchainSyncAddressTransactions extends cloudflare_workers.WorkflowEntry
88
91
  );
89
92
  }
90
93
  const transactions = await step.do(
91
- "fetch address transactions",
94
+ `fetch address transactions`,
92
95
  {
93
96
  retries: { limit: 5, delay: 2e3, backoff: "constant" },
94
97
  timeout: "30 seconds"
@@ -114,15 +117,21 @@ class BlockchainSyncAddressTransactions extends cloudflare_workers.WorkflowEntry
114
117
  }
115
118
  ]
116
119
  });
117
- return await connector.getAllAddressTransactions({
120
+ const result = await connector.getAllAddressTransactions({
118
121
  address: address.number,
119
- filter: { fromBlock: address.lastSyncBlock }
122
+ filter: {
123
+ fromBlock: address.lastSyncBlock ? BigInt(address.lastSyncBlock) : null
124
+ }
120
125
  });
126
+ return {
127
+ transactions: result.transactions,
128
+ latestBlock: result.latestBlock.toString()
129
+ };
121
130
  }
122
131
  );
123
132
  if (transactions.transactions.length > 0) {
124
133
  await step.do(
125
- "process new transactions and update lastSyncAt",
134
+ `process new transactions and update lastSyncAt`,
126
135
  async () => {
127
136
  const createCommands = transactions.transactions.map(
128
137
  (tx) => createTransactionCommand(db, { transaction: tx }).command
@@ -161,7 +170,7 @@ class BlockchainSyncAddressTransactions extends cloudflare_workers.WorkflowEntry
161
170
  }).command;
162
171
  const updateLastSyncBlockCommand = updateAddressLastSyncBlockCommand(db, {
163
172
  addressId: address.id,
164
- lastSyncBlock: transactions.latestBlock
173
+ lastSyncBlock: BigInt(transactions.latestBlock)
165
174
  }).command;
166
175
  if (eventsToEmit.length) {
167
176
  await db.batch(
@@ -184,11 +193,11 @@ class BlockchainSyncAddressTransactions extends cloudflare_workers.WorkflowEntry
184
193
  );
185
194
  }
186
195
  await step.sleep(
187
- "sleep until next sync",
196
+ `sleep until next sync`,
188
197
  `${address.syncIntervalS} seconds`
189
198
  );
190
199
  }
191
200
  }
192
201
  }
193
202
 
194
- exports.BlockchainSyncAddressTransactions = BlockchainSyncAddressTransactions;
203
+ exports.BlockchainSyncAddressTxs = BlockchainSyncAddressTxs;
@@ -3,8 +3,8 @@ import { WorkflowEntrypoint, WorkflowEvent, WorkflowStep } from 'cloudflare:work
3
3
  type Params = {
4
4
  addressId: string;
5
5
  };
6
- declare class BlockchainSyncAddressTransactions extends WorkflowEntrypoint<BlockchainEnv, Params> {
6
+ declare class BlockchainSyncAddressTxs extends WorkflowEntrypoint<BlockchainEnv, Params> {
7
7
  run(event: WorkflowEvent<Params>, step: WorkflowStep): Promise<void>;
8
8
  }
9
9
 
10
- export { BlockchainSyncAddressTransactions };
10
+ export { BlockchainSyncAddressTxs };
@@ -3,8 +3,8 @@ import { WorkflowEntrypoint, WorkflowEvent, WorkflowStep } from 'cloudflare:work
3
3
  type Params = {
4
4
  addressId: string;
5
5
  };
6
- declare class BlockchainSyncAddressTransactions extends WorkflowEntrypoint<BlockchainEnv, Params> {
6
+ declare class BlockchainSyncAddressTxs extends WorkflowEntrypoint<BlockchainEnv, Params> {
7
7
  run(event: WorkflowEvent<Params>, step: WorkflowStep): Promise<void>;
8
8
  }
9
9
 
10
- export { BlockchainSyncAddressTransactions };
10
+ export { BlockchainSyncAddressTxs };
@@ -3,8 +3,8 @@ import { WorkflowEntrypoint, WorkflowEvent, WorkflowStep } from 'cloudflare:work
3
3
  type Params = {
4
4
  addressId: string;
5
5
  };
6
- declare class BlockchainSyncAddressTransactions extends WorkflowEntrypoint<BlockchainEnv, Params> {
6
+ declare class BlockchainSyncAddressTxs extends WorkflowEntrypoint<BlockchainEnv, Params> {
7
7
  run(event: WorkflowEvent<Params>, step: WorkflowStep): Promise<void>;
8
8
  }
9
9
 
10
- export { BlockchainSyncAddressTransactions };
10
+ export { BlockchainSyncAddressTxs };
@@ -1,10 +1,10 @@
1
1
  import { uuidv4, asNonEmpty } from '@develit-io/backend-sdk';
2
- import { t as tables, i as initiateConnector } from '../shared/blockchain.BhDiNGPI.mjs';
2
+ import { t as tables, i as initiateConnector } from '../shared/blockchain.wsLSmIaf.mjs';
3
3
  import { eq } from 'drizzle-orm';
4
4
  import { WorkflowEntrypoint } from 'cloudflare:workers';
5
5
  import { NonRetryableError } from 'cloudflare:workflows';
6
6
  import { drizzle } from 'drizzle-orm/d1';
7
- import '../shared/blockchain._nv3VxNA.mjs';
7
+ import '../shared/blockchain.BKGlFbOW.mjs';
8
8
  import 'drizzle-orm/sqlite-core';
9
9
  import '../shared/blockchain.CKh8Fs7w.mjs';
10
10
  import 'zod';
@@ -49,7 +49,7 @@ const getContractAddresses = async (db, { connector }) => {
49
49
 
50
50
  const createTransactionCommand = (db, { transaction }) => {
51
51
  const id = uuidv4();
52
- const command = db.insert(tables.transaction).values({ ...transaction, id }).returning();
52
+ const command = db.insert(tables.transaction).values({ ...transaction, id }).onConflictDoNothing().returning();
53
53
  return { command };
54
54
  };
55
55
 
@@ -62,7 +62,7 @@ function pushToQueue(queue, message) {
62
62
  }))
63
63
  );
64
64
  }
65
- class BlockchainSyncAddressTransactions extends WorkflowEntrypoint {
65
+ class BlockchainSyncAddressTxs extends WorkflowEntrypoint {
66
66
  async run(event, step) {
67
67
  const { addressId } = event.payload;
68
68
  const db = drizzle(this.env.BLOCKCHAIN_D1, { schema: tables });
@@ -78,7 +78,10 @@ class BlockchainSyncAddressTransactions extends WorkflowEntrypoint {
78
78
  `Blockchain address not found: ${addressId}.`
79
79
  );
80
80
  }
81
- return address2;
81
+ return {
82
+ ...address2,
83
+ lastSyncBlock: address2.lastSyncBlock?.toString() ?? null
84
+ };
82
85
  });
83
86
  if (!address.lastSyncAt) {
84
87
  throw new NonRetryableError(
@@ -86,7 +89,7 @@ class BlockchainSyncAddressTransactions extends WorkflowEntrypoint {
86
89
  );
87
90
  }
88
91
  const transactions = await step.do(
89
- "fetch address transactions",
92
+ `fetch address transactions`,
90
93
  {
91
94
  retries: { limit: 5, delay: 2e3, backoff: "constant" },
92
95
  timeout: "30 seconds"
@@ -112,15 +115,21 @@ class BlockchainSyncAddressTransactions extends WorkflowEntrypoint {
112
115
  }
113
116
  ]
114
117
  });
115
- return await connector.getAllAddressTransactions({
118
+ const result = await connector.getAllAddressTransactions({
116
119
  address: address.number,
117
- filter: { fromBlock: address.lastSyncBlock }
120
+ filter: {
121
+ fromBlock: address.lastSyncBlock ? BigInt(address.lastSyncBlock) : null
122
+ }
118
123
  });
124
+ return {
125
+ transactions: result.transactions,
126
+ latestBlock: result.latestBlock.toString()
127
+ };
119
128
  }
120
129
  );
121
130
  if (transactions.transactions.length > 0) {
122
131
  await step.do(
123
- "process new transactions and update lastSyncAt",
132
+ `process new transactions and update lastSyncAt`,
124
133
  async () => {
125
134
  const createCommands = transactions.transactions.map(
126
135
  (tx) => createTransactionCommand(db, { transaction: tx }).command
@@ -159,7 +168,7 @@ class BlockchainSyncAddressTransactions extends WorkflowEntrypoint {
159
168
  }).command;
160
169
  const updateLastSyncBlockCommand = updateAddressLastSyncBlockCommand(db, {
161
170
  addressId: address.id,
162
- lastSyncBlock: transactions.latestBlock
171
+ lastSyncBlock: BigInt(transactions.latestBlock)
163
172
  }).command;
164
173
  if (eventsToEmit.length) {
165
174
  await db.batch(
@@ -182,11 +191,11 @@ class BlockchainSyncAddressTransactions extends WorkflowEntrypoint {
182
191
  );
183
192
  }
184
193
  await step.sleep(
185
- "sleep until next sync",
194
+ `sleep until next sync`,
186
195
  `${address.syncIntervalS} seconds`
187
196
  );
188
197
  }
189
198
  }
190
199
  }
191
200
 
192
- export { BlockchainSyncAddressTransactions };
201
+ export { BlockchainSyncAddressTxs };
@@ -27,7 +27,7 @@ function defineBlockchainServiceWrangler(config) {
27
27
  {
28
28
  binding: "SYNC_ADDRESS_TRANSACTIONS_WORKFLOW",
29
29
  name: `${project}-blockchain-sync-address-transactions`,
30
- class_name: "BlockchainSyncAddressTransactions"
30
+ class_name: "BlockchainSyncAddressTxs"
31
31
  }
32
32
  ],
33
33
  queues: {
@@ -25,7 +25,7 @@ function defineBlockchainServiceWrangler(config) {
25
25
  {
26
26
  binding: "SYNC_ADDRESS_TRANSACTIONS_WORKFLOW",
27
27
  name: `${project}-blockchain-sync-address-transactions`,
28
- class_name: "BlockchainSyncAddressTransactions"
28
+ class_name: "BlockchainSyncAddressTxs"
29
29
  }
30
30
  ],
31
31
  queues: {
@@ -1,5 +1,5 @@
1
1
  import { base } from '@develit-io/backend-sdk';
2
- import { sqliteTable, text, integer, blob } from 'drizzle-orm/sqlite-core';
2
+ import { sqliteTable, text, integer, blob, uniqueIndex } from 'drizzle-orm/sqlite-core';
3
3
  import { a as CREDENTIALS_TYPES, C as CHAIN_KEYS } from './blockchain.CKh8Fs7w.mjs';
4
4
 
5
5
  const address = sqliteTable("address", {
@@ -36,22 +36,26 @@ const tokens = sqliteTable("tokens", {
36
36
  name: text("name")
37
37
  });
38
38
 
39
- const transaction = sqliteTable("transaction", {
40
- ...base,
41
- hash: text("hash"),
42
- from: text("from"),
43
- to: text("to"),
44
- value: text("value"),
45
- blockNumber: text("block_number"),
46
- blockHash: text("blockHash"),
47
- gasUsed: text("gasUsed"),
48
- gasPrice: text("gasPrice"),
49
- timestamp: integer("timestamp"),
50
- status: text("status"),
51
- decimals: integer("decimals"),
52
- connector: text("connector").$type(),
53
- ticker: text("ticker")
54
- });
39
+ const transaction = sqliteTable(
40
+ "transaction",
41
+ {
42
+ ...base,
43
+ hash: text("hash"),
44
+ from: text("from"),
45
+ to: text("to"),
46
+ value: text("value"),
47
+ blockNumber: text("block_number"),
48
+ blockHash: text("blockHash"),
49
+ gasUsed: text("gasUsed"),
50
+ gasPrice: text("gasPrice"),
51
+ timestamp: integer("timestamp"),
52
+ status: text("status"),
53
+ decimals: integer("decimals"),
54
+ connector: text("connector").$type(),
55
+ ticker: text("ticker")
56
+ },
57
+ (t) => [uniqueIndex("transaction_hash_unique").on(t.hash)]
58
+ );
55
59
 
56
60
  const schema = {
57
61
  __proto__: null,
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const database_schema = require('./blockchain.CbmnjjFl.cjs');
3
+ const database_schema = require('./blockchain.ZJPECySM.cjs');
4
4
  require('drizzle-orm');
5
5
  const backendSdk = require('@develit-io/backend-sdk');
6
6
  const viem = require('viem');
@@ -38,22 +38,26 @@ const tokens = sqliteCore.sqliteTable("tokens", {
38
38
  name: sqliteCore.text("name")
39
39
  });
40
40
 
41
- const transaction = sqliteCore.sqliteTable("transaction", {
42
- ...backendSdk.base,
43
- hash: sqliteCore.text("hash"),
44
- from: sqliteCore.text("from"),
45
- to: sqliteCore.text("to"),
46
- value: sqliteCore.text("value"),
47
- blockNumber: sqliteCore.text("block_number"),
48
- blockHash: sqliteCore.text("blockHash"),
49
- gasUsed: sqliteCore.text("gasUsed"),
50
- gasPrice: sqliteCore.text("gasPrice"),
51
- timestamp: sqliteCore.integer("timestamp"),
52
- status: sqliteCore.text("status"),
53
- decimals: sqliteCore.integer("decimals"),
54
- connector: sqliteCore.text("connector").$type(),
55
- ticker: sqliteCore.text("ticker")
56
- });
41
+ const transaction = sqliteCore.sqliteTable(
42
+ "transaction",
43
+ {
44
+ ...backendSdk.base,
45
+ hash: sqliteCore.text("hash"),
46
+ from: sqliteCore.text("from"),
47
+ to: sqliteCore.text("to"),
48
+ value: sqliteCore.text("value"),
49
+ blockNumber: sqliteCore.text("block_number"),
50
+ blockHash: sqliteCore.text("blockHash"),
51
+ gasUsed: sqliteCore.text("gasUsed"),
52
+ gasPrice: sqliteCore.text("gasPrice"),
53
+ timestamp: sqliteCore.integer("timestamp"),
54
+ status: sqliteCore.text("status"),
55
+ decimals: sqliteCore.integer("decimals"),
56
+ connector: sqliteCore.text("connector").$type(),
57
+ ticker: sqliteCore.text("ticker")
58
+ },
59
+ (t) => [sqliteCore.uniqueIndex("transaction_hash_unique").on(t.hash)]
60
+ );
57
61
 
58
62
  const schema = {
59
63
  __proto__: null,
@@ -1,4 +1,4 @@
1
- import { s as schema } from './blockchain._nv3VxNA.mjs';
1
+ import { s as schema } from './blockchain.BKGlFbOW.mjs';
2
2
  import 'drizzle-orm';
3
3
  import { useResult, createInternalError } from '@develit-io/backend-sdk';
4
4
  import { createPublicClient, http, createWalletClient, encodeFunctionData, parseUnits } from 'viem';
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.DUhjXgba.cjs';
2
2
  import { BaseEvent } from '@develit-io/backend-sdk';
3
- import { t as tables } from './shared/blockchain.CaPQzwns.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.CaPQzwns.cjs';
3
+ import { t as tables } from './shared/blockchain.Br6esGv4.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.Br6esGv4.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 { C as CHAIN_KEYS, a as CREDENTIALS_TYPES, b as CredentialsType, L as LastSyncMetadata } from './shared/blockchain.DUhjXgba.mjs';
2
2
  import { BaseEvent } from '@develit-io/backend-sdk';
3
- import { t as tables } from './shared/blockchain.CvNI0YTF.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.CvNI0YTF.mjs';
3
+ import { t as tables } from './shared/blockchain.DcWSUM60.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.DcWSUM60.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 { C as CHAIN_KEYS, a as CREDENTIALS_TYPES, b as CredentialsType, L as LastSyncMetadata } from './shared/blockchain.DUhjXgba.js';
2
2
  import { BaseEvent } from '@develit-io/backend-sdk';
3
- import { t as tables } from './shared/blockchain.7cRY-udH.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.7cRY-udH.js';
3
+ import { t as tables } from './shared/blockchain.DurPotrN.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.DurPotrN.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/blockchain",
3
- "version": "0.8.3",
3
+ "version": "0.8.5",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -56,6 +56,6 @@
56
56
  "zod": "^4.1.13"
57
57
  },
58
58
  "dependencies": {
59
- "viem": "^2.45.1"
59
+ "viem": "^2.46.1"
60
60
  }
61
61
  }
@@ -12,9 +12,9 @@ declare const getBlockInputSchema: z.ZodObject<{
12
12
  SCROLL: "SCROLL";
13
13
  }>;
14
14
  blockTag: z.ZodOptional<z.ZodEnum<{
15
- pending: "pending";
16
15
  latest: "latest";
17
16
  earliest: "earliest";
17
+ pending: "pending";
18
18
  safe: "safe";
19
19
  finalized: "finalized";
20
20
  }>>;
@@ -93,9 +93,9 @@ declare const getTransactionOutputSchema: z.ZodObject<{
93
93
  nonce: z.ZodNumber;
94
94
  transactionIndex: z.ZodNullable<z.ZodNumber>;
95
95
  status: z.ZodEnum<{
96
+ pending: "pending";
96
97
  success: "success";
97
98
  reverted: "reverted";
98
- pending: "pending";
99
99
  }>;
100
100
  gasUsed: z.ZodNullable<z.ZodString>;
101
101
  timestamp: z.ZodNullable<z.ZodNumber>;
@@ -12,9 +12,9 @@ declare const getBlockInputSchema: z.ZodObject<{
12
12
  SCROLL: "SCROLL";
13
13
  }>;
14
14
  blockTag: z.ZodOptional<z.ZodEnum<{
15
- pending: "pending";
16
15
  latest: "latest";
17
16
  earliest: "earliest";
17
+ pending: "pending";
18
18
  safe: "safe";
19
19
  finalized: "finalized";
20
20
  }>>;
@@ -93,9 +93,9 @@ declare const getTransactionOutputSchema: z.ZodObject<{
93
93
  nonce: z.ZodNumber;
94
94
  transactionIndex: z.ZodNullable<z.ZodNumber>;
95
95
  status: z.ZodEnum<{
96
+ pending: "pending";
96
97
  success: "success";
97
98
  reverted: "reverted";
98
- pending: "pending";
99
99
  }>;
100
100
  gasUsed: z.ZodNullable<z.ZodString>;
101
101
  timestamp: z.ZodNullable<z.ZodNumber>;
@@ -12,9 +12,9 @@ declare const getBlockInputSchema: z.ZodObject<{
12
12
  SCROLL: "SCROLL";
13
13
  }>;
14
14
  blockTag: z.ZodOptional<z.ZodEnum<{
15
- pending: "pending";
16
15
  latest: "latest";
17
16
  earliest: "earliest";
17
+ pending: "pending";
18
18
  safe: "safe";
19
19
  finalized: "finalized";
20
20
  }>>;
@@ -93,9 +93,9 @@ declare const getTransactionOutputSchema: z.ZodObject<{
93
93
  nonce: z.ZodNumber;
94
94
  transactionIndex: z.ZodNullable<z.ZodNumber>;
95
95
  status: z.ZodEnum<{
96
+ pending: "pending";
96
97
  success: "success";
97
98
  reverted: "reverted";
98
- pending: "pending";
99
99
  }>;
100
100
  gasUsed: z.ZodNullable<z.ZodString>;
101
101
  timestamp: z.ZodNullable<z.ZodNumber>;