Signature algorithm

Hi, I am trying to generate and sign a transaction using C#, but having troubles with signing. Is there a stand alone code example (not necessarity in C#), which implements Cosmos flavor of secp256k1 and sr25519 signing? Ideally, I’d like to take this code, compile it, and use to sign a transaction, which will successfully run in the Gaia testnet or my local dev node, for example.