Seamless interaction with any Polkadot SDK based chain for Swift, Kotlin, Javascript, Python and more!
Polkabind is a library that opens the Polkadot ecosystem to programming languages other than Rust. It exposes mainly standard wallet-level functionality (key management, balance queries, extrinsic building, signing, RPC, event subscriptions and more) to other languages (Swift, Kotlin, Python, Javascript and more) by exposing Parity's Subxt library through FFI (foreign language interface).
Polkabind achieves this in a different way: leveraging Subxt to other programming languages (the official and established library to interact with Polkadot SDK chains), instead of reinventing it or a subset of its API scope from scratch.
Polkabind tries to open the Polkadot ecosystem to other languages in a smart way by:
Polkabind is not a Subxt replacement, nor it tries to reimplement it or a subset of its features in other languages.
Polkabind is three things:
flowchart TB subgraph Polkabind["Polkabind"] direction TB A1[Uses Subxt under the hood]:::concept A2[Exposes a simple developer-oriented API/façade]:::concept A1 --> A2 end subgraph Components["Polkabind Consists Of"] direction TB B1[Native binary = Rust façade + Subxt]:::component B2[Generated foreign-language library FFI bindings]:::component B3[CI pipeline: auto-package & publish]:::component end subgraph CI["CI Pipeline"] direction TB C1[On push to main repo] C2[Build binary & generate bindings] C3[Create & tag language packages] C4[Publish packages to registries] C1 --> C2 --> C3 --> C4 end Polkabind --> Components --> CI classDef concept fill:#fff4e5,stroke:#ffa726,stroke-width:1px; classDef component fill:#e3f2fd,stroke:#42a5f5,stroke-width:1px;
This is the overall scope of wallet-level API that Polkabind aims to deliver in the v1.0. The API will be developped in Rust, using Subxt under the hood, and exposed to Swift and Kotlin. Other languages will be supported in future versions, with a broader API surface.
Category | Feature / Task |
---|---|
Account | Generate mnemonic |
Account | Derive seed |
Account | Import JSON keystore |
Account | Export JSON keystore |
Account | Decode derivation path |
Address | SS58 encode |
Address | SS58 decode |
Balance | Query balance |
Balance | Subscribe to balance changes |
Transfer | Submit a transfer |
Transfer | Track extrinsic status |
Staking | Bond funds |
Staking | Unbond funds |
Staking | Nominate validators |
Staking | Withdraw unbonded |
Subscription | RPC connect |
Subscription | RPC disconnect |
Subscription | JSON-RPC request |
Subscription | Subscribe to storage changes |
Metadata | Fetch runtime metadata |
Fees & Dry-Run | Estimate transaction fee |
Fees & Dry-Run | Perform dry-run (payment query) |
Multisig | Create multisig call |
Multisig | Approve multisig |
Multisig | Execute multisig |
Batch | Batch multiple calls |
Governance | Submit democracy proposal |
Governance | Vote on referendum |
Assets & Tokens | Transfer arbitrary asset |
Assets & Tokens | Query asset balance |
Chain Info | Get chain properties |
Chain Info | Get runtime version |
Events | Subscribe to system events |
Block & Heads | Subscribe to new heads |
Block & Heads | Fetch block by hash |
Nonce & Account | Query account nonce |
Nonce & Account | Query account info |
Genesis & Chain | Get genesis hash |
Genesis & Chain | Get chain name |
Utility | Decode SCALE bytes |
Utility | Encode to SCALE bytes |