Releases: textileio/js-powergate-client
v4.1.0
v4.0.0 🌈
Changes
Please see the Powergate v2.0.0 release notes for more detailed information about API changes and additions.
🙏 A big thank you to all the contributors to this release:
v3.1.0 🌈
This update is compatible with Powergate v1.1.0 or newer
- Updates "storage profiles" method naming to "users" in the admin part of the API
- Type
Job
renamed toStorageJob
- Objects returned from any method related to storage jobs now uses the name
storageJob(s)
instead ofjob(s)
as the object key.
Changes
🧰 Maintenance
🙏 A big thank you to all the contributors to this release:
v3.0.0 🌈
Changes
This release includes big and breaking API changes for the Powergate client. They are described below.
General API focus
Powergate was previously developed without a clear picture of exactly who would be using it or how they may be using it. We now have a better idea of that, and the API has been cleaned up, slimmed down, and re-organized to align better with actual Powergate usage and purpose.
No more "FFS" wording
"FFS" is an implementation detail of Powergate and doesn't really add any value to the API. It turns out that almost all interactions with Powergate rely on the FFS implementation, and this is really just the default mode of Powergate's operation from an API perspective. Removing "FFS" from the API and just assuming its use has allowed for an easier to understand API... Just supply your auth token and don't worry about the internal implementation details of Powergate.
Filecoin deal state available
When viewing information about a Powergate storage job, real time information about any Filecoin storage deals is now included.
API structure based around API concepts and not backend implementation details.
The new API is organized around entities and concepts that are important to the DX of Powergate. The general outline of the new API is as follows and can be seen in the Go client, pow
CLI, as well as upcoming updates to the Javascript client.
- Admin - Administrative functions that are secured by an admin auth token (it is possible to run Powergate with no admin auth token)
- Profiles - Manage "storage profiles" (internally, these are FFS instances)
- Create - This is now how storage profiles are created (used to be
pow ffs create
) - List - List storage profiles including id and auth token
- Create - This is now how storage profiles are created (used to be
- Storage jobs - Various functions for querying Powergate storage jobs for any storage profile
- Queued jobs
- Executing jobs
- Latest final jobs
- Latest successful jobs
- Summary of all jobs
- Wallet
- Create address
- List all addresses
- Send FIL
- Profiles - Manage "storage profiles" (internally, these are FFS instances)
- Data - General operations around data to be stored or already stored in a Powergate storage profile
- Stage
- Replace
- Get
- Watch logs for CID
- CID info - New function that provides a summary of the desired storage state, current storage state, and any jobs and Filecoin deals for a CID.
- Deals - Information about Filecoin storage and retrieval deals in a Powergate storage profile
- List storage deals
- List retrieval deals
- Storage config - View and manage the default storage config and store data in a Powergate storage profile by applying storage configs to CIDs
- Get default
- Set default
- Apply
- Remove
- Storage jobs - New functions to query storage jobs of a storage profile in various states, including real time information about their corresponding Filecoin storage deals state
- Get job
- Get storage config for job
- Queued jobs
- Executing jobs
- Latest final jobs
- Latest successful jobs
- Summary of all jobs
- Watch jobs
- Cancel job
- Wallet - Functions to interact with a storage profile's wallet addresses
- Balance
- New address
- List addresses
- Send FIL
- Sign message
- Verify message
Simplified client return types
The JS client now always returns the gRPC type returned from the backend. This reduces the complexity of and number of dependencies for the client code, and decouples the client code from the server code. This sets us up for creating custom client types if/where needed in the future.
Removed APIs
Some APIs were not central to the primary use of Powergate. Some were not used at all and others are only used internally for Powergate implementation. The following were removed:
- Asks
- Faults
- Miners
- Reputation
- Net
- Health
Other changes
- Example app: Update powergate client and all other deps @asutula (#143)
- New Powergate API @asutula (#194)
🙏 A big thank you to all the contributors to this release:
v2.0.1 🚀
v2.0.0 🌈
v1.0.0
- Targets Powergate 0.4.0.
- Adds FFS
stageFolder
andgetFolder
. - FFS functions that accept options now take an options object instead of functional options.
- Removes FFS
close
function. - Adds
buildInfo
function to get build and version information about the connected Powergate server. - Improved generated docs.
v0.2.0
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
andCidConfig
, previously used to represent the default storage configuration for a FFS instance and the storage settings for a specific cid, have both been replaced byStorageConfig
.StorageConfig
actually is the same shape asDefaultConfig
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 toDefaultStorageConfig()
setDefaultConfig()
changed tosetDefaultStorageConfig()
getCidConfig()
changed toGetStorageConfig()
pushConfig()
changed topushStorageConfig()
pushStorageConfig()
optionwithOverrideConfig()
is nowwithOverride()
pushStorageConfig()
optionwithConfig()
is nowwithStorageConfig()
- Option
withCidConfig()
changed towithStorageConfig()
addToHot()
changed tostage()
getDefaultCidConfig()
was removed because it is no longer needed- Return value from
info()
ofInstanceInfo.defaultConfig
changed toInstanceInfo.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()
v0.1.0
v0.1.0-beta.14
Removes post install step that was causing npm install
to fail