Class: Pin
Defined in: bee-js/src/modules/pin.ts:12
Local pinning operations.
Accessed as bee.pin.
Constructors
Constructor
new Pin(
context):Pin
Defined in: bee-js/src/modules/pin.ts:13
Parameters
context
BeeContext
Returns
Pin
Methods
add()
add(
reference,requestOptions?):Promise<void>
Defined in: bee-js/src/modules/pin.ts:21
Pins local data with the given reference.
Parameters
reference
Data reference
string | Uint8Array<ArrayBufferLike> | Reference
requestOptions?
Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
Returns
Promise<void>
get()
get(
reference,requestOptions?):Promise<Pin>
Defined in: bee-js/src/modules/pin.ts:54
Gets the pinning status of the chunk with the given reference.
Parameters
reference
Data reference
string | Uint8Array<ArrayBufferLike> | Reference
requestOptions?
Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
Returns
Promise<Pin>
getAll()
getAll(
requestOptions?):Promise<Reference[]>
Defined in: bee-js/src/modules/pin.ts:44
Gets the list of all locally pinned references.
Parameters
requestOptions?
Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
Returns
Promise<Reference[]>
remove()
remove(
reference,requestOptions?):Promise<void>
Defined in: bee-js/src/modules/pin.ts:33
Unpins local data with the given reference.
Parameters
reference
Data reference
string | Uint8Array<ArrayBufferLike> | Reference
requestOptions?
Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
Returns
Promise<void>
reuploadData()
reuploadData(
postageBatchId,reference,requestOptions?):Promise<void>
Defined in: bee-js/src/modules/pin.ts:67
Instructs the Bee node to reupload locally pinned data into the network.
Parameters
postageBatchId
Postage Batch ID that will be used to re-upload the data.
string | Uint8Array<ArrayBufferLike> | BatchId
reference
Data reference to be re-uploaded.
string | Uint8Array<ArrayBufferLike> | Reference
requestOptions?
Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
Returns
Promise<void>