SDK For Hub Framework
Mind Network SDK For Hub Framework
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.
Github link: Mind Network SDK for Hub Framework
Installation
Install the SDK using npm or yarn:
Usage
1. Initialize the SDK
Before using the SDK, initialize it with the required configuration:
2. Fetch an FHE Key Set
Use fetchFheKeySet
to retrieve a key set by its keyId
:
3. Get Voting Reward
Use getVotingReward
to retrieve the voting reward for a specific wallet:
Configuration Options
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
API Reference
initialize(config: CoreConfig): void
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>
fetchFheKeySet(keyId: bigint): Promise<any>
Fetches the FHE key set associated with the given keyId
.
keyId
: The unique identifier of the key set (typebigint
).
getVotingReward(coldWalletAddress: string): Promise<bigint>
getVotingReward(coldWalletAddress: string): Promise<bigint>
Fetches the voting reward for the given cold wallet address.
coldWalletAddress
: The wallet address (typestring
).
License
The Mind Network SDK is distributed under the MIT License.
Last updated