1.5.19 • Published 5 months ago

@entangle_protocol/oracle-sdk v1.5.19

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months 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.10

9 months ago

1.5.12

7 months ago

1.5.11

8 months ago

1.5.14

7 months ago

1.5.13

7 months ago

1.5.16

6 months ago

1.5.15

6 months ago

1.5.18

6 months ago

1.5.17

6 months ago

1.5.19

5 months ago

1.5.9

9 months ago

1.5.8

9 months ago

1.5.7

10 months ago

1.5.6

10 months ago

1.5.5

10 months ago

1.5.4

10 months ago

1.5.3

10 months ago

1.5.2

10 months ago

1.5.1

10 months ago

1.5.0

10 months ago

1.4.56-testnet-v4

10 months ago

1.4.57-testnet-v4

10 months ago

1.4.55-testnet-v4

11 months ago

1.4.54-testnet-v4

11 months ago

1.4.53-testnet-v4

11 months ago

1.4.50-testnet-v4

11 months ago

1.4.51-testnet-v4

11 months ago

1.4.52-testnet-v4

11 months ago

1.4.49-testnet-v4

11 months ago

1.4.44-testnet-v4

11 months ago

1.4.45-testnet-v4

11 months ago

1.4.46-testnet-v4

11 months ago

1.4.48-testnet-v4

11 months ago

1.4.47-testnet-v4

11 months ago

1.4.43-testnet-v4

11 months ago

1.4.36-testnet-v4

11 months ago

1.4.40-testnet-v4

11 months ago

1.4.38-testnet-v4

11 months ago

1.4.39-testnet-v4

11 months ago

1.4.41-testnet-v4

11 months ago

1.4.42-testnet-v4

11 months ago

1.4.37-testnet-v4

11 months ago

1.4.35-testnet-v4

11 months ago

1.4.34-testnet-v4

11 months ago

1.4.32-testnet-v4

11 months ago

1.4.33-testnet-v4

11 months ago

1.4.31-testnet-v4

12 months ago

1.4.29-testnet-v4

12 months ago

1.4.30-testnet-v4

12 months ago

1.4.28-testnet-v4

12 months ago

1.4.27-testnet-v4

12 months ago

1.4.26-testnet-v4

12 months ago

1.4.24-testnet-v4

12 months ago

1.4.22-testnet-v4

12 months ago

1.4.25-testnet-v4

12 months ago

1.4.23-testnet-v4

12 months ago

1.4.21-testnet-v4

12 months ago

1.4.20-testnet-v4

12 months ago

1.4.19-testnet-v4

12 months ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago