Releases: spheronFdn/sdk
Releases · spheronFdn/sdk
compute:v1.0.5
Changed
- Spheron core version update.
storage:v2.0.0
Changes
- Update the login in the package to work with the new organizations of type Storage.
core: v2.0.0
Changes
- Added support for working with the new Storage organization type
- Added new methods for interacting with the new bucket, bucket domains, bucket ipns records and upload endpoints.
- Added interfaces for the new entities.
- Updated the UploadManager logic to work with the new upload endpoints.
browser-upload:v2.0.0
Changes
- Update the login in the package to work with the new organizations of type Storage.
fvm-deal-utils: v1.0.0
FVM Deal Utils SDK
🧰 SDK to create storage deals on FVM, powered by Spheron.
getFvmMetadata Example
In the example below you can see how to create an instance of SpheronDealClient
and how to generate the metadata required for creating a storage deal on FVM.
const {
SpheronDealClient,
DealDataResult,
} = require("@spheron/fvm-deal-utils");
const client = new SpheronDealClient({ token });
let currentlyUploaded = 0;
const result: DealDataResult = await client.getFvmMetadata(filePath, {
name,
onUploadInitiated: (uploadId) => {
console.log(`Upload with id ${uploadId} started...`);
},
onChunkUploaded: (uploadedSize, totalSize) => {
currentlyUploaded += uploadedSize;
console.log(`Uploaded ${currentlyUploaded} of ${totalSize} Bytes.`);
},
});
- The response of the
getFvmMetadata
function is an object with the following properties:pieceSize
- the size of the file in bytessize
- the size of the CAR file in bytespieceCid
- hash of the piece in hexdataCid
- IPFS hash of the car filecarLink
- the IPFS URL of the generated car file.carName
- the name of the caruploadId
- the id of the upload on which the car was uploaded
Access Token
To create the token
that is used with the SpheronClient
, follow the instructions in the DOCS. When you are creating the tokens, please choose web app type in the dashboard.
Notes
The package is only meant for Node.js environments and will not work in a browser or frontend apps.
Learn More
You can learn more about Spheron and Storage SDK here:
cli:v1.0.16
Update
- Remove parsing logic from Spheron GPT
compute: v1.0.4
Changed
- Args, command, environmentVariables and secretEnvironmentVariables are all now optional attributes for update instance config.
core: v1.0.10
Added
- Added support for custom specification for compute deployments.
- Added support for attaching persistent storage for compute instances.
Fixed
- Attaching and updating of instance domains.
compute: v1.0.3
Added
- Added support for custom specification for compute deployments.
- Added support for attaching persistent storage to compute instances.
Changed
- Args, command, environmentVariables and secretEnvironmentVariables are all now optional attributes.
- Machine image id attribute is now optional and should not be specified in case of using custom specification.
cli:v1.0.15
Added
- Add Spheron GPT with updated logic
- Added login check before whitelist check