BitSong
  • Introduction
  • Delegators
    • Delegator FAQ
    • Delegator Security
  • Validators
    • Validator Overview
    • Validator FAQ
    • Validator Security
  • Relayer
  • FAQ
  • Glossary
  • Roadmap
  • Media Kit
  • Links
  • Blockchain
    • Install go-bitsong
    • Join the Mainnet
    • Create Validator
    • CLI Guide
    • Gas and Fees
    • Pruning of State
    • Export the state
    • Verify Mainnet
    • Upgrades
      • From v0.8.0 to v0.10.0
      • From v0.10.0 to v0.11.0
      • From v0.12.x to v0.13.0
      • From v0.13.x to v0.14.0
      • From v0.14.x to v0.15.0
      • From v0.17.0 to v0.18.0
  • Features and Modules
    • Fan Tokens
    • Merkledrop
    • NFTs
    • Marketplace
    • CosmWasm
      • Install rust
      • Deploy a Smart Contract
    • IBC
    • Auth
    • Bank
    • Crisis
    • Capability
    • Community Pool
    • Distribution
    • Evidence
    • Governance
    • Mint
    • Staking
    • Slashing
    • Upgrade
  • BTSG
    • What is BTSG ?
    • Distribution and Tokenomics
    • Wallets
    • Buy and Sell
    • Liquidity Provider
  • Developers
    • bitsongJS
  • PRODUCTS
    • Sinfonia
    • BitSong Studio
  • USEFUL GUIDES
    • How to Create a BitSong wallet
    • How to Import Your BitSong Wallet
    • How to Stake $BTSG
    • How to Add $BTSG Liquidity to Osmosis Pools
    • Sinfonia User's Guide
    • How to Report a Bug on Sinfonia
  • Global Ambassador Program
    • Who is an ambassador?
    • Program Rules
Powered by GitBook
On this page
  1. Features and Modules

Capability

PreviousCrisisNextCommunity Pool

Last updated 3 years ago

Capability is an implementation of a Cosmos SDK module, per , that allows for provisioning, tracking, and authenticating multi-owner capabilities at runtime.

The keeper maintains two states: persistent and ephemeral in-memory. The persistent store maintains a globally unique auto-incrementing index and a mapping from capability index to a set of capability owners that are defined as a module and capability name tuple. The in-memory ephemeral state keeps track of the actual capabilities, represented as addresses in local memory, with both forward and reverse indexes. The forward index maps module name and capability tuples to the capability name. The reverse index maps between the module and capability name and the capability itself.

The keeper allows the creation of "scoped" sub-keepers which are tied to a particular module by name. Scoped keepers must be created at application initialization and passed to modules, which can then use them to claim capabilities they receive and retrieve capabilities which they own by name, in addition to creating new capabilities and authenticating capabilities passed by other modules. A scoped keeper cannot escape its scope, so a module cannot interfere with or inspect capabilities owned by other modules.

The keeper provides no other core functionality that can be found in other modules like queriers, REST and CLI handlers, and genesis state.

ADR 003