@pinata/sdk 1.1.20 → 1.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/lib/pinata-sdk.js +358 -1
- package/lib/pinata-sdk.min.js +1 -1
- package/package.json +5 -2
- package/src/commands/data/pinList/pinList.js +7 -0
- package/src/commands/data/pinList/queryBuilder.js +11 -0
- package/src/commands/data/testAuthentication.js +6 -0
- package/src/commands/data/userPinnedDataTotal.js +6 -0
- package/src/commands/pinning/hashMetadata.js +8 -0
- package/src/commands/pinning/hashPinPolicy.js +8 -0
- package/src/commands/pinning/pinByHash.js +8 -0
- package/src/commands/pinning/pinFileToIPFS.js +11 -3
- package/src/commands/pinning/pinFromFS.js +8 -0
- package/src/commands/pinning/pinJSONToIPFS.js +8 -0
- package/src/commands/pinning/pinJobs/pinJobs.js +7 -0
- package/src/commands/pinning/pinJobs/queryBuilder.js +6 -0
- package/src/commands/pinning/unpin.js +7 -0
- package/src/commands/pinning/userPinPolicy.js +7 -0
- package/src/index.js +227 -0
- package/src/util/validators.js +21 -0
- package/test/commands/pinning/pinFileToIPFS.test.js +16 -3
- package/tsconfig.json +23 -0
- package/types/commands/data/pinList/pinList.d.ts +8 -0
- package/types/commands/data/pinList/queryBuilder.d.ts +7 -0
- package/types/commands/data/testAuthentication.d.ts +7 -0
- package/types/commands/data/userPinnedDataTotal.d.ts +7 -0
- package/types/commands/pinning/hashMetadata.d.ts +9 -0
- package/types/commands/pinning/hashPinPolicy.d.ts +9 -0
- package/types/commands/pinning/pinByHash.d.ts +9 -0
- package/types/commands/pinning/pinFileToIPFS.d.ts +9 -0
- package/types/commands/pinning/pinFromFS.d.ts +9 -0
- package/types/commands/pinning/pinJSONToIPFS.d.ts +9 -0
- package/types/commands/pinning/pinJobs/pinJobs.d.ts +8 -0
- package/types/commands/pinning/pinJobs/queryBuilder.d.ts +7 -0
- package/types/commands/pinning/unpin.d.ts +8 -0
- package/types/commands/pinning/userPinPolicy.d.ts +8 -0
- package/types/constants.d.ts +1 -0
- package/types/index.d.ts +362 -0
- package/types/util/errorResponse.d.ts +1 -0
- package/types/util/validators.d.ts +26 -0
package/README.md
CHANGED
|
@@ -153,7 +153,7 @@ Adds a hash to Pinata's pin queue to be pinned asynchronously. For the synchrono
|
|
|
153
153
|
* `pinataMetadata` (optional): A JSON object with [optional metadata](#metadata-anchor) for the hash being pinned
|
|
154
154
|
* `pinataOptions`
|
|
155
155
|
* `hostNodes` (optional): An array of [multiaddresses for nodes](#hostNode-anchor) that are currently hosting the content to be pinned
|
|
156
|
-
* `
|
|
156
|
+
* `customPinPolicy` A JSON object with a new [Pin Policy](#pinPolicies-anchor) for the hash.
|
|
157
157
|
#### Response
|
|
158
158
|
```
|
|
159
159
|
{
|
|
@@ -203,7 +203,7 @@ pinata.pinByHash('yourHashHere', options).then((result) => {
|
|
|
203
203
|
|
|
204
204
|
<a name="pinFileToIPFS-anchor"></a>
|
|
205
205
|
### `pinFileToIPFS`
|
|
206
|
-
Send a file to
|
|
206
|
+
Send a file to Pinata for direct pinning to IPFS.
|
|
207
207
|
|
|
208
208
|
##### `pinata.pinFileToIPFS(readableStream, options)`
|
|
209
209
|
##### Params
|
|
@@ -352,7 +352,7 @@ pinata.pinJobs('yourHashHere', filters).then((result) => {
|
|
|
352
352
|
|
|
353
353
|
<a name="pinJSONToIPFS-anchor"></a>
|
|
354
354
|
### `pinJSONToIPFS`
|
|
355
|
-
Send JSON to
|
|
355
|
+
Send JSON to Pinata for direct pinning to IPFS.
|
|
356
356
|
|
|
357
357
|
##### `pinata.pinJSONToIPFS(body, options)`
|
|
358
358
|
##### Params
|