@cfxlabsinc/b2b-services
    Preparing search index...

    Variable utilaWalletTransactionTableConst

    utilaWalletTransactionTable: Omit<
        PgTableWithColumns<
            {
                columns: {
                    address: PgBuildColumn<
                        "utila_wallet_transaction",
                        PgTextBuilder<[string, ...string[]]>,
                        {
                            data: string;
                            dataType: "string";
                            driverParam: string;
                            enumValues: undefined;
                            generated: undefined;
                            hasDefault: false;
                            hasRuntimeDefault: false;
                            identity: undefined;
                            isAutoincrement: false;
                            isPrimaryKey: false;
                            name: string;
                            notNull: false;
                            tableName: "utila_wallet_transaction";
                        },
                    >;
                    amount: PgBuildColumn<
                        "utila_wallet_transaction",
                        SetNotNull<PgNumericBuilder>,
                        {
                            data: string;
                            dataType: "string numeric";
                            driverParam: string;
                            enumValues: undefined;
                            generated: undefined;
                            hasDefault: false;
                            hasRuntimeDefault: false;
                            identity: undefined;
                            isAutoincrement: false;
                            isPrimaryKey: false;
                            name: string;
                            notNull: true;
                            tableName: "utila_wallet_transaction";
                        },
                    >;
                    assetId: PgBuildColumn<
                        "utila_wallet_transaction",
                        SetNotNull<PgIntegerBuilder>,
                        {
                            data: number;
                            dataType: "number int32";
                            driverParam: string | number;
                            enumValues: undefined;
                            generated: undefined;
                            hasDefault: false;
                            hasRuntimeDefault: false;
                            identity: undefined;
                            isAutoincrement: false;
                            isPrimaryKey: false;
                            name: string;
                            notNull: true;
                            tableName: "utila_wallet_transaction";
                        },
                    >;
                    createdAt: PgBuildColumn<
                        "utila_wallet_transaction",
                        SetHasDefault<SetNotNull<PgTimestampBuilder>>,
                        {
                            data: Date;
                            dataType: "object date";
                            driverParam: string;
                            enumValues: undefined;
                            generated: undefined;
                            hasDefault: true;
                            hasRuntimeDefault: false;
                            identity: undefined;
                            isAutoincrement: false;
                            isPrimaryKey: false;
                            name: string;
                            notNull: true;
                            tableName: "utila_wallet_transaction";
                        },
                    >;
                    customerId: PgBuildColumn<
                        "utila_wallet_transaction",
                        PgIntegerBuilder,
                        {
                            data: number;
                            dataType: "number int32";
                            driverParam: string
                            | number;
                            enumValues: undefined;
                            generated: undefined;
                            hasDefault: false;
                            hasRuntimeDefault: false;
                            identity: undefined;
                            isAutoincrement: false;
                            isPrimaryKey: false;
                            name: string;
                            notNull: false;
                            tableName: "utila_wallet_transaction";
                        },
                    >;
                    feeAmount: PgBuildColumn<
                        "utila_wallet_transaction",
                        SetHasDefault<SetNotNull<PgNumericBuilder>>,
                        {
                            data: string;
                            dataType: "string numeric";
                            driverParam: string;
                            enumValues: undefined;
                            generated: undefined;
                            hasDefault: true;
                            hasRuntimeDefault: false;
                            identity: undefined;
                            isAutoincrement: false;
                            isPrimaryKey: false;
                            name: string;
                            notNull: true;
                            tableName: "utila_wallet_transaction";
                        },
                    >;
                    updatedAt: PgBuildColumn<
                        "utila_wallet_transaction",
                        SetHasDefault<SetHasDefault<SetNotNull<PgTimestampBuilder>>>,
                        {
                            data: Date;
                            dataType: "object date";
                            driverParam: string;
                            enumValues: undefined;
                            generated: undefined;
                            hasDefault: true;
                            hasRuntimeDefault: false;
                            identity: undefined;
                            isAutoincrement: false;
                            isPrimaryKey: false;
                            name: string;
                            notNull: true;
                            tableName: "utila_wallet_transaction";
                        },
                    >;
                    usdPrice: PgBuildColumn<
                        "utila_wallet_transaction",
                        PgNumericBuilder,
                        {
                            data: string;
                            dataType: "string numeric";
                            driverParam: string;
                            enumValues: undefined;
                            generated: undefined;
                            hasDefault: false;
                            hasRuntimeDefault: false;
                            identity: undefined;
                            isAutoincrement: false;
                            isPrimaryKey: false;
                            name: string;
                            notNull: false;
                            tableName: "utila_wallet_transaction";
                        },
                    >;
                    utilaTransactionId: PgBuildColumn<
                        "utila_wallet_transaction",
                        SetNotNull<PgIntegerBuilder>,
                        {
                            data: number;
                            dataType: "number int32";
                            driverParam: string | number;
                            enumValues: undefined;
                            generated: undefined;
                            hasDefault: false;
                            hasRuntimeDefault: false;
                            identity: undefined;
                            isAutoincrement: false;
                            isPrimaryKey: false;
                            name: string;
                            notNull: true;
                            tableName: "utila_wallet_transaction";
                        },
                    >;
                    vaultId: PgBuildColumn<
                        "utila_wallet_transaction",
                        SetNotNull<PgTextBuilder<[string, ...string[]]>>,
                        {
                            data: string;
                            dataType: "string";
                            driverParam: string;
                            enumValues: undefined;
                            generated: undefined;
                            hasDefault: false;
                            hasRuntimeDefault: false;
                            identity: undefined;
                            isAutoincrement: false;
                            isPrimaryKey: false;
                            name: string;
                            notNull: true;
                            tableName: "utila_wallet_transaction";
                        },
                    >;
                    walletId: PgBuildColumn<
                        "utila_wallet_transaction",
                        SetNotNull<PgTextBuilder<[string, ...string[]]>>,
                        {
                            data: string;
                            dataType: "string";
                            driverParam: string;
                            enumValues: undefined;
                            generated: undefined;
                            hasDefault: false;
                            hasRuntimeDefault: false;
                            identity: undefined;
                            isAutoincrement: false;
                            isPrimaryKey: false;
                            name: string;
                            notNull: true;
                            tableName: "utila_wallet_transaction";
                        },
                    >;
                };
                dialect: "pg";
                name: "utila_wallet_transaction";
                schema: "b2b";
            },
        >,
        "enableRLS",
    > = ...

    The precomputed row, at the same grain as solana_account_transaction: one per wallet per asset per transaction.

    Where this inverts Solana's table rather than copying it. There, the RPC gives pre_balance and post_balance in base units and amount is post_balance - pre_balance. Utila gives a normalized amount and no balances, and the balance is derived at read as sum(amount) over the series in chain order (§ 3.8) — so nothing balance-shaped is stored. Materializing one would make the stored value depend on insert order, which the chain-native ordering columns already answer without it.

    See docs/proposals/UTILA_TRANSACTION_SYNC.md § 3.2, § 3.4 for the writer, and § 3.8 for the read.