ElvTenant
Provides tenant administration operations on the Eluvio Content Fabric: managing access groups (tenant admins, content admins, tenant users), configuring faucet funding and sharing keys, and setting tenant status.
Constructor
Instantiate the ElvTenant object
Returns: New ElvTenant object connected to the specified content fabric and blockchain
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
configUrl | string | ✓ | The Content Fabric configuration URL |
debugLogging | boolean | Enable verbose debug logging (default:false) |
Init
Initialize the ElvTenant SDK with the provided private key.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
privateKey | string | ✓ | Hex-encoded private key for the signing account |
TenantCheckGroupConfig
tenantId,
groupAddr,
tenantOwner
}) → Promise.<Object>
Verify that an access group is correctly associated with the given tenant.
Checks ownership, contract type, and tenant ID via contract metadata,
the tenant contract field, and fabric object metadata (in that order).
Returns: Object with success boolean, optional message and need_format fields
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | Tenant ID (iten***) |
groupAddr | string | ✓ | Address of the access group to verify |
tenantOwner | string | ✓ | Expected owner address of the tenant contract |
TenantContentAdminGroup
Retrieve the address of the content admins group registered on the tenant contract.
Returns: Address of the content admins group
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | Tenant ID (iten***) |
TenantCreateFaucetAndFund
asUrl,
tenantId,
amount, // optional
noFunds // optional
}) → Promise.<Object>
Create (or retrieve) a faucet funding address for the tenant via the authority service, then optionally transfer ELV from the current account to fund it.
Returns: Result including faucet config and optional amount_transferred / current_balance
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
asUrl | string | ✓ | Authority service base URL |
tenantId | string | ✓ | Tenant ID (iten***) |
amount | number | Amount of ELV to transfer to the faucet funding address (default:20) | |
noFunds | boolean | Create the faucet address without transferring funds (default:false) |
TenantCreateSharingKey
asUrl,
tenantId
}) → Promise.<Object>
Create a sharing key for the tenant via the authority service and add the resulting signing address to the tenant's content admins group.
Returns: Result including sharing key info from the authority service
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
asUrl | string | ✓ | Authority service base URL |
tenantId | string | ✓ | Tenant ID (iten***) |
TenantDeleteFaucet
asUrl,
tenantId
}) → Promise.<void>
Delete the faucet funding configuration for a tenant via the authority service.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
asUrl | string | ✓ | Authority service base URL |
tenantId | string | ✓ | Tenant ID (iten***) |
TenantFundUser
asUrl,
tenantId,
userAddress
}) → Promise.<Object>
Fund a user wallet address via the tenant's faucet. The user's balance must
be below the faucet's configured per_top_up_limit, and the request is
signed with the tenant's multi-sig token.
Returns: Faucet fund response from the authority service
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
asUrl | string | ✓ | Authority service base URL |
tenantId | string | ✓ | Tenant ID (iten***) |
userAddress | string | ✓ | Ethereum address of the user to fund |
TenantGetFaucet
asUrl,
tenantId
}) → Promise.<Object>
Retrieve the faucet funding configuration for a tenant from the authority service.
Returns: Faucet configuration object from the authority service
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
asUrl | string | ✓ | Authority service base URL |
tenantId | string | ✓ | Tenant ID (iten***) |
TenantGetSharingKey
asUrl,
tenantId
}) → Promise.<Object>
Retrieve the sharing key configuration for a tenant from the authority service. The request is signed with the tenant's multi-sig token.
Returns: Sharing key configuration from the authority service
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
asUrl | string | ✓ | Authority service base URL |
tenantId | string | ✓ | Tenant ID (iten***) |
TenantInfo
Get tenant-level information
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | Tenant ID (iten) |
TenantRemoveContentAdmin
tenantId,
contentAdminsAddress
)
Remove a content admin from this tenant.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | The ID of the tenant (iten***) |
contentAdminsAddress | string | ✓ | Address of content admin we want to remove. |
TenantRemoveTenantUsers
tenantId,
tenantUsersAddress
)
Remove a tenant user group from this tenant.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | The ID of the tenant (iten***) |
tenantUsersAddress | string | ✓ | Address of tenant users address we want to remove. |
TenantSetContentAdmins
tenantId,
contentAdminAddr
) → string
Create a new content admin group corresponding to this tenant.
Returns: Content Admin Group's address
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | The ID of the tenant (iten***) |
contentAdminAddr | string | ✓ | Content Admin Group's address, new group will be created if not specified (optional) |
TenantSetEluvioLiveId
tenantId,
eluvioLiveId
)
Set the Eluvio Live tenant object ID on the tenant contract.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | Tenant ID (iten) |
eluvioLiveId | string | ✓ | Object ID of the tenant-leve Eluvio Live object |
TenantSetGroupConfig
tenantId,
groupAddress
)
Associate group with the tenant with tenantId.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | The ID of the tenant (iten***) |
groupAddress | string | ✓ | Address of the group we want to remove. |
TenantSetStatus
tenantContractId,
tenantStatus
) → Promise.<{tenantStatus: string, tenantContractId: string}>
Add tenant status
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantContractId | string | ✓ | The ID of the tenant Id (iten***) |
tenantStatus | string | ✓ | tenant status: acive | inactive |
TenantSetTenantUsers
tenantId,
tenantUsersAddr
) → string
Create a new tenant users group corresponding to this tenant.
Returns: Tenant users Group's address
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | The ID of the tenant (iten***) |
tenantUsersAddr | string | ✓ | Tenant users Group's address, new group will be created if not specified (optional) |
TenantShow
tenantId,
asUrl,
show_metadata
)
Return tenant admins group and content admins group corresponding to this tenant.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantId | string | ✓ | The ID of the tenant (iten***) |
asUrl | string | ✓ | authority service URL |
show_metadata | boolean | ✓ | Enable retrieving metadata from tenant object |
TenantStatus
Retrieve tenant status
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenantContractId | string | ✓ | The ID of the tenant Id (iten***) |