# @entangle_protocol/oracle-sdk

> The SDK for crosschain messaging

Latest version **1.5.22** (published 2025-02-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install @entangle_protocol/oracle-sdk
pnpm add @entangle_protocol/oracle-sdk
yarn add @entangle_protocol/oracle-sdk
bun add @entangle_protocol/oracle-sdk
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; large bundle.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.22 |
| Published | 2025-02-11 |
| First published | 2023-11-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 15 |
| Unpacked size | 18.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | entanglefi, ruarin, a.kolupaev, entangle_private |

## Links

- npm: https://www.npmjs.com/package/@entangle_protocol/oracle-sdk
- Repository: https://github.com/Entangle-Protocol/spotter-contracts
- Homepage: https://github.com/Entangle-Protocol/spotter-contracts#readme
- Issues: https://github.com/Entangle-Protocol/spotter-contracts/issues
- npm.io page: https://npm.io/package/@entangle_protocol/oracle-sdk

## Dependencies (15)

- [bs58](https://npm.io/package/bs58.md) ^5.0.0
- [chai](https://npm.io/package/chai.md) ^4.3.7
- [ethers](https://npm.io/package/ethers.md) ^6.11.1
- [hardhat](https://npm.io/package/hardhat.md) ^2.22.2
- [ts-node](https://npm.io/package/ts-node.md) ^10.8.2
- [typescript](https://npm.io/package/typescript.md) ^4.9.5
- [@types/bs58](https://npm.io/package/@types/bs58.md) ^4.0.4
- [@coral-xyz/anchor](https://npm.io/package/@coral-xyz/anchor.md) ^0.29.0
- [@openzeppelin/contracts](https://npm.io/package/@openzeppelin/contracts.md) ^4.9.6
- [@openzeppelin/merkle-tree](https://npm.io/package/@openzeppelin/merkle-tree.md) ^1.0.6
- [@openzeppelin/hardhat-upgrades](https://npm.io/package/@openzeppelin/hardhat-upgrades.md) ^3.0.5
- [@nomicfoundation/hardhat-ethers](https://npm.io/package/@nomicfoundation/hardhat-ethers.md) ^3.0.5
- [@nomicfoundation/hardhat-toolbox](https://npm.io/package/@nomicfoundation/hardhat-toolbox.md) ^5.0.0
- [@openzeppelin/contracts-upgradeable](https://npm.io/package/@openzeppelin/contracts-upgradeable.md) ^4.9.6
- [@nomicfoundation/hardhat-chai-matchers](https://npm.io/package/@nomicfoundation/hardhat-chai-matchers.md) ^2.0.6

## Recent versions

- 1.5.22 (latest) — 2025-02-11
- 1.5.21 — 2024-12-19
- 1.5.20 — 2024-11-06
- 1.5.19 — 2024-10-04
- 1.5.18 — 2024-09-11
- 1.5.17 — 2024-09-11
- 1.5.16 — 2024-09-11
- 1.5.15 — 2024-08-19
- 1.5.14 — 2024-08-09
- 1.5.13 — 2024-07-24
- 1.5.12 — 2024-07-24
- 1.5.11 — 2024-07-03
- 1.5.10 — 2024-06-13
- 1.5.9 — 2024-05-20
- 1.5.8 — 2024-05-20
- … 72 more at https://npm.io/package/@entangle_protocol/oracle-sdk/versions

## README

# Photon Messaging Protocol

The SDK for crosschain messaging

## Installing

`yarn add "@entangle_protocol/oracle-sdk"`

## KYC

All externalDevelopers must contact us

## Usage

```
import { ProtocolBuilder, ProtocolParams, TransmittersParams } from "@entangle_protocol/oracle-sdk";

async function setupProtocol() {

    const MANUAL_RECEIVERS = ["address1", "address2"];

    const transmittersParams: TransmittersParams = {
        maxTransmitters: 10,
        minDelegateAmount: ethers.utils.parseUnits("100", "ether"),
        minPersonalAmount: ethers.utils.parseUnits("10", "ether"),
    }
    const protocolParams: ProtocolParams = {
        msgBetAmount: ethers.utils.parseUnits("0.001", "ether"),
        dataBetAmount: ethers.utils.parseUnits("0.0001", "ether"),
        msgBetReward: ethers.utils.parseUnits("0.002", "ether"),
        dataBetReward: ethers.utils.parseUnits("0.0002", "ether"),
        msgBetFirstReward: ethers.utils.parseUnits("0.004", "ether"),
        dataBetFirstReward: ethers.utils.parseUnits("0.0004", "ether"),
        consensusTargetRate: CONSENSUS_TARGET_RATE
    };

    const builder = new ProtocolBuilder(
        PROTOCOL_ID,
        MANUAL_RECEIVERS,
        transmittersParams,
        protocolParams
    ).withSigner(
        externalDeveloper
    );

    const protocol: Protocol = await builder.build();

    console.log("Init protocol");

    await protocol.verifyOrCreate(await externalDeveloper.getAddress());

    await protocol.verifyOrCreate(await admin.getAddress());
    await protocol.addProtocolAddressEvm(CHAIN_ID, protocolContractAddress);
    await protocol.addProposerAddressEvm(CHAIN_ID, proposerContractAddress);

    await protocol.addExecutorEvm(CHAIN_ID, executorAddress);

    // deposit distrib amount to start protocol working
    await protocol.deposit(AMOUNT);
}
```

---
_Source: https://npm.io/package/@entangle_protocol/oracle-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
