Loading...
Loading...
Build with BITE Protocol for privacy on SKALE. Covers encrypted transactions, CTX, SDK usage. Use for privacy dApps, confidential voting, encrypted transfers.
npx skill4agent add skalenetwork/skills build-with-bitetocalldata| Primitive | Description | Chains |
|---|---|---|
| Encrypted TX | Encrypt | SKALE Base, SKALE Base Sepolia |
| CTX | Conditional Transactions | BITE V2 Sandbox 2 |
npm install @skalenetwork/biteimport { BITE } from '@skalenetwork/bite';
const bite = new BITE('https://base-sepolia-testnet.skalenodes.com/v1/jubilant-horrible-ancha');
// Encrypt transaction
const encrypted = await bite.encryptTransaction({
to: "0xContractAddress",
data: "0xCalldata"
});
// Send with wallet - CRITICAL: set gas manually
const tx = await wallet.sendTransaction({
...encrypted,
gasLimit: 300_000
});const { data, to } = await bite.getDecryptedTransactionData(txHash);const committees = await bite.getCommitteesInfo();
// length === 2 means rotation in progress (3 min window)forge install skalenetwork/bite-soliditypragma solidity >=0.8.27;
import { BITE } from "@skalenetwork/bite-solidity/BITE.sol";
import { IBiteSupplicant } from "@skalenetwork/bite-solidity/interfaces/IBiteSupplicant.sol";
contract Secret is IBiteSupplicant {
bytes public message;
function reveal(bytes calldata encrypted) external payable {
BITE.submitCTX(
BITE.SUBMIT_CTX_ADDRESS,
msg.value / tx.gasprice,
encrypted,
new bytes[](0)
);
}
function onDecrypt(bytes[] calldata decrypted, bytes[] calldata) external override {
message = decrypted[0];
}
}solc_version = "0.8.27"
evm_version = "istanbul"tocalldata| Data | Encrypted |
|---|---|
| Recipient (to) | ✅ |
| Calldata | ✅ |
| Sender | ❌ |
| Value | ❌ |
| Gas used | ❌ |