Skip to content

v0.2.0

Compare
Choose a tag to compare
@asutula asutula released this 21 Jul 18:46
· 124 commits to master since this release

Powergate 0.2.0 introduces some API updates meant to make things easier to use and less confusing, but some of these are breaking changes. It also includes some bug fixes and other internal improvements.

API changes in pow.ffs:

  • DefaultConfig and CidConfig, previously used to represent the default storage configuration for a FFS instance and the storage settings for a specific cid, have both been replaced by StorageConfig. StorageConfig actually is the same shape as DefaultConfig was, but is used both to represent the default storage configuration for a FFS instance as well as for storage settings for a specific cid.
  • defaultConfig() changed to DefaultStorageConfig()
  • setDefaultConfig() changed to setDefaultStorageConfig()
  • getCidConfig() changed to GetStorageConfig()
  • pushConfig() changed to pushStorageConfig()
  • pushStorageConfig() option withOverrideConfig() is now withOverride()
  • pushStorageConfig() option withConfig() is now withStorageConfig()
  • Option withCidConfig() changed to withStorageConfig()
  • addToHot() changed to stage()
  • getDefaultCidConfig() was removed because it is no longer needed
  • Return value from info() of InstanceInfo.defaultConfig changed to InstanceInfo.defaultStorageConfig

Other API changes:

Previously, some functions returned objects while others returned single values. For the sake of consistency and to minimize future breaking changes, all functions now return objects, even when the object has only a single key. You'll need to read the object keys to get return values. The functions that changed in this way are:

  • asks.get()
  • asks.query()
  • faults.get()
  • ffs.listPayChannels()
  • ffs.listStorageDealRecords()
  • ffs.listRetrievalDealRecords()
  • ffs.showAll()
  • reputation.getTopMiners()
  • wallet.newAddress()
  • wallet.list()
  • wallet.balance()