@guaritos/tracer-engine
Version:
A highly performant and scalable multi-hop, time-aware tracer for account-based blockchain transactions, designed for off-chain risk assessment and flow analysis.
88 lines • 3.33 kB
TypeScript
declare class Edge {
/**
* Edge is a class that represents a financial transaction edge in the TTR strategy.
* It contains the from address, to address, symbol, value, and an optional timestamp
* associated with the edge.
*
* @param _from - The address from which the transaction originates.
* @param _to - The address to which the transaction is directed.
* @param _symbol - The symbol of the asset being transferred.
* @param _value - The value of the asset being transferred.
* @param _hash - The hash of the transaction.
* @param _timestamp - The timestamp of the transaction.
* @param _metadata - Extra info.
*/
from: string;
to: string;
symbol: string;
value: number;
hash: string;
timestamp: number;
metadata: any;
constructor(_from: string | undefined, _to: string | undefined, _symbol: string | undefined, _value: number | undefined, _type: string | undefined, _timestamp: number | undefined, _hash: string | undefined, _metadata: any);
}
declare class WeightedEdge {
from: string;
to: string;
weight: number;
symbol: string;
hash: string;
timestamp: number;
metadata: any;
constructor(params: {
from: string;
to: string;
weight: number;
symbol: string;
hash: string;
timestamp: number;
metadata: any;
});
}
declare class Profit {
symbol: string;
value: number;
timestamp: number;
constructor(symbol: string, value: number, timestamp: number);
}
declare class AggregatedEdge {
/**
* AggregatedEdge is a class that represents an aggregated edge in the TTR strategy.
* It contains a hash, profits, and aggregated edges.
*
* @param _hash - The hash of the aggregated edge.
* @param _profits - An array of profits associated with the aggregated edge.
* @param _aggregated_edges - An array of aggregated edges.
*/
hash: string;
profits: AggregatedEdgeProfit[];
aggregated_edges: any[];
metadata: any;
constructor(_hash: string, _profits: AggregatedEdgeProfit[], _aggregated_edges: any[], _metadata: any);
aggregate(aggregated_edge: any): AggregatedEdge;
get_input_profit(symbol: string): AggregatedEdgeProfit | null;
get_output_profit(symbol: string): AggregatedEdgeProfit | null;
get_output_profits(): AggregatedEdgeProfit[];
get_input_profits(): AggregatedEdgeProfit[];
get_output_symbols(): Set<unknown>;
get_input_symbols(): Set<unknown>;
get_timestamp(): number;
}
declare class AggregatedEdgeProfit {
address: string;
value: number;
timestamp: number;
symbol: string;
/**
* AggregatedEdgeProfit is a class that represents a profit associated with an aggregated edge.
* It contains the address, value, timestamp, and symbol of the profit.
*
* @param _address - The address associated with the profit.
* @param _value - The value of the profit.
* @param _timestamp - The timestamp of the profit.
* @param _symbol - The symbol associated with the profit.
*/
constructor(_address: string, _value: number, _timestamp: number, _symbol: string);
}
export { Edge, WeightedEdge, Profit, AggregatedEdge, AggregatedEdgeProfit, };
//# sourceMappingURL=ttr_defs.d.ts.map