Skip to content

Commit 306a0d2

Browse files
authored
feat(ipfs): add documentation about replacePin (#993)
1 parent 9c86af7 commit 306a0d2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

packages/clients/src/api/ipfs/v1alpha1/api.gen.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,20 @@ export class API extends ParentAPI {
238238
unmarshalPin,
239239
)
240240

241+
/**
242+
* Replace pin by CID. Deletes the given resource ID and pins the new CID in
243+
* its place. Will fetch and store the content pointed by the provided CID.
244+
* The content must be available on the public IPFS network. The content (IPFS
245+
* blocks) is hosted by the pinning service until the pin is deleted. While
246+
* the content is available any other IPFS peer can fetch and host your
247+
* content. For this reason, we recommend that you pin either public or
248+
* encrypted content. Several different pin requests can target the same CID.
249+
* A pin is defined by its ID (UUID), its status (queued, pinning, pinned or
250+
* failed) and target CID.
251+
*
252+
* @param request - The request {@link ReplacePinRequest}
253+
* @returns A Promise of ReplacePinResponse
254+
*/
241255
replacePin = (request: Readonly<ReplacePinRequest>) =>
242256
this.client.fetch<ReplacePinResponse>(
243257
{

0 commit comments

Comments
 (0)