For easier integration, you can add the Satellite contract as a dependency and use its interfaces inside your smart contract. To do that using Foundry, you should first install it using:
forge install HerodotusDev/satellite
and then we recommend configuring a remapping inside your foundry.toml file:
remappings = [
  # Your other remappings go here
  "@HerodotusDev/satellite/=lib/satellite/",
]
Or if you are using NPM (e.g. with Hardhat), you can just install it using:
npm install https://github.com/HerodotusDev/satellite
Then you can use the Satellite contract in your smart contract. Here is an example code snippet of a contract which gives voting power to the account based on its historical balance.
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.27;

import {ISatellite} from "@HerodotusDev/satellite/solidity/src/interfaces/ISatellite.sol";

contract HistoricalBalanceVoting {
    ISatellite public satellite;
    address public immutable token;
    uint256 public immutable timeSeconds;

    constructor(address _satellite, address _token, uint256 _timeSeconds) {
        satellite = ISatellite(_satellite);
        token = _token;
        timeSeconds = _timeSeconds;
    }

    function getVotingPower(address account) public view returns (uint256) {
        uint256 chainId = block.chainid;
        uint256 historicalTimestamp = block.timestamp - timeSeconds;
        uint256 blockNumber = satellite.timestamp(chainId, historicalTimestamp);
        bytes32 slot = keccak256(abi.encode(account, token));
        bytes32 value = satellite.storageSlot(chainId, blockNumber, account, slot);
        return uint256(value);
    }

    // ...
}