File tree 6 files changed +25
-7
lines changed
6 files changed +25
-7
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " apillon-web3-tools" ,
3
- "version" : " 2.0 .0" ,
3
+ "version" : " 2.1 .0" ,
4
4
"description" : " Monorepo for Apillon tools" ,
5
5
"author" : " Apillon" ,
6
6
"license" : " MIT" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @apillon/sdk" ,
3
3
"description" : " ▶◀ Apillon SDK for NodeJS ▶◀" ,
4
- "version" : " 2.0 .0" ,
4
+ "version" : " 2.1 .0" ,
5
5
"author" : " Apillon" ,
6
6
"license" : " MIT" ,
7
7
"main" : " ./dist/index.js" ,
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ export * from './types/nfts';
3
3
export * from './types/hosting' ;
4
4
export * from './types/storage' ;
5
5
export * from './types/identity' ;
6
+ export * from './types/computing' ;
6
7
export * from './lib/apillon' ;
7
8
export * from './modules/storage/storage' ;
8
9
export * from './modules/storage/storage-bucket' ;
@@ -15,3 +16,5 @@ export * from './modules/hosting/hosting-website';
15
16
export * from './modules/nft/nft' ;
16
17
export * from './modules/nft/nft-collection' ;
17
18
export * from './modules/identity/identity' ;
19
+ export * from './modules/computing/computing' ;
20
+ export * from './modules/computing/computing-contract' ;
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ export class ComputingContract extends ApillonModel {
97
97
/**
98
98
* Gets list of transactions for this computing contract.
99
99
* @param {IApillonPagination } params Pagination filters.
100
- * @returns List of transactions.
100
+ * @returns { IComputingTransaction[] } List of transactions.
101
101
*/
102
102
public async listTransactions (
103
103
params ?: IApillonPagination ,
@@ -132,7 +132,7 @@ export class ComputingContract extends ApillonModel {
132
132
* - Uploads the encrypted file to the bucket
133
133
* - Assigns the encrypted file's CID to the NFT used for decryption authentication
134
134
* @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
136
136
*/
137
137
async encryptFile ( data : IEncryptData ) : Promise < FileMetadata [ ] > {
138
138
ApillonLogger . log ( `Encrypting file...` ) ;
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ export class NftCollection extends ApillonModel {
200
200
* Burns a nft.
201
201
* @warn Can only burn NFTs if the collection is revokable.
202
202
* @param tokenId Token ID of the NFT we want to burn.
203
- * @returns Status .
203
+ * @returns Success status and transaction hash .
204
204
*/
205
205
public async burn ( tokenId : string ) : Promise < INftActionResponse > {
206
206
if ( this . isRevokable != null && ! this . isRevokable ) {
@@ -237,7 +237,7 @@ export class NftCollection extends ApillonModel {
237
237
/**
238
238
* Gets list of transactions that occurred on this collection through Apillon.
239
239
* @param params Filters.
240
- * @returns List of transactions.
240
+ * @returns { ITransaction[] } List of transactions.
241
241
*/
242
242
public async listTransactions (
243
243
params ?: ITransactionFilters ,
Original file line number Diff line number Diff line change @@ -22,10 +22,25 @@ export enum ComputingTransactionType {
22
22
}
23
23
24
24
export type ComputingContractData = {
25
+ /**
26
+ * Contract address of NFT which will be used to authenticate decryption
27
+ */
25
28
nftContractAddress : string ;
29
+ /**
30
+ * RPC URL of the chain the NFT collection exists on
31
+ */
26
32
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
+ */
28
40
ipfsGatewayUrl : string ;
41
+ /**
42
+ * Identifier of the Phala computing cluster the contract runs on
43
+ */
29
44
clusterId : string ;
30
45
} ;
31
46
You can’t perform that action at this time.
0 commit comments