Secp256k1.os_retry: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/crypto/secp256k1.bend as Secp256k1 Lines 63-73 of bend-collections@1.0.0.0/src/crypto/secp256k1.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/crypto/secp256k1.bend&start_line=63&end_line=73 import Base def os_retry(fuel: Nat, m: Maybe<&2, Keypair>) -> IO(Maybe<&2, Keypair>): match fuel m: case _ Some{kp}: IO.pure(Maybe<&2, Keypair>, Some{kp}) case 0n None{}: IO.pure(Maybe<&2, Keypair>, None{}) case 1n+f None{}: do IO>: seed : List<&2, U32> <- random_bytes(8n, Nil{}) kp : Maybe<&2, Keypair> <- os_retry(f, generate_keypair(seed)) return kp Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/secp256k1.bend&name=Keypair https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/secp256k1.bend&name=generate_keypair https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/secp256k1.bend&name=random_bytes