The format is based on Keep a Changelog. This project adheres to Semantic Versioning.
- Fix DhtOps helper functions
getChainOpType
,getChainOpAction
,getChainOpEntry
andgetChainOpSignature
to adhere to the new types
- Change
InstallAppRequest
type to adhere to the new format that includes theroles_settings
field and removes themembrane_proofs
field as membrane proofs are now specified as part of theroles_settings
.
- Simplify zome call parameters.
cap_secret
,provenance
andpayload
are optional parameters of aCallZomeRequest
. If implicit zome call signing is used, which happens when calling a zome with aCallZomeRequest
,provenance
andcap_secret
are automatically set with the authorized signing credentials. It is still possible to call a cell by its role name instead of its cell id. Alternatively to passing in aCallZomeRequest
,callZome
can be invoked with a signed requestCallZomeRequestSigned
, where the zome call parameters have already been serialized and signed.
- Bring back optional cap_secret to zome call parameters.
- Zome call signing has been changed in Holochain to remove the requirement of imitating Holochain serialization. Signing is now a simplified process of serializing zome call parameters using MessagePack, then computing a SHA2 512-bit hash of the serialized bytes and signing the hash. The zome call payload consists of the serialized bytes and the signature.
- AppWebsocket calls to interact with countersigning sessions, i.e.
GetCountersigningSessionState
as well asAbandonCountersigningSession
andPublishCountersigningSession
when a session could not be resolved automatically. Countersigning is an unstable feature which must explicitly be enabled in Holochain.
- Bring back a websocket reconnection automation for Admin and App websockets. When either of them is closed and a new request made, it will attempt to reconnect using the same app authentication token that was used to initially authenticate the websocket. A specific
InvalidTokenError
is returned if that fails.
- Update to Holochain 0.5.0-dev.0
- Type
RevokeAgentKeyResponse
, which returns an array of tuples with cell id and error message for all cells that key revocation failed for.
- Admin API call
RevokeAgentKey
.
- Util function to compare two cell ids
isSameCell
.
- BREAKING: Clone cell ids have changed from accepting a
CellId
to aDnaHash
.
- Signal listeners changed from only returning an
AppSignal
to aSignal
which can be either an app or system signal.
- Revert addition of @hc-spartan/holo-hash. Hashes were used inconsistently and lead to wrong types for return values.
- BREAKING: Use package @spartan-hc/holo-hash for managing hashes, instead of custom functions.
AgentPubKey
is a new type now instead of aUint8Array
.
- New value
NotStartedAfterProvidingMemproofs
for typeDisabledAppReason
which effectively allows a new app status, corresponding to the specific state where a UI has just called AppRequest::ProvideMemproofs, but the app has not yet been enabled for the first time. - New
AppWebsocket
callEnableAfterMemproofsProvided
, which allows enabling an app only if the app is in theAppStatus::Disabled(DisabledAppReason::NotStartedAfterProvidingMemproofs)
state. Attempting to enable the app from other states (other than Running) will fail. - New field
lineage
to the DNA manifest, which declares forward compatibility for any hash in that list with this DNA. - New
AdminWebsocket
callGetCompatibleCells
, which returnsCellId
for all installed cells which use a DNA that is forward-compatible with a given DNA hash. This can be used to find a compatible cell for use with the UseExisting cell provisioning method.
- Hash part utility functions for core hash and DHT location. Both were using an incorrect number of bytes.
- Added missing
base
field to theLink
type. This exists in Holochain but wasn't present in the client.
- Refer to type, not
this
in a static context to fix a bug in theAppWebsocket
that would result inthis.requester is not a function
when the client is used in as JavaScript environment.
DhtOp
was split intoChainOp
andWarrantOp
in Holochain.
- New call
AppRequest::ProvideMemproofs
. An app can be installed with deferred membrane proofs, which can later be provided through this call.
- App id to
AppClient
andAppWebsocket
. - Optional function parameter for a custom zome transformer in
AppWebsocket
.
- Test for Rust enum serialization.
- BREAKING Update enum serialization to match changed Conductor API serialization format.
- Invalid module references which caused the client to fail to import in Node environments.
- BREAKING Changed
Appwebsocket.connect()
to take a single parameterAppWebsocketConnectionOptions
that includes theAppAuthenticationToken
as an optional property. TheAppAuthenticationToken
can be omitted if it is provided by thewindow.__HC_LAUNCHER_ENV__
variable. - BREAKING The legacy framework specific zome call signing methods
signZomeCallTauri
andsignZomeCallElectron
have been removed. Runtimes like Launcher now mandatorily need to provide awindow.__HC_ZOME_CALL_SIGNER__
object to have zome calls be automatically signed. - New optional parameter to
attachAppInterface
to bind the app interface to a specific app. - BREAKING The admin call
listAppInterfaces
now returns a list ofAppInterfaceInfo
instead of a list of ports.
- BREAKING Connecting an app websocket now requires an authentication token which can be obtained from the admin
websocket using
AdminWebsocket#issueAppAuthenticationToken
.
- BREAKING Merged the app and app-agent websockets into a single
AppWebsocket
class. Following the addition of the authentication token, the two types were well enough aligned that there was no longer a need to keep them separate. - BREAKING App calls that previously required an
InstalledAppId
no longer require one because the websocket will be authenticated with an app already, so the app interface no longer requires you to tell it which app you are calling.
- Replace all IPv4 addresses
127.0.0.1
bylocalhost
.
- Websocket client: Specify
origin
parameter when establishing app websocket connections to protect localhost from cross origin attacks in browser scripts. - Websocket client: Add
allowed_origins
parameter toAdminWebsocket.attachAppInterface
to specify allowed origins. - Consistently throw
HolochainError
s throughout with specific error names and messages.
- Type:
AppInfoResponse
can benull
if the requested app is not found.
- BREAKING:
Websocket.connect()
functions' mandatoryurl
parameter is replaced by an optional options object, which contains optional propertiesurl
anddefaultTimeout
. Callingconnect
if the url is not defined by parameter, nor by launcher environment will throw an error. Order of parameters in theAppAgentWebsocket.connect
function is changed, so the required parameter goes first.
- Work around cell_id being a proxy object in Vue.
- Decouple host zome call signer from environment. Now a zome call signer can be provided separatedly from the environment that the client is used in.
- Utility functions for slicing hashes into their components:
sliceHashType
,sliceCore32
,sliceDhtLocation
- Utility functions for generating hashes from components:
dhtLocationFrom32
,hashFrom32AndType
:
- Utility functions fakeAgentPubKey, fakeEntryHash, fakeActionHash and fakeDnaHash now generate valid hashes with a valid final 4 bytes
- Utility functions fakeAgentPubKey, fakeEntryHash, fakeActionHash and fakeDnaHash now optionally take a single parameter
coreByte
which if defined will be repeated for all core 32 bytes of the hash
- Action type
CreateLink
: Add fieldlink_type
.
- Type
Link
to HDK and a confirmatory test.
- BREAKING CHANGE: Conductor API ser/deserialization has changed on Holochain side. Tags are serialized like
{ type: { app_info: null } }
now, when before it was{ type: "app_info" }
for requests and responses.
CapAccess
typesUnrestricted
andTransferable
were not correctly implemented. Both need to be nested objects containing a single property with a Pascal cased name, e. g.{ access: { Unrestricted: null } }
.AttachAppInterfaceRequest
took a mandatory propertyport
. The property is optional now.
- Dropped support for Node.js v16 after its end-of-life.
- Support for signing zome calls in electron via
window.electronAPI.signZomeCall
when__HC_LAUNCHER_ENV__.ENVIRONMENT == 'electron'
.
DnaProperties
inDnaModifiers
changed toUint8array
as it comes back serialized from Holochain.
- Update
InstallAppRequest
with new optional fieldignore_genesis_failure
.
- When generating a signing key pair, a new optional argument can be passed in to copy the last 4 bytes (= DHT location bytes) of the original agent pub key.
- BREAKING CHANGE: Swap cryptographic package from
noble/ed25519
tolibsodium
. This lead to helper functions become async and some type changes. - BREAKING CHANGE: Set type of
Memproof
toUint8array
instead ofBuffer
which is specific to Node.js.
- Export functions to check if a role name is a clone id.
- In Vue projects reactivity broke signal functionality provided by Emittery. A pointer to
this
which Emittery relies on becomes undefined. Until the bug is fixed upstream in Emittery, the workaround is to bind all its methods manually after instantiating an agent websocket.
- When making a WsClient request, reconnect websocket in case it's closed.
- BREAKING CHANGE: Refactor client and websocket classes to use URLs instead of strings.
- BREAKING CHANGE: Error responses from Holochain are thrown as instance of new class
HolochainError
which extendsError
.
- Import crypto module conditionally when in Node.js environment. For browsers and bundlers no module import is required and the Web API module is used. Add
...
externals: {
"node:crypto": {}
},
...
to Webpack config.
- Set default timeout for API calls to 60 seconds, formerly 15 seconds.
- BREAKING CHANGE: Replace NPM package "tweetnacl" with "@noble/ed25519". "tweetnacl" produced errors with bundlers and hasn't been updated in a longer time.
- BREAKING CHANGE: Update params of
NetworkInfoRequest
.
- Add new Admin API endpoint
storageInfo
. - Add new Admin API endpoint
dumpNetworkStats
. - Add new Admin API endpoint
updateCoordinators
to update coordinator zomes in an already installed hApp.
- Update response type
NetworkInfo
.
- Replace event listener method
.on("close")
by.onclose
..on
is not compatible with Web API's WebSocket.
- When app websocket closes, reject pending requests.
- Throw an error when calling zome with role name and provenance from
AppAgentWebsocket
. Role names can only be used with own agent, not for other agents.
- Function to generate a fake DNA hash.
- Switch to Nix flake for develop environment. Run
nix develop
from now on instead ofnix-shell
. Pass on--extra-experimental-features nix-command --extra-experimental-features flakes
or enable these features for your user in~/.config/nix/nix.conf
.
- Update
NetworkInfo
types.
Compatible with Holochain v0.1.0
- No changes; minor version bump.
- Refactor AppAgentWebsocket to directly get the agent pub key from app info.
- Return additional field
agent_pub_key
inAppInfo
.
- BREAKING CHANGE: The resources field of bundles was changed from
Array<number>
toUint8Array
. - BREAKING CHANGE:
CreateCloneCell
returnsClonedCell
instead ofInstalledCell
. - BREAKING CHANGE:
EnableCloneCell
returnsClonedCell
instead ofInstalledCell
. - BREAKING CHANGE: Remove unused call
AdminRequest::StartApp
. - BREAKING CHANGE:
Cell
is split up intoProvisionedCell
andClonedCell
. - BREAKING CHANGE:
CellInfo
variants are renamed to snake case during serde.
- API generation, available under ./docs
- Cell provisioning strategy type in AppBundle.
- TypeScript source maps.
- Access
Blob
from window for browser apps (fixes error with Nodejs v16).
- Cell id log when no signing credentials are present for a cell.
- Refactor util functions that depend on crypto to async import.
- Deprecated parameter
signalCb
fromWsClient
andAppWebsocket
.
- All Launcher environment properties to be optional.
- Types belonging to AppManifest.
- Add pending request from client after processing response.
- Introduce
GrantedFunctionsType
to reflect newly added wildcard option for all zomes and functions.
- Simplify
authorizeSigningCredentials
by making functions an optional parameter and defaulting to all zomes and functions.
- Move signing functions to corresponding modules and simplify fn signZomeCall.
- AppAgentWebsocket constructor is private now and follows the same pattern to instantiate through
connect
as the other websockets.
- Revert launcher refactors that introduced problems.
- tauri-apps bug which came out of the blue.
- Tidy up signing module & export functions for signing.
- Serialization package issue.
- Deprecated API calls.
- Type definition of functions in
authorizeNewSigningKeyPair
. - Problem with rolling up serialization package.
- property
provenance
fromAppAgentCallZomeRequest
.
- Low-level functions to generate and authorize signing keys and to sign zome calls with them.
- High-level function to handle key generation and zome call signing automatically.
- BREAKING CHANGE: Remove call
install_app
.
- BREAKING CHANGE: Upgrade to Holochain v0.1.0-beta-rc.1
- BREAKING CHANGE: Require all zome calls to be signed.
- BREAKING CHANGE: Rename
install_app_bundle
toinstall_app
. - BREAKING CHANGE: Rename
archive_clone_cell
todisable_clone_cell
. - BREAKING CHANGE: Rename
restore_archived_clone_cell
toenable_clone_cell
. - BREAKING CHANGE: Move
enable_clone_cell
to App API. - BREAKING CHANGE: Refactor
delete_clone_cell
to delete a single disabled clone cell. - BREAKING CHANGE: Refactor
app_info
to return all cells and DNA modifiers. - BREAKING CHANGE: Rename
request_agent_info
toagent_info
. - AppAgentWebsocket constructor uses launcher env.INSTALLED_APP_ID when present
- Remove fetch to launcher-env.json and replace it with
window.__HC_LAUNCHER_ENV__
.
- Use lodash-es instead of lodash
- Missing export of AppAgentWebsocket
- Switch event emitter package from "events" to "Emittery".
- Interface AppAgentClient, along with a class that implements that interface AppAgentWebsocket as part of work to unify the holochain and holo client apis. Happ devs will now be able to write the majority of their client code using the AppAgentClient interface, completely agnostic as to whether they're in a pure holochain or holo context.
- Add App API call
gossip_info
, which returns progress data on historical gossip. - Update to holochain 0.0.175, hdk 0.0.163 which includes all the breaking change renames
- Add Admin API call
getDnaDefinition
, which returns the DNA definition for a given DNA hash.
- Upgrade to Holochain v0.0.170
- Fix AppEntryType type definition, leading to wrong deserialization.
- Response type for request
RestoreCloneCell
set toInstalledCell
.
- Expose clone id class.
- Added calls for clone cell management:
- App API: create clone cell
- App API: archive clone cell
- Admin API: restore clone cell
- Admin API: delete archived clone cells
- Added utility class
CloneId
- BREAKING CHANGE:
RegisterDnaRequest
parameters have changed in Conductor API. - Upgraded
isomorphic-ws
to v5.0.0 which provides native ES modules.
- Updated
uid
tonetwork_seed
after name change in Holochain.
- Main entry points in
package.json
for CommonJS and ECMA modules.
- BREAKING:
bundle.ts
module, which was Nodejs-specific and not compatible with browser-based clients.
- Update link to launcher in comment (#123).
- Cater for some edge cases for function
getDhtOpAction
(#122).
- Use more specific type
DnaHash
inCellId
PR #120 - Change argument
appInfoTransform
ofappInfo
to take anAppWebsocket
PR #121
- fix(type): use entry type for record PR #119
- Type
Record
andRecordEntry
- Updates nomenclature in types from Header/Element to Action/Record as per changes from holochain 0.0.145 PR #117
- Update test fixture to holochain 0.0.147 PR #117
- Correct field name
hashed
in Header #113
- Convert module import to URL schema in lazy imports. #111
- Converted to pure ES module (dropped CommonJS support)
- ES module support
- Export all common types #96
- Adding types and
dump full state
call #94
- Everything that's not needed to use the library, run tests or publish the npm package
- Renamed package to @holochain/client and repository to holochain-client-js
- Use git tag instead of revision SHA for version mentions #92
- Updated to Holochain v0.0.121 and HDK v0.0.117
- Failed tests cause non-zero exit code #93
- It now works in a browser context. 0.2.2 introduced an exception in the browser context by improperly checking for a node specific variable. #88
- We now safely ignore system signals instead of breaking upon receiving them #84
- Launcher autodetection now works properly in jest environments #85
- Adds support for UninstallApp which is available in holochain 0.0.106
- Adds support for automatically detecting Launcher run context for overriding installedApi
- Add new admin conductor api endpoints - EnableApp, StartApp and DisableApp
- Deprecated admin conductor api endpoints: ActivateApp & DisactivateApp
- Change log
- Downstream compilation issues when using rollup and typescript (adds an esmodules compilation target to dist)