@ledgerhq/coin-filecoin
Version:
Ledger Filecoin Coin integration
9 lines (7 loc) • 397 B
text/typescript
import { fetchEstimatedFees } from "../../network/api";
// The Filecoin REST API has no standalone nonce endpoint. We derive the nonce
// from the fee-estimation response, which includes the current account nonce.
export async function getNextSequence(address: string): Promise<bigint> {
const result = await fetchEstimatedFees({ from: address, to: address });
return BigInt(result.nonce);
}