<p align="center"> <img src="https://via.placeholder.com/800x150?text=EpicVault+DappKit" alt="EpicVault-DappKit"/> <br/> <b>EpicVault-DappKit:</b> Your Ultimate Gateway to Building Decentralized Applications on EpicChain Blockchain. <br/> Built
npm install @epicchain/epicvault-dappkit-types
EpicVault-DappKit: Your Ultimate Gateway to Building Decentralized Applications on EpicChain Blockchain.
Built with β€ by EpicChain Labs, empowering developers worldwide.
EpicVault-DappKit is an all-in-one, developer-friendly toolkit designed to simplify the process of building decentralized applications (dApps) on the EpicChain blockchain. Whether you're connecting Web Applications, managing Off-chain JS Servers, or creating React-Native Apps, EpicVault-DappKit seamlessly bridges your app to the powerful EpicChain ecosystem.
> π Pro Tip: EpicVault-DappKit leverages types compatible with WalletConnectSDK, enabling you to alternate between implementations while reusing existing code. Check out the comprehensive WalletConnect Guide for more insights.
---
``sh`
npm i @epicchain/epicvault-dappkit-types
π For Vite Users (Important Configuration)
To ensure compatibility with Vite, update your vite.config.ts file with the following snippet:
`ts
import { defineConfig } from 'vite';
export default defineConfig({
// Custom configuration
define: {
global: 'globalThis',
process: {
version: 'globalThis',
},
},
});
`
---
1. EpicVaultInvoker
A smart contract invocation tool for efficient blockchain interactions.
2. EpicVaultParser
A versatile parser for managing EpicChain-specific data types.
3. EpicVaultSigner
Handles cryptographic signing, verification, encryption, and decryption.
4. EpicVaultEventListener
A robust event listener to capture real-time blockchain updates.
> π Explore sample implementations in the examples folder.
---
`ts
import { EpicVaultInvoker, EpicVaultParser, TypeChecker } from '@epicchain/epicvault-dappkit';
import { ContractInvocationMulti } from '@epicchain/epicvault-dappkit-types';
// Initialize the EpicVaultInvoker
const invoker = await EpicVaultInvoker.init({
rpcAddress: EpicVaultInvoker.TESTNET,
});
// Define the contract invocation
const invocation: ContractInvocationMulti = {
invocations: [
{
scriptHash: '0x309b6b2e0538fe4095ecc48e81bb4735388432b5',
operation: 'getMetaData',
args: [
{
type: 'Hash160',
value: '0x6dc3bff7b2e6061f3cad5744edf307c14823328e',
},
],
},
],
};
// Test the invocation
const testInvokeResult = await invoker.testInvoke(invocation);
// Log results
console.log(Invocation state returned: ${testInvokeResult.state});Estimated EpicPulse consumed: ${testInvokeResult.epicpulseconsumed} EpicPulse
console.log();Returned a map? ${TypeChecker.isStackTypeMap(testInvokeResult.stack[0])}
console.log();Parsed data: ${JSON.stringify(EpicVaultParser.parseRpcResponse(testInvokeResult.stack[0]), null, 2)}
console.log();`
---
---