Skip to content

Oracle signer reads secret key from raw env var — needs KMS/HSM signer before mainnet #5

Description

@pitah23

Problem

loadOracleKeypair() (src/shared/stellar.ts) reads ORACLE_SECRET_KEY directly from process env. Code comments and the README both flag this as dev/testnet-only, but there's no interface boundary prepared for swapping in a KMS/HSM-backed signer — submitContractCall() (src/safetynet/oracle.ts) works directly with a Keypair. Without a tracked follow-up, this risks shipping to mainnet unchanged under time pressure.

Location

  • src/shared/stellar.ts#loadOracleKeypair
  • src/safetynet/oracle.ts#submitContractCall

Suggested fix

Extract a Signer interface (sign(tx): Promise<Tx> / publicKey(): string) that submitContractCall depends on instead of a raw Keypair, with the current env-based loader as one implementation and room for a KMS-backed one. Track mainnet cutover as a hard release gate, not an incidental refactor.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions