SDK For Hub Framework
Last updated
Was this helpful?
Last updated
Was this helpful?
The Mind Network SDK is a powerful TypeScript library designed to streamline interactions with the Mind Network Hub Framework contracts. It provides essential tools to work with core functionalities such as the FHE Key Registry and Member Pool.
Install the SDK using npm or yarn:
Before using the SDK, initialize it with the required configuration:
Use fetchFheKeySet
to retrieve a key set by its keyId
:
Use getVotingReward
to retrieve the voting reward for a specific wallet:
fheKeyRegistryAddress
string
Address of the FHE Key Registry contract
memberPoolAddress
string
Address of the Member Pool contract
rpc
string
RPC endpoint for the Mind network
chainID
number
Chain ID of the Mind network
initialize(config: CoreConfig): void
Initializes the SDK with the given configuration.
config
: An object containing the following properties:
fheKeyRegistryAddress
(string, required)
memberPoolAddress
(string, required)
rpc
(string, required)
chainID
(number, required)
fetchFheKeySet(keyId: bigint): Promise<any>
Fetches the FHE key set associated with the given keyId
.
keyId
: The unique identifier of the key set (type bigint
).
getVotingReward(coldWalletAddress: string): Promise<bigint>
Fetches the voting reward for the given cold wallet address.
coldWalletAddress
: The wallet address (type string
).
The Mind Network SDK is distributed under the MIT License.