From 9e94d3ae15f837299a5ad1d024bf92a4dae22b60 Mon Sep 17 00:00:00 2001 From: Akash Shaw Date: Thu, 7 Mar 2024 18:09:19 +0530 Subject: [PATCH 1/6] chore: cleaning the txn table attributes --- .../down.sql | 4 ++++ .../up.sql | 1 + .../down.sql | 3 +++ .../up.sql | 1 + .../down.sql | 3 +++ .../up.sql | 1 + .../down.sql | 1 + .../up.sql | 1 + .../down.sql | 3 +++ .../up.sql | 1 + .../down.sql | 1 + .../up.sql | 1 + .../down.sql | 5 +++++ .../1709811810826_set_fk_public_transactions_clientId/up.sql | 5 +++++ .../down.sql | 1 + .../up.sql | 1 + .../down.sql | 3 +++ .../up.sql | 1 + .../down.sql | 4 ++++ .../up.sql | 2 ++ .../down.sql | 3 +++ .../up.sql | 1 + .../down.sql | 4 ++++ .../up.sql | 2 ++ 24 files changed, 53 insertions(+) create mode 100644 backend/hasura/hasura/migrations/default/1709811647893_alter_table_public_transactions_drop_column_blockTime/down.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811647893_alter_table_public_transactions_drop_column_blockTime/up.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811674183_alter_table_public_transactions_drop_column_preBalances/down.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811674183_alter_table_public_transactions_drop_column_preBalances/up.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811686850_alter_table_public_transactions_drop_column_postBalances/down.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811686850_alter_table_public_transactions_drop_column_postBalances/up.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811704205_alter_table_public_transactions_alter_column_recentBlockhash/down.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811704205_alter_table_public_transactions_alter_column_recentBlockhash/up.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811712397_alter_table_public_transactions_drop_column_signature/down.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811712397_alter_table_public_transactions_drop_column_signature/up.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811745810_alter_table_public_transactions_alter_column_hash/down.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811745810_alter_table_public_transactions_alter_column_hash/up.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811810826_set_fk_public_transactions_clientId/down.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811810826_set_fk_public_transactions_clientId/up.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811839113_alter_table_public_transactions_alter_column_hash/down.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811839113_alter_table_public_transactions_alter_column_hash/up.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811998056_alter_table_public_transactions_drop_column_nonce/down.sql create mode 100644 backend/hasura/hasura/migrations/default/1709811998056_alter_table_public_transactions_drop_column_nonce/up.sql create mode 100644 backend/hasura/hasura/migrations/default/1709814059944_alter_table_public_transactions_add_column_nonce/down.sql create mode 100644 backend/hasura/hasura/migrations/default/1709814059944_alter_table_public_transactions_add_column_nonce/up.sql create mode 100644 backend/hasura/hasura/migrations/default/1709814947154_alter_table_public_transactions_drop_column_nonce/down.sql create mode 100644 backend/hasura/hasura/migrations/default/1709814947154_alter_table_public_transactions_drop_column_nonce/up.sql create mode 100644 backend/hasura/hasura/migrations/default/1709815035598_alter_table_public_transactions_add_column_nonce/down.sql create mode 100644 backend/hasura/hasura/migrations/default/1709815035598_alter_table_public_transactions_add_column_nonce/up.sql diff --git a/backend/hasura/hasura/migrations/default/1709811647893_alter_table_public_transactions_drop_column_blockTime/down.sql b/backend/hasura/hasura/migrations/default/1709811647893_alter_table_public_transactions_drop_column_blockTime/down.sql new file mode 100644 index 00000000..7fd80880 --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811647893_alter_table_public_transactions_drop_column_blockTime/down.sql @@ -0,0 +1,4 @@ +comment on column "public"."transactions"."blockTime" is E'transactions table '; +alter table "public"."transactions" add constraint "transactions_block_time_key" unique (blockTime); +alter table "public"."transactions" alter column "blockTime" drop not null; +alter table "public"."transactions" add column "blockTime" int8; diff --git a/backend/hasura/hasura/migrations/default/1709811647893_alter_table_public_transactions_drop_column_blockTime/up.sql b/backend/hasura/hasura/migrations/default/1709811647893_alter_table_public_transactions_drop_column_blockTime/up.sql new file mode 100644 index 00000000..c7d13f06 --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811647893_alter_table_public_transactions_drop_column_blockTime/up.sql @@ -0,0 +1 @@ +alter table "public"."transactions" drop column "blockTime" cascade; diff --git a/backend/hasura/hasura/migrations/default/1709811674183_alter_table_public_transactions_drop_column_preBalances/down.sql b/backend/hasura/hasura/migrations/default/1709811674183_alter_table_public_transactions_drop_column_preBalances/down.sql new file mode 100644 index 00000000..2d3e4152 --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811674183_alter_table_public_transactions_drop_column_preBalances/down.sql @@ -0,0 +1,3 @@ +comment on column "public"."transactions"."preBalances" is E'transactions table '; +alter table "public"."transactions" alter column "preBalances" drop not null; +alter table "public"."transactions" add column "preBalances" jsonb; diff --git a/backend/hasura/hasura/migrations/default/1709811674183_alter_table_public_transactions_drop_column_preBalances/up.sql b/backend/hasura/hasura/migrations/default/1709811674183_alter_table_public_transactions_drop_column_preBalances/up.sql new file mode 100644 index 00000000..91cddd19 --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811674183_alter_table_public_transactions_drop_column_preBalances/up.sql @@ -0,0 +1 @@ +alter table "public"."transactions" drop column "preBalances" cascade; diff --git a/backend/hasura/hasura/migrations/default/1709811686850_alter_table_public_transactions_drop_column_postBalances/down.sql b/backend/hasura/hasura/migrations/default/1709811686850_alter_table_public_transactions_drop_column_postBalances/down.sql new file mode 100644 index 00000000..0878dc7e --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811686850_alter_table_public_transactions_drop_column_postBalances/down.sql @@ -0,0 +1,3 @@ +comment on column "public"."transactions"."postBalances" is E'transactions table '; +alter table "public"."transactions" alter column "postBalances" drop not null; +alter table "public"."transactions" add column "postBalances" jsonb; diff --git a/backend/hasura/hasura/migrations/default/1709811686850_alter_table_public_transactions_drop_column_postBalances/up.sql b/backend/hasura/hasura/migrations/default/1709811686850_alter_table_public_transactions_drop_column_postBalances/up.sql new file mode 100644 index 00000000..6fa644da --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811686850_alter_table_public_transactions_drop_column_postBalances/up.sql @@ -0,0 +1 @@ +alter table "public"."transactions" drop column "postBalances" cascade; diff --git a/backend/hasura/hasura/migrations/default/1709811704205_alter_table_public_transactions_alter_column_recentBlockhash/down.sql b/backend/hasura/hasura/migrations/default/1709811704205_alter_table_public_transactions_alter_column_recentBlockhash/down.sql new file mode 100644 index 00000000..9e1b2a5f --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811704205_alter_table_public_transactions_alter_column_recentBlockhash/down.sql @@ -0,0 +1 @@ +alter table "public"."transactions" rename column "blockHash" to "recentBlockhash"; diff --git a/backend/hasura/hasura/migrations/default/1709811704205_alter_table_public_transactions_alter_column_recentBlockhash/up.sql b/backend/hasura/hasura/migrations/default/1709811704205_alter_table_public_transactions_alter_column_recentBlockhash/up.sql new file mode 100644 index 00000000..27f16af0 --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811704205_alter_table_public_transactions_alter_column_recentBlockhash/up.sql @@ -0,0 +1 @@ +alter table "public"."transactions" rename column "recentBlockhash" to "blockHash"; diff --git a/backend/hasura/hasura/migrations/default/1709811712397_alter_table_public_transactions_drop_column_signature/down.sql b/backend/hasura/hasura/migrations/default/1709811712397_alter_table_public_transactions_drop_column_signature/down.sql new file mode 100644 index 00000000..3a0e9ef3 --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811712397_alter_table_public_transactions_drop_column_signature/down.sql @@ -0,0 +1,3 @@ +comment on column "public"."transactions"."signature" is E'transactions table '; +alter table "public"."transactions" alter column "signature" drop not null; +alter table "public"."transactions" add column "signature" jsonb; diff --git a/backend/hasura/hasura/migrations/default/1709811712397_alter_table_public_transactions_drop_column_signature/up.sql b/backend/hasura/hasura/migrations/default/1709811712397_alter_table_public_transactions_drop_column_signature/up.sql new file mode 100644 index 00000000..3fac2adb --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811712397_alter_table_public_transactions_drop_column_signature/up.sql @@ -0,0 +1 @@ +alter table "public"."transactions" drop column "signature" cascade; diff --git a/backend/hasura/hasura/migrations/default/1709811745810_alter_table_public_transactions_alter_column_hash/down.sql b/backend/hasura/hasura/migrations/default/1709811745810_alter_table_public_transactions_alter_column_hash/down.sql new file mode 100644 index 00000000..b91f0a41 --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811745810_alter_table_public_transactions_alter_column_hash/down.sql @@ -0,0 +1 @@ +alter table "public"."transactions" alter column "hash" drop not null; diff --git a/backend/hasura/hasura/migrations/default/1709811745810_alter_table_public_transactions_alter_column_hash/up.sql b/backend/hasura/hasura/migrations/default/1709811745810_alter_table_public_transactions_alter_column_hash/up.sql new file mode 100644 index 00000000..b70c15eb --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811745810_alter_table_public_transactions_alter_column_hash/up.sql @@ -0,0 +1 @@ +alter table "public"."transactions" alter column "hash" set not null; diff --git a/backend/hasura/hasura/migrations/default/1709811810826_set_fk_public_transactions_clientId/down.sql b/backend/hasura/hasura/migrations/default/1709811810826_set_fk_public_transactions_clientId/down.sql new file mode 100644 index 00000000..45264b1f --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811810826_set_fk_public_transactions_clientId/down.sql @@ -0,0 +1,5 @@ +alter table "public"."transactions" drop constraint "transactions_clientId_fkey", + add constraint "transactions_client_id_fkey" + foreign key ("clientId") + references "public"."client" + ("id") on update restrict on delete restrict; diff --git a/backend/hasura/hasura/migrations/default/1709811810826_set_fk_public_transactions_clientId/up.sql b/backend/hasura/hasura/migrations/default/1709811810826_set_fk_public_transactions_clientId/up.sql new file mode 100644 index 00000000..0934135a --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811810826_set_fk_public_transactions_clientId/up.sql @@ -0,0 +1,5 @@ +alter table "public"."transactions" drop constraint "transactions_client_id_fkey", + add constraint "transactions_clientId_fkey" + foreign key ("clientId") + references "public"."client" + ("id") on update restrict on delete restrict; diff --git a/backend/hasura/hasura/migrations/default/1709811839113_alter_table_public_transactions_alter_column_hash/down.sql b/backend/hasura/hasura/migrations/default/1709811839113_alter_table_public_transactions_alter_column_hash/down.sql new file mode 100644 index 00000000..7e2d46c6 --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811839113_alter_table_public_transactions_alter_column_hash/down.sql @@ -0,0 +1 @@ +alter table "public"."transactions" drop constraint "transactions_hash_key"; diff --git a/backend/hasura/hasura/migrations/default/1709811839113_alter_table_public_transactions_alter_column_hash/up.sql b/backend/hasura/hasura/migrations/default/1709811839113_alter_table_public_transactions_alter_column_hash/up.sql new file mode 100644 index 00000000..65c53d01 --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811839113_alter_table_public_transactions_alter_column_hash/up.sql @@ -0,0 +1 @@ +alter table "public"."transactions" add constraint "transactions_hash_key" unique ("hash"); diff --git a/backend/hasura/hasura/migrations/default/1709811998056_alter_table_public_transactions_drop_column_nonce/down.sql b/backend/hasura/hasura/migrations/default/1709811998056_alter_table_public_transactions_drop_column_nonce/down.sql new file mode 100644 index 00000000..9a9b3da6 --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811998056_alter_table_public_transactions_drop_column_nonce/down.sql @@ -0,0 +1,3 @@ +comment on column "public"."transactions"."nonce" is E'transactions table '; +alter table "public"."transactions" alter column "nonce" drop not null; +alter table "public"."transactions" add column "nonce" int4; diff --git a/backend/hasura/hasura/migrations/default/1709811998056_alter_table_public_transactions_drop_column_nonce/up.sql b/backend/hasura/hasura/migrations/default/1709811998056_alter_table_public_transactions_drop_column_nonce/up.sql new file mode 100644 index 00000000..76f3fd05 --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709811998056_alter_table_public_transactions_drop_column_nonce/up.sql @@ -0,0 +1 @@ +alter table "public"."transactions" drop column "nonce" cascade; diff --git a/backend/hasura/hasura/migrations/default/1709814059944_alter_table_public_transactions_add_column_nonce/down.sql b/backend/hasura/hasura/migrations/default/1709814059944_alter_table_public_transactions_add_column_nonce/down.sql new file mode 100644 index 00000000..8093f0ce --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709814059944_alter_table_public_transactions_add_column_nonce/down.sql @@ -0,0 +1,4 @@ +-- Could not auto-generate a down migration. +-- Please write an appropriate down migration for the SQL below: +-- alter table "public"."transactions" add column "nonce" bigint +-- null; diff --git a/backend/hasura/hasura/migrations/default/1709814059944_alter_table_public_transactions_add_column_nonce/up.sql b/backend/hasura/hasura/migrations/default/1709814059944_alter_table_public_transactions_add_column_nonce/up.sql new file mode 100644 index 00000000..7b0d24b7 --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709814059944_alter_table_public_transactions_add_column_nonce/up.sql @@ -0,0 +1,2 @@ +alter table "public"."transactions" add column "nonce" bigint + null; diff --git a/backend/hasura/hasura/migrations/default/1709814947154_alter_table_public_transactions_drop_column_nonce/down.sql b/backend/hasura/hasura/migrations/default/1709814947154_alter_table_public_transactions_drop_column_nonce/down.sql new file mode 100644 index 00000000..d2a92fe5 --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709814947154_alter_table_public_transactions_drop_column_nonce/down.sql @@ -0,0 +1,3 @@ +comment on column "public"."transactions"."nonce" is E'transactions table '; +alter table "public"."transactions" alter column "nonce" drop not null; +alter table "public"."transactions" add column "nonce" int8; diff --git a/backend/hasura/hasura/migrations/default/1709814947154_alter_table_public_transactions_drop_column_nonce/up.sql b/backend/hasura/hasura/migrations/default/1709814947154_alter_table_public_transactions_drop_column_nonce/up.sql new file mode 100644 index 00000000..76f3fd05 --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709814947154_alter_table_public_transactions_drop_column_nonce/up.sql @@ -0,0 +1 @@ +alter table "public"."transactions" drop column "nonce" cascade; diff --git a/backend/hasura/hasura/migrations/default/1709815035598_alter_table_public_transactions_add_column_nonce/down.sql b/backend/hasura/hasura/migrations/default/1709815035598_alter_table_public_transactions_add_column_nonce/down.sql new file mode 100644 index 00000000..8093f0ce --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709815035598_alter_table_public_transactions_add_column_nonce/down.sql @@ -0,0 +1,4 @@ +-- Could not auto-generate a down migration. +-- Please write an appropriate down migration for the SQL below: +-- alter table "public"."transactions" add column "nonce" bigint +-- null; diff --git a/backend/hasura/hasura/migrations/default/1709815035598_alter_table_public_transactions_add_column_nonce/up.sql b/backend/hasura/hasura/migrations/default/1709815035598_alter_table_public_transactions_add_column_nonce/up.sql new file mode 100644 index 00000000..7b0d24b7 --- /dev/null +++ b/backend/hasura/hasura/migrations/default/1709815035598_alter_table_public_transactions_add_column_nonce/up.sql @@ -0,0 +1,2 @@ +alter table "public"."transactions" add column "nonce" bigint + null; From 84597bd775b2753b47a4178b916220dae484f7e6 Mon Sep 17 00:00:00 2001 From: Akash Shaw Date: Thu, 7 Mar 2024 18:09:54 +0530 Subject: [PATCH 2/6] chore: changing the publisher according to new types --- packages/kafka/src/db/address.ts | 7 +- packages/kafka/src/db/client.ts | 400 ++++++++++++++++++++++-- packages/kafka/src/db/index.ts | 4 +- packages/kafka/src/db/transaction.ts | 62 ++-- packages/kafka/src/index.ts | 6 +- packages/kafka/src/producer/producer.ts | 22 +- 6 files changed, 418 insertions(+), 83 deletions(-) diff --git a/packages/kafka/src/db/address.ts b/packages/kafka/src/db/address.ts index 8bc4b933..4dab1482 100644 --- a/packages/kafka/src/db/address.ts +++ b/packages/kafka/src/db/address.ts @@ -1,10 +1,5 @@ import { Chain } from "@paybox/zeus"; -import { - HASURA_ADMIN_SERCRET, - HASURA_URL, - JWT, - dbResStatus, -} from "@paybox/common"; +import { HASURA_ADMIN_SERCRET, HASURA_URL, JWT, dbResStatus } from "@paybox/common"; const chain = Chain(HASURA_URL, { headers: { diff --git a/packages/kafka/src/db/client.ts b/packages/kafka/src/db/client.ts index 1a8fd50a..a2247d4e 100644 --- a/packages/kafka/src/db/client.ts +++ b/packages/kafka/src/db/client.ts @@ -1,10 +1,20 @@ import { Chain } from "@paybox/zeus"; import { + AccountType, + Address, + BitcoinKey, + Client, + EthKey, HASURA_ADMIN_SERCRET, HASURA_URL, + SolKey, + WalletKeys, JWT, dbResStatus, + getClientId } from "@paybox/common"; +import { Wallet, ethers } from "ethers"; +import { Keypair } from "@solana/web3.js"; const chain = Chain(HASURA_URL, { headers: { @@ -14,12 +24,16 @@ const chain = Chain(HASURA_URL, { }); /** + * * @param username * @param email * @param firstname * @param lastname * @param hashPassword * @param mobile + * @param seed + * @param solKeys + * @param ethKeys * @returns */ export const createClient = async ( @@ -29,12 +43,21 @@ export const createClient = async ( lastname: string | undefined, hashPassword: string, mobile: number | null, + seed: string, + solKeys: WalletKeys, + ethKeys: WalletKeys, ): Promise<{ id?: unknown; address?: unknown; + walletId?: unknown; + accountId?: unknown; + sol?: SolKey; + eth?: EthKey; + bitcoin?: BitcoinKey; + usdc?: EthKey; status: dbResStatus; }> => { - const response = await chain("mutation")( + const clientResponse = await chain("mutation")( { insert_client_one: [ { @@ -61,8 +84,87 @@ export const createClient = async ( }, { operationName: "createClient" }, ); - if (response.insert_client_one?.id) { - return { ...response.insert_client_one, status: dbResStatus.Ok }; + if (clientResponse.insert_client_one?.id) { + const createWallet = await chain("mutation")( + { + insert_wallet_one: [ + { + object: { + clientId: clientResponse.insert_client_one.id, + secretPhase: seed, + accounts: { + data: [ + { + clientId: clientResponse.insert_client_one.id, + sol: { + data: { + publicKey: solKeys.publicKey, + privateKey: solKeys.privateKey, + }, + }, + eth: { + data: { + publicKey: ethKeys.publicKey, + privateKey: ethKeys.privateKey, + }, + }, + name: "Account 1", + }, + ], + }, + }, + }, + { + id: true, + accounts: [ + { + limit: 1, + }, + { + id: true, + eth: { + publicKey: true, + goerliEth: true, + kovanEth: true, + mainnetEth: true, + rinkebyEth: true, + ropstenEth: true, + sepoliaEth: true, + }, + sol: { + publicKey: true, + devnetSol: true, + mainnetSol: true, + testnetSol: true, + }, + walletId: true, + bitcoin: { + publicKey: true, + mainnetBtc: true, + regtestBtc: true, + textnetBtc: true, + }, + }, + ], + }, + ], + }, + { operationName: "createWallet" }, + ); + + if (createWallet.insert_wallet_one?.id) { + return { + ...clientResponse.insert_client_one, + walletId: createWallet.insert_wallet_one.id, + sol: createWallet.insert_wallet_one.accounts[0].sol as SolKey, + eth: createWallet.insert_wallet_one.accounts[0].eth as EthKey, + bitcoin: createWallet.insert_wallet_one.accounts[0] + .bitcoin as BitcoinKey, + accountId: createWallet.insert_wallet_one.accounts[0].id, + status: dbResStatus.Ok, + }; + } + return { ...clientResponse.insert_client_one, status: dbResStatus.Ok }; } return { status: dbResStatus.Error, @@ -140,9 +242,7 @@ export const conflictClient = async ( email: string, ): Promise<{ status: dbResStatus; - client?: { - id?: unknown; - }[]; + client?: getClientId[]; }> => { const response = await chain("query")( { @@ -181,16 +281,7 @@ export const checkClient = async ( username: string, email: string, ): Promise<{ - client?: { - username?: unknown; - email?: unknown; - firstname?: unknown; - lastname?: unknown; - mobile?: unknown; - id?: unknown; - address?: unknown; - password?: unknown; - }[]; + client?: Client; status: dbResStatus; }> => { const response = await chain("query")( @@ -223,9 +314,9 @@ export const checkClient = async ( }, { operationName: "checkClient" }, ); - if (response.client.length) { + if (response.client[0].id) { return { - ...response, + client: response.client[0] as Client, status: dbResStatus.Ok, }; } @@ -438,3 +529,276 @@ export const deleteClient = async ( }; // And continue + +/** + * + * @param id + * @returns + */ +export const getPassword = async ( + id: string, +): Promise<{ + status: dbResStatus; + hashPassword?: string; +}> => { + const response = await chain("query")( + { + client: [ + { + limit: 1, + where: { + id: { _eq: id }, + }, + }, + { + password: true, + }, + ], + }, + { operationName: "getPassword" }, + ); + if (response.client[0].password) { + return { + status: dbResStatus.Ok, + hashPassword: response.client[0].password, + }; + } + return { + status: dbResStatus.Error, + }; +}; + +/** + * + * @param id + * @param password + * @returns + */ +export const updatePassword = async ( + id: string, + password: string, +): Promise<{ + status: dbResStatus; +}> => { + const response = await chain("mutation")( + { + update_client: [ + { + where: { + id: { _eq: id }, + }, + _set: { + password, + }, + }, + { + returning: { + id: true, + }, + }, + ], + }, + { operationName: "updatePassword" }, + ); + if (response.update_client?.returning[0].id) { + return { + status: dbResStatus.Ok, + }; + } + return { + status: dbResStatus.Error, + }; +}; + +/** + * + * @param username + * @param email + * @param firstname + * @param lastname + * @param hashPassword + * @param mobile + * @returns + */ +export const createBaseClient = async ( + username: string, + email: string, + firstname: string | undefined, + lastname: string | undefined, + hashPassword: string, + mobile: number | null, +): Promise<{ + status: dbResStatus, + id?: string, + address?: Address, +}> => { + const response = await chain("mutation")({ + insert_client_one: [{ + object: { + firstname, + email, + username, + lastname, + mobile: mobile || null, + password: hashPassword, + }, + }, + { + id: true, + address: { + bitcoin: true, + eth: true, + sol: true, + usdc: true, + id: true, + }, + }] + }, {operationName: "createBaseClient"}); + if (response.insert_client_one?.id) { + return { + id: response.insert_client_one.id as string, + address: response.insert_client_one.address as Address, + status: dbResStatus.Ok + } + } + return { + status: dbResStatus.Error + } +} + +/** + * + * @param id + * @param secretPhase + * @param name + * @param solKeys + * @param ethKeys + * @returns + */ +export const validateClient = async ( + id: string, + secretPhase: string, + name: string, + solKeys: WalletKeys, + ethKeys: WalletKeys, +): Promise<{ + status: dbResStatus, + valid?: boolean, + walletId?: string, + account?: AccountType +}> => { + const response = await chain("mutation")({ + update_client: [{ + where: { + id: { + _eq: id + } + }, + _set: { + valid: true + } + }, { + returning: { + valid: true + } + }] + }, {operationName: "validateClient"}); + + const createWallet = await chain("mutation")({ + insert_wallet_one: [{ + object: { + clientId: id, + secretPhase, + accounts: { + data: [ + { + clientId: id, + sol: { + data: solKeys + }, + eth: { + data: ethKeys + }, + name + } + ] + } + } + }, { + id: true, + accounts: [{ + limit: 1 + }, { + id: true, + eth: { + publicKey: true, + goerliEth: true, + kovanEth: true, + mainnetEth: true, + rinkebyEth: true, + ropstenEth: true, + sepoliaEth: true + }, + sol: { + publicKey: true, + devnetSol: true, + mainnetSol: true, + testnetSol: true + }, + walletId: true, + bitcoin: { + publicKey: true, + mainnetBtc: true, + regtestBtc: true, + textnetBtc: true + } + }] + }] + }, {operationName: "createWallet"}); + + if (response.update_client?.returning[0].valid && createWallet.insert_wallet_one?.id) { + return { + status: dbResStatus.Ok, + valid: response.update_client.returning[0].valid, + walletId: createWallet.insert_wallet_one.id as string, + account: createWallet.insert_wallet_one.accounts[0] as AccountType + } + } + return { + status: dbResStatus.Error + } +} + +/** + * + * @param id + * @returns + */ +export const queryValid = async ( + id: string +): Promise<{ + status: dbResStatus, + valid?: boolean +}> => { + const response = await chain("query")({ + client: [{ + where: { + id: { + _eq: id + } + }, + limit: 1, + }, { + valid: true + }] + }, {operationName: "queryValid"}); + if (Array.isArray(response.client)) { + return { + status: dbResStatus.Ok, + valid: response.client[0].valid + } + } + return { + status: dbResStatus.Error + } +} \ No newline at end of file diff --git a/packages/kafka/src/db/index.ts b/packages/kafka/src/db/index.ts index 656d338b..f7b16a4e 100644 --- a/packages/kafka/src/db/index.ts +++ b/packages/kafka/src/db/index.ts @@ -1,3 +1,3 @@ -export * from "./client"; export * from "./address"; -export * from "./transaction"; +export * from "./client"; +export * from "./transaction"; \ No newline at end of file diff --git a/packages/kafka/src/db/transaction.ts b/packages/kafka/src/db/transaction.ts index 7de475cf..b1b6af46 100644 --- a/packages/kafka/src/db/transaction.ts +++ b/packages/kafka/src/db/transaction.ts @@ -35,19 +35,16 @@ const chain = Chain(HASURA_URL, { */ export const insertTxn = async ({ clientId, - blockTime, + time, amount, fee, from, to, - postBalances, - preBalances, - recentBlockhash, - signature, + blockHash, + hash, network, slot, cluster, - nonce, chainId, }: InsertTxnType): Promise<{ status: dbResStatus; @@ -59,19 +56,15 @@ export const insertTxn = async ({ { object: { clientId, - signature, network, + hash, slot, amount, - blockTime, fee, from, to, - preBalances, - postBalances, - recentBlockhash, + blockHash, cluster, - nonce, chainId, }, }, @@ -121,22 +114,18 @@ export const getTxns = async ({ }, { id: true, - //@ts-ignore - signature: true, + hash: true, amount: true, - blockTime: true, + time: true, clientId: true, fee: true, - time: true, from: true, network: true, - //@ts-ignore - postBalances: true, - //@ts-ignore - preBalances: true, - recentBlockhash: true, + blockHash: true, slot: true, to: true, + cluster: true, + status: true }, ], }, @@ -161,7 +150,7 @@ export const getTxns = async ({ */ export const getTxnByHash = async ({ network, - sign, + hash, clientId, }: TxnQuerySignType): Promise<{ status: dbResStatus; @@ -173,29 +162,25 @@ export const getTxnByHash = async ({ transactions: [ { where: { - signature: { _contains: sign }, + hash: { _eq: hash }, clientId: { _eq: clientId }, network: { _eq: network }, }, }, { id: true, - //@ts-ignore - signature: true, amount: true, - blockTime: true, + time: true, clientId: true, fee: true, - time: true, from: true, network: true, - //@ts-ignore - postBalances: true, - //@ts-ignore - preBalances: true, - recentBlockhash: true, + blockHash: true, slot: true, to: true, + hash: true, + cluster: true, + status: true }, ], }, @@ -237,23 +222,18 @@ export const getAllTxn = async ({ }, { id: true, - //@ts-ignore - signature: true, + hash: true, amount: true, - blockTime: true, + time: true, clientId: true, fee: true, - time: true, from: true, network: true, - //@ts-ignore - postBalances: true, - //@ts-ignore - preBalances: true, - recentBlockhash: true, + blockHash: true, slot: true, to: true, cluster: true, + status: true }, ], }, diff --git a/packages/kafka/src/index.ts b/packages/kafka/src/index.ts index 1172d1f1..b700f23c 100644 --- a/packages/kafka/src/index.ts +++ b/packages/kafka/src/index.ts @@ -10,11 +10,11 @@ export * from "./db"; export const kafkaClient = new KafkaInstance(); (async () => { - await kafkaClient.init([{ topicName: "txn3", partitions: 2 }]); + await kafkaClient.init([{ topicName: "txn4", partitions: 2 }]); await kafkaClient.connectProducer(); const consumer = await kafkaClient.connectCounsumer( - "sendTxn3", - ["txn3"], + "sendTxn4", + ["txn4"], true, ); await consumer.run({ diff --git a/packages/kafka/src/producer/producer.ts b/packages/kafka/src/producer/producer.ts index c8c3f5d9..61b63be8 100644 --- a/packages/kafka/src/producer/producer.ts +++ b/packages/kafka/src/producer/producer.ts @@ -1,4 +1,4 @@ -import { EthCluster, Network, TxnSolana } from "@paybox/common"; +import { EthCluster, Network, TxnSolana, unixToISOString } from "@paybox/common"; import { kafkaClient } from ".."; import { ConfirmedTransactionMeta } from "@solana/web3.js"; import { TransactionReceipt, TransactionResponse } from "ethers"; @@ -31,24 +31,21 @@ export const publishSolTxn = async ( //@ts-ignore const receiver = transaction.message?.accountKeys[1].toBase58(); await kafkaClient.publishOne({ - topic: "txn3", + topic: "txn4", message: [ { partition: 0, key: transaction.signatures[0] || "", value: JSON.stringify({ - signature: transaction.signatures, + hash: transaction.signatures[0], amount, - blockTime, fee: meta.fee, clientId, from: sender, to: receiver, - postBalances: meta.postBalances, - preBalances: meta.preBalances, - recentBlockhash: transaction.message.recentBlockhash, + blockHash: transaction.message.recentBlockhash, + time: unixToISOString(blockTime), slot, - nonce: slot, network, cluster }), @@ -71,22 +68,21 @@ export const publishEthTxn = async ( ): Promise => { try { await kafkaClient.publishOne({ - topic: "txn3", + topic: "txn4", message: [ { partition: 1, key: transaction.hash, value: JSON.stringify({ - signature: [transaction.hash], + hash: transaction.hash, amount, - blockTime: Number(transaction.blockNumber), + time: unixToISOString(Number(transaction.blockNumber)), fee: calculateGas(transaction.gasLimit, transaction.gasPrice), clientId, from: transaction.from, to: transaction.to, - recentBlockhash: transaction.blockHash, + blockHash: transaction.blockHash, chainId: Number(transaction.chainId), - nonce: Number(transaction.nonce), slot: Number(transaction.nonce), network, cluster, From 2fb9df41b1503a537a6280294158e8adcdfce5d6 Mon Sep 17 00:00:00 2001 From: Akash Shaw Date: Thu, 7 Mar 2024 18:10:54 +0530 Subject: [PATCH 3/6] chore(common): adding unixToISOString func, changing the query type --- packages/common/src/constant.ts | 20 ++++++++++++++++++- packages/common/src/types.ts | 19 ++++++++++-------- .../common/src/validations/transaction.ts | 2 +- 3 files changed, 31 insertions(+), 10 deletions(-) diff --git a/packages/common/src/constant.ts b/packages/common/src/constant.ts index 04567fb3..0b0abd82 100644 --- a/packages/common/src/constant.ts +++ b/packages/common/src/constant.ts @@ -236,4 +236,22 @@ export const getOtpTemplate = (name: string, otp: number, helpEmail: string) => ` } -export const R2_QRCODE_BUCKET_NAME = "paybox-qrcode"; \ No newline at end of file +export const R2_QRCODE_BUCKET_NAME = "paybox-qrcode"; + +export const unixToISOString = (unixTime: number): string => { + const date = new Date(unixTime * 1000); + const offset = -date.getTimezoneOffset(); + const offsetHours = Math.floor(offset / 60); + const offsetMinutes = Math.abs(offset) % 60; + + const dateString = date.toISOString().split('T')[0]; + const timeString = date.toTimeString().split(' ')[0]; + + const offsetString = + (offsetHours >= 0 ? '+' : '-') + + ('0' + Math.abs(offsetHours)).slice(-2) + + ':' + + ('0' + offsetMinutes).slice(-2); + + return `${dateString}T${timeString}.${date.getMilliseconds()}${offsetString}`; +} diff --git a/packages/common/src/types.ts b/packages/common/src/types.ts index d4ca0bba..4cbd30f9 100644 --- a/packages/common/src/types.ts +++ b/packages/common/src/types.ts @@ -78,18 +78,15 @@ export type TxnSendQueryType = z.infer; export type InsertTxnType = { clientId: string; - blockTime: number; + time: number; amount: number; fee: number; from: string; to: string; - postBalances?: number[] | null; - preBalances?: number[] | null; - recentBlockhash: string; - signature: string[]; + blockHash: string; + hash: string; network: Network; - slot?: number | null; - nonce?: number | null; + slot?: number; chainId?: number; cluster?: EthCluster | Cluster | BitcoinCluster | USDCCluster; }; @@ -97,6 +94,7 @@ export type InsertTxnType = { export type TxnType = InsertTxnType & { id: string; time?: string; + status?: string }; export type TxnsQeuryType = z.infer & { clientId: string }; @@ -270,4 +268,9 @@ export type NetworkPublicKeyType = z.infer; export enum WsMessageType { Index = "index", Message = "message" -} \ No newline at end of file +} + + +export type getClientId = { + id?: unknown; +}; diff --git a/packages/common/src/validations/transaction.ts b/packages/common/src/validations/transaction.ts index 32fd3eab..097a8c66 100644 --- a/packages/common/src/validations/transaction.ts +++ b/packages/common/src/validations/transaction.ts @@ -69,7 +69,7 @@ export const TxnsQeury = z.object({ export const TxnQeuryByHash = z.object({ network: z.nativeEnum(Network), - sign: z.string(), + hash: z.string(), }); export const TxnSchema = z.object({ From 5b91f8c9f3398185a50225f88c61d53fd5878859 Mon Sep 17 00:00:00 2001 From: Akash Shaw Date: Thu, 7 Mar 2024 18:11:11 +0530 Subject: [PATCH 4/6] chore(zeus): generating types --- backend/zeus/src/codegen/types.ts | 193 +----- backend/zeus/src/zeus/const.ts | 124 +--- backend/zeus/src/zeus/index.ts | 947 +++--------------------------- 3 files changed, 109 insertions(+), 1155 deletions(-) diff --git a/backend/zeus/src/codegen/types.ts b/backend/zeus/src/codegen/types.ts index ac6a6b19..8586f973 100644 --- a/backend/zeus/src/codegen/types.ts +++ b/backend/zeus/src/codegen/types.ts @@ -14,7 +14,6 @@ export type Scalars = { Float: { input: number; output: number; } bigint: { input: any; output: any; } float8: { input: any; output: any; } - jsonb: { input: any; output: any; } timestamptz: { input: any; output: any; } uuid: { input: any; output: any; } }; @@ -1559,34 +1558,6 @@ export type Float8_Comparison_Exp = { _nin?: InputMaybe>; }; -export type Jsonb_Cast_Exp = { - String?: InputMaybe; -}; - -/** Boolean expression to compare columns of type "jsonb". All fields are combined with logical 'AND'. */ -export type Jsonb_Comparison_Exp = { - _cast?: InputMaybe; - /** is the column contained in the given json value */ - _contained_in?: InputMaybe; - /** does the column contain the given json value at the top level */ - _contains?: InputMaybe; - _eq?: InputMaybe; - _gt?: InputMaybe; - _gte?: InputMaybe; - /** does the string exist as a top-level key in the column */ - _has_key?: InputMaybe; - /** do all of these strings exist as top-level keys in the column */ - _has_keys_all?: InputMaybe>; - /** do any of these strings exist as top-level keys in the column */ - _has_keys_any?: InputMaybe>; - _in?: InputMaybe>; - _is_null?: InputMaybe; - _lt?: InputMaybe; - _lte?: InputMaybe; - _neq?: InputMaybe; - _nin?: InputMaybe>; -}; - /** mutation root */ export type Mutation_Root = { __typename?: 'mutation_root'; @@ -2043,12 +2014,7 @@ export type Mutation_RootUpdate_Sol_ManyArgs = { /** mutation root */ export type Mutation_RootUpdate_TransactionsArgs = { - _append?: InputMaybe; - _delete_at_path?: InputMaybe; - _delete_elem?: InputMaybe; - _delete_key?: InputMaybe; _inc?: InputMaybe; - _prepend?: InputMaybe; _set?: InputMaybe; where: Transactions_Bool_Exp; }; @@ -2056,12 +2022,7 @@ export type Mutation_RootUpdate_TransactionsArgs = { /** mutation root */ export type Mutation_RootUpdate_Transactions_By_PkArgs = { - _append?: InputMaybe; - _delete_at_path?: InputMaybe; - _delete_elem?: InputMaybe; - _delete_key?: InputMaybe; _inc?: InputMaybe; - _prepend?: InputMaybe; _set?: InputMaybe; pk_columns: Transactions_Pk_Columns_Input; }; @@ -2964,7 +2925,7 @@ export type Timestamptz_Comparison_Exp = { export type Transactions = { __typename?: 'transactions'; amount: Scalars['float8']['output']; - blockTime: Scalars['bigint']['output']; + blockHash: Scalars['String']['output']; chainId?: Maybe; /** An object relationship */ client: Client; @@ -2972,38 +2933,16 @@ export type Transactions = { cluster?: Maybe; fee: Scalars['float8']['output']; from: Scalars['String']['output']; - hash?: Maybe; + hash: Scalars['String']['output']; id: Scalars['uuid']['output']; network: Scalars['String']['output']; nonce?: Maybe; - postBalances?: Maybe; - preBalances?: Maybe; - recentBlockhash: Scalars['String']['output']; - signature: Scalars['jsonb']['output']; slot?: Maybe; status: Scalars['String']['output']; time: Scalars['timestamptz']['output']; to: Scalars['String']['output']; }; - -/** transactions table */ -export type TransactionsPostBalancesArgs = { - path?: InputMaybe; -}; - - -/** transactions table */ -export type TransactionsPreBalancesArgs = { - path?: InputMaybe; -}; - - -/** transactions table */ -export type TransactionsSignatureArgs = { - path?: InputMaybe; -}; - /** aggregated selection of "transactions" */ export type Transactions_Aggregate = { __typename?: 'transactions_aggregate'; @@ -3134,13 +3073,6 @@ export type Transactions_Aggregate_Order_By = { variance?: InputMaybe; }; -/** append existing jsonb value of filtered columns with new jsonb value */ -export type Transactions_Append_Input = { - postBalances?: InputMaybe; - preBalances?: InputMaybe; - signature?: InputMaybe; -}; - /** input type for inserting array relation for remote table "transactions" */ export type Transactions_Arr_Rel_Insert_Input = { data: Array; @@ -3152,7 +3084,6 @@ export type Transactions_Arr_Rel_Insert_Input = { export type Transactions_Avg_Fields = { __typename?: 'transactions_avg_fields'; amount?: Maybe; - blockTime?: Maybe; chainId?: Maybe; fee?: Maybe; nonce?: Maybe; @@ -3162,7 +3093,6 @@ export type Transactions_Avg_Fields = { /** order by avg() on columns of table "transactions" */ export type Transactions_Avg_Order_By = { amount?: InputMaybe; - blockTime?: InputMaybe; chainId?: InputMaybe; fee?: InputMaybe; nonce?: InputMaybe; @@ -3175,7 +3105,7 @@ export type Transactions_Bool_Exp = { _not?: InputMaybe; _or?: InputMaybe>; amount?: InputMaybe; - blockTime?: InputMaybe; + blockHash?: InputMaybe; chainId?: InputMaybe; client?: InputMaybe; clientId?: InputMaybe; @@ -3186,10 +3116,6 @@ export type Transactions_Bool_Exp = { id?: InputMaybe; network?: InputMaybe; nonce?: InputMaybe; - postBalances?: InputMaybe; - preBalances?: InputMaybe; - recentBlockhash?: InputMaybe; - signature?: InputMaybe; slot?: InputMaybe; status?: InputMaybe; time?: InputMaybe; @@ -3198,37 +3124,15 @@ export type Transactions_Bool_Exp = { /** unique or primary key constraints on table "transactions" */ export enum Transactions_Constraint { - /** unique or primary key constraint on columns "blockTime" */ - TransactionsBlockTimeKey = 'transactions_block_time_key', + /** unique or primary key constraint on columns "hash" */ + TransactionsHashKey = 'transactions_hash_key', /** unique or primary key constraint on columns "id" */ TransactionsPkey = 'transactions_pkey' } -/** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */ -export type Transactions_Delete_At_Path_Input = { - postBalances?: InputMaybe>; - preBalances?: InputMaybe>; - signature?: InputMaybe>; -}; - -/** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */ -export type Transactions_Delete_Elem_Input = { - postBalances?: InputMaybe; - preBalances?: InputMaybe; - signature?: InputMaybe; -}; - -/** delete key/value pair or string element. key/value pairs are matched based on their key value */ -export type Transactions_Delete_Key_Input = { - postBalances?: InputMaybe; - preBalances?: InputMaybe; - signature?: InputMaybe; -}; - /** input type for incrementing numeric columns in table "transactions" */ export type Transactions_Inc_Input = { amount?: InputMaybe; - blockTime?: InputMaybe; chainId?: InputMaybe; fee?: InputMaybe; nonce?: InputMaybe; @@ -3238,7 +3142,7 @@ export type Transactions_Inc_Input = { /** input type for inserting data into table "transactions" */ export type Transactions_Insert_Input = { amount?: InputMaybe; - blockTime?: InputMaybe; + blockHash?: InputMaybe; chainId?: InputMaybe; client?: InputMaybe; clientId?: InputMaybe; @@ -3249,10 +3153,6 @@ export type Transactions_Insert_Input = { id?: InputMaybe; network?: InputMaybe; nonce?: InputMaybe; - postBalances?: InputMaybe; - preBalances?: InputMaybe; - recentBlockhash?: InputMaybe; - signature?: InputMaybe; slot?: InputMaybe; status?: InputMaybe; time?: InputMaybe; @@ -3263,7 +3163,7 @@ export type Transactions_Insert_Input = { export type Transactions_Max_Fields = { __typename?: 'transactions_max_fields'; amount?: Maybe; - blockTime?: Maybe; + blockHash?: Maybe; chainId?: Maybe; clientId?: Maybe; cluster?: Maybe; @@ -3273,7 +3173,6 @@ export type Transactions_Max_Fields = { id?: Maybe; network?: Maybe; nonce?: Maybe; - recentBlockhash?: Maybe; slot?: Maybe; status?: Maybe; time?: Maybe; @@ -3283,7 +3182,7 @@ export type Transactions_Max_Fields = { /** order by max() on columns of table "transactions" */ export type Transactions_Max_Order_By = { amount?: InputMaybe; - blockTime?: InputMaybe; + blockHash?: InputMaybe; chainId?: InputMaybe; clientId?: InputMaybe; cluster?: InputMaybe; @@ -3293,7 +3192,6 @@ export type Transactions_Max_Order_By = { id?: InputMaybe; network?: InputMaybe; nonce?: InputMaybe; - recentBlockhash?: InputMaybe; slot?: InputMaybe; status?: InputMaybe; time?: InputMaybe; @@ -3304,7 +3202,7 @@ export type Transactions_Max_Order_By = { export type Transactions_Min_Fields = { __typename?: 'transactions_min_fields'; amount?: Maybe; - blockTime?: Maybe; + blockHash?: Maybe; chainId?: Maybe; clientId?: Maybe; cluster?: Maybe; @@ -3314,7 +3212,6 @@ export type Transactions_Min_Fields = { id?: Maybe; network?: Maybe; nonce?: Maybe; - recentBlockhash?: Maybe; slot?: Maybe; status?: Maybe; time?: Maybe; @@ -3324,7 +3221,7 @@ export type Transactions_Min_Fields = { /** order by min() on columns of table "transactions" */ export type Transactions_Min_Order_By = { amount?: InputMaybe; - blockTime?: InputMaybe; + blockHash?: InputMaybe; chainId?: InputMaybe; clientId?: InputMaybe; cluster?: InputMaybe; @@ -3334,7 +3231,6 @@ export type Transactions_Min_Order_By = { id?: InputMaybe; network?: InputMaybe; nonce?: InputMaybe; - recentBlockhash?: InputMaybe; slot?: InputMaybe; status?: InputMaybe; time?: InputMaybe; @@ -3360,7 +3256,7 @@ export type Transactions_On_Conflict = { /** Ordering options when selecting data from "transactions". */ export type Transactions_Order_By = { amount?: InputMaybe; - blockTime?: InputMaybe; + blockHash?: InputMaybe; chainId?: InputMaybe; client?: InputMaybe; clientId?: InputMaybe; @@ -3371,10 +3267,6 @@ export type Transactions_Order_By = { id?: InputMaybe; network?: InputMaybe; nonce?: InputMaybe; - postBalances?: InputMaybe; - preBalances?: InputMaybe; - recentBlockhash?: InputMaybe; - signature?: InputMaybe; slot?: InputMaybe; status?: InputMaybe; time?: InputMaybe; @@ -3386,19 +3278,12 @@ export type Transactions_Pk_Columns_Input = { id: Scalars['uuid']['input']; }; -/** prepend existing jsonb value of filtered columns with new jsonb value */ -export type Transactions_Prepend_Input = { - postBalances?: InputMaybe; - preBalances?: InputMaybe; - signature?: InputMaybe; -}; - /** select columns of table "transactions" */ export enum Transactions_Select_Column { /** column name */ Amount = 'amount', /** column name */ - BlockTime = 'blockTime', + BlockHash = 'blockHash', /** column name */ ChainId = 'chainId', /** column name */ @@ -3418,14 +3303,6 @@ export enum Transactions_Select_Column { /** column name */ Nonce = 'nonce', /** column name */ - PostBalances = 'postBalances', - /** column name */ - PreBalances = 'preBalances', - /** column name */ - RecentBlockhash = 'recentBlockhash', - /** column name */ - Signature = 'signature', - /** column name */ Slot = 'slot', /** column name */ Status = 'status', @@ -3502,7 +3379,7 @@ export enum Transactions_Select_Column_Transactions_Aggregate_Bool_Exp_Var_Samp_ /** input type for updating data in table "transactions" */ export type Transactions_Set_Input = { amount?: InputMaybe; - blockTime?: InputMaybe; + blockHash?: InputMaybe; chainId?: InputMaybe; clientId?: InputMaybe; cluster?: InputMaybe; @@ -3512,10 +3389,6 @@ export type Transactions_Set_Input = { id?: InputMaybe; network?: InputMaybe; nonce?: InputMaybe; - postBalances?: InputMaybe; - preBalances?: InputMaybe; - recentBlockhash?: InputMaybe; - signature?: InputMaybe; slot?: InputMaybe; status?: InputMaybe; time?: InputMaybe; @@ -3526,7 +3399,6 @@ export type Transactions_Set_Input = { export type Transactions_Stddev_Fields = { __typename?: 'transactions_stddev_fields'; amount?: Maybe; - blockTime?: Maybe; chainId?: Maybe; fee?: Maybe; nonce?: Maybe; @@ -3536,7 +3408,6 @@ export type Transactions_Stddev_Fields = { /** order by stddev() on columns of table "transactions" */ export type Transactions_Stddev_Order_By = { amount?: InputMaybe; - blockTime?: InputMaybe; chainId?: InputMaybe; fee?: InputMaybe; nonce?: InputMaybe; @@ -3547,7 +3418,6 @@ export type Transactions_Stddev_Order_By = { export type Transactions_Stddev_Pop_Fields = { __typename?: 'transactions_stddev_pop_fields'; amount?: Maybe; - blockTime?: Maybe; chainId?: Maybe; fee?: Maybe; nonce?: Maybe; @@ -3557,7 +3427,6 @@ export type Transactions_Stddev_Pop_Fields = { /** order by stddev_pop() on columns of table "transactions" */ export type Transactions_Stddev_Pop_Order_By = { amount?: InputMaybe; - blockTime?: InputMaybe; chainId?: InputMaybe; fee?: InputMaybe; nonce?: InputMaybe; @@ -3568,7 +3437,6 @@ export type Transactions_Stddev_Pop_Order_By = { export type Transactions_Stddev_Samp_Fields = { __typename?: 'transactions_stddev_samp_fields'; amount?: Maybe; - blockTime?: Maybe; chainId?: Maybe; fee?: Maybe; nonce?: Maybe; @@ -3578,7 +3446,6 @@ export type Transactions_Stddev_Samp_Fields = { /** order by stddev_samp() on columns of table "transactions" */ export type Transactions_Stddev_Samp_Order_By = { amount?: InputMaybe; - blockTime?: InputMaybe; chainId?: InputMaybe; fee?: InputMaybe; nonce?: InputMaybe; @@ -3596,7 +3463,7 @@ export type Transactions_Stream_Cursor_Input = { /** Initial value of the column from where the streaming should start */ export type Transactions_Stream_Cursor_Value_Input = { amount?: InputMaybe; - blockTime?: InputMaybe; + blockHash?: InputMaybe; chainId?: InputMaybe; clientId?: InputMaybe; cluster?: InputMaybe; @@ -3606,10 +3473,6 @@ export type Transactions_Stream_Cursor_Value_Input = { id?: InputMaybe; network?: InputMaybe; nonce?: InputMaybe; - postBalances?: InputMaybe; - preBalances?: InputMaybe; - recentBlockhash?: InputMaybe; - signature?: InputMaybe; slot?: InputMaybe; status?: InputMaybe; time?: InputMaybe; @@ -3620,7 +3483,6 @@ export type Transactions_Stream_Cursor_Value_Input = { export type Transactions_Sum_Fields = { __typename?: 'transactions_sum_fields'; amount?: Maybe; - blockTime?: Maybe; chainId?: Maybe; fee?: Maybe; nonce?: Maybe; @@ -3630,7 +3492,6 @@ export type Transactions_Sum_Fields = { /** order by sum() on columns of table "transactions" */ export type Transactions_Sum_Order_By = { amount?: InputMaybe; - blockTime?: InputMaybe; chainId?: InputMaybe; fee?: InputMaybe; nonce?: InputMaybe; @@ -3642,7 +3503,7 @@ export enum Transactions_Update_Column { /** column name */ Amount = 'amount', /** column name */ - BlockTime = 'blockTime', + BlockHash = 'blockHash', /** column name */ ChainId = 'chainId', /** column name */ @@ -3662,14 +3523,6 @@ export enum Transactions_Update_Column { /** column name */ Nonce = 'nonce', /** column name */ - PostBalances = 'postBalances', - /** column name */ - PreBalances = 'preBalances', - /** column name */ - RecentBlockhash = 'recentBlockhash', - /** column name */ - Signature = 'signature', - /** column name */ Slot = 'slot', /** column name */ Status = 'status', @@ -3680,18 +3533,8 @@ export enum Transactions_Update_Column { } export type Transactions_Updates = { - /** append existing jsonb value of filtered columns with new jsonb value */ - _append?: InputMaybe; - /** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */ - _delete_at_path?: InputMaybe; - /** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */ - _delete_elem?: InputMaybe; - /** delete key/value pair or string element. key/value pairs are matched based on their key value */ - _delete_key?: InputMaybe; /** increments the numeric columns with given value of the filtered values */ _inc?: InputMaybe; - /** prepend existing jsonb value of filtered columns with new jsonb value */ - _prepend?: InputMaybe; /** sets the columns of the filtered rows to the given values */ _set?: InputMaybe; /** filter the rows which have to be updated */ @@ -3702,7 +3545,6 @@ export type Transactions_Updates = { export type Transactions_Var_Pop_Fields = { __typename?: 'transactions_var_pop_fields'; amount?: Maybe; - blockTime?: Maybe; chainId?: Maybe; fee?: Maybe; nonce?: Maybe; @@ -3712,7 +3554,6 @@ export type Transactions_Var_Pop_Fields = { /** order by var_pop() on columns of table "transactions" */ export type Transactions_Var_Pop_Order_By = { amount?: InputMaybe; - blockTime?: InputMaybe; chainId?: InputMaybe; fee?: InputMaybe; nonce?: InputMaybe; @@ -3723,7 +3564,6 @@ export type Transactions_Var_Pop_Order_By = { export type Transactions_Var_Samp_Fields = { __typename?: 'transactions_var_samp_fields'; amount?: Maybe; - blockTime?: Maybe; chainId?: Maybe; fee?: Maybe; nonce?: Maybe; @@ -3733,7 +3573,6 @@ export type Transactions_Var_Samp_Fields = { /** order by var_samp() on columns of table "transactions" */ export type Transactions_Var_Samp_Order_By = { amount?: InputMaybe; - blockTime?: InputMaybe; chainId?: InputMaybe; fee?: InputMaybe; nonce?: InputMaybe; @@ -3744,7 +3583,6 @@ export type Transactions_Var_Samp_Order_By = { export type Transactions_Variance_Fields = { __typename?: 'transactions_variance_fields'; amount?: Maybe; - blockTime?: Maybe; chainId?: Maybe; fee?: Maybe; nonce?: Maybe; @@ -3754,7 +3592,6 @@ export type Transactions_Variance_Fields = { /** order by variance() on columns of table "transactions" */ export type Transactions_Variance_Order_By = { amount?: InputMaybe; - blockTime?: InputMaybe; chainId?: InputMaybe; fee?: InputMaybe; nonce?: InputMaybe; diff --git a/backend/zeus/src/zeus/const.ts b/backend/zeus/src/zeus/const.ts index 0cd24205..0da50994 100644 --- a/backend/zeus/src/zeus/const.ts +++ b/backend/zeus/src/zeus/const.ts @@ -481,23 +481,6 @@ export const AllTypesProps: Record = { _neq: "float8", _nin: "float8", }, - jsonb: `scalar.jsonb` as const, - jsonb_cast_exp: { - String: "String_comparison_exp", - }, - jsonb_comparison_exp: { - _cast: "jsonb_cast_exp", - _contained_in: "jsonb", - _contains: "jsonb", - _eq: "jsonb", - _gt: "jsonb", - _gte: "jsonb", - _in: "jsonb", - _lt: "jsonb", - _lte: "jsonb", - _neq: "jsonb", - _nin: "jsonb", - }, mutation_root: { delete_account: { where: "account_bool_exp", @@ -686,22 +669,12 @@ export const AllTypesProps: Record = { updates: "sol_updates", }, update_transactions: { - _append: "transactions_append_input", - _delete_at_path: "transactions_delete_at_path_input", - _delete_elem: "transactions_delete_elem_input", - _delete_key: "transactions_delete_key_input", _inc: "transactions_inc_input", - _prepend: "transactions_prepend_input", _set: "transactions_set_input", where: "transactions_bool_exp", }, update_transactions_by_pk: { - _append: "transactions_append_input", - _delete_at_path: "transactions_delete_at_path_input", - _delete_elem: "transactions_delete_elem_input", - _delete_key: "transactions_delete_key_input", _inc: "transactions_inc_input", - _prepend: "transactions_prepend_input", _set: "transactions_set_input", pk_columns: "transactions_pk_columns_input", }, @@ -1055,11 +1028,6 @@ export const AllTypesProps: Record = { _neq: "timestamptz", _nin: "timestamptz", }, - transactions: { - postBalances: {}, - preBalances: {}, - signature: {}, - }, transactions_aggregate_bool_exp: { avg: "transactions_aggregate_bool_exp_avg", corr: "transactions_aggregate_bool_exp_corr", @@ -1148,18 +1116,12 @@ export const AllTypesProps: Record = { var_samp: "transactions_var_samp_order_by", variance: "transactions_variance_order_by", }, - transactions_append_input: { - postBalances: "jsonb", - preBalances: "jsonb", - signature: "jsonb", - }, transactions_arr_rel_insert_input: { data: "transactions_insert_input", on_conflict: "transactions_on_conflict", }, transactions_avg_order_by: { amount: "order_by", - blockTime: "order_by", chainId: "order_by", fee: "order_by", nonce: "order_by", @@ -1170,7 +1132,7 @@ export const AllTypesProps: Record = { _not: "transactions_bool_exp", _or: "transactions_bool_exp", amount: "float8_comparison_exp", - blockTime: "bigint_comparison_exp", + blockHash: "String_comparison_exp", chainId: "bigint_comparison_exp", client: "client_bool_exp", clientId: "uuid_comparison_exp", @@ -1180,44 +1142,34 @@ export const AllTypesProps: Record = { hash: "String_comparison_exp", id: "uuid_comparison_exp", network: "String_comparison_exp", - nonce: "Int_comparison_exp", - postBalances: "jsonb_comparison_exp", - preBalances: "jsonb_comparison_exp", - recentBlockhash: "String_comparison_exp", - signature: "jsonb_comparison_exp", + nonce: "bigint_comparison_exp", slot: "bigint_comparison_exp", status: "String_comparison_exp", time: "timestamptz_comparison_exp", to: "String_comparison_exp", }, transactions_constraint: "enum" as const, - transactions_delete_at_path_input: {}, - transactions_delete_elem_input: {}, - transactions_delete_key_input: {}, transactions_inc_input: { amount: "float8", - blockTime: "bigint", chainId: "bigint", fee: "float8", + nonce: "bigint", slot: "bigint", }, transactions_insert_input: { amount: "float8", - blockTime: "bigint", chainId: "bigint", client: "client_obj_rel_insert_input", clientId: "uuid", fee: "float8", id: "uuid", - postBalances: "jsonb", - preBalances: "jsonb", - signature: "jsonb", + nonce: "bigint", slot: "bigint", time: "timestamptz", }, transactions_max_order_by: { amount: "order_by", - blockTime: "order_by", + blockHash: "order_by", chainId: "order_by", clientId: "order_by", cluster: "order_by", @@ -1227,7 +1179,6 @@ export const AllTypesProps: Record = { id: "order_by", network: "order_by", nonce: "order_by", - recentBlockhash: "order_by", slot: "order_by", status: "order_by", time: "order_by", @@ -1235,7 +1186,7 @@ export const AllTypesProps: Record = { }, transactions_min_order_by: { amount: "order_by", - blockTime: "order_by", + blockHash: "order_by", chainId: "order_by", clientId: "order_by", cluster: "order_by", @@ -1245,7 +1196,6 @@ export const AllTypesProps: Record = { id: "order_by", network: "order_by", nonce: "order_by", - recentBlockhash: "order_by", slot: "order_by", status: "order_by", time: "order_by", @@ -1258,7 +1208,7 @@ export const AllTypesProps: Record = { }, transactions_order_by: { amount: "order_by", - blockTime: "order_by", + blockHash: "order_by", chainId: "order_by", client: "client_order_by", clientId: "order_by", @@ -1269,10 +1219,6 @@ export const AllTypesProps: Record = { id: "order_by", network: "order_by", nonce: "order_by", - postBalances: "order_by", - preBalances: "order_by", - recentBlockhash: "order_by", - signature: "order_by", slot: "order_by", status: "order_by", time: "order_by", @@ -1281,11 +1227,6 @@ export const AllTypesProps: Record = { transactions_pk_columns_input: { id: "uuid", }, - transactions_prepend_input: { - postBalances: "jsonb", - preBalances: "jsonb", - signature: "jsonb", - }, transactions_select_column: "enum" as const, transactions_select_column_transactions_aggregate_bool_exp_avg_arguments_columns: "enum" as const, @@ -1305,20 +1246,16 @@ export const AllTypesProps: Record = { "enum" as const, transactions_set_input: { amount: "float8", - blockTime: "bigint", chainId: "bigint", clientId: "uuid", fee: "float8", id: "uuid", - postBalances: "jsonb", - preBalances: "jsonb", - signature: "jsonb", + nonce: "bigint", slot: "bigint", time: "timestamptz", }, transactions_stddev_order_by: { amount: "order_by", - blockTime: "order_by", chainId: "order_by", fee: "order_by", nonce: "order_by", @@ -1326,7 +1263,6 @@ export const AllTypesProps: Record = { }, transactions_stddev_pop_order_by: { amount: "order_by", - blockTime: "order_by", chainId: "order_by", fee: "order_by", nonce: "order_by", @@ -1334,7 +1270,6 @@ export const AllTypesProps: Record = { }, transactions_stddev_samp_order_by: { amount: "order_by", - blockTime: "order_by", chainId: "order_by", fee: "order_by", nonce: "order_by", @@ -1346,20 +1281,16 @@ export const AllTypesProps: Record = { }, transactions_stream_cursor_value_input: { amount: "float8", - blockTime: "bigint", chainId: "bigint", clientId: "uuid", fee: "float8", id: "uuid", - postBalances: "jsonb", - preBalances: "jsonb", - signature: "jsonb", + nonce: "bigint", slot: "bigint", time: "timestamptz", }, transactions_sum_order_by: { amount: "order_by", - blockTime: "order_by", chainId: "order_by", fee: "order_by", nonce: "order_by", @@ -1367,18 +1298,12 @@ export const AllTypesProps: Record = { }, transactions_update_column: "enum" as const, transactions_updates: { - _append: "transactions_append_input", - _delete_at_path: "transactions_delete_at_path_input", - _delete_elem: "transactions_delete_elem_input", - _delete_key: "transactions_delete_key_input", _inc: "transactions_inc_input", - _prepend: "transactions_prepend_input", _set: "transactions_set_input", where: "transactions_bool_exp", }, transactions_var_pop_order_by: { amount: "order_by", - blockTime: "order_by", chainId: "order_by", fee: "order_by", nonce: "order_by", @@ -1386,7 +1311,6 @@ export const AllTypesProps: Record = { }, transactions_var_samp_order_by: { amount: "order_by", - blockTime: "order_by", chainId: "order_by", fee: "order_by", nonce: "order_by", @@ -1394,7 +1318,6 @@ export const AllTypesProps: Record = { }, transactions_variance_order_by: { amount: "order_by", - blockTime: "order_by", chainId: "order_by", fee: "order_by", nonce: "order_by", @@ -1884,7 +1807,6 @@ export const ReturnTypes: Record = { sepoliaEth: "Float", }, float8: `scalar.float8` as const, - jsonb: `scalar.jsonb` as const, mutation_root: { delete_account: "account_mutation_response", delete_account_by_pk: "account", @@ -2095,7 +2017,7 @@ export const ReturnTypes: Record = { timestamptz: `scalar.timestamptz` as const, transactions: { amount: "float8", - blockTime: "bigint", + blockHash: "String", chainId: "bigint", client: "client", clientId: "uuid", @@ -2105,11 +2027,7 @@ export const ReturnTypes: Record = { hash: "String", id: "uuid", network: "String", - nonce: "Int", - postBalances: "jsonb", - preBalances: "jsonb", - recentBlockhash: "String", - signature: "jsonb", + nonce: "bigint", slot: "bigint", status: "String", time: "timestamptz", @@ -2134,7 +2052,6 @@ export const ReturnTypes: Record = { }, transactions_avg_fields: { amount: "Float", - blockTime: "Float", chainId: "Float", fee: "Float", nonce: "Float", @@ -2142,7 +2059,7 @@ export const ReturnTypes: Record = { }, transactions_max_fields: { amount: "float8", - blockTime: "bigint", + blockHash: "String", chainId: "bigint", clientId: "uuid", cluster: "String", @@ -2151,8 +2068,7 @@ export const ReturnTypes: Record = { hash: "String", id: "uuid", network: "String", - nonce: "Int", - recentBlockhash: "String", + nonce: "bigint", slot: "bigint", status: "String", time: "timestamptz", @@ -2160,7 +2076,7 @@ export const ReturnTypes: Record = { }, transactions_min_fields: { amount: "float8", - blockTime: "bigint", + blockHash: "String", chainId: "bigint", clientId: "uuid", cluster: "String", @@ -2169,8 +2085,7 @@ export const ReturnTypes: Record = { hash: "String", id: "uuid", network: "String", - nonce: "Int", - recentBlockhash: "String", + nonce: "bigint", slot: "bigint", status: "String", time: "timestamptz", @@ -2182,7 +2097,6 @@ export const ReturnTypes: Record = { }, transactions_stddev_fields: { amount: "Float", - blockTime: "Float", chainId: "Float", fee: "Float", nonce: "Float", @@ -2190,7 +2104,6 @@ export const ReturnTypes: Record = { }, transactions_stddev_pop_fields: { amount: "Float", - blockTime: "Float", chainId: "Float", fee: "Float", nonce: "Float", @@ -2198,7 +2111,6 @@ export const ReturnTypes: Record = { }, transactions_stddev_samp_fields: { amount: "Float", - blockTime: "Float", chainId: "Float", fee: "Float", nonce: "Float", @@ -2206,15 +2118,13 @@ export const ReturnTypes: Record = { }, transactions_sum_fields: { amount: "float8", - blockTime: "bigint", chainId: "bigint", fee: "float8", - nonce: "Int", + nonce: "bigint", slot: "bigint", }, transactions_var_pop_fields: { amount: "Float", - blockTime: "Float", chainId: "Float", fee: "Float", nonce: "Float", @@ -2222,7 +2132,6 @@ export const ReturnTypes: Record = { }, transactions_var_samp_fields: { amount: "Float", - blockTime: "Float", chainId: "Float", fee: "Float", nonce: "Float", @@ -2230,7 +2139,6 @@ export const ReturnTypes: Record = { }, transactions_variance_fields: { amount: "Float", - blockTime: "Float", chainId: "Float", fee: "Float", nonce: "Float", diff --git a/backend/zeus/src/zeus/index.ts b/backend/zeus/src/zeus/index.ts index 1a928b7d..21792bfb 100644 --- a/backend/zeus/src/zeus/index.ts +++ b/backend/zeus/src/zeus/index.ts @@ -1017,7 +1017,6 @@ type ZEUS_INTERFACES = never; export type ScalarCoders = { bigint?: ScalarResolver; float8?: ScalarResolver; - jsonb?: ScalarResolver; timestamptz?: ScalarResolver; uuid?: ScalarResolver; }; @@ -3095,49 +3094,6 @@ export type ValueTypes = { | null | Variable; }; - ["jsonb"]: unknown; - ["jsonb_cast_exp"]: { - String?: - | ValueTypes["String_comparison_exp"] - | undefined - | null - | Variable; - }; - /** Boolean expression to compare columns of type "jsonb". All fields are combined with logical 'AND'. */ - ["jsonb_comparison_exp"]: { - _cast?: - | ValueTypes["jsonb_cast_exp"] - | undefined - | null - | Variable; - /** is the column contained in the given json value */ - _contained_in?: - | ValueTypes["jsonb"] - | undefined - | null - | Variable; - /** does the column contain the given json value at the top level */ - _contains?: ValueTypes["jsonb"] | undefined | null | Variable; - _eq?: ValueTypes["jsonb"] | undefined | null | Variable; - _gt?: ValueTypes["jsonb"] | undefined | null | Variable; - _gte?: ValueTypes["jsonb"] | undefined | null | Variable; - /** does the string exist as a top-level key in the column */ - _has_key?: string | undefined | null | Variable; - /** do all of these strings exist as top-level keys in the column */ - _has_keys_all?: Array | undefined | null | Variable; - /** do any of these strings exist as top-level keys in the column */ - _has_keys_any?: Array | undefined | null | Variable; - _in?: Array | undefined | null | Variable; - _is_null?: boolean | undefined | null | Variable; - _lt?: ValueTypes["jsonb"] | undefined | null | Variable; - _lte?: ValueTypes["jsonb"] | undefined | null | Variable; - _neq?: ValueTypes["jsonb"] | undefined | null | Variable; - _nin?: - | Array - | undefined - | null - | Variable; - }; /** mutation root */ ["mutation_root"]: AliasType<{ delete_account?: [ @@ -3730,51 +3686,11 @@ export type ValueTypes = { ]; update_transactions?: [ { - /** append existing jsonb value of filtered columns with new jsonb value */ - _append?: - | ValueTypes["transactions_append_input"] - | undefined - | null - | Variable< - any, - string - > /** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */; - _delete_at_path?: - | ValueTypes["transactions_delete_at_path_input"] - | undefined - | null - | Variable< - any, - string - > /** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */; - _delete_elem?: - | ValueTypes["transactions_delete_elem_input"] - | undefined - | null - | Variable< - any, - string - > /** delete key/value pair or string element. key/value pairs are matched based on their key value */; - _delete_key?: - | ValueTypes["transactions_delete_key_input"] - | undefined - | null - | Variable< - any, - string - > /** increments the numeric columns with given value of the filtered values */; + /** increments the numeric columns with given value of the filtered values */ _inc?: | ValueTypes["transactions_inc_input"] | undefined | null - | Variable< - any, - string - > /** prepend existing jsonb value of filtered columns with new jsonb value */; - _prepend?: - | ValueTypes["transactions_prepend_input"] - | undefined - | null | Variable< any, string @@ -3793,51 +3709,11 @@ export type ValueTypes = { ]; update_transactions_by_pk?: [ { - /** append existing jsonb value of filtered columns with new jsonb value */ - _append?: - | ValueTypes["transactions_append_input"] - | undefined - | null - | Variable< - any, - string - > /** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */; - _delete_at_path?: - | ValueTypes["transactions_delete_at_path_input"] - | undefined - | null - | Variable< - any, - string - > /** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */; - _delete_elem?: - | ValueTypes["transactions_delete_elem_input"] - | undefined - | null - | Variable< - any, - string - > /** delete key/value pair or string element. key/value pairs are matched based on their key value */; - _delete_key?: - | ValueTypes["transactions_delete_key_input"] - | undefined - | null - | Variable< - any, - string - > /** increments the numeric columns with given value of the filtered values */; + /** increments the numeric columns with given value of the filtered values */ _inc?: | ValueTypes["transactions_inc_input"] | undefined | null - | Variable< - any, - string - > /** prepend existing jsonb value of filtered columns with new jsonb value */; - _prepend?: - | ValueTypes["transactions_prepend_input"] - | undefined - | null | Variable< any, string @@ -5607,7 +5483,7 @@ export type ValueTypes = { /** transactions table */ ["transactions"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; + blockHash?: boolean | `@${string}`; chainId?: boolean | `@${string}`; /** An object relationship */ client?: ValueTypes["client"]; @@ -5619,28 +5495,6 @@ export type ValueTypes = { id?: boolean | `@${string}`; network?: boolean | `@${string}`; nonce?: boolean | `@${string}`; - postBalances?: [ - { - /** JSON select path */ - path?: string | undefined | null | Variable; - }, - boolean | `@${string}`, - ]; - preBalances?: [ - { - /** JSON select path */ - path?: string | undefined | null | Variable; - }, - boolean | `@${string}`, - ]; - recentBlockhash?: boolean | `@${string}`; - signature?: [ - { - /** JSON select path */ - path?: string | undefined | null | Variable; - }, - boolean | `@${string}`, - ]; slot?: boolean | `@${string}`; status?: boolean | `@${string}`; time?: boolean | `@${string}`; @@ -5905,20 +5759,6 @@ export type ValueTypes = { | null | Variable; }; - /** append existing jsonb value of filtered columns with new jsonb value */ - ["transactions_append_input"]: { - postBalances?: - | ValueTypes["jsonb"] - | undefined - | null - | Variable; - preBalances?: - | ValueTypes["jsonb"] - | undefined - | null - | Variable; - signature?: ValueTypes["jsonb"] | undefined | null | Variable; - }; /** input type for inserting array relation for remote table "transactions" */ ["transactions_arr_rel_insert_input"]: { data: @@ -5934,7 +5774,6 @@ export type ValueTypes = { /** aggregate avg on columns */ ["transactions_avg_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; chainId?: boolean | `@${string}`; fee?: boolean | `@${string}`; nonce?: boolean | `@${string}`; @@ -5944,11 +5783,6 @@ export type ValueTypes = { /** order by avg() on columns of table "transactions" */ ["transactions_avg_order_by"]: { amount?: ValueTypes["order_by"] | undefined | null | Variable; - blockTime?: - | ValueTypes["order_by"] - | undefined - | null - | Variable; chainId?: ValueTypes["order_by"] | undefined | null | Variable; fee?: ValueTypes["order_by"] | undefined | null | Variable; nonce?: ValueTypes["order_by"] | undefined | null | Variable; @@ -5976,8 +5810,8 @@ export type ValueTypes = { | undefined | null | Variable; - blockTime?: - | ValueTypes["bigint_comparison_exp"] + blockHash?: + | ValueTypes["String_comparison_exp"] | undefined | null | Variable; @@ -6027,27 +5861,7 @@ export type ValueTypes = { | null | Variable; nonce?: - | ValueTypes["Int_comparison_exp"] - | undefined - | null - | Variable; - postBalances?: - | ValueTypes["jsonb_comparison_exp"] - | undefined - | null - | Variable; - preBalances?: - | ValueTypes["jsonb_comparison_exp"] - | undefined - | null - | Variable; - recentBlockhash?: - | ValueTypes["String_comparison_exp"] - | undefined - | null - | Variable; - signature?: - | ValueTypes["jsonb_comparison_exp"] + | ValueTypes["bigint_comparison_exp"] | undefined | null | Variable; @@ -6074,37 +5888,18 @@ export type ValueTypes = { }; /** unique or primary key constraints on table "transactions" */ ["transactions_constraint"]: transactions_constraint; - /** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */ - ["transactions_delete_at_path_input"]: { - postBalances?: Array | undefined | null | Variable; - preBalances?: Array | undefined | null | Variable; - signature?: Array | undefined | null | Variable; - }; - /** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */ - ["transactions_delete_elem_input"]: { - postBalances?: number | undefined | null | Variable; - preBalances?: number | undefined | null | Variable; - signature?: number | undefined | null | Variable; - }; - /** delete key/value pair or string element. key/value pairs are matched based on their key value */ - ["transactions_delete_key_input"]: { - postBalances?: string | undefined | null | Variable; - preBalances?: string | undefined | null | Variable; - signature?: string | undefined | null | Variable; - }; /** input type for incrementing numeric columns in table "transactions" */ ["transactions_inc_input"]: { amount?: ValueTypes["float8"] | undefined | null | Variable; - blockTime?: ValueTypes["bigint"] | undefined | null | Variable; chainId?: ValueTypes["bigint"] | undefined | null | Variable; fee?: ValueTypes["float8"] | undefined | null | Variable; - nonce?: number | undefined | null | Variable; + nonce?: ValueTypes["bigint"] | undefined | null | Variable; slot?: ValueTypes["bigint"] | undefined | null | Variable; }; /** input type for inserting data into table "transactions" */ ["transactions_insert_input"]: { amount?: ValueTypes["float8"] | undefined | null | Variable; - blockTime?: ValueTypes["bigint"] | undefined | null | Variable; + blockHash?: string | undefined | null | Variable; chainId?: ValueTypes["bigint"] | undefined | null | Variable; client?: | ValueTypes["client_obj_rel_insert_input"] @@ -6118,19 +5913,7 @@ export type ValueTypes = { hash?: string | undefined | null | Variable; id?: ValueTypes["uuid"] | undefined | null | Variable; network?: string | undefined | null | Variable; - nonce?: number | undefined | null | Variable; - postBalances?: - | ValueTypes["jsonb"] - | undefined - | null - | Variable; - preBalances?: - | ValueTypes["jsonb"] - | undefined - | null - | Variable; - recentBlockhash?: string | undefined | null | Variable; - signature?: ValueTypes["jsonb"] | undefined | null | Variable; + nonce?: ValueTypes["bigint"] | undefined | null | Variable; slot?: ValueTypes["bigint"] | undefined | null | Variable; status?: string | undefined | null | Variable; time?: ValueTypes["timestamptz"] | undefined | null | Variable; @@ -6139,7 +5922,7 @@ export type ValueTypes = { /** aggregate max on columns */ ["transactions_max_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; + blockHash?: boolean | `@${string}`; chainId?: boolean | `@${string}`; clientId?: boolean | `@${string}`; cluster?: boolean | `@${string}`; @@ -6149,7 +5932,6 @@ export type ValueTypes = { id?: boolean | `@${string}`; network?: boolean | `@${string}`; nonce?: boolean | `@${string}`; - recentBlockhash?: boolean | `@${string}`; slot?: boolean | `@${string}`; status?: boolean | `@${string}`; time?: boolean | `@${string}`; @@ -6159,7 +5941,7 @@ export type ValueTypes = { /** order by max() on columns of table "transactions" */ ["transactions_max_order_by"]: { amount?: ValueTypes["order_by"] | undefined | null | Variable; - blockTime?: + blockHash?: | ValueTypes["order_by"] | undefined | null @@ -6177,11 +5959,6 @@ export type ValueTypes = { id?: ValueTypes["order_by"] | undefined | null | Variable; network?: ValueTypes["order_by"] | undefined | null | Variable; nonce?: ValueTypes["order_by"] | undefined | null | Variable; - recentBlockhash?: - | ValueTypes["order_by"] - | undefined - | null - | Variable; slot?: ValueTypes["order_by"] | undefined | null | Variable; status?: ValueTypes["order_by"] | undefined | null | Variable; time?: ValueTypes["order_by"] | undefined | null | Variable; @@ -6190,7 +5967,7 @@ export type ValueTypes = { /** aggregate min on columns */ ["transactions_min_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; + blockHash?: boolean | `@${string}`; chainId?: boolean | `@${string}`; clientId?: boolean | `@${string}`; cluster?: boolean | `@${string}`; @@ -6200,7 +5977,6 @@ export type ValueTypes = { id?: boolean | `@${string}`; network?: boolean | `@${string}`; nonce?: boolean | `@${string}`; - recentBlockhash?: boolean | `@${string}`; slot?: boolean | `@${string}`; status?: boolean | `@${string}`; time?: boolean | `@${string}`; @@ -6210,7 +5986,7 @@ export type ValueTypes = { /** order by min() on columns of table "transactions" */ ["transactions_min_order_by"]: { amount?: ValueTypes["order_by"] | undefined | null | Variable; - blockTime?: + blockHash?: | ValueTypes["order_by"] | undefined | null @@ -6228,11 +6004,6 @@ export type ValueTypes = { id?: ValueTypes["order_by"] | undefined | null | Variable; network?: ValueTypes["order_by"] | undefined | null | Variable; nonce?: ValueTypes["order_by"] | undefined | null | Variable; - recentBlockhash?: - | ValueTypes["order_by"] - | undefined - | null - | Variable; slot?: ValueTypes["order_by"] | undefined | null | Variable; status?: ValueTypes["order_by"] | undefined | null | Variable; time?: ValueTypes["order_by"] | undefined | null | Variable; @@ -6261,7 +6032,7 @@ export type ValueTypes = { /** Ordering options when selecting data from "transactions". */ ["transactions_order_by"]: { amount?: ValueTypes["order_by"] | undefined | null | Variable; - blockTime?: + blockHash?: | ValueTypes["order_by"] | undefined | null @@ -6284,26 +6055,6 @@ export type ValueTypes = { id?: ValueTypes["order_by"] | undefined | null | Variable; network?: ValueTypes["order_by"] | undefined | null | Variable; nonce?: ValueTypes["order_by"] | undefined | null | Variable; - postBalances?: - | ValueTypes["order_by"] - | undefined - | null - | Variable; - preBalances?: - | ValueTypes["order_by"] - | undefined - | null - | Variable; - recentBlockhash?: - | ValueTypes["order_by"] - | undefined - | null - | Variable; - signature?: - | ValueTypes["order_by"] - | undefined - | null - | Variable; slot?: ValueTypes["order_by"] | undefined | null | Variable; status?: ValueTypes["order_by"] | undefined | null | Variable; time?: ValueTypes["order_by"] | undefined | null | Variable; @@ -6313,20 +6064,6 @@ export type ValueTypes = { ["transactions_pk_columns_input"]: { id: ValueTypes["uuid"] | Variable; }; - /** prepend existing jsonb value of filtered columns with new jsonb value */ - ["transactions_prepend_input"]: { - postBalances?: - | ValueTypes["jsonb"] - | undefined - | null - | Variable; - preBalances?: - | ValueTypes["jsonb"] - | undefined - | null - | Variable; - signature?: ValueTypes["jsonb"] | undefined | null | Variable; - }; /** select columns of table "transactions" */ ["transactions_select_column"]: transactions_select_column; /** select "transactions_aggregate_bool_exp_avg_arguments_columns" columns of table "transactions" */ @@ -6348,7 +6085,7 @@ export type ValueTypes = { /** input type for updating data in table "transactions" */ ["transactions_set_input"]: { amount?: ValueTypes["float8"] | undefined | null | Variable; - blockTime?: ValueTypes["bigint"] | undefined | null | Variable; + blockHash?: string | undefined | null | Variable; chainId?: ValueTypes["bigint"] | undefined | null | Variable; clientId?: ValueTypes["uuid"] | undefined | null | Variable; cluster?: string | undefined | null | Variable; @@ -6357,19 +6094,7 @@ export type ValueTypes = { hash?: string | undefined | null | Variable; id?: ValueTypes["uuid"] | undefined | null | Variable; network?: string | undefined | null | Variable; - nonce?: number | undefined | null | Variable; - postBalances?: - | ValueTypes["jsonb"] - | undefined - | null - | Variable; - preBalances?: - | ValueTypes["jsonb"] - | undefined - | null - | Variable; - recentBlockhash?: string | undefined | null | Variable; - signature?: ValueTypes["jsonb"] | undefined | null | Variable; + nonce?: ValueTypes["bigint"] | undefined | null | Variable; slot?: ValueTypes["bigint"] | undefined | null | Variable; status?: string | undefined | null | Variable; time?: ValueTypes["timestamptz"] | undefined | null | Variable; @@ -6378,7 +6103,6 @@ export type ValueTypes = { /** aggregate stddev on columns */ ["transactions_stddev_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; chainId?: boolean | `@${string}`; fee?: boolean | `@${string}`; nonce?: boolean | `@${string}`; @@ -6388,11 +6112,6 @@ export type ValueTypes = { /** order by stddev() on columns of table "transactions" */ ["transactions_stddev_order_by"]: { amount?: ValueTypes["order_by"] | undefined | null | Variable; - blockTime?: - | ValueTypes["order_by"] - | undefined - | null - | Variable; chainId?: ValueTypes["order_by"] | undefined | null | Variable; fee?: ValueTypes["order_by"] | undefined | null | Variable; nonce?: ValueTypes["order_by"] | undefined | null | Variable; @@ -6401,7 +6120,6 @@ export type ValueTypes = { /** aggregate stddev_pop on columns */ ["transactions_stddev_pop_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; chainId?: boolean | `@${string}`; fee?: boolean | `@${string}`; nonce?: boolean | `@${string}`; @@ -6411,11 +6129,6 @@ export type ValueTypes = { /** order by stddev_pop() on columns of table "transactions" */ ["transactions_stddev_pop_order_by"]: { amount?: ValueTypes["order_by"] | undefined | null | Variable; - blockTime?: - | ValueTypes["order_by"] - | undefined - | null - | Variable; chainId?: ValueTypes["order_by"] | undefined | null | Variable; fee?: ValueTypes["order_by"] | undefined | null | Variable; nonce?: ValueTypes["order_by"] | undefined | null | Variable; @@ -6424,7 +6137,6 @@ export type ValueTypes = { /** aggregate stddev_samp on columns */ ["transactions_stddev_samp_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; chainId?: boolean | `@${string}`; fee?: boolean | `@${string}`; nonce?: boolean | `@${string}`; @@ -6434,11 +6146,6 @@ export type ValueTypes = { /** order by stddev_samp() on columns of table "transactions" */ ["transactions_stddev_samp_order_by"]: { amount?: ValueTypes["order_by"] | undefined | null | Variable; - blockTime?: - | ValueTypes["order_by"] - | undefined - | null - | Variable; chainId?: ValueTypes["order_by"] | undefined | null | Variable; fee?: ValueTypes["order_by"] | undefined | null | Variable; nonce?: ValueTypes["order_by"] | undefined | null | Variable; @@ -6460,7 +6167,7 @@ export type ValueTypes = { /** Initial value of the column from where the streaming should start */ ["transactions_stream_cursor_value_input"]: { amount?: ValueTypes["float8"] | undefined | null | Variable; - blockTime?: ValueTypes["bigint"] | undefined | null | Variable; + blockHash?: string | undefined | null | Variable; chainId?: ValueTypes["bigint"] | undefined | null | Variable; clientId?: ValueTypes["uuid"] | undefined | null | Variable; cluster?: string | undefined | null | Variable; @@ -6469,19 +6176,7 @@ export type ValueTypes = { hash?: string | undefined | null | Variable; id?: ValueTypes["uuid"] | undefined | null | Variable; network?: string | undefined | null | Variable; - nonce?: number | undefined | null | Variable; - postBalances?: - | ValueTypes["jsonb"] - | undefined - | null - | Variable; - preBalances?: - | ValueTypes["jsonb"] - | undefined - | null - | Variable; - recentBlockhash?: string | undefined | null | Variable; - signature?: ValueTypes["jsonb"] | undefined | null | Variable; + nonce?: ValueTypes["bigint"] | undefined | null | Variable; slot?: ValueTypes["bigint"] | undefined | null | Variable; status?: string | undefined | null | Variable; time?: ValueTypes["timestamptz"] | undefined | null | Variable; @@ -6490,7 +6185,6 @@ export type ValueTypes = { /** aggregate sum on columns */ ["transactions_sum_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; chainId?: boolean | `@${string}`; fee?: boolean | `@${string}`; nonce?: boolean | `@${string}`; @@ -6500,11 +6194,6 @@ export type ValueTypes = { /** order by sum() on columns of table "transactions" */ ["transactions_sum_order_by"]: { amount?: ValueTypes["order_by"] | undefined | null | Variable; - blockTime?: - | ValueTypes["order_by"] - | undefined - | null - | Variable; chainId?: ValueTypes["order_by"] | undefined | null | Variable; fee?: ValueTypes["order_by"] | undefined | null | Variable; nonce?: ValueTypes["order_by"] | undefined | null | Variable; @@ -6513,42 +6202,12 @@ export type ValueTypes = { /** update columns of table "transactions" */ ["transactions_update_column"]: transactions_update_column; ["transactions_updates"]: { - /** append existing jsonb value of filtered columns with new jsonb value */ - _append?: - | ValueTypes["transactions_append_input"] - | undefined - | null - | Variable; - /** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */ - _delete_at_path?: - | ValueTypes["transactions_delete_at_path_input"] - | undefined - | null - | Variable; - /** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */ - _delete_elem?: - | ValueTypes["transactions_delete_elem_input"] - | undefined - | null - | Variable; - /** delete key/value pair or string element. key/value pairs are matched based on their key value */ - _delete_key?: - | ValueTypes["transactions_delete_key_input"] - | undefined - | null - | Variable; /** increments the numeric columns with given value of the filtered values */ _inc?: | ValueTypes["transactions_inc_input"] | undefined | null | Variable; - /** prepend existing jsonb value of filtered columns with new jsonb value */ - _prepend?: - | ValueTypes["transactions_prepend_input"] - | undefined - | null - | Variable; /** sets the columns of the filtered rows to the given values */ _set?: | ValueTypes["transactions_set_input"] @@ -6561,7 +6220,6 @@ export type ValueTypes = { /** aggregate var_pop on columns */ ["transactions_var_pop_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; chainId?: boolean | `@${string}`; fee?: boolean | `@${string}`; nonce?: boolean | `@${string}`; @@ -6571,11 +6229,6 @@ export type ValueTypes = { /** order by var_pop() on columns of table "transactions" */ ["transactions_var_pop_order_by"]: { amount?: ValueTypes["order_by"] | undefined | null | Variable; - blockTime?: - | ValueTypes["order_by"] - | undefined - | null - | Variable; chainId?: ValueTypes["order_by"] | undefined | null | Variable; fee?: ValueTypes["order_by"] | undefined | null | Variable; nonce?: ValueTypes["order_by"] | undefined | null | Variable; @@ -6584,7 +6237,6 @@ export type ValueTypes = { /** aggregate var_samp on columns */ ["transactions_var_samp_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; chainId?: boolean | `@${string}`; fee?: boolean | `@${string}`; nonce?: boolean | `@${string}`; @@ -6594,11 +6246,6 @@ export type ValueTypes = { /** order by var_samp() on columns of table "transactions" */ ["transactions_var_samp_order_by"]: { amount?: ValueTypes["order_by"] | undefined | null | Variable; - blockTime?: - | ValueTypes["order_by"] - | undefined - | null - | Variable; chainId?: ValueTypes["order_by"] | undefined | null | Variable; fee?: ValueTypes["order_by"] | undefined | null | Variable; nonce?: ValueTypes["order_by"] | undefined | null | Variable; @@ -6607,7 +6254,6 @@ export type ValueTypes = { /** aggregate variance on columns */ ["transactions_variance_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; chainId?: boolean | `@${string}`; fee?: boolean | `@${string}`; nonce?: boolean | `@${string}`; @@ -6617,11 +6263,6 @@ export type ValueTypes = { /** order by variance() on columns of table "transactions" */ ["transactions_variance_order_by"]: { amount?: ValueTypes["order_by"] | undefined | null | Variable; - blockTime?: - | ValueTypes["order_by"] - | undefined - | null - | Variable; chainId?: ValueTypes["order_by"] | undefined | null | Variable; fee?: ValueTypes["order_by"] | undefined | null | Variable; nonce?: ValueTypes["order_by"] | undefined | null | Variable; @@ -8348,33 +7989,6 @@ export type ResolverInputTypes = { _neq?: ResolverInputTypes["float8"] | undefined | null; _nin?: Array | undefined | null; }; - ["jsonb"]: unknown; - ["jsonb_cast_exp"]: { - String?: ResolverInputTypes["String_comparison_exp"] | undefined | null; - }; - /** Boolean expression to compare columns of type "jsonb". All fields are combined with logical 'AND'. */ - ["jsonb_comparison_exp"]: { - _cast?: ResolverInputTypes["jsonb_cast_exp"] | undefined | null; - /** is the column contained in the given json value */ - _contained_in?: ResolverInputTypes["jsonb"] | undefined | null; - /** does the column contain the given json value at the top level */ - _contains?: ResolverInputTypes["jsonb"] | undefined | null; - _eq?: ResolverInputTypes["jsonb"] | undefined | null; - _gt?: ResolverInputTypes["jsonb"] | undefined | null; - _gte?: ResolverInputTypes["jsonb"] | undefined | null; - /** does the string exist as a top-level key in the column */ - _has_key?: string | undefined | null; - /** do all of these strings exist as top-level keys in the column */ - _has_keys_all?: Array | undefined | null; - /** do any of these strings exist as top-level keys in the column */ - _has_keys_any?: Array | undefined | null; - _in?: Array | undefined | null; - _is_null?: boolean | undefined | null; - _lt?: ResolverInputTypes["jsonb"] | undefined | null; - _lte?: ResolverInputTypes["jsonb"] | undefined | null; - _neq?: ResolverInputTypes["jsonb"] | undefined | null; - _nin?: Array | undefined | null; - }; /** mutation root */ ["mutation_root"]: AliasType<{ delete_account?: [ @@ -8835,30 +8449,10 @@ export type ResolverInputTypes = { ]; update_transactions?: [ { - /** append existing jsonb value of filtered columns with new jsonb value */ - _append?: - | ResolverInputTypes["transactions_append_input"] - | undefined - | null /** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */; - _delete_at_path?: - | ResolverInputTypes["transactions_delete_at_path_input"] - | undefined - | null /** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */; - _delete_elem?: - | ResolverInputTypes["transactions_delete_elem_input"] - | undefined - | null /** delete key/value pair or string element. key/value pairs are matched based on their key value */; - _delete_key?: - | ResolverInputTypes["transactions_delete_key_input"] - | undefined - | null /** increments the numeric columns with given value of the filtered values */; + /** increments the numeric columns with given value of the filtered values */ _inc?: | ResolverInputTypes["transactions_inc_input"] | undefined - | null /** prepend existing jsonb value of filtered columns with new jsonb value */; - _prepend?: - | ResolverInputTypes["transactions_prepend_input"] - | undefined | null /** sets the columns of the filtered rows to the given values */; _set?: | ResolverInputTypes["transactions_set_input"] @@ -8870,30 +8464,10 @@ export type ResolverInputTypes = { ]; update_transactions_by_pk?: [ { - /** append existing jsonb value of filtered columns with new jsonb value */ - _append?: - | ResolverInputTypes["transactions_append_input"] - | undefined - | null /** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */; - _delete_at_path?: - | ResolverInputTypes["transactions_delete_at_path_input"] - | undefined - | null /** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */; - _delete_elem?: - | ResolverInputTypes["transactions_delete_elem_input"] - | undefined - | null /** delete key/value pair or string element. key/value pairs are matched based on their key value */; - _delete_key?: - | ResolverInputTypes["transactions_delete_key_input"] - | undefined - | null /** increments the numeric columns with given value of the filtered values */; + /** increments the numeric columns with given value of the filtered values */ _inc?: | ResolverInputTypes["transactions_inc_input"] | undefined - | null /** prepend existing jsonb value of filtered columns with new jsonb value */; - _prepend?: - | ResolverInputTypes["transactions_prepend_input"] - | undefined | null /** sets the columns of the filtered rows to the given values */; _set?: ResolverInputTypes["transactions_set_input"] | undefined | null; pk_columns: ResolverInputTypes["transactions_pk_columns_input"]; @@ -10068,7 +9642,7 @@ export type ResolverInputTypes = { /** transactions table */ ["transactions"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; + blockHash?: boolean | `@${string}`; chainId?: boolean | `@${string}`; /** An object relationship */ client?: ResolverInputTypes["client"]; @@ -10080,25 +9654,6 @@ export type ResolverInputTypes = { id?: boolean | `@${string}`; network?: boolean | `@${string}`; nonce?: boolean | `@${string}`; - postBalances?: [ - { - /** JSON select path */ path?: string | undefined | null; - }, - boolean | `@${string}`, - ]; - preBalances?: [ - { - /** JSON select path */ path?: string | undefined | null; - }, - boolean | `@${string}`, - ]; - recentBlockhash?: boolean | `@${string}`; - signature?: [ - { - /** JSON select path */ path?: string | undefined | null; - }, - boolean | `@${string}`, - ]; slot?: boolean | `@${string}`; status?: boolean | `@${string}`; time?: boolean | `@${string}`; @@ -10270,12 +9825,6 @@ export type ResolverInputTypes = { | undefined | null; }; - /** append existing jsonb value of filtered columns with new jsonb value */ - ["transactions_append_input"]: { - postBalances?: ResolverInputTypes["jsonb"] | undefined | null; - preBalances?: ResolverInputTypes["jsonb"] | undefined | null; - signature?: ResolverInputTypes["jsonb"] | undefined | null; - }; /** input type for inserting array relation for remote table "transactions" */ ["transactions_arr_rel_insert_input"]: { data: Array; @@ -10288,7 +9837,6 @@ export type ResolverInputTypes = { /** aggregate avg on columns */ ["transactions_avg_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; chainId?: boolean | `@${string}`; fee?: boolean | `@${string}`; nonce?: boolean | `@${string}`; @@ -10298,7 +9846,6 @@ export type ResolverInputTypes = { /** order by avg() on columns of table "transactions" */ ["transactions_avg_order_by"]: { amount?: ResolverInputTypes["order_by"] | undefined | null; - blockTime?: ResolverInputTypes["order_by"] | undefined | null; chainId?: ResolverInputTypes["order_by"] | undefined | null; fee?: ResolverInputTypes["order_by"] | undefined | null; nonce?: ResolverInputTypes["order_by"] | undefined | null; @@ -10313,7 +9860,7 @@ export type ResolverInputTypes = { _not?: ResolverInputTypes["transactions_bool_exp"] | undefined | null; _or?: Array | undefined | null; amount?: ResolverInputTypes["float8_comparison_exp"] | undefined | null; - blockTime?: ResolverInputTypes["bigint_comparison_exp"] | undefined | null; + blockHash?: ResolverInputTypes["String_comparison_exp"] | undefined | null; chainId?: ResolverInputTypes["bigint_comparison_exp"] | undefined | null; client?: ResolverInputTypes["client_bool_exp"] | undefined | null; clientId?: ResolverInputTypes["uuid_comparison_exp"] | undefined | null; @@ -10323,17 +9870,7 @@ export type ResolverInputTypes = { hash?: ResolverInputTypes["String_comparison_exp"] | undefined | null; id?: ResolverInputTypes["uuid_comparison_exp"] | undefined | null; network?: ResolverInputTypes["String_comparison_exp"] | undefined | null; - nonce?: ResolverInputTypes["Int_comparison_exp"] | undefined | null; - postBalances?: - | ResolverInputTypes["jsonb_comparison_exp"] - | undefined - | null; - preBalances?: ResolverInputTypes["jsonb_comparison_exp"] | undefined | null; - recentBlockhash?: - | ResolverInputTypes["String_comparison_exp"] - | undefined - | null; - signature?: ResolverInputTypes["jsonb_comparison_exp"] | undefined | null; + nonce?: ResolverInputTypes["bigint_comparison_exp"] | undefined | null; slot?: ResolverInputTypes["bigint_comparison_exp"] | undefined | null; status?: ResolverInputTypes["String_comparison_exp"] | undefined | null; time?: ResolverInputTypes["timestamptz_comparison_exp"] | undefined | null; @@ -10341,37 +9878,18 @@ export type ResolverInputTypes = { }; /** unique or primary key constraints on table "transactions" */ ["transactions_constraint"]: transactions_constraint; - /** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */ - ["transactions_delete_at_path_input"]: { - postBalances?: Array | undefined | null; - preBalances?: Array | undefined | null; - signature?: Array | undefined | null; - }; - /** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */ - ["transactions_delete_elem_input"]: { - postBalances?: number | undefined | null; - preBalances?: number | undefined | null; - signature?: number | undefined | null; - }; - /** delete key/value pair or string element. key/value pairs are matched based on their key value */ - ["transactions_delete_key_input"]: { - postBalances?: string | undefined | null; - preBalances?: string | undefined | null; - signature?: string | undefined | null; - }; /** input type for incrementing numeric columns in table "transactions" */ ["transactions_inc_input"]: { amount?: ResolverInputTypes["float8"] | undefined | null; - blockTime?: ResolverInputTypes["bigint"] | undefined | null; chainId?: ResolverInputTypes["bigint"] | undefined | null; fee?: ResolverInputTypes["float8"] | undefined | null; - nonce?: number | undefined | null; + nonce?: ResolverInputTypes["bigint"] | undefined | null; slot?: ResolverInputTypes["bigint"] | undefined | null; }; /** input type for inserting data into table "transactions" */ ["transactions_insert_input"]: { amount?: ResolverInputTypes["float8"] | undefined | null; - blockTime?: ResolverInputTypes["bigint"] | undefined | null; + blockHash?: string | undefined | null; chainId?: ResolverInputTypes["bigint"] | undefined | null; client?: | ResolverInputTypes["client_obj_rel_insert_input"] @@ -10384,11 +9902,7 @@ export type ResolverInputTypes = { hash?: string | undefined | null; id?: ResolverInputTypes["uuid"] | undefined | null; network?: string | undefined | null; - nonce?: number | undefined | null; - postBalances?: ResolverInputTypes["jsonb"] | undefined | null; - preBalances?: ResolverInputTypes["jsonb"] | undefined | null; - recentBlockhash?: string | undefined | null; - signature?: ResolverInputTypes["jsonb"] | undefined | null; + nonce?: ResolverInputTypes["bigint"] | undefined | null; slot?: ResolverInputTypes["bigint"] | undefined | null; status?: string | undefined | null; time?: ResolverInputTypes["timestamptz"] | undefined | null; @@ -10397,7 +9911,7 @@ export type ResolverInputTypes = { /** aggregate max on columns */ ["transactions_max_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; + blockHash?: boolean | `@${string}`; chainId?: boolean | `@${string}`; clientId?: boolean | `@${string}`; cluster?: boolean | `@${string}`; @@ -10407,7 +9921,6 @@ export type ResolverInputTypes = { id?: boolean | `@${string}`; network?: boolean | `@${string}`; nonce?: boolean | `@${string}`; - recentBlockhash?: boolean | `@${string}`; slot?: boolean | `@${string}`; status?: boolean | `@${string}`; time?: boolean | `@${string}`; @@ -10417,7 +9930,7 @@ export type ResolverInputTypes = { /** order by max() on columns of table "transactions" */ ["transactions_max_order_by"]: { amount?: ResolverInputTypes["order_by"] | undefined | null; - blockTime?: ResolverInputTypes["order_by"] | undefined | null; + blockHash?: ResolverInputTypes["order_by"] | undefined | null; chainId?: ResolverInputTypes["order_by"] | undefined | null; clientId?: ResolverInputTypes["order_by"] | undefined | null; cluster?: ResolverInputTypes["order_by"] | undefined | null; @@ -10427,7 +9940,6 @@ export type ResolverInputTypes = { id?: ResolverInputTypes["order_by"] | undefined | null; network?: ResolverInputTypes["order_by"] | undefined | null; nonce?: ResolverInputTypes["order_by"] | undefined | null; - recentBlockhash?: ResolverInputTypes["order_by"] | undefined | null; slot?: ResolverInputTypes["order_by"] | undefined | null; status?: ResolverInputTypes["order_by"] | undefined | null; time?: ResolverInputTypes["order_by"] | undefined | null; @@ -10436,7 +9948,7 @@ export type ResolverInputTypes = { /** aggregate min on columns */ ["transactions_min_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; + blockHash?: boolean | `@${string}`; chainId?: boolean | `@${string}`; clientId?: boolean | `@${string}`; cluster?: boolean | `@${string}`; @@ -10446,7 +9958,6 @@ export type ResolverInputTypes = { id?: boolean | `@${string}`; network?: boolean | `@${string}`; nonce?: boolean | `@${string}`; - recentBlockhash?: boolean | `@${string}`; slot?: boolean | `@${string}`; status?: boolean | `@${string}`; time?: boolean | `@${string}`; @@ -10456,7 +9967,7 @@ export type ResolverInputTypes = { /** order by min() on columns of table "transactions" */ ["transactions_min_order_by"]: { amount?: ResolverInputTypes["order_by"] | undefined | null; - blockTime?: ResolverInputTypes["order_by"] | undefined | null; + blockHash?: ResolverInputTypes["order_by"] | undefined | null; chainId?: ResolverInputTypes["order_by"] | undefined | null; clientId?: ResolverInputTypes["order_by"] | undefined | null; cluster?: ResolverInputTypes["order_by"] | undefined | null; @@ -10466,7 +9977,6 @@ export type ResolverInputTypes = { id?: ResolverInputTypes["order_by"] | undefined | null; network?: ResolverInputTypes["order_by"] | undefined | null; nonce?: ResolverInputTypes["order_by"] | undefined | null; - recentBlockhash?: ResolverInputTypes["order_by"] | undefined | null; slot?: ResolverInputTypes["order_by"] | undefined | null; status?: ResolverInputTypes["order_by"] | undefined | null; time?: ResolverInputTypes["order_by"] | undefined | null; @@ -10489,7 +9999,7 @@ export type ResolverInputTypes = { /** Ordering options when selecting data from "transactions". */ ["transactions_order_by"]: { amount?: ResolverInputTypes["order_by"] | undefined | null; - blockTime?: ResolverInputTypes["order_by"] | undefined | null; + blockHash?: ResolverInputTypes["order_by"] | undefined | null; chainId?: ResolverInputTypes["order_by"] | undefined | null; client?: ResolverInputTypes["client_order_by"] | undefined | null; clientId?: ResolverInputTypes["order_by"] | undefined | null; @@ -10500,10 +10010,6 @@ export type ResolverInputTypes = { id?: ResolverInputTypes["order_by"] | undefined | null; network?: ResolverInputTypes["order_by"] | undefined | null; nonce?: ResolverInputTypes["order_by"] | undefined | null; - postBalances?: ResolverInputTypes["order_by"] | undefined | null; - preBalances?: ResolverInputTypes["order_by"] | undefined | null; - recentBlockhash?: ResolverInputTypes["order_by"] | undefined | null; - signature?: ResolverInputTypes["order_by"] | undefined | null; slot?: ResolverInputTypes["order_by"] | undefined | null; status?: ResolverInputTypes["order_by"] | undefined | null; time?: ResolverInputTypes["order_by"] | undefined | null; @@ -10513,12 +10019,6 @@ export type ResolverInputTypes = { ["transactions_pk_columns_input"]: { id: ResolverInputTypes["uuid"]; }; - /** prepend existing jsonb value of filtered columns with new jsonb value */ - ["transactions_prepend_input"]: { - postBalances?: ResolverInputTypes["jsonb"] | undefined | null; - preBalances?: ResolverInputTypes["jsonb"] | undefined | null; - signature?: ResolverInputTypes["jsonb"] | undefined | null; - }; /** select columns of table "transactions" */ ["transactions_select_column"]: transactions_select_column; /** select "transactions_aggregate_bool_exp_avg_arguments_columns" columns of table "transactions" */ @@ -10540,7 +10040,7 @@ export type ResolverInputTypes = { /** input type for updating data in table "transactions" */ ["transactions_set_input"]: { amount?: ResolverInputTypes["float8"] | undefined | null; - blockTime?: ResolverInputTypes["bigint"] | undefined | null; + blockHash?: string | undefined | null; chainId?: ResolverInputTypes["bigint"] | undefined | null; clientId?: ResolverInputTypes["uuid"] | undefined | null; cluster?: string | undefined | null; @@ -10549,11 +10049,7 @@ export type ResolverInputTypes = { hash?: string | undefined | null; id?: ResolverInputTypes["uuid"] | undefined | null; network?: string | undefined | null; - nonce?: number | undefined | null; - postBalances?: ResolverInputTypes["jsonb"] | undefined | null; - preBalances?: ResolverInputTypes["jsonb"] | undefined | null; - recentBlockhash?: string | undefined | null; - signature?: ResolverInputTypes["jsonb"] | undefined | null; + nonce?: ResolverInputTypes["bigint"] | undefined | null; slot?: ResolverInputTypes["bigint"] | undefined | null; status?: string | undefined | null; time?: ResolverInputTypes["timestamptz"] | undefined | null; @@ -10562,7 +10058,6 @@ export type ResolverInputTypes = { /** aggregate stddev on columns */ ["transactions_stddev_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; chainId?: boolean | `@${string}`; fee?: boolean | `@${string}`; nonce?: boolean | `@${string}`; @@ -10572,7 +10067,6 @@ export type ResolverInputTypes = { /** order by stddev() on columns of table "transactions" */ ["transactions_stddev_order_by"]: { amount?: ResolverInputTypes["order_by"] | undefined | null; - blockTime?: ResolverInputTypes["order_by"] | undefined | null; chainId?: ResolverInputTypes["order_by"] | undefined | null; fee?: ResolverInputTypes["order_by"] | undefined | null; nonce?: ResolverInputTypes["order_by"] | undefined | null; @@ -10581,7 +10075,6 @@ export type ResolverInputTypes = { /** aggregate stddev_pop on columns */ ["transactions_stddev_pop_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; chainId?: boolean | `@${string}`; fee?: boolean | `@${string}`; nonce?: boolean | `@${string}`; @@ -10591,7 +10084,6 @@ export type ResolverInputTypes = { /** order by stddev_pop() on columns of table "transactions" */ ["transactions_stddev_pop_order_by"]: { amount?: ResolverInputTypes["order_by"] | undefined | null; - blockTime?: ResolverInputTypes["order_by"] | undefined | null; chainId?: ResolverInputTypes["order_by"] | undefined | null; fee?: ResolverInputTypes["order_by"] | undefined | null; nonce?: ResolverInputTypes["order_by"] | undefined | null; @@ -10600,7 +10092,6 @@ export type ResolverInputTypes = { /** aggregate stddev_samp on columns */ ["transactions_stddev_samp_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; chainId?: boolean | `@${string}`; fee?: boolean | `@${string}`; nonce?: boolean | `@${string}`; @@ -10610,7 +10101,6 @@ export type ResolverInputTypes = { /** order by stddev_samp() on columns of table "transactions" */ ["transactions_stddev_samp_order_by"]: { amount?: ResolverInputTypes["order_by"] | undefined | null; - blockTime?: ResolverInputTypes["order_by"] | undefined | null; chainId?: ResolverInputTypes["order_by"] | undefined | null; fee?: ResolverInputTypes["order_by"] | undefined | null; nonce?: ResolverInputTypes["order_by"] | undefined | null; @@ -10626,7 +10116,7 @@ export type ResolverInputTypes = { /** Initial value of the column from where the streaming should start */ ["transactions_stream_cursor_value_input"]: { amount?: ResolverInputTypes["float8"] | undefined | null; - blockTime?: ResolverInputTypes["bigint"] | undefined | null; + blockHash?: string | undefined | null; chainId?: ResolverInputTypes["bigint"] | undefined | null; clientId?: ResolverInputTypes["uuid"] | undefined | null; cluster?: string | undefined | null; @@ -10635,11 +10125,7 @@ export type ResolverInputTypes = { hash?: string | undefined | null; id?: ResolverInputTypes["uuid"] | undefined | null; network?: string | undefined | null; - nonce?: number | undefined | null; - postBalances?: ResolverInputTypes["jsonb"] | undefined | null; - preBalances?: ResolverInputTypes["jsonb"] | undefined | null; - recentBlockhash?: string | undefined | null; - signature?: ResolverInputTypes["jsonb"] | undefined | null; + nonce?: ResolverInputTypes["bigint"] | undefined | null; slot?: ResolverInputTypes["bigint"] | undefined | null; status?: string | undefined | null; time?: ResolverInputTypes["timestamptz"] | undefined | null; @@ -10648,7 +10134,6 @@ export type ResolverInputTypes = { /** aggregate sum on columns */ ["transactions_sum_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; chainId?: boolean | `@${string}`; fee?: boolean | `@${string}`; nonce?: boolean | `@${string}`; @@ -10658,7 +10143,6 @@ export type ResolverInputTypes = { /** order by sum() on columns of table "transactions" */ ["transactions_sum_order_by"]: { amount?: ResolverInputTypes["order_by"] | undefined | null; - blockTime?: ResolverInputTypes["order_by"] | undefined | null; chainId?: ResolverInputTypes["order_by"] | undefined | null; fee?: ResolverInputTypes["order_by"] | undefined | null; nonce?: ResolverInputTypes["order_by"] | undefined | null; @@ -10667,33 +10151,8 @@ export type ResolverInputTypes = { /** update columns of table "transactions" */ ["transactions_update_column"]: transactions_update_column; ["transactions_updates"]: { - /** append existing jsonb value of filtered columns with new jsonb value */ - _append?: - | ResolverInputTypes["transactions_append_input"] - | undefined - | null; - /** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */ - _delete_at_path?: - | ResolverInputTypes["transactions_delete_at_path_input"] - | undefined - | null; - /** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */ - _delete_elem?: - | ResolverInputTypes["transactions_delete_elem_input"] - | undefined - | null; - /** delete key/value pair or string element. key/value pairs are matched based on their key value */ - _delete_key?: - | ResolverInputTypes["transactions_delete_key_input"] - | undefined - | null; /** increments the numeric columns with given value of the filtered values */ _inc?: ResolverInputTypes["transactions_inc_input"] | undefined | null; - /** prepend existing jsonb value of filtered columns with new jsonb value */ - _prepend?: - | ResolverInputTypes["transactions_prepend_input"] - | undefined - | null; /** sets the columns of the filtered rows to the given values */ _set?: ResolverInputTypes["transactions_set_input"] | undefined | null; /** filter the rows which have to be updated */ @@ -10702,7 +10161,6 @@ export type ResolverInputTypes = { /** aggregate var_pop on columns */ ["transactions_var_pop_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; chainId?: boolean | `@${string}`; fee?: boolean | `@${string}`; nonce?: boolean | `@${string}`; @@ -10712,7 +10170,6 @@ export type ResolverInputTypes = { /** order by var_pop() on columns of table "transactions" */ ["transactions_var_pop_order_by"]: { amount?: ResolverInputTypes["order_by"] | undefined | null; - blockTime?: ResolverInputTypes["order_by"] | undefined | null; chainId?: ResolverInputTypes["order_by"] | undefined | null; fee?: ResolverInputTypes["order_by"] | undefined | null; nonce?: ResolverInputTypes["order_by"] | undefined | null; @@ -10721,7 +10178,6 @@ export type ResolverInputTypes = { /** aggregate var_samp on columns */ ["transactions_var_samp_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; chainId?: boolean | `@${string}`; fee?: boolean | `@${string}`; nonce?: boolean | `@${string}`; @@ -10731,7 +10187,6 @@ export type ResolverInputTypes = { /** order by var_samp() on columns of table "transactions" */ ["transactions_var_samp_order_by"]: { amount?: ResolverInputTypes["order_by"] | undefined | null; - blockTime?: ResolverInputTypes["order_by"] | undefined | null; chainId?: ResolverInputTypes["order_by"] | undefined | null; fee?: ResolverInputTypes["order_by"] | undefined | null; nonce?: ResolverInputTypes["order_by"] | undefined | null; @@ -10740,7 +10195,6 @@ export type ResolverInputTypes = { /** aggregate variance on columns */ ["transactions_variance_fields"]: AliasType<{ amount?: boolean | `@${string}`; - blockTime?: boolean | `@${string}`; chainId?: boolean | `@${string}`; fee?: boolean | `@${string}`; nonce?: boolean | `@${string}`; @@ -10750,7 +10204,6 @@ export type ResolverInputTypes = { /** order by variance() on columns of table "transactions" */ ["transactions_variance_order_by"]: { amount?: ResolverInputTypes["order_by"] | undefined | null; - blockTime?: ResolverInputTypes["order_by"] | undefined | null; chainId?: ResolverInputTypes["order_by"] | undefined | null; fee?: ResolverInputTypes["order_by"] | undefined | null; nonce?: ResolverInputTypes["order_by"] | undefined | null; @@ -12060,33 +11513,6 @@ export type ModelTypes = { _neq?: ModelTypes["float8"] | undefined; _nin?: Array | undefined; }; - ["jsonb"]: any; - ["jsonb_cast_exp"]: { - String?: ModelTypes["String_comparison_exp"] | undefined; - }; - /** Boolean expression to compare columns of type "jsonb". All fields are combined with logical 'AND'. */ - ["jsonb_comparison_exp"]: { - _cast?: ModelTypes["jsonb_cast_exp"] | undefined; - /** is the column contained in the given json value */ - _contained_in?: ModelTypes["jsonb"] | undefined; - /** does the column contain the given json value at the top level */ - _contains?: ModelTypes["jsonb"] | undefined; - _eq?: ModelTypes["jsonb"] | undefined; - _gt?: ModelTypes["jsonb"] | undefined; - _gte?: ModelTypes["jsonb"] | undefined; - /** does the string exist as a top-level key in the column */ - _has_key?: string | undefined; - /** do all of these strings exist as top-level keys in the column */ - _has_keys_all?: Array | undefined; - /** do any of these strings exist as top-level keys in the column */ - _has_keys_any?: Array | undefined; - _in?: Array | undefined; - _is_null?: boolean | undefined; - _lt?: ModelTypes["jsonb"] | undefined; - _lte?: ModelTypes["jsonb"] | undefined; - _neq?: ModelTypes["jsonb"] | undefined; - _nin?: Array | undefined; - }; /** mutation root */ ["mutation_root"]: { /** delete data from the table: "account" */ @@ -12559,7 +11985,7 @@ export type ModelTypes = { /** transactions table */ ["transactions"]: { amount: ModelTypes["float8"]; - blockTime: ModelTypes["bigint"]; + blockHash: string; chainId?: ModelTypes["bigint"] | undefined; /** An object relationship */ client: ModelTypes["client"]; @@ -12567,14 +11993,10 @@ export type ModelTypes = { cluster?: string | undefined; fee: ModelTypes["float8"]; from: string; - hash?: string | undefined; + hash: string; id: ModelTypes["uuid"]; network: string; - nonce?: number | undefined; - postBalances?: ModelTypes["jsonb"] | undefined; - preBalances?: ModelTypes["jsonb"] | undefined; - recentBlockhash: string; - signature: ModelTypes["jsonb"]; + nonce?: ModelTypes["bigint"] | undefined; slot?: ModelTypes["bigint"] | undefined; status: string; time: ModelTypes["timestamptz"]; @@ -12692,12 +12114,6 @@ export type ModelTypes = { var_samp?: ModelTypes["transactions_var_samp_order_by"] | undefined; variance?: ModelTypes["transactions_variance_order_by"] | undefined; }; - /** append existing jsonb value of filtered columns with new jsonb value */ - ["transactions_append_input"]: { - postBalances?: ModelTypes["jsonb"] | undefined; - preBalances?: ModelTypes["jsonb"] | undefined; - signature?: ModelTypes["jsonb"] | undefined; - }; /** input type for inserting array relation for remote table "transactions" */ ["transactions_arr_rel_insert_input"]: { data: Array; @@ -12707,7 +12123,6 @@ export type ModelTypes = { /** aggregate avg on columns */ ["transactions_avg_fields"]: { amount?: number | undefined; - blockTime?: number | undefined; chainId?: number | undefined; fee?: number | undefined; nonce?: number | undefined; @@ -12716,7 +12131,6 @@ export type ModelTypes = { /** order by avg() on columns of table "transactions" */ ["transactions_avg_order_by"]: { amount?: ModelTypes["order_by"] | undefined; - blockTime?: ModelTypes["order_by"] | undefined; chainId?: ModelTypes["order_by"] | undefined; fee?: ModelTypes["order_by"] | undefined; nonce?: ModelTypes["order_by"] | undefined; @@ -12728,7 +12142,7 @@ export type ModelTypes = { _not?: ModelTypes["transactions_bool_exp"] | undefined; _or?: Array | undefined; amount?: ModelTypes["float8_comparison_exp"] | undefined; - blockTime?: ModelTypes["bigint_comparison_exp"] | undefined; + blockHash?: ModelTypes["String_comparison_exp"] | undefined; chainId?: ModelTypes["bigint_comparison_exp"] | undefined; client?: ModelTypes["client_bool_exp"] | undefined; clientId?: ModelTypes["uuid_comparison_exp"] | undefined; @@ -12738,48 +12152,25 @@ export type ModelTypes = { hash?: ModelTypes["String_comparison_exp"] | undefined; id?: ModelTypes["uuid_comparison_exp"] | undefined; network?: ModelTypes["String_comparison_exp"] | undefined; - nonce?: ModelTypes["Int_comparison_exp"] | undefined; - postBalances?: ModelTypes["jsonb_comparison_exp"] | undefined; - preBalances?: ModelTypes["jsonb_comparison_exp"] | undefined; - recentBlockhash?: ModelTypes["String_comparison_exp"] | undefined; - signature?: ModelTypes["jsonb_comparison_exp"] | undefined; + nonce?: ModelTypes["bigint_comparison_exp"] | undefined; slot?: ModelTypes["bigint_comparison_exp"] | undefined; status?: ModelTypes["String_comparison_exp"] | undefined; time?: ModelTypes["timestamptz_comparison_exp"] | undefined; to?: ModelTypes["String_comparison_exp"] | undefined; }; ["transactions_constraint"]: transactions_constraint; - /** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */ - ["transactions_delete_at_path_input"]: { - postBalances?: Array | undefined; - preBalances?: Array | undefined; - signature?: Array | undefined; - }; - /** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */ - ["transactions_delete_elem_input"]: { - postBalances?: number | undefined; - preBalances?: number | undefined; - signature?: number | undefined; - }; - /** delete key/value pair or string element. key/value pairs are matched based on their key value */ - ["transactions_delete_key_input"]: { - postBalances?: string | undefined; - preBalances?: string | undefined; - signature?: string | undefined; - }; /** input type for incrementing numeric columns in table "transactions" */ ["transactions_inc_input"]: { amount?: ModelTypes["float8"] | undefined; - blockTime?: ModelTypes["bigint"] | undefined; chainId?: ModelTypes["bigint"] | undefined; fee?: ModelTypes["float8"] | undefined; - nonce?: number | undefined; + nonce?: ModelTypes["bigint"] | undefined; slot?: ModelTypes["bigint"] | undefined; }; /** input type for inserting data into table "transactions" */ ["transactions_insert_input"]: { amount?: ModelTypes["float8"] | undefined; - blockTime?: ModelTypes["bigint"] | undefined; + blockHash?: string | undefined; chainId?: ModelTypes["bigint"] | undefined; client?: ModelTypes["client_obj_rel_insert_input"] | undefined; clientId?: ModelTypes["uuid"] | undefined; @@ -12789,11 +12180,7 @@ export type ModelTypes = { hash?: string | undefined; id?: ModelTypes["uuid"] | undefined; network?: string | undefined; - nonce?: number | undefined; - postBalances?: ModelTypes["jsonb"] | undefined; - preBalances?: ModelTypes["jsonb"] | undefined; - recentBlockhash?: string | undefined; - signature?: ModelTypes["jsonb"] | undefined; + nonce?: ModelTypes["bigint"] | undefined; slot?: ModelTypes["bigint"] | undefined; status?: string | undefined; time?: ModelTypes["timestamptz"] | undefined; @@ -12802,7 +12189,7 @@ export type ModelTypes = { /** aggregate max on columns */ ["transactions_max_fields"]: { amount?: ModelTypes["float8"] | undefined; - blockTime?: ModelTypes["bigint"] | undefined; + blockHash?: string | undefined; chainId?: ModelTypes["bigint"] | undefined; clientId?: ModelTypes["uuid"] | undefined; cluster?: string | undefined; @@ -12811,8 +12198,7 @@ export type ModelTypes = { hash?: string | undefined; id?: ModelTypes["uuid"] | undefined; network?: string | undefined; - nonce?: number | undefined; - recentBlockhash?: string | undefined; + nonce?: ModelTypes["bigint"] | undefined; slot?: ModelTypes["bigint"] | undefined; status?: string | undefined; time?: ModelTypes["timestamptz"] | undefined; @@ -12821,7 +12207,7 @@ export type ModelTypes = { /** order by max() on columns of table "transactions" */ ["transactions_max_order_by"]: { amount?: ModelTypes["order_by"] | undefined; - blockTime?: ModelTypes["order_by"] | undefined; + blockHash?: ModelTypes["order_by"] | undefined; chainId?: ModelTypes["order_by"] | undefined; clientId?: ModelTypes["order_by"] | undefined; cluster?: ModelTypes["order_by"] | undefined; @@ -12831,7 +12217,6 @@ export type ModelTypes = { id?: ModelTypes["order_by"] | undefined; network?: ModelTypes["order_by"] | undefined; nonce?: ModelTypes["order_by"] | undefined; - recentBlockhash?: ModelTypes["order_by"] | undefined; slot?: ModelTypes["order_by"] | undefined; status?: ModelTypes["order_by"] | undefined; time?: ModelTypes["order_by"] | undefined; @@ -12840,7 +12225,7 @@ export type ModelTypes = { /** aggregate min on columns */ ["transactions_min_fields"]: { amount?: ModelTypes["float8"] | undefined; - blockTime?: ModelTypes["bigint"] | undefined; + blockHash?: string | undefined; chainId?: ModelTypes["bigint"] | undefined; clientId?: ModelTypes["uuid"] | undefined; cluster?: string | undefined; @@ -12849,8 +12234,7 @@ export type ModelTypes = { hash?: string | undefined; id?: ModelTypes["uuid"] | undefined; network?: string | undefined; - nonce?: number | undefined; - recentBlockhash?: string | undefined; + nonce?: ModelTypes["bigint"] | undefined; slot?: ModelTypes["bigint"] | undefined; status?: string | undefined; time?: ModelTypes["timestamptz"] | undefined; @@ -12859,7 +12243,7 @@ export type ModelTypes = { /** order by min() on columns of table "transactions" */ ["transactions_min_order_by"]: { amount?: ModelTypes["order_by"] | undefined; - blockTime?: ModelTypes["order_by"] | undefined; + blockHash?: ModelTypes["order_by"] | undefined; chainId?: ModelTypes["order_by"] | undefined; clientId?: ModelTypes["order_by"] | undefined; cluster?: ModelTypes["order_by"] | undefined; @@ -12869,7 +12253,6 @@ export type ModelTypes = { id?: ModelTypes["order_by"] | undefined; network?: ModelTypes["order_by"] | undefined; nonce?: ModelTypes["order_by"] | undefined; - recentBlockhash?: ModelTypes["order_by"] | undefined; slot?: ModelTypes["order_by"] | undefined; status?: ModelTypes["order_by"] | undefined; time?: ModelTypes["order_by"] | undefined; @@ -12891,7 +12274,7 @@ export type ModelTypes = { /** Ordering options when selecting data from "transactions". */ ["transactions_order_by"]: { amount?: ModelTypes["order_by"] | undefined; - blockTime?: ModelTypes["order_by"] | undefined; + blockHash?: ModelTypes["order_by"] | undefined; chainId?: ModelTypes["order_by"] | undefined; client?: ModelTypes["client_order_by"] | undefined; clientId?: ModelTypes["order_by"] | undefined; @@ -12902,10 +12285,6 @@ export type ModelTypes = { id?: ModelTypes["order_by"] | undefined; network?: ModelTypes["order_by"] | undefined; nonce?: ModelTypes["order_by"] | undefined; - postBalances?: ModelTypes["order_by"] | undefined; - preBalances?: ModelTypes["order_by"] | undefined; - recentBlockhash?: ModelTypes["order_by"] | undefined; - signature?: ModelTypes["order_by"] | undefined; slot?: ModelTypes["order_by"] | undefined; status?: ModelTypes["order_by"] | undefined; time?: ModelTypes["order_by"] | undefined; @@ -12915,12 +12294,6 @@ export type ModelTypes = { ["transactions_pk_columns_input"]: { id: ModelTypes["uuid"]; }; - /** prepend existing jsonb value of filtered columns with new jsonb value */ - ["transactions_prepend_input"]: { - postBalances?: ModelTypes["jsonb"] | undefined; - preBalances?: ModelTypes["jsonb"] | undefined; - signature?: ModelTypes["jsonb"] | undefined; - }; ["transactions_select_column"]: transactions_select_column; ["transactions_select_column_transactions_aggregate_bool_exp_avg_arguments_columns"]: transactions_select_column_transactions_aggregate_bool_exp_avg_arguments_columns; ["transactions_select_column_transactions_aggregate_bool_exp_corr_arguments_columns"]: transactions_select_column_transactions_aggregate_bool_exp_corr_arguments_columns; @@ -12933,7 +12306,7 @@ export type ModelTypes = { /** input type for updating data in table "transactions" */ ["transactions_set_input"]: { amount?: ModelTypes["float8"] | undefined; - blockTime?: ModelTypes["bigint"] | undefined; + blockHash?: string | undefined; chainId?: ModelTypes["bigint"] | undefined; clientId?: ModelTypes["uuid"] | undefined; cluster?: string | undefined; @@ -12942,11 +12315,7 @@ export type ModelTypes = { hash?: string | undefined; id?: ModelTypes["uuid"] | undefined; network?: string | undefined; - nonce?: number | undefined; - postBalances?: ModelTypes["jsonb"] | undefined; - preBalances?: ModelTypes["jsonb"] | undefined; - recentBlockhash?: string | undefined; - signature?: ModelTypes["jsonb"] | undefined; + nonce?: ModelTypes["bigint"] | undefined; slot?: ModelTypes["bigint"] | undefined; status?: string | undefined; time?: ModelTypes["timestamptz"] | undefined; @@ -12955,7 +12324,6 @@ export type ModelTypes = { /** aggregate stddev on columns */ ["transactions_stddev_fields"]: { amount?: number | undefined; - blockTime?: number | undefined; chainId?: number | undefined; fee?: number | undefined; nonce?: number | undefined; @@ -12964,7 +12332,6 @@ export type ModelTypes = { /** order by stddev() on columns of table "transactions" */ ["transactions_stddev_order_by"]: { amount?: ModelTypes["order_by"] | undefined; - blockTime?: ModelTypes["order_by"] | undefined; chainId?: ModelTypes["order_by"] | undefined; fee?: ModelTypes["order_by"] | undefined; nonce?: ModelTypes["order_by"] | undefined; @@ -12973,7 +12340,6 @@ export type ModelTypes = { /** aggregate stddev_pop on columns */ ["transactions_stddev_pop_fields"]: { amount?: number | undefined; - blockTime?: number | undefined; chainId?: number | undefined; fee?: number | undefined; nonce?: number | undefined; @@ -12982,7 +12348,6 @@ export type ModelTypes = { /** order by stddev_pop() on columns of table "transactions" */ ["transactions_stddev_pop_order_by"]: { amount?: ModelTypes["order_by"] | undefined; - blockTime?: ModelTypes["order_by"] | undefined; chainId?: ModelTypes["order_by"] | undefined; fee?: ModelTypes["order_by"] | undefined; nonce?: ModelTypes["order_by"] | undefined; @@ -12991,7 +12356,6 @@ export type ModelTypes = { /** aggregate stddev_samp on columns */ ["transactions_stddev_samp_fields"]: { amount?: number | undefined; - blockTime?: number | undefined; chainId?: number | undefined; fee?: number | undefined; nonce?: number | undefined; @@ -13000,7 +12364,6 @@ export type ModelTypes = { /** order by stddev_samp() on columns of table "transactions" */ ["transactions_stddev_samp_order_by"]: { amount?: ModelTypes["order_by"] | undefined; - blockTime?: ModelTypes["order_by"] | undefined; chainId?: ModelTypes["order_by"] | undefined; fee?: ModelTypes["order_by"] | undefined; nonce?: ModelTypes["order_by"] | undefined; @@ -13016,7 +12379,7 @@ export type ModelTypes = { /** Initial value of the column from where the streaming should start */ ["transactions_stream_cursor_value_input"]: { amount?: ModelTypes["float8"] | undefined; - blockTime?: ModelTypes["bigint"] | undefined; + blockHash?: string | undefined; chainId?: ModelTypes["bigint"] | undefined; clientId?: ModelTypes["uuid"] | undefined; cluster?: string | undefined; @@ -13025,11 +12388,7 @@ export type ModelTypes = { hash?: string | undefined; id?: ModelTypes["uuid"] | undefined; network?: string | undefined; - nonce?: number | undefined; - postBalances?: ModelTypes["jsonb"] | undefined; - preBalances?: ModelTypes["jsonb"] | undefined; - recentBlockhash?: string | undefined; - signature?: ModelTypes["jsonb"] | undefined; + nonce?: ModelTypes["bigint"] | undefined; slot?: ModelTypes["bigint"] | undefined; status?: string | undefined; time?: ModelTypes["timestamptz"] | undefined; @@ -13038,16 +12397,14 @@ export type ModelTypes = { /** aggregate sum on columns */ ["transactions_sum_fields"]: { amount?: ModelTypes["float8"] | undefined; - blockTime?: ModelTypes["bigint"] | undefined; chainId?: ModelTypes["bigint"] | undefined; fee?: ModelTypes["float8"] | undefined; - nonce?: number | undefined; + nonce?: ModelTypes["bigint"] | undefined; slot?: ModelTypes["bigint"] | undefined; }; /** order by sum() on columns of table "transactions" */ ["transactions_sum_order_by"]: { amount?: ModelTypes["order_by"] | undefined; - blockTime?: ModelTypes["order_by"] | undefined; chainId?: ModelTypes["order_by"] | undefined; fee?: ModelTypes["order_by"] | undefined; nonce?: ModelTypes["order_by"] | undefined; @@ -13055,20 +12412,8 @@ export type ModelTypes = { }; ["transactions_update_column"]: transactions_update_column; ["transactions_updates"]: { - /** append existing jsonb value of filtered columns with new jsonb value */ - _append?: ModelTypes["transactions_append_input"] | undefined; - /** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */ - _delete_at_path?: - | ModelTypes["transactions_delete_at_path_input"] - | undefined; - /** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */ - _delete_elem?: ModelTypes["transactions_delete_elem_input"] | undefined; - /** delete key/value pair or string element. key/value pairs are matched based on their key value */ - _delete_key?: ModelTypes["transactions_delete_key_input"] | undefined; /** increments the numeric columns with given value of the filtered values */ _inc?: ModelTypes["transactions_inc_input"] | undefined; - /** prepend existing jsonb value of filtered columns with new jsonb value */ - _prepend?: ModelTypes["transactions_prepend_input"] | undefined; /** sets the columns of the filtered rows to the given values */ _set?: ModelTypes["transactions_set_input"] | undefined; /** filter the rows which have to be updated */ @@ -13077,7 +12422,6 @@ export type ModelTypes = { /** aggregate var_pop on columns */ ["transactions_var_pop_fields"]: { amount?: number | undefined; - blockTime?: number | undefined; chainId?: number | undefined; fee?: number | undefined; nonce?: number | undefined; @@ -13086,7 +12430,6 @@ export type ModelTypes = { /** order by var_pop() on columns of table "transactions" */ ["transactions_var_pop_order_by"]: { amount?: ModelTypes["order_by"] | undefined; - blockTime?: ModelTypes["order_by"] | undefined; chainId?: ModelTypes["order_by"] | undefined; fee?: ModelTypes["order_by"] | undefined; nonce?: ModelTypes["order_by"] | undefined; @@ -13095,7 +12438,6 @@ export type ModelTypes = { /** aggregate var_samp on columns */ ["transactions_var_samp_fields"]: { amount?: number | undefined; - blockTime?: number | undefined; chainId?: number | undefined; fee?: number | undefined; nonce?: number | undefined; @@ -13104,7 +12446,6 @@ export type ModelTypes = { /** order by var_samp() on columns of table "transactions" */ ["transactions_var_samp_order_by"]: { amount?: ModelTypes["order_by"] | undefined; - blockTime?: ModelTypes["order_by"] | undefined; chainId?: ModelTypes["order_by"] | undefined; fee?: ModelTypes["order_by"] | undefined; nonce?: ModelTypes["order_by"] | undefined; @@ -13113,7 +12454,6 @@ export type ModelTypes = { /** aggregate variance on columns */ ["transactions_variance_fields"]: { amount?: number | undefined; - blockTime?: number | undefined; chainId?: number | undefined; fee?: number | undefined; nonce?: number | undefined; @@ -13122,7 +12462,6 @@ export type ModelTypes = { /** order by variance() on columns of table "transactions" */ ["transactions_variance_order_by"]: { amount?: ModelTypes["order_by"] | undefined; - blockTime?: ModelTypes["order_by"] | undefined; chainId?: ModelTypes["order_by"] | undefined; fee?: ModelTypes["order_by"] | undefined; nonce?: ModelTypes["order_by"] | undefined; @@ -14418,33 +13757,6 @@ export type GraphQLTypes = { _neq?: GraphQLTypes["float8"] | undefined; _nin?: Array | undefined; }; - ["jsonb"]: "scalar" & { name: "jsonb" }; - ["jsonb_cast_exp"]: { - String?: GraphQLTypes["String_comparison_exp"] | undefined; - }; - /** Boolean expression to compare columns of type "jsonb". All fields are combined with logical 'AND'. */ - ["jsonb_comparison_exp"]: { - _cast?: GraphQLTypes["jsonb_cast_exp"] | undefined; - /** is the column contained in the given json value */ - _contained_in?: GraphQLTypes["jsonb"] | undefined; - /** does the column contain the given json value at the top level */ - _contains?: GraphQLTypes["jsonb"] | undefined; - _eq?: GraphQLTypes["jsonb"] | undefined; - _gt?: GraphQLTypes["jsonb"] | undefined; - _gte?: GraphQLTypes["jsonb"] | undefined; - /** does the string exist as a top-level key in the column */ - _has_key?: string | undefined; - /** do all of these strings exist as top-level keys in the column */ - _has_keys_all?: Array | undefined; - /** do any of these strings exist as top-level keys in the column */ - _has_keys_any?: Array | undefined; - _in?: Array | undefined; - _is_null?: boolean | undefined; - _lt?: GraphQLTypes["jsonb"] | undefined; - _lte?: GraphQLTypes["jsonb"] | undefined; - _neq?: GraphQLTypes["jsonb"] | undefined; - _nin?: Array | undefined; - }; /** mutation root */ ["mutation_root"]: { __typename: "mutation_root"; @@ -14939,7 +14251,7 @@ export type GraphQLTypes = { ["transactions"]: { __typename: "transactions"; amount: GraphQLTypes["float8"]; - blockTime: GraphQLTypes["bigint"]; + blockHash: string; chainId?: GraphQLTypes["bigint"] | undefined; /** An object relationship */ client: GraphQLTypes["client"]; @@ -14947,14 +14259,10 @@ export type GraphQLTypes = { cluster?: string | undefined; fee: GraphQLTypes["float8"]; from: string; - hash?: string | undefined; + hash: string; id: GraphQLTypes["uuid"]; network: string; - nonce?: number | undefined; - postBalances?: GraphQLTypes["jsonb"] | undefined; - preBalances?: GraphQLTypes["jsonb"] | undefined; - recentBlockhash: string; - signature: GraphQLTypes["jsonb"]; + nonce?: GraphQLTypes["bigint"] | undefined; slot?: GraphQLTypes["bigint"] | undefined; status: string; time: GraphQLTypes["timestamptz"]; @@ -15074,12 +14382,6 @@ export type GraphQLTypes = { var_samp?: GraphQLTypes["transactions_var_samp_order_by"] | undefined; variance?: GraphQLTypes["transactions_variance_order_by"] | undefined; }; - /** append existing jsonb value of filtered columns with new jsonb value */ - ["transactions_append_input"]: { - postBalances?: GraphQLTypes["jsonb"] | undefined; - preBalances?: GraphQLTypes["jsonb"] | undefined; - signature?: GraphQLTypes["jsonb"] | undefined; - }; /** input type for inserting array relation for remote table "transactions" */ ["transactions_arr_rel_insert_input"]: { data: Array; @@ -15090,7 +14392,6 @@ export type GraphQLTypes = { ["transactions_avg_fields"]: { __typename: "transactions_avg_fields"; amount?: number | undefined; - blockTime?: number | undefined; chainId?: number | undefined; fee?: number | undefined; nonce?: number | undefined; @@ -15099,7 +14400,6 @@ export type GraphQLTypes = { /** order by avg() on columns of table "transactions" */ ["transactions_avg_order_by"]: { amount?: GraphQLTypes["order_by"] | undefined; - blockTime?: GraphQLTypes["order_by"] | undefined; chainId?: GraphQLTypes["order_by"] | undefined; fee?: GraphQLTypes["order_by"] | undefined; nonce?: GraphQLTypes["order_by"] | undefined; @@ -15111,7 +14411,7 @@ export type GraphQLTypes = { _not?: GraphQLTypes["transactions_bool_exp"] | undefined; _or?: Array | undefined; amount?: GraphQLTypes["float8_comparison_exp"] | undefined; - blockTime?: GraphQLTypes["bigint_comparison_exp"] | undefined; + blockHash?: GraphQLTypes["String_comparison_exp"] | undefined; chainId?: GraphQLTypes["bigint_comparison_exp"] | undefined; client?: GraphQLTypes["client_bool_exp"] | undefined; clientId?: GraphQLTypes["uuid_comparison_exp"] | undefined; @@ -15121,11 +14421,7 @@ export type GraphQLTypes = { hash?: GraphQLTypes["String_comparison_exp"] | undefined; id?: GraphQLTypes["uuid_comparison_exp"] | undefined; network?: GraphQLTypes["String_comparison_exp"] | undefined; - nonce?: GraphQLTypes["Int_comparison_exp"] | undefined; - postBalances?: GraphQLTypes["jsonb_comparison_exp"] | undefined; - preBalances?: GraphQLTypes["jsonb_comparison_exp"] | undefined; - recentBlockhash?: GraphQLTypes["String_comparison_exp"] | undefined; - signature?: GraphQLTypes["jsonb_comparison_exp"] | undefined; + nonce?: GraphQLTypes["bigint_comparison_exp"] | undefined; slot?: GraphQLTypes["bigint_comparison_exp"] | undefined; status?: GraphQLTypes["String_comparison_exp"] | undefined; time?: GraphQLTypes["timestamptz_comparison_exp"] | undefined; @@ -15133,37 +14429,18 @@ export type GraphQLTypes = { }; /** unique or primary key constraints on table "transactions" */ ["transactions_constraint"]: transactions_constraint; - /** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */ - ["transactions_delete_at_path_input"]: { - postBalances?: Array | undefined; - preBalances?: Array | undefined; - signature?: Array | undefined; - }; - /** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */ - ["transactions_delete_elem_input"]: { - postBalances?: number | undefined; - preBalances?: number | undefined; - signature?: number | undefined; - }; - /** delete key/value pair or string element. key/value pairs are matched based on their key value */ - ["transactions_delete_key_input"]: { - postBalances?: string | undefined; - preBalances?: string | undefined; - signature?: string | undefined; - }; /** input type for incrementing numeric columns in table "transactions" */ ["transactions_inc_input"]: { amount?: GraphQLTypes["float8"] | undefined; - blockTime?: GraphQLTypes["bigint"] | undefined; chainId?: GraphQLTypes["bigint"] | undefined; fee?: GraphQLTypes["float8"] | undefined; - nonce?: number | undefined; + nonce?: GraphQLTypes["bigint"] | undefined; slot?: GraphQLTypes["bigint"] | undefined; }; /** input type for inserting data into table "transactions" */ ["transactions_insert_input"]: { amount?: GraphQLTypes["float8"] | undefined; - blockTime?: GraphQLTypes["bigint"] | undefined; + blockHash?: string | undefined; chainId?: GraphQLTypes["bigint"] | undefined; client?: GraphQLTypes["client_obj_rel_insert_input"] | undefined; clientId?: GraphQLTypes["uuid"] | undefined; @@ -15173,11 +14450,7 @@ export type GraphQLTypes = { hash?: string | undefined; id?: GraphQLTypes["uuid"] | undefined; network?: string | undefined; - nonce?: number | undefined; - postBalances?: GraphQLTypes["jsonb"] | undefined; - preBalances?: GraphQLTypes["jsonb"] | undefined; - recentBlockhash?: string | undefined; - signature?: GraphQLTypes["jsonb"] | undefined; + nonce?: GraphQLTypes["bigint"] | undefined; slot?: GraphQLTypes["bigint"] | undefined; status?: string | undefined; time?: GraphQLTypes["timestamptz"] | undefined; @@ -15187,7 +14460,7 @@ export type GraphQLTypes = { ["transactions_max_fields"]: { __typename: "transactions_max_fields"; amount?: GraphQLTypes["float8"] | undefined; - blockTime?: GraphQLTypes["bigint"] | undefined; + blockHash?: string | undefined; chainId?: GraphQLTypes["bigint"] | undefined; clientId?: GraphQLTypes["uuid"] | undefined; cluster?: string | undefined; @@ -15196,8 +14469,7 @@ export type GraphQLTypes = { hash?: string | undefined; id?: GraphQLTypes["uuid"] | undefined; network?: string | undefined; - nonce?: number | undefined; - recentBlockhash?: string | undefined; + nonce?: GraphQLTypes["bigint"] | undefined; slot?: GraphQLTypes["bigint"] | undefined; status?: string | undefined; time?: GraphQLTypes["timestamptz"] | undefined; @@ -15206,7 +14478,7 @@ export type GraphQLTypes = { /** order by max() on columns of table "transactions" */ ["transactions_max_order_by"]: { amount?: GraphQLTypes["order_by"] | undefined; - blockTime?: GraphQLTypes["order_by"] | undefined; + blockHash?: GraphQLTypes["order_by"] | undefined; chainId?: GraphQLTypes["order_by"] | undefined; clientId?: GraphQLTypes["order_by"] | undefined; cluster?: GraphQLTypes["order_by"] | undefined; @@ -15216,7 +14488,6 @@ export type GraphQLTypes = { id?: GraphQLTypes["order_by"] | undefined; network?: GraphQLTypes["order_by"] | undefined; nonce?: GraphQLTypes["order_by"] | undefined; - recentBlockhash?: GraphQLTypes["order_by"] | undefined; slot?: GraphQLTypes["order_by"] | undefined; status?: GraphQLTypes["order_by"] | undefined; time?: GraphQLTypes["order_by"] | undefined; @@ -15226,7 +14497,7 @@ export type GraphQLTypes = { ["transactions_min_fields"]: { __typename: "transactions_min_fields"; amount?: GraphQLTypes["float8"] | undefined; - blockTime?: GraphQLTypes["bigint"] | undefined; + blockHash?: string | undefined; chainId?: GraphQLTypes["bigint"] | undefined; clientId?: GraphQLTypes["uuid"] | undefined; cluster?: string | undefined; @@ -15235,8 +14506,7 @@ export type GraphQLTypes = { hash?: string | undefined; id?: GraphQLTypes["uuid"] | undefined; network?: string | undefined; - nonce?: number | undefined; - recentBlockhash?: string | undefined; + nonce?: GraphQLTypes["bigint"] | undefined; slot?: GraphQLTypes["bigint"] | undefined; status?: string | undefined; time?: GraphQLTypes["timestamptz"] | undefined; @@ -15245,7 +14515,7 @@ export type GraphQLTypes = { /** order by min() on columns of table "transactions" */ ["transactions_min_order_by"]: { amount?: GraphQLTypes["order_by"] | undefined; - blockTime?: GraphQLTypes["order_by"] | undefined; + blockHash?: GraphQLTypes["order_by"] | undefined; chainId?: GraphQLTypes["order_by"] | undefined; clientId?: GraphQLTypes["order_by"] | undefined; cluster?: GraphQLTypes["order_by"] | undefined; @@ -15255,7 +14525,6 @@ export type GraphQLTypes = { id?: GraphQLTypes["order_by"] | undefined; network?: GraphQLTypes["order_by"] | undefined; nonce?: GraphQLTypes["order_by"] | undefined; - recentBlockhash?: GraphQLTypes["order_by"] | undefined; slot?: GraphQLTypes["order_by"] | undefined; status?: GraphQLTypes["order_by"] | undefined; time?: GraphQLTypes["order_by"] | undefined; @@ -15278,7 +14547,7 @@ export type GraphQLTypes = { /** Ordering options when selecting data from "transactions". */ ["transactions_order_by"]: { amount?: GraphQLTypes["order_by"] | undefined; - blockTime?: GraphQLTypes["order_by"] | undefined; + blockHash?: GraphQLTypes["order_by"] | undefined; chainId?: GraphQLTypes["order_by"] | undefined; client?: GraphQLTypes["client_order_by"] | undefined; clientId?: GraphQLTypes["order_by"] | undefined; @@ -15289,10 +14558,6 @@ export type GraphQLTypes = { id?: GraphQLTypes["order_by"] | undefined; network?: GraphQLTypes["order_by"] | undefined; nonce?: GraphQLTypes["order_by"] | undefined; - postBalances?: GraphQLTypes["order_by"] | undefined; - preBalances?: GraphQLTypes["order_by"] | undefined; - recentBlockhash?: GraphQLTypes["order_by"] | undefined; - signature?: GraphQLTypes["order_by"] | undefined; slot?: GraphQLTypes["order_by"] | undefined; status?: GraphQLTypes["order_by"] | undefined; time?: GraphQLTypes["order_by"] | undefined; @@ -15302,12 +14567,6 @@ export type GraphQLTypes = { ["transactions_pk_columns_input"]: { id: GraphQLTypes["uuid"]; }; - /** prepend existing jsonb value of filtered columns with new jsonb value */ - ["transactions_prepend_input"]: { - postBalances?: GraphQLTypes["jsonb"] | undefined; - preBalances?: GraphQLTypes["jsonb"] | undefined; - signature?: GraphQLTypes["jsonb"] | undefined; - }; /** select columns of table "transactions" */ ["transactions_select_column"]: transactions_select_column; /** select "transactions_aggregate_bool_exp_avg_arguments_columns" columns of table "transactions" */ @@ -15329,7 +14588,7 @@ export type GraphQLTypes = { /** input type for updating data in table "transactions" */ ["transactions_set_input"]: { amount?: GraphQLTypes["float8"] | undefined; - blockTime?: GraphQLTypes["bigint"] | undefined; + blockHash?: string | undefined; chainId?: GraphQLTypes["bigint"] | undefined; clientId?: GraphQLTypes["uuid"] | undefined; cluster?: string | undefined; @@ -15338,11 +14597,7 @@ export type GraphQLTypes = { hash?: string | undefined; id?: GraphQLTypes["uuid"] | undefined; network?: string | undefined; - nonce?: number | undefined; - postBalances?: GraphQLTypes["jsonb"] | undefined; - preBalances?: GraphQLTypes["jsonb"] | undefined; - recentBlockhash?: string | undefined; - signature?: GraphQLTypes["jsonb"] | undefined; + nonce?: GraphQLTypes["bigint"] | undefined; slot?: GraphQLTypes["bigint"] | undefined; status?: string | undefined; time?: GraphQLTypes["timestamptz"] | undefined; @@ -15352,7 +14607,6 @@ export type GraphQLTypes = { ["transactions_stddev_fields"]: { __typename: "transactions_stddev_fields"; amount?: number | undefined; - blockTime?: number | undefined; chainId?: number | undefined; fee?: number | undefined; nonce?: number | undefined; @@ -15361,7 +14615,6 @@ export type GraphQLTypes = { /** order by stddev() on columns of table "transactions" */ ["transactions_stddev_order_by"]: { amount?: GraphQLTypes["order_by"] | undefined; - blockTime?: GraphQLTypes["order_by"] | undefined; chainId?: GraphQLTypes["order_by"] | undefined; fee?: GraphQLTypes["order_by"] | undefined; nonce?: GraphQLTypes["order_by"] | undefined; @@ -15371,7 +14624,6 @@ export type GraphQLTypes = { ["transactions_stddev_pop_fields"]: { __typename: "transactions_stddev_pop_fields"; amount?: number | undefined; - blockTime?: number | undefined; chainId?: number | undefined; fee?: number | undefined; nonce?: number | undefined; @@ -15380,7 +14632,6 @@ export type GraphQLTypes = { /** order by stddev_pop() on columns of table "transactions" */ ["transactions_stddev_pop_order_by"]: { amount?: GraphQLTypes["order_by"] | undefined; - blockTime?: GraphQLTypes["order_by"] | undefined; chainId?: GraphQLTypes["order_by"] | undefined; fee?: GraphQLTypes["order_by"] | undefined; nonce?: GraphQLTypes["order_by"] | undefined; @@ -15390,7 +14641,6 @@ export type GraphQLTypes = { ["transactions_stddev_samp_fields"]: { __typename: "transactions_stddev_samp_fields"; amount?: number | undefined; - blockTime?: number | undefined; chainId?: number | undefined; fee?: number | undefined; nonce?: number | undefined; @@ -15399,7 +14649,6 @@ export type GraphQLTypes = { /** order by stddev_samp() on columns of table "transactions" */ ["transactions_stddev_samp_order_by"]: { amount?: GraphQLTypes["order_by"] | undefined; - blockTime?: GraphQLTypes["order_by"] | undefined; chainId?: GraphQLTypes["order_by"] | undefined; fee?: GraphQLTypes["order_by"] | undefined; nonce?: GraphQLTypes["order_by"] | undefined; @@ -15415,7 +14664,7 @@ export type GraphQLTypes = { /** Initial value of the column from where the streaming should start */ ["transactions_stream_cursor_value_input"]: { amount?: GraphQLTypes["float8"] | undefined; - blockTime?: GraphQLTypes["bigint"] | undefined; + blockHash?: string | undefined; chainId?: GraphQLTypes["bigint"] | undefined; clientId?: GraphQLTypes["uuid"] | undefined; cluster?: string | undefined; @@ -15424,11 +14673,7 @@ export type GraphQLTypes = { hash?: string | undefined; id?: GraphQLTypes["uuid"] | undefined; network?: string | undefined; - nonce?: number | undefined; - postBalances?: GraphQLTypes["jsonb"] | undefined; - preBalances?: GraphQLTypes["jsonb"] | undefined; - recentBlockhash?: string | undefined; - signature?: GraphQLTypes["jsonb"] | undefined; + nonce?: GraphQLTypes["bigint"] | undefined; slot?: GraphQLTypes["bigint"] | undefined; status?: string | undefined; time?: GraphQLTypes["timestamptz"] | undefined; @@ -15438,16 +14683,14 @@ export type GraphQLTypes = { ["transactions_sum_fields"]: { __typename: "transactions_sum_fields"; amount?: GraphQLTypes["float8"] | undefined; - blockTime?: GraphQLTypes["bigint"] | undefined; chainId?: GraphQLTypes["bigint"] | undefined; fee?: GraphQLTypes["float8"] | undefined; - nonce?: number | undefined; + nonce?: GraphQLTypes["bigint"] | undefined; slot?: GraphQLTypes["bigint"] | undefined; }; /** order by sum() on columns of table "transactions" */ ["transactions_sum_order_by"]: { amount?: GraphQLTypes["order_by"] | undefined; - blockTime?: GraphQLTypes["order_by"] | undefined; chainId?: GraphQLTypes["order_by"] | undefined; fee?: GraphQLTypes["order_by"] | undefined; nonce?: GraphQLTypes["order_by"] | undefined; @@ -15456,20 +14699,8 @@ export type GraphQLTypes = { /** update columns of table "transactions" */ ["transactions_update_column"]: transactions_update_column; ["transactions_updates"]: { - /** append existing jsonb value of filtered columns with new jsonb value */ - _append?: GraphQLTypes["transactions_append_input"] | undefined; - /** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */ - _delete_at_path?: - | GraphQLTypes["transactions_delete_at_path_input"] - | undefined; - /** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */ - _delete_elem?: GraphQLTypes["transactions_delete_elem_input"] | undefined; - /** delete key/value pair or string element. key/value pairs are matched based on their key value */ - _delete_key?: GraphQLTypes["transactions_delete_key_input"] | undefined; /** increments the numeric columns with given value of the filtered values */ _inc?: GraphQLTypes["transactions_inc_input"] | undefined; - /** prepend existing jsonb value of filtered columns with new jsonb value */ - _prepend?: GraphQLTypes["transactions_prepend_input"] | undefined; /** sets the columns of the filtered rows to the given values */ _set?: GraphQLTypes["transactions_set_input"] | undefined; /** filter the rows which have to be updated */ @@ -15479,7 +14710,6 @@ export type GraphQLTypes = { ["transactions_var_pop_fields"]: { __typename: "transactions_var_pop_fields"; amount?: number | undefined; - blockTime?: number | undefined; chainId?: number | undefined; fee?: number | undefined; nonce?: number | undefined; @@ -15488,7 +14718,6 @@ export type GraphQLTypes = { /** order by var_pop() on columns of table "transactions" */ ["transactions_var_pop_order_by"]: { amount?: GraphQLTypes["order_by"] | undefined; - blockTime?: GraphQLTypes["order_by"] | undefined; chainId?: GraphQLTypes["order_by"] | undefined; fee?: GraphQLTypes["order_by"] | undefined; nonce?: GraphQLTypes["order_by"] | undefined; @@ -15498,7 +14727,6 @@ export type GraphQLTypes = { ["transactions_var_samp_fields"]: { __typename: "transactions_var_samp_fields"; amount?: number | undefined; - blockTime?: number | undefined; chainId?: number | undefined; fee?: number | undefined; nonce?: number | undefined; @@ -15507,7 +14735,6 @@ export type GraphQLTypes = { /** order by var_samp() on columns of table "transactions" */ ["transactions_var_samp_order_by"]: { amount?: GraphQLTypes["order_by"] | undefined; - blockTime?: GraphQLTypes["order_by"] | undefined; chainId?: GraphQLTypes["order_by"] | undefined; fee?: GraphQLTypes["order_by"] | undefined; nonce?: GraphQLTypes["order_by"] | undefined; @@ -15517,7 +14744,6 @@ export type GraphQLTypes = { ["transactions_variance_fields"]: { __typename: "transactions_variance_fields"; amount?: number | undefined; - blockTime?: number | undefined; chainId?: number | undefined; fee?: number | undefined; nonce?: number | undefined; @@ -15526,7 +14752,6 @@ export type GraphQLTypes = { /** order by variance() on columns of table "transactions" */ ["transactions_variance_order_by"]: { amount?: GraphQLTypes["order_by"] | undefined; - blockTime?: GraphQLTypes["order_by"] | undefined; chainId?: GraphQLTypes["order_by"] | undefined; fee?: GraphQLTypes["order_by"] | undefined; nonce?: GraphQLTypes["order_by"] | undefined; @@ -15877,13 +15102,13 @@ export const enum sol_update_column { } /** unique or primary key constraints on table "transactions" */ export const enum transactions_constraint { - transactions_block_time_key = "transactions_block_time_key", + transactions_hash_key = "transactions_hash_key", transactions_pkey = "transactions_pkey", } /** select columns of table "transactions" */ export const enum transactions_select_column { amount = "amount", - blockTime = "blockTime", + blockHash = "blockHash", chainId = "chainId", clientId = "clientId", cluster = "cluster", @@ -15893,10 +15118,6 @@ export const enum transactions_select_column { id = "id", network = "network", nonce = "nonce", - postBalances = "postBalances", - preBalances = "preBalances", - recentBlockhash = "recentBlockhash", - signature = "signature", slot = "slot", status = "status", time = "time", @@ -15945,7 +15166,7 @@ export const enum transactions_select_column_transactions_aggregate_bool_exp_var /** update columns of table "transactions" */ export const enum transactions_update_column { amount = "amount", - blockTime = "blockTime", + blockHash = "blockHash", chainId = "chainId", clientId = "clientId", cluster = "cluster", @@ -15955,10 +15176,6 @@ export const enum transactions_update_column { id = "id", network = "network", nonce = "nonce", - postBalances = "postBalances", - preBalances = "preBalances", - recentBlockhash = "recentBlockhash", - signature = "signature", slot = "slot", status = "status", time = "time", @@ -16066,9 +15283,6 @@ type ZEUS_VARIABLES = { ["eth_updates"]: ValueTypes["eth_updates"]; ["float8"]: ValueTypes["float8"]; ["float8_comparison_exp"]: ValueTypes["float8_comparison_exp"]; - ["jsonb"]: ValueTypes["jsonb"]; - ["jsonb_cast_exp"]: ValueTypes["jsonb_cast_exp"]; - ["jsonb_comparison_exp"]: ValueTypes["jsonb_comparison_exp"]; ["order_by"]: ValueTypes["order_by"]; ["sol_bool_exp"]: ValueTypes["sol_bool_exp"]; ["sol_constraint"]: ValueTypes["sol_constraint"]; @@ -16099,14 +15313,10 @@ type ZEUS_VARIABLES = { ["transactions_aggregate_bool_exp_sum"]: ValueTypes["transactions_aggregate_bool_exp_sum"]; ["transactions_aggregate_bool_exp_var_samp"]: ValueTypes["transactions_aggregate_bool_exp_var_samp"]; ["transactions_aggregate_order_by"]: ValueTypes["transactions_aggregate_order_by"]; - ["transactions_append_input"]: ValueTypes["transactions_append_input"]; ["transactions_arr_rel_insert_input"]: ValueTypes["transactions_arr_rel_insert_input"]; ["transactions_avg_order_by"]: ValueTypes["transactions_avg_order_by"]; ["transactions_bool_exp"]: ValueTypes["transactions_bool_exp"]; ["transactions_constraint"]: ValueTypes["transactions_constraint"]; - ["transactions_delete_at_path_input"]: ValueTypes["transactions_delete_at_path_input"]; - ["transactions_delete_elem_input"]: ValueTypes["transactions_delete_elem_input"]; - ["transactions_delete_key_input"]: ValueTypes["transactions_delete_key_input"]; ["transactions_inc_input"]: ValueTypes["transactions_inc_input"]; ["transactions_insert_input"]: ValueTypes["transactions_insert_input"]; ["transactions_max_order_by"]: ValueTypes["transactions_max_order_by"]; @@ -16114,7 +15324,6 @@ type ZEUS_VARIABLES = { ["transactions_on_conflict"]: ValueTypes["transactions_on_conflict"]; ["transactions_order_by"]: ValueTypes["transactions_order_by"]; ["transactions_pk_columns_input"]: ValueTypes["transactions_pk_columns_input"]; - ["transactions_prepend_input"]: ValueTypes["transactions_prepend_input"]; ["transactions_select_column"]: ValueTypes["transactions_select_column"]; ["transactions_select_column_transactions_aggregate_bool_exp_avg_arguments_columns"]: ValueTypes["transactions_select_column_transactions_aggregate_bool_exp_avg_arguments_columns"]; ["transactions_select_column_transactions_aggregate_bool_exp_corr_arguments_columns"]: ValueTypes["transactions_select_column_transactions_aggregate_bool_exp_corr_arguments_columns"]; From 271ca5565c8c4377c03bcec162d6c34b1b55dcbb Mon Sep 17 00:00:00 2001 From: Akash Shaw Date: Thu, 7 Mar 2024 18:11:43 +0530 Subject: [PATCH 5/6] chore(web): changing the attributes in txn table --- apps/web/app/txn/components/columns.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/web/app/txn/components/columns.tsx b/apps/web/app/txn/components/columns.tsx index 8f2d5d11..463a1233 100644 --- a/apps/web/app/txn/components/columns.tsx +++ b/apps/web/app/txn/components/columns.tsx @@ -49,7 +49,7 @@ export const columns: ColumnDef[] = [ // make the cluster dynamic
Txn-{(row.getValue("id") as string).split("-")[1]} @@ -154,9 +154,7 @@ export const columns: ColumnDef[] = [ ), cell: ({ row }) => { - const blockTimeMilliseconds = row.original.blockTime * 1000; - - const blockDate = new Date(blockTimeMilliseconds); + const blockDate = new Date(row.original.time); const formattedDate = format(blockDate, "do MMM yy"); return (
@@ -175,7 +173,7 @@ export const columns: ColumnDef[] = [ ), cell: ({ row }) => { - const blockTimeMilliseconds = row.original.blockTime * 1000; + const blockTimeMilliseconds = row.original.time * 1000; const blockDate = new Date(blockTimeMilliseconds); const formattedTime = format(blockDate, "h:mm a"); From 4056d429ae52d5abf70490238443559949eb8b95 Mon Sep 17 00:00:00 2001 From: Akash Shaw Date: Thu, 7 Mar 2024 18:12:21 +0530 Subject: [PATCH 6/6] chore(api): txnType attribute changes --- backend/api/src/db/transaction.ts | 62 +++++++++------------------ backend/api/src/routes/transaction.ts | 6 +-- 2 files changed, 24 insertions(+), 44 deletions(-) diff --git a/backend/api/src/db/transaction.ts b/backend/api/src/db/transaction.ts index 414ca370..06311148 100644 --- a/backend/api/src/db/transaction.ts +++ b/backend/api/src/db/transaction.ts @@ -34,19 +34,16 @@ const chain = Chain(HASURA_URL, { */ export const insertTxn = async ({ clientId, - blockTime, + time, amount, fee, from, to, - postBalances, - preBalances, - recentBlockhash, - signature, + blockHash, + hash, network, slot, cluster, - nonce, chainId, }: InsertTxnType): Promise<{ status: dbResStatus; @@ -58,19 +55,15 @@ export const insertTxn = async ({ { object: { clientId, - signature, network, + hash, slot, amount, - blockTime, fee, from, to, - preBalances, - postBalances, - recentBlockhash, + blockHash, cluster, - nonce, chainId, }, }, @@ -120,22 +113,18 @@ export const getTxns = async ({ }, { id: true, - //@ts-ignore - signature: true, + hash: true, amount: true, - blockTime: true, + time: true, clientId: true, fee: true, - time: true, from: true, network: true, - //@ts-ignore - postBalances: true, - //@ts-ignore - preBalances: true, - recentBlockhash: true, + blockHash: true, slot: true, to: true, + cluster: true, + status: true }, ], }, @@ -160,7 +149,7 @@ export const getTxns = async ({ */ export const getTxnByHash = async ({ network, - sign, + hash, clientId, }: TxnQuerySignType): Promise<{ status: dbResStatus; @@ -172,29 +161,25 @@ export const getTxnByHash = async ({ transactions: [ { where: { - signature: { _contains: sign }, + hash: { _eq: hash }, clientId: { _eq: clientId }, network: { _eq: network }, }, }, { id: true, - //@ts-ignore - signature: true, amount: true, - blockTime: true, + time: true, clientId: true, fee: true, - time: true, from: true, network: true, - //@ts-ignore - postBalances: true, - //@ts-ignore - preBalances: true, - recentBlockhash: true, + blockHash: true, slot: true, to: true, + hash: true, + cluster: true, + status: true }, ], }, @@ -236,23 +221,18 @@ export const getAllTxn = async ({ }, { id: true, - //@ts-ignore - signature: true, + hash: true, amount: true, - blockTime: true, + time: true, clientId: true, fee: true, - time: true, from: true, network: true, - //@ts-ignore - postBalances: true, - //@ts-ignore - preBalances: true, - recentBlockhash: true, + blockHash: true, slot: true, to: true, cluster: true, + status: true }, ], }, diff --git a/backend/api/src/routes/transaction.ts b/backend/api/src/routes/transaction.ts index f7c4c4e0..3bc930fe 100644 --- a/backend/api/src/routes/transaction.ts +++ b/backend/api/src/routes/transaction.ts @@ -128,16 +128,16 @@ txnRouter.get("/get", async (req, res) => { //@ts-ignore const id = req.id as string; if (id) { - let { network, sign } = TxnQeuryByHash.parse(req.query); + let { network, hash } = TxnQeuryByHash.parse(req.query); /** * Cache */ - const isTxn = await cache.txn.cacheGetTxnBySign(sign); + const isTxn = await cache.txn.cacheGetTxnBySign(hash); if (isTxn) { return res.status(302).json({ txn: isTxn, status: responseStatus.Ok }); } //Db query - const txn = await getTxnByHash({ network, sign, clientId: id }); + const txn = await getTxnByHash({ network, hash, clientId: id }); if (txn.status == dbResStatus.Error) { return res .status(503)