Skip to content

Releases: spheronFdn/sdk

compute:v1.0.5

08 Sep 09:02
396c100
Compare
Choose a tag to compare

Changed

  • Spheron core version update.

storage:v2.0.0

06 Sep 18:25
eb63133
Compare
Choose a tag to compare

Changes

  • Update the login in the package to work with the new organizations of type Storage.

core: v2.0.0

06 Sep 18:24
eb63133
Compare
Choose a tag to compare

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

06 Sep 18:26
eb63133
Compare
Choose a tag to compare

Changes

  • Update the login in the package to work with the new organizations of type Storage.

fvm-deal-utils: v1.0.0

22 Aug 15:27
65fefd5
Compare
Choose a tag to compare

Spheron

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 bytes
    • size - the size of the CAR file in bytes
    • pieceCid - hash of the piece in hex
    • dataCid - IPFS hash of the car file
    • carLink - the IPFS URL of the generated car file.
    • carName - the name of the car
    • uploadId - 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

24 Jul 10:06
4a65522
Compare
Choose a tag to compare

Update

  • Remove parsing logic from Spheron GPT

compute: v1.0.4

05 Jul 10:29
59e4298
Compare
Choose a tag to compare

Changed

  • Args, command, environmentVariables and secretEnvironmentVariables are all now optional attributes for update instance config.

core: v1.0.10

03 Jul 17:25
cd94554
Compare
Choose a tag to compare

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

03 Jul 17:29
cd94554
Compare
Choose a tag to compare

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

27 Jun 15:36
659b5a9
Compare
Choose a tag to compare

Added

  • Add Spheron GPT with updated logic
  • Added login check before whitelist check