steadyaction / etherwalletkit Goto Github PK
View Code? Open in Web Editor NEWEthereum Wallet Toolkit for iOS - You can implement an Ethereum wallet without a server and blockchain knowledge.
License: MIT License
Ethereum Wallet Toolkit for iOS - You can implement an Ethereum wallet without a server and blockchain knowledge.
License: MIT License
I need to send and receive token, but I didn't find the OC code that I could refer to.
Any chance you can provide support for Swift Package Manager?
Following up regarding 721 support. Created a new issue to keep it open. Awesome work!
web3swift 2.0 is out. Please update to new version
pod 'web3swift', :git => 'https://github.com/bankex/web3swift.git'
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)
}
I know this is old but I am having this error on Xcode 11 in EtherWallet+Account.swift. No such module 'EthereumAddress'
Will support for ERC20 and 721 tokens be built in the future?
I'd love to display other tokens.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.