For example, in Ethereum to create an account it must use the keccak256 algortithm.
Every blockchain uses a different hashing algorithm to create a wallet. Wallets can be considered the identity systems or authentication for building blockchain applications. The data field is a generic dictionary that is defined by each plugin for data needed in a specific blockchain. Needs to take in data specific for the blockchain and a subnetwork to be able to differentiate testnet and mainnet wallets for a given network. Static func createWallet(subnetwork: String, data: ?) throws -> WalletĬreate a new wallet. Please look over the Pocket Ethereum Plugin as an example for implementing on another blockchain. The PocketPlugin is a protocol that every Plugin needs to conform to. It is intended to abstract the complexity of blockchain development to enable developers to build out their applications quickly and easily.Įach plugin can be created independently and supported individually as a Cocoapods package, and each developer can pick and choose whichever plugins they wanna use to support on their network.įor example, if you wanted to add Ethereum support for your app, you can use our Pocket iOS Ethereum Plugin. The Pocket iOS Plugin System allows any iOS app to support any decentralized network that a developer wishes to build upon. The Wallet is the main account system for clients that do all the authentication by signing messages and transactions with their private keys. Successful responses to reads and writes are QueryResponse and TransactionResponse. Pod 'Pocket', :git => '', :branch => 'master' Primary ModelsĬonstructing reads and writes from blockchains have been modeled out as Query and Transaction. All queries and transactions conform to what a Pocket Node is expecting. Each plugin will have its own metadata specific to it's own blockchain. The SDK boils down to two main interactions, sendTransaction for writes and executeQuery for reads to a given blockchain. The Pocket iOS SDK contains a generic interface that allows anyone to build a plugin that is specific to any blockchain. This repository has been deprecated, please visit the PocketSwift repository for the latest on Pocket iOS client development.