function stringToIndex(phrase): bigint;Defined in: aa-sdk/core/src/utils/bigint.ts:117
Useful if you want to use a string, such as a user's email address, as salt to generate a unique SmartAccount per user.
example:
const salt = stringToIndex("alice@example.com");
export const account = new SimpleSmartContractAccount({
index: salt,
// other args omitted...
});
| Parameter | Type | Description |
|---|---|---|
|
| any string value. |
bigint
the bigint value of the hashed string