Skip to content

stringToIndex

This function can be used to create a unique SmartAccount for a given uuid, email, or any other arbitrary string.

Usage

ts
const salt = stringToIndex("[email protected]");
// 53219281434065493725260108619161294016101536485294536107629387514619165176826n

export const account = new SimpleSmartContractAccount({
  index: salt,
  // ... other args omitted
});

Returns

bigint

Parameters

phrase: string

Any arbitrary string.