Skip to main content

Registry

Entry service for the protocol. It is for interacting with the Registry contract. This service is used to register entities and get information about them.

registerEntity​

Registers an entity to the protocol. Deploys a new contract and returns its address.

For technical info, check here.

registerEntity(registry: RegistryOptions): Promise<string>

type RegistryOptions = {
entityName: string;
description: string;
thumbnail: string;
entitySlotDefaultURI: string;
slotPrice: string;
};

getLastEntityId​

Returns the last ID of the registered entity.

For technical info, check here.

getLastEntityId(): Promise<BigNumber>

getEntitySubscriptionPrice​

NFTs are allowed to subscribe to an entity with a paid amount which is set by the entity owner. This function returns it.

For technical info, check here.

getEntitySubscriptionPrice(entityId:BigNumber): Promise<BigNumber>

getRegisteredEntity​

Returns the registered entity information with the given ID.

For technical info, check here.

getRegisteredEntity(entityId: string): Promise<Entity>

getSubscriber​

Returns the address of the subscriber contract.

For technical info, check here.

getSubscriber(): Promise<string>

getController​

Returns the address of the controller contract.

For technical info, check here.

getController(): Promise<string>

getImplementation​

Returns the implementation address associated with a given implementation ID.

For technical info, check here.

getImplementation( _implementation: string): Promise<string>

getEntityAddress​

Returns the address of the entity with the given ID.

For technical info, check here.

getEntityAddress(_entityId: string): Promise<string>

getEntityId​

Returns the ID of the entity with the given contract address.

For technical info, check here.

getEntityId(_contractAddress: string): Promise<BigNumber>

getEntityIsRegistered​

Returns whether the entity with the given contract address is registered or not.

For technical info, check here.

getEntityIsRegistered(_contractAddress: string): Promise<boolean>