Code Monkey home page Code Monkey logo

etherwalletkit's People

Contributors

steadyaction avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

etherwalletkit's Issues

SPM

Any chance you can provide support for Swift Package Manager?

Old version of web3swift

web3swift 2.0 is out. Please update to new version

pod 'web3swift', :git => 'https://github.com/bankex/web3swift.git'

Support Infura V3

Great repo !

Infura no longer supports the old API, now we have to access through https://mainnet.infura.io/v3/<PROJECT_ID>

I updated the project accordingly with the following pieces of code and my Project ID obtained through Infura dashboard:

EtherWallet.swift
private let web3Main = Web3.InfuraMainnetWeb3("<PROJECT ID>")

Web3.swift (unchanged)

public static func InfuraMainnetWeb3(accessToken: String? = nil) -> web3 {
        let infura = InfuraProvider(Networks.Mainnet, accessToken: accessToken)!
        return web3(provider: infura)
    }

Web3+Infura.swift

public class InfuraProvider: Web3HttpProvider {
    public init?(_ net:Networks, accessToken token: String? = nil, keystoreManager manager: KeystoreManager? = nil) {
        var requestURLstring = "https://" + net.name + ".infura.io/v3/"
        if token != nil {
            requestURLstring = requestURLstring + token!
        }
        let providerURL = URL(string: requestURLstring)
        super.init(providerURL!, network: net, keystoreManager: manager)
    }
...
}

Requesting the balance with EtherWallet.balance throws the following error.

EtherWalletTest[3957:62791] CredStore - performQuery - Error copying matching creds.  Error=-25300, query={
    class = inet;
    "m_Limit" = "m_LimitAll";
    ptcl = htps;
    "r_Attributes" = 1;
    sdmn = "Project ID is required in the URL";
    srvr = "mainnet.infura.io";
    sync = syna;
}

It seems that the project ID is missing in the call, but printing requestURLstring shows the correct URL with the access token.

如何使用助记词

在web3swift中可以使用

let keystore = try! BIP32Keystore(seed: seed, password: "")

我不知道在EtherWalletKit中该如何使用助记词进行创建
是否需要在EtherWallet+Account.swift添加

   public func generateMmemonics(mmemonics: String, password: String) throws {
        
        guard let seed = BIP39.seedFromMmemonics(mmemonics, password: password) else {
            throw WalletError.toSeedFailure
        }
        let keystore = try BIP32Keystore(seed: seed)
        let keystoreManager = KeystoreManager([keystore!])
        guard let keystoreV3 = keystoreManager.keystores.first else {
            throw WalletError.malformedKeystore
        }
        try saveKeystore(keystoreV3)
    }

Error "Cannot load module 'web3swift' as 'Web3swift'"

I am having this error on Xcode 13.0 in EtherWallet.swift and the 'EtherWalletKit' pod version is 0.1.4

Screenshot 2022-03-14 at 12 43 46 PM

Screenshot 2022-03-14 at 12 42 35 PM

When I updated web3swift instead of Web3swift then got another issue is "No such module 'EthereumAddress'".

Screenshot 2022-03-14 at 12 43 24 PM

Please give me suggestions regarding this issue.

Documentation for ERC20

Will support for ERC20 and 721 tokens be built in the future?
I'd love to display other tokens.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.