Class: Grantee
Defined in: bee-js/src/modules/grantee.ts:11
Grantee (access control) operations.
Accessed as bee.grantee.
Constructors
Constructor
new Grantee(
context):Grantee
Defined in: bee-js/src/modules/grantee.ts:12
Parameters
context
BeeContext
Returns
Grantee
Methods
create()
create(
postageBatchId,grantees,requestOptions?):Promise<GranteesResult>
Defined in: bee-js/src/modules/grantee.ts:21
Creates grantees for a postage batch.
Parameters
postageBatchId
string | Uint8Array<ArrayBufferLike> | BatchId
grantees
Public keys of the grantees.
string[] | Uint8Array<ArrayBufferLike>[] | PublicKey[]
requestOptions?
Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
Returns
Promise<GranteesResult>
get()
get(
reference,requestOptions?):Promise<GetGranteesResult>
Defined in: bee-js/src/modules/grantee.ts:38
Retrieves the grantees for a given reference.
Parameters
reference
The reference.
string | Uint8Array<ArrayBufferLike> | Reference
requestOptions?
Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
Returns
Promise<GetGranteesResult>
patch()
patch(
postageBatchId,reference,history,grantees,requestOptions?):Promise<GranteesResult>
Defined in: bee-js/src/modules/grantee.ts:56
Updates the grantees of a specific reference and history.
Parameters
postageBatchId
The ID of the postage batch.
string | Uint8Array<ArrayBufferLike> | BatchId
reference
The reference.
string | Uint8Array<ArrayBufferLike> | Reference
history
The history.
string | Uint8Array<ArrayBufferLike> | Reference
grantees
The grantees to add and/or revoke.
add?
string[] | Uint8Array<ArrayBufferLike>[] | PublicKey[]
revoke?
string[] | Uint8Array<ArrayBufferLike>[] | PublicKey[]
requestOptions?
Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
Returns
Promise<GranteesResult>