1. Initialize Your Project
Create Project Layout
Set up your development directory structure and install dependencies.
mkdir ezeniia-core && cd $_
npm init -y
npm install @ezeniia/sdk
Configuration
Create a config file to define core network parameters.
// config.js
module.exports = {
network: "testnet",
privateKey: "your_wallet_private_key",
contractAddress: "0x4e...5a"
};
2. Interacting with Contracts
Initialize SDK
Connect to the decentralized network using the Ezeni Iia SDK.
const EzeniSDK = require('@ezeniia/sdk');
const sdk = new EzeniSDK({
configPath: 'config.js'
});
SDK connected to network:
✓ Chain ID: 42161 (Arbitrum)
✓ Wallet balance: 12,800 EZN
✓ Active nodes: 24
3. Implementing Core Features
Data Upload
Store training data in decentralized storage for global access.
await sdk.data.upload("training_data.csv", {
replication: 3,
pinToIpfs: true
});
Model Training
Distribute training across nodes in the network.
const results = await sdk.training.train({
modelId: "resnet-152",
epochs: 10,
batchSize: 64
});
Governance
Participate in protocol upgrades and node management.
await sdk.governance.vote("proposal-0042", {
choice: sdk.governance.choices.FOR
});
4. Deployment Process
Contract Deployment
Publish and verify your contracts on supported blockchains.
const contract = await sdk.deployer.deploy("MyAIModel", {
compilerVersion: "0.8.22+commit.0",
constructorArgs: ["ipfs-hash-model"]
});
Contract Status: ✓ Deployed to address 0x5eF... ✓ Transaction hash: 0x3f9e... ✓ Gas used: 484,231 wei