import { normalizeLabels, BaseContext } from '../index.js';
import { SolanaChainId } from '@sentio/chain';
export class SolanaContext extends BaseContext {
    network;
    address;
    programName;
    blockNumber;
    transaction;
    constructor(programName, network, address, slot, baseLabels, transaction) {
        super(baseLabels);
        this.network = network || SolanaChainId.SOLANA_MAINNET;
        this.programName = programName;
        this.address = address;
        this.blockNumber = slot;
        this.transaction = transaction;
    }
    getChainId() {
        return this.network;
    }
    getMetaDataInternal(name, labels) {
        return {
            address: this.address,
            contractName: this.programName,
            blockNumber: this.blockNumber,
            transactionIndex: 0,
            transactionHash: this.transaction?.transaction.signatures[0] || '',
            logIndex: 0,
            chainId: this.getChainId(),
            name: name,
            labels: normalizeLabels(labels)
        };
    }
}
//# sourceMappingURL=solana-context.js.map