Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rykci committed Jan 24, 2023
1 parent f608c7e commit f7be44c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 36 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,24 @@ main()

## 👨‍💻 Examples

### Bucket Storage

- Create a bucket

```js
let bucketData = await mcs.createBucket(<BUCKET_NAME>)
console.log(bucketData)
```

- Upload a file to the bucket

```js
let fileData = mcs.uploadToBucket(<FILE_PATH>, <BUCKET_UID>, 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.
Expand Down Expand Up @@ -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(<BUCKET_NAME>)
console.log(bucketData)
```

- Upload a file to the bucket

```js
let fileData = mcs.uploadToBucket(<FILE_PATH>, <BUCKET_UID>, prefix="")
console.log(fileData)
```

For more examples, please see the [SDK documentation.](https://docs.filswan.com/multi-chain-storage/developer-quickstart/sdk)

<a name="functions"></a>

## ℹ️ Functions
Expand Down
36 changes: 18 additions & 18 deletions sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,24 @@ main()

## 👨‍💻 Examples

### Bucket Storage

- Create a bucket

```js
let bucketData = await mcs.createBucket(<BUCKET_NAME>)
console.log(bucketData)
```

- Upload a file to the bucket

```js
let fileData = mcs.uploadToBucket(<FILE_PATH>, <BUCKET_UID>, 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.
Expand Down Expand Up @@ -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(<BUCKET_NAME>)
console.log(bucketData)
```

- Upload a file to the bucket

```js
let fileData = mcs.uploadToBucket(<FILE_PATH>, <BUCKET_UID>, prefix="")
console.log(fileData)
```

For more examples, please see the [SDK documentation.](https://docs.filswan.com/multi-chain-storage/developer-quickstart/sdk)

<a name="functions"></a>

## ℹ️ Functions
Expand Down

0 comments on commit f7be44c

Please sign in to comment.