Boilertalk / Web3.swift

A pure swift Ethereum Web3 library
MIT License
639 stars 188 forks source link

How do I obtain hexPrivateKey? #107

Closed ChurikiTenna closed 2 years ago

ChurikiTenna commented 3 years ago

I am trying init EthereumPrivateKey with hexPrivateKey.

I have connected my wallet with walletconnectswift. But there is no information of private key in the session obtained.

Below is the session info

Session(url: WalletConnectSwift.WCURL(topic: "E922E244-D80F-4933-A1AD-4D965F15E077", version: "1", bridgeURL: https://etherscan.bridge.walletconnect.org, key: "676e6f73697373616665b82b4a7797c7fb577e8ed6c44547e7bc1b9f14a4f7a2"), dAppInfo: WalletConnectSwift.Session.DAppInfo(peerId: "6AA62FB7-A2DB-48D0-9818-60A664B25F37", peerMeta: WalletConnectSwift.Session.ClientMeta(name: "MyAppName", description: Optional("my app description"), icons: [https://gnosis-safe.io/app/favicon.ico], url: my-website-url, scheme: Optional("gnosissafe")), chainId: nil, approved: nil), walletInfo: Optional(WalletConnectSwift.Session.WalletInfo(approved: true, accounts: ["0x97c8dfd045801feE4F05083777438E845C62C3fe"], chainId: 4, peerId: "df0a8e6c-c1a4-4dbb-890c-be711e17eaf1", peerMeta: WalletConnectSwift.Session.ClientMeta(name: "MetaMask", description: Optional("MetaMask Mobile app"), icons: [https://raw.githubusercontent.com/MetaMask/brand-resources/master/SVG/metamask-fox.svg], url: https://metamask.io, scheme: nil)))

Sorry to ask noob question here. I really need help...