@typus/typus-perp-sdk 1.1.32-codegen-exp5 → 1.1.32-codegen-exp7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,7 @@ import { SuiGrpcClient } from "@mysten/sui/grpc";
3
3
  import { DevInspectTransactionBlockParams, ExecuteTransactionBlockParams, GetCoinsParams, GetDynamicFieldsParams, GetObjectParams, GetOwnedObjectsParams, MultiGetObjectsParams, QueryEventsParams, SuiClient } from "@mysten/sui/client";
4
4
  import { PythClient, TypusConfig } from "@typus/typus-sdk/dist/src/utils";
5
5
  import type { Experimental_SuiClientTypes } from "@mysten/sui/experimental";
6
+ import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
6
7
  export type Network = "MAINNET" | "TESTNET";
7
8
  export declare class TypusClient {
8
9
  jsonRpcClient: SuiClient;
@@ -10,7 +11,7 @@ export declare class TypusClient {
10
11
  graphQLClient: SuiGraphQLClient;
11
12
  pythClient: PythClient;
12
13
  config: TypusConfig;
13
- constructor(config: TypusConfig);
14
+ constructor(config: TypusConfig, grpcTransport?: RpcTransport);
14
15
  getCoins(params: GetCoinsParams): Promise<import("@mysten/sui/client").PaginatedCoins>;
15
16
  getObject(params: GetObjectParams): Promise<import("@mysten/sui/client").SuiObjectResponse>;
16
17
  getOwnedObjects(params: GetOwnedObjectsParams): Promise<import("@mysten/sui/client").PaginatedObjectsResponse>;
@@ -6,10 +6,11 @@ const grpc_1 = require("@mysten/sui/grpc");
6
6
  const client_1 = require("@mysten/sui/client");
7
7
  const utils_1 = require("@typus/typus-sdk/dist/src/utils");
8
8
  const src_1 = require("../src");
9
+ const grpcweb_transport_1 = require("@protobuf-ts/grpcweb-transport");
9
10
  class TypusClient {
10
11
  // user: string;
11
12
  // mvr?: Experimental_SuiClientTypes.MvrOptions
12
- constructor(config) {
13
+ constructor(config, grpcTransport) {
13
14
  this.config = config;
14
15
  const network = config.network.toLowerCase();
15
16
  const mvr = {
@@ -31,7 +32,11 @@ class TypusClient {
31
32
  });
32
33
  this.gRpcClient = new grpc_1.SuiGrpcClient({
33
34
  network: network,
34
- baseUrl: `https://fullnode.${network}.sui.io:443`,
35
+ transport: grpcTransport ??
36
+ new grpcweb_transport_1.GrpcWebFetchTransport({
37
+ baseUrl: `https://fullnode.${network}.sui.io:443`,
38
+ // Additional transport options
39
+ }),
35
40
  });
36
41
  this.graphQLClient = new graphql_1.SuiGraphQLClient({
37
42
  network: network,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typus/typus-perp-sdk",
3
- "version": "1.1.32-codegen-exp5",
3
+ "version": "1.1.32-codegen-exp7",
4
4
  "repository": "https://github.com/Typus-Lab/typus-perp-sdk.git",
5
5
  "author": "Typus",
6
6
  "description": "typus perp sdk",
@@ -43,5 +43,5 @@
43
43
  "url": "https://github.com/Typus-Lab/typus-perp-sdk/issues"
44
44
  },
45
45
  "homepage": "https://github.com/Typus-Lab/typus-perp-sdk#readme",
46
- "packageManager": "yarn@4.10.3+sha512.c38cafb5c7bb273f3926d04e55e1d8c9dfa7d9c3ea1f36a4868fa028b9e5f72298f0b7f401ad5eb921749eb012eb1c3bb74bf7503df3ee43fd600d14a018266f"
47
- }
46
+ "packageManager": "yarn@4.10.3"
47
+ }