Skip to content

@gala-chain/testAPI


API > AdminChainClients

Type alias: AdminChainClients<T>

AdminChainClients\<T>: ChainClients\<T & ChainClientOptionsWithPK> & object

Admin chain clients that provide elevated privileges for test setup. Includes all standard client functionality plus the ability to create and register new users.

Example

const adminClients = await TestClients.createForAdmin();
const user1 = await adminClients.createRegisteredUser();
const user2 = await adminClients.createRegisteredUser("alice");

Type declaration

createRegisteredUser()

Creates and registers a new user on the blockchain.

Parameters

userAlias?: string

Optional alias for the user. If not provided, generates a random user with ETH address

Returns

Promise resolving to the created and registered ChainUser

Type parameters

Parameter Default Description
T extends ChainClientOptions DefaultChainClientOptions The chain client options configuration

Source

chain-test/src/e2e/TestClients.ts:247