All notable changes to this project will be documented in this file.
For the latest beta changes, see CHANGELOG-BETA.md.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Types of changes:
Added
for new features.Changed
for changes in existing functionality.Removed
for now removed features.
- Added deploy script in
scripts/
folder.
- Added
client.getFileContentBinary
andclient.getFileContentBinaryHns
methods for downloading binary data. - Added
chunkSizeMultiplier
option for large file uploads. - Added
staggerPercent
option for more efficient uploading of large file uploads.
- Large file uploads now make one less request before starting an upload.
- Improved performance and stability of integration tests.
- Fixed
getFileContentHns
error due to bad skylink comparison. By @parajbs in #479
client.db.getJSON
no longer returns{ data, revision }
but instead{ data, skylink }
.client.db.setJSON
no longer accepts a revision number.- Renamed SkyDB
skylink
response field todataLink
. - Added missing
sia://
prefixes to the skylinks returned from SkyDB.
- Renamed
RegistryEntry.datakey
todataKey
for consistency. - Registry entries now contain
data
that is typeUint8Array
instead ofstring
.
getSkylinkUrl
,downloadFile
,openFile
, and the HNS equivalents are all nowasync
.getFileContent
andgetFileContentHns
no longer return metadata objects.- Remove
noResponseMetadata
custom option from download and HNS download methods. getMetadata
now takes aCustomGetMetadataOptions
object for custom options.- Rename
resolveHns
optionendpointDownloadHnsres
toendpointResolveHns
. getHnsUrl
now defaults tosubdomain: true
.
client.portalUrl
is now an async method instead of a variable.
- The
sia:
skylink prefix has been changed tosia://
.
- The
getEntry
timeout
option has been removed as it no longer has an effect. - Removed
uriHandshakeResolverPrefix
. - Removed
merkleRoot
andbitfield
from upload response.
- Added SkyDB V2.
- SkyDB V2 can be accessed with
client.dbV2
andmySky.dbV2
. - SkyDB V2 methods use a revision number cache internally, improving performance and correctness.
dbV2.setJSON
does not make a network request to get the latest revision number, so you must always calldbV2.getJSON
first.
- SkyDB V2 can be accessed with
- Added support for large file uploads.
- The tus protocol will be used automatically for files greater than 40MiB in size.
- Large files are uploaded in parallel chunks.
- Added
client.loadMySky
. - Added
MySky
andDacLibrary
types. See the docs for everything you can do with this new functionality. - Added
client.extractDomain
,client.getFullDomainUrl
,extractDomainForPortal
,getFullDomainUrlForPortal
.
- Added
client.file.getJSON
. - Added
client.file.getJSONEncrypted
. - Added
client.file.getEntryLink
.
- Added
Permission
export. - Exported
Keypair
andKeyPairAndSeed
crypto types. - Added
validateRegistryProof
function. - Exported some crypto length constants.
- Added exports for encryption utilities
decryptJSONFile
,encryptJSONFile
,ENCRYPTED_JSON_RESPONSE_VERSION
, andEncryptedJSONResponse
.
- Added
db.deleteJSON
andmySky.deleteJSON
. - Added
db.setDataLink
. - Added
db.getEntryData
,db.setEntryData
,db.deleteEntryData
. - Added
cachedDataLink
option todb.getJSON
. This lets us avoid getting the data again if the latest data link matches the cached data link.
- Added
getEntryLink
andmysky.getEntryLink
. - Added
getEntryUrlForPortal
,getSkylinkUrlForPortal
. - Added
signEntry
helper function. - Added
client.registry.postSignedEntry
helper method.
- Errors caused by network requests to
skyd
are now typeExecuteRequestError
.- This error type is fully compatible with
AxiosError
. - Errors from failed requests now contain a message with the original message
from axios as well as the full context from
skyd
. ExecuteRequestError
also contains.responseMessage
and.responseStatus
.ExecuteRequestError
can be used withinstanceof
(unlike AxiosError).
- This error type is fully compatible with
- Expose
executeRequest
. - Added
customCookie
client option. - Added
onDownloadProgress
client option. - Added
client.initPortalUrl
method to manually initialize the portal URL before it is needed.
- Added the
errorPages
andtryFiles
options for directory uploads.
- Add option for portal API keys and env var for integration tests
- Added ability to set custom cookie in integration tests with the
SKYNET_JS_INTEGRATION_TEST_CUSTOM_COOKIE
env var.
- Added
client.pinSkylink
. - Added
isSkylinkV1
andisSkylinkV2
. - Added
range
option to download options. - Added
convertSkylinkToBase64
.
- Try resolving the portal URL again if the previous attempt failed.
- Error messages from
skyd
requests now contain the full, descriptive error response returned fromskyd
. - The SDK now supports cookies with requests that are "same-site" but "cross-origin." This allows accounts to be associated with requests made to API endpoints at the base portal URL.
- Downloads now verify the registry proofs returned from the portal.
- Fixed build for CommonJS and React projects.
- Fixed Range Error on unicode data keys.
- The
resolveHNS
method now works for Handshake domains withskyns://
HNS entries.
- Add portalUrl response field to
getFileContents
andgetMetadata
.
- A new optimization causes
db.setJSON
to complete significantly faster. - The size of the bundled SDK has been reduced by more than 60% by changing crypto dependencies.
- Fix a bug where registry entries with empty data were rejected.
getFileContent
andgetFileContentHns
methods have been added for getting the content of a file from a skylink or Handshake domain without downloading the file in-browser.noResponseMetadata
option was added to the download options.
- [Breaking change] Entry revisions are now
bigint
instead ofnumber
. - [Breaking change] Upload methods return full objects instead of just a skylink string.
- [Breaking change] Upload request methods were removed.
- [Breaking change]
getMetadata
returns a full object containing the metadata in a subfield. - [Breaking change] The registry timeout has changed to take seconds instead of milliseconds.
- [Breaking change]
db.getJSON
can return destructured nulls instead of null - [Breaking change]
registry.getEntry
only returnsnull
on entry-not-found. - Almost every API method now has the potential to throw. A common cause would be wrongly-typed inputs to a method, which are now checked.
- [Breaking change]
executeRequest
was removed.
- Support for downloading skylinks with paths (either pre-encoded in the skylink, or with the
path
parameter not encoded). - Support for returning skylinks from
getSkylinkUrl
anddownloadFile
in subdomain form. - Added
includePath
,onlyPath
, andfromSubdomain
options toparseSkylink
, allowing getting the path with/without the skylink as well as parsing skylinks in base32 subdomain form.
- Fixed bug in
getJSON
where fetching an inexistent entry would cause an error.
downloadFile
andgetSkylinkUrl
now accept asubdomain
option which makes them return the skylink in subdomain format.parseSkylink
now accepts asubdomain
option which parses the skylink as a base32 subdomain in a URL.
- Trying to use the skykeyName or skykeyId parameters now results in an error, as previously users may not have realized they were unimplemented.
Note: this version contains breaking changes to deriveChildSeed
.
- [Breaking change] Fix
deriveChildSeed
bugs. It will now return hex-encoded strings. Note that it will now return different values than before these bugs were fixed. - Fix
setJSON
function not using hex-encoded publickeys when making its request. - Do not use a timeout for
setEntry
by default (was 5s previously). - Fix a bug when calling
setJSON
withrevision = 0
wheresetJSON
would fetch the latest revision anyway.
- Add
getEntryUrl
- Fix
genKeyPair*
functions
Note: this version contains breaking changes in the SkyDB and Registry APIs.
- [Breaking change] Rename
keyPairFromSeed
togenKeyPairFromSeed
and have it return keys in the form of hex strings. - [Breaking change] Rename
generateKeyPairAndSeed
togenKeyPairAndSeed
and have it return keys in the form of hex strings. - [Breaking change] Use hex strings as keys as inputs to
getJSON
,setJSON
,getEntry
, andsetEntry
. - [Breaking change]
setEntry
no longer takes adatakey
argument as it is already inentry
.
- Add crypto API for generating seeds and deriving subkeys.
- Fix compatibility issue that made
getEntry
not work in the browser.
- Simplified registry API.
- Change SkyDB and Registry APIs.
- Improve timeout handling for SkyDB
- Extend end-to-end tests
- Add SkyDB support
- Move to Typescript
- Fix some bugs with skylink parsing.
- Revert 2.0.7 and fix
uploadFile
filename bug.
- Revert: "Fixed a bug causing
uploadFile
to not work." introduced in 2.0.4
- Fixed a bug in server-side rendering where
typeof
was not used forwindow
.
- Fixed a bug in server-side rendering where
window
wasundefined
.
- Fixed a bug causing
uploadFile
to not work.
- Remove some test code that made it into the published version.
- MIT license
regeneratorRuntime
error when packaging withwebpack
has been fixed.
- Publish only compiled version (resolves issues with webpack).
Prior version numbers skipped to maintain parity with API.
downloadFileHns
,openFileHns
,resolveSkylinkHns
getHnsUrl
,getHnsresUrl
customFilename
andcustomDirname
upload options
download
andopen
were renamed todownloadFile
andopenFile
.upload
was renamed touploadFile
and the response was changed to only include a skylink. To obtain the full response as in the oldupload
, use the newuploadFileRequest
.getDownloadUrl
has been renamed togetSkylinkUrl
.- Connection options can now be passed to the client, in addition to individual API calls, to be applied to all API calls.
- The
defaultPortalUrl
string has been renamed todefaultSkynetPortalUrl
anddefaultPortalUrl
is now a function.
- New
SkynetClient
class that must be initialized to call methods such asupload
anddownload
. - New utility helpers such as
getRelativeFilePath
anddefaultPortalUrl
.
- Most standalone functions are now methods on the
SkynetClient
. Previous code that was callingupload(...)
instead ofclient.upload(...)
will no longer work.