Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ts/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ import {
BluefinRequestSigner,
makeSigner,
} from "@bluefin-exchange/pro-sdk";
import { SuiClient, Ed25519Keypair } from "@firefly-exchange/library-sui";
import { SuiJsonRpcClient } from "@mysten/sui/jsonRpc";
import { Ed25519Keypair } from "@firefly-exchange/library-sui";
import { hexToBytes } from "@noble/hashes/utils";

// Create wallet from private key
Expand All @@ -50,7 +51,7 @@ const signer = new BluefinRequestSigner(makeSigner(wallet, false));
const client = new BluefinProSdk(
signer,
"mainnet", // or "testnet" for staging, "devnet" for development
new SuiClient({ url: "https://fullnode.mainnet.sui.io:443" })
new SuiJsonRpcClient({ url: "https://fullnode.mainnet.sui.io:443", network: "mainnet" })
);

// Initialize the SDK (authenticates and loads exchange configuration)
Expand Down
10 changes: 6 additions & 4 deletions ts/sdk/docs/batch-claim-rewards-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import {
makeSigner,
BatchClaimParams
} from "@bluefin-exchange/pro-sdk";
import { SuiClient, Ed25519Keypair } from "@firefly-exchange/library-sui";
import { SuiJsonRpcClient } from "@mysten/sui/jsonRpc";
import { Ed25519Keypair } from "@firefly-exchange/library-sui";

// Create wallet from private key or mnemonic
const wallet = Ed25519Keypair.fromSecretKey(hexToBytes("YOUR_PRIVATE_KEY"));
Expand All @@ -33,7 +34,7 @@ const signer = new BluefinRequestSigner(makeSigner(wallet, false));
const sdk = new BluefinProSdk(
signer,
"mainnet", // or "testnet" for staging
new SuiClient({ url: "https://fullnode.mainnet.sui.io:443" })
new SuiJsonRpcClient({ url: "https://fullnode.mainnet.sui.io:443", network: "mainnet" })
);

await sdk.initialize();
Expand Down Expand Up @@ -129,7 +130,8 @@ import {
makeSigner,
BatchClaimParams
} from "@bluefin-exchange/pro-sdk";
import { SuiClient, Ed25519Keypair } from "@firefly-exchange/library-sui";
import { SuiJsonRpcClient } from "@mysten/sui/jsonRpc";
import { Ed25519Keypair } from "@firefly-exchange/library-sui";
import { hexToBytes } from "@noble/hashes/utils";

async function claimRewards() {
Expand All @@ -139,7 +141,7 @@ async function claimRewards() {
const sdk = new BluefinProSdk(
signer,
"mainnet",
new SuiClient({ url: "https://fullnode.mainnet.sui.io:443" })
new SuiJsonRpcClient({ url: "https://fullnode.mainnet.sui.io:443", network: "mainnet" })
);
await sdk.initialize();

Expand Down
7 changes: 4 additions & 3 deletions ts/sdk/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import {
} from "./index";

import { hexToBytes } from "@noble/hashes/utils";
import { SuiClient, Ed25519Keypair } from "@firefly-exchange/library-sui";
import { SuiJsonRpcClient } from "@mysten/sui/jsonRpc";
import { Ed25519Keypair } from "@firefly-exchange/library-sui";

// Configure logging
const logger = {
Expand Down Expand Up @@ -113,7 +114,7 @@ async function main() {
const client = new BluefinProSdk(
bfSigner,
"testnet",
new SuiClient({ url: "https://fullnode.testnet.sui.io:443" })
new SuiJsonRpcClient({ url: "https://fullnode.testnet.sui.io:443", network: "testnet" })
);
await client.initialize();

Expand All @@ -122,7 +123,7 @@ async function main() {
// const clientWithTimeOffset = new BluefinProSdk(
// bfSigner,
// "testnet",
// new SuiClient({ url: "https://fullnode.testnet.sui.io:443" }),
// new SuiJsonRpcClient({ url: "https://fullnode.testnet.sui.io:443", network: "testnet" }),
// { currentTimeMs: customTime }
// );
// await clientWithTimeOffset.initialize();
Expand Down
Loading
Loading