diff --git a/README.md b/README.md index 3bc0853..8e2628f 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,24 @@ main() ## 👨‍đŸ’ģ Examples +### Bucket Storage + +- Create a bucket + + ```js + let bucketData = await mcs.createBucket() + console.log(bucketData) + ``` + +- Upload a file to the bucket + + ```js + let fileData = mcs.uploadToBucket(, , prefix="") + console.log(fileData) + ``` + +For more examples, please see the [SDK documentation.](https://docs.filswan.com/multi-chain-storage/developer-quickstart/sdk) + ### Onchain Storage Onchain storage is designed for storing file information in the smart contract. It requires payment for each file. @@ -96,24 +114,6 @@ To use certain Onchain Storage features (upload, payment, minting), you will nee console.log(transaction hash: ' + tx.transactionHash) ``` -### Bucket Storage - -- Create a bucket - - ```js - let bucketData = await mcs.createBucket() - console.log(bucketData) - ``` - -- Upload a file to the bucket - - ```js - let fileData = mcs.uploadToBucket(, , prefix="") - console.log(fileData) - ``` - -For more examples, please see the [SDK documentation.](https://docs.filswan.com/multi-chain-storage/developer-quickstart/sdk) - ## ℹī¸ Functions diff --git a/sdk/README.md b/sdk/README.md index 3bc0853..8e2628f 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -69,6 +69,24 @@ main() ## 👨‍đŸ’ģ Examples +### Bucket Storage + +- Create a bucket + + ```js + let bucketData = await mcs.createBucket() + console.log(bucketData) + ``` + +- Upload a file to the bucket + + ```js + let fileData = mcs.uploadToBucket(, , prefix="") + console.log(fileData) + ``` + +For more examples, please see the [SDK documentation.](https://docs.filswan.com/multi-chain-storage/developer-quickstart/sdk) + ### Onchain Storage Onchain storage is designed for storing file information in the smart contract. It requires payment for each file. @@ -96,24 +114,6 @@ To use certain Onchain Storage features (upload, payment, minting), you will nee console.log(transaction hash: ' + tx.transactionHash) ``` -### Bucket Storage - -- Create a bucket - - ```js - let bucketData = await mcs.createBucket() - console.log(bucketData) - ``` - -- Upload a file to the bucket - - ```js - let fileData = mcs.uploadToBucket(, , prefix="") - console.log(fileData) - ``` - -For more examples, please see the [SDK documentation.](https://docs.filswan.com/multi-chain-storage/developer-quickstart/sdk) - ## ℹī¸ Functions