Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
secp256k1 public keys
import Voltaire let priv = try PrivateKey.generate() let pub = try priv.publicKey() // Compressed SEC1 form let comp = try pub.compressed() XCTAssertTrue(comp[0] == 0x02 || comp[0] == 0x03) // Ethereum address from public key let addr = try pub.address() print(addr.hex) // Uncompressed (x||y) access XCTAssertEqual(pub.uncompressed.count, 64)
Was this page helpful?
Suggestions