import { Sequelize, Model, Association, CreationOptional } from 'sequelize'; import { Address } from '@graphprotocol/common-ts'; import { TAPVerifier } from '@semiotic-labs/tap-contracts-bindings'; import { RAV as RAVv2 } from '@graphprotocol/toolshed'; import { BytesLike } from 'ethers'; export interface ScalarTapReceiptsAttributes { id: number; allocation_id: Address; signer_address: Address; signature: Uint8Array; timestamp_ns: bigint; nonce: bigint; value: bigint; error_log?: string; } export declare class ScalarTapReceipts extends Model implements ScalarTapReceiptsAttributes { id: number; allocation_id: Address; signer_address: Address; signature: Uint8Array; timestamp_ns: bigint; nonce: bigint; value: bigint; createdAt: CreationOptional; updatedAt: CreationOptional; } export interface TapHorizonReceiptsAttributes { id: number; signer_address: Address; signature: Uint8Array; collection_id: string; payer: Address; data_service: Address; service_provider: Address; timestamp_ns: bigint; nonce: bigint; value: bigint; error_log?: string; } export declare class TapHorizonReceipts extends Model implements TapHorizonReceiptsAttributes { id: number; signer_address: Address; signature: Uint8Array; collection_id: string; payer: Address; data_service: Address; service_provider: Address; timestamp_ns: bigint; nonce: bigint; value: bigint; createdAt: CreationOptional; updatedAt: CreationOptional; } export declare class ScalarTapReceiptsInvalid extends Model implements ScalarTapReceiptsAttributes { id: number; allocation_id: Address; signer_address: Address; timestamp_ns: bigint; nonce: bigint; value: bigint; signature: Uint8Array; error_log: string; createdAt: CreationOptional; updatedAt: CreationOptional; } export declare class TapHorizonReceiptsInvalid extends Model implements TapHorizonReceiptsAttributes { id: number; signer_address: Address; signature: Uint8Array; collection_id: string; payer: Address; data_service: Address; service_provider: Address; timestamp_ns: bigint; nonce: bigint; value: bigint; error_log: string; createdAt: CreationOptional; updatedAt: CreationOptional; } export interface AllocationReceiptAttributes { id: string; allocation: Address; fees: string; signature: string; protocolNetwork: string; } export declare class AllocationReceipt extends Model implements AllocationReceiptAttributes { id: string; allocation: Address; fees: string; signature: string; protocolNetwork: string; readonly createdAt: Date; readonly updatedAt: Date; } export interface VoucherAttributes { allocation: Address; amount: string; signature: string; protocolNetwork: string; } export declare class Voucher extends Model implements VoucherAttributes { allocation: Address; amount: string; signature: string; readonly createdAt: Date; readonly updatedAt: Date; protocolNetwork: string; readonly allocationSummary?: AllocationSummary; static associations: { allocationSummary: Association; }; } export interface ReceiptAggregateVoucherAttributes { allocationId: string; senderAddress: string; signature: Uint8Array; timestampNs: bigint; valueAggregate: bigint; last: boolean; redeemedAt: Date | null; final: boolean; } export interface ReceiptAggregateVoucherV2Attributes { signature: Uint8Array; collectionId: string; payer: string; dataService: string; serviceProvider: string; timestampNs: bigint; valueAggregate: bigint; metadata: string; last: boolean; final: boolean; redeemedAt: Date | null; } export interface FailedReceiptAggregateVoucherAttributes { allocationId: string; senderAddress: string; expectedRav: JSON; rav_response: JSON; reason: string; } export interface FailedReceiptAggregateVoucherV2Attributes { collectionId: string; payer: string; dataService: string; serviceProvider: string; expectedRav: JSON; rav_response: JSON; reason: string; } export declare class ReceiptAggregateVoucher extends Model implements ReceiptAggregateVoucherAttributes { allocationId: Address; senderAddress: Address; signature: Uint8Array; timestampNs: bigint; valueAggregate: bigint; final: boolean; last: boolean; redeemedAt: Date | null; createdAt: CreationOptional; updatedAt: CreationOptional; readonly allocationSummary?: AllocationSummary; static associations: { allocationSummary: Association; }; getSignedRAV(): SignedRAV; } export type SignedRAVv2 = { rav: RAVv2; signature: BytesLike; }; export declare class ReceiptAggregateVoucherV2 extends Model implements ReceiptAggregateVoucherV2Attributes { signature: Uint8Array; collectionId: string; payer: Address; dataService: Address; serviceProvider: Address; timestampNs: bigint; valueAggregate: bigint; metadata: string; final: boolean; last: boolean; redeemedAt: Date | null; createdAt: CreationOptional; updatedAt: CreationOptional; readonly allocationSummary?: AllocationSummary; static associations: { allocationSummary: Association; }; getSignedRAV(): SignedRAVv2; } export type SignedRAV = TAPVerifier.SignedRAVStruct; export declare class FailedReceiptAggregateVoucher extends Model implements FailedReceiptAggregateVoucherAttributes { allocationId: Address; senderAddress: Address; expectedRav: JSON; rav_response: JSON; reason: string; } export declare class FailedReceiptAggregateVoucherV2 extends Model implements FailedReceiptAggregateVoucherV2Attributes { collectionId: string; payer: Address; dataService: Address; serviceProvider: Address; expectedRav: JSON; rav_response: JSON; reason: string; } export interface TransferReceiptAttributes { id: number; signer: Address; fees: string; signature: string; protocolNetwork: string; } export declare class TransferReceipt extends Model implements TransferReceiptAttributes { id: number; signer: Address; fees: string; signature: string; protocolNetwork: string; readonly createdAt: Date; readonly updatedAt: Date; readonly transfer?: Transfer; static associations: { transfer: Association; }; } export declare enum TransferStatus { OPEN = "OPEN", ALLOCATION_CLOSED = "ALLOCATION_CLOSED", RESOLVED = "RESOLVED", FAILED = "FAILED" } export interface TransferAttributes { routingId: string; allocation: Address; signer: Address; allocationClosedAt: Date | null; status: TransferStatus; protocolNetwork: string; } export declare class Transfer extends Model implements TransferAttributes { routingId: string; allocation: Address; signer: Address; allocationClosedAt: Date | null; status: TransferStatus; protocolNetwork: string; readonly createdAt: Date; readonly updatedAt: Date; readonly receipts?: TransferReceipt[]; static associations: { receipts: Association; }; } export interface AllocationSummaryAttributes { allocation: Address; closedAt: Date | null; createdTransfers: number; resolvedTransfers: number; failedTransfers: number; openTransfers: number; collectedFees: string; withdrawnFees: string; protocolNetwork: string; } export declare class AllocationSummary extends Model implements AllocationSummaryAttributes { allocation: Address; closedAt: Date; createdTransfers: number; resolvedTransfers: number; failedTransfers: number; openTransfers: number; collectedFees: string; withdrawnFees: string; protocolNetwork: string; readonly createdAt: Date; readonly updatedAt: Date; readonly transfers?: Transfer[]; readonly allocationReceipts?: AllocationReceipt[]; readonly voucher?: Voucher; readonly receiptAggregateVoucher?: ReceiptAggregateVoucher; readonly receiptAggregateVoucherV2?: ReceiptAggregateVoucherV2; voucherType?: 'Voucher' | 'ReceiptAggregateVoucher' | 'ReceiptAggregateVoucherV2'; static associations: { transfers: Association; allocationReceipts: Association; voucher: Association; receiptAggregateVoucher: Association; receiptAggregateVoucherV2: Association; }; } export interface QueryFeeModels { allocationReceipts: typeof AllocationReceipt; vouchers: typeof Voucher; receiptAggregateVouchers: typeof ReceiptAggregateVoucher; receiptAggregateVouchersV2: typeof ReceiptAggregateVoucherV2; transferReceipts: typeof TransferReceipt; transfers: typeof Transfer; allocationSummaries: typeof AllocationSummary; scalarTapReceipts: typeof ScalarTapReceipts; scalarTapReceiptsInvalid: typeof ScalarTapReceiptsInvalid; failedReceiptAggregateVouchers: typeof FailedReceiptAggregateVoucher; failedReceiptAggregateVouchersV2: typeof FailedReceiptAggregateVoucherV2; } export declare function defineQueryFeeModels(sequelize: Sequelize): QueryFeeModels;