Skip to content

Commit b265f12

Browse files
committed
Computing JSDoc and SDK version update
1 parent f1ca863 commit b265f12

File tree

7 files changed

+26
-7
lines changed

7 files changed

+26
-7
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "apillon-web3-tools",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "Monorepo for Apillon tools",
55
"author": "Apillon",
66
"license": "MIT",

packages/sdk/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@apillon/sdk",
33
"description": "▶◀ Apillon SDK for NodeJS ▶◀",
4-
"version": "2.0.0",
4+
"version": "2.1.0",
55
"author": "Apillon",
66
"license": "MIT",
77
"main": "./dist/index.js",

packages/sdk/src/docs-index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export * from './types/nfts';
33
export * from './types/hosting';
44
export * from './types/storage';
55
export * from './types/identity';
6+
export * from './types/computing';
67
export * from './lib/apillon';
78
export * from './modules/storage/storage';
89
export * from './modules/storage/storage-bucket';
@@ -15,3 +16,5 @@ export * from './modules/hosting/hosting-website';
1516
export * from './modules/nft/nft';
1617
export * from './modules/nft/nft-collection';
1718
export * from './modules/identity/identity';
19+
export * from './modules/computing/computing';
20+
export * from './modules/computing/computing-contract';

packages/sdk/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ export * from './modules/storage/storage';
99
export * from './modules/hosting/hosting';
1010
export * from './modules/nft/nft';
1111
export * from './modules/identity/identity';
12+
export * from './modules/computing/computing';

packages/sdk/src/modules/computing/computing-contract.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class ComputingContract extends ApillonModel {
9797
/**
9898
* Gets list of transactions for this computing contract.
9999
* @param {IApillonPagination} params Pagination filters.
100-
* @returns List of transactions.
100+
* @returns {IComputingTransaction[]} List of transactions.
101101
*/
102102
public async listTransactions(
103103
params?: IApillonPagination,
@@ -132,7 +132,7 @@ export class ComputingContract extends ApillonModel {
132132
* - Uploads the encrypted file to the bucket
133133
* - Assigns the encrypted file's CID to the NFT used for decryption authentication
134134
* @param {IEncryptData} data The data to use for encryption.
135-
* @returns The encrypted data in the form of a string.
135+
* @returns The uploaded encrypted file metadata
136136
*/
137137
async encryptFile(data: IEncryptData): Promise<FileMetadata[]> {
138138
ApillonLogger.log(`Encrypting file...`);

packages/sdk/src/modules/nft/nft-collection.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export class NftCollection extends ApillonModel {
200200
* Burns a nft.
201201
* @warn Can only burn NFTs if the collection is revokable.
202202
* @param tokenId Token ID of the NFT we want to burn.
203-
* @returns Status.
203+
* @returns Success status and transaction hash.
204204
*/
205205
public async burn(tokenId: string): Promise<INftActionResponse> {
206206
if (this.isRevokable != null && !this.isRevokable) {
@@ -237,7 +237,7 @@ export class NftCollection extends ApillonModel {
237237
/**
238238
* Gets list of transactions that occurred on this collection through Apillon.
239239
* @param params Filters.
240-
* @returns List of transactions.
240+
* @returns {ITransaction[]} List of transactions.
241241
*/
242242
public async listTransactions(
243243
params?: ITransactionFilters,

packages/sdk/src/types/computing.ts

+16-1
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,25 @@ export enum ComputingTransactionType {
2222
}
2323

2424
export type ComputingContractData = {
25+
/**
26+
* Contract address of NFT which will be used to authenticate decryption
27+
*/
2528
nftContractAddress: string;
29+
/**
30+
* RPC URL of the chain the NFT collection exists on
31+
*/
2632
nftChainRpcUrl: string;
27-
restrictToOwner: string;
33+
/**
34+
* If true, only the owner is able to use the contract for data encryption/decryption
35+
*/
36+
restrictToOwner: boolean;
37+
/**
38+
* The IPFS gateway where the encrypted files are stored on
39+
*/
2840
ipfsGatewayUrl: string;
41+
/**
42+
* Identifier of the Phala computing cluster the contract runs on
43+
*/
2944
clusterId: string;
3045
};
3146

0 commit comments

Comments
 (0)