1.5.5 • Published 14 days ago

@entangle_protocol/oracle-sdk v1.5.5

Weekly downloads
-
License
ISC
Repository
github
Last release
14 days ago

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);
}
1.5.5

14 days ago

1.5.4

15 days ago

1.5.3

16 days ago

1.5.2

19 days ago

1.5.1

20 days ago

1.5.0

20 days ago

1.4.34-testnet-v4

2 months ago

1.4.32-testnet-v4

2 months ago

1.4.33-testnet-v4

2 months ago

1.4.31-testnet-v4

2 months ago

1.4.29-testnet-v4

2 months ago

1.4.30-testnet-v4

2 months ago

1.4.28-testnet-v4

2 months ago

1.4.27-testnet-v4

2 months ago

1.4.26-testnet-v4

2 months ago

1.4.24-testnet-v4

2 months ago

1.4.22-testnet-v4

2 months ago

1.4.25-testnet-v4

2 months ago

1.4.23-testnet-v4

2 months ago

1.4.21-testnet-v4

2 months ago

1.4.20-testnet-v4

2 months ago

1.4.19-testnet-v4

2 months ago

1.4.18-testnet-v4

3 months ago

1.4.17-testnet-v4

3 months ago

1.4.16-testnet-v4

3 months ago

1.4.15-testnet-v4

3 months ago

1.4.14-testnet-v4

3 months ago

1.4.13-testnet-v4

3 months ago

1.4.12-testnet-v4

3 months ago

1.4.11-testnet-v4

4 months ago

1.4.6-testnet-v4

4 months ago

1.4.8-testnet-v4

4 months ago

1.4.5-testnet-v4

4 months ago

1.4.9-testnet-v4

4 months ago

1.4.7-testnet-v4

4 months ago

1.4.10-testnet-v4

4 months ago

1.4.4-testnet-v4

4 months ago

1.4.3-testnet-v4

4 months ago

1.4.2-testnet-v4

4 months ago

1.4.1-testnet-v4

4 months ago

1.4.0-testnet-v4

4 months ago

1.2.2

5 months ago

1.2.1

6 months ago

1.2.0

6 months ago

1.1.0

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago