@scallop-io/sui-scallop-sdk 1.5.2 → 1.5.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scallop-io/sui-scallop-sdk",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "Typescript sdk for interacting with Scallop contract on SUI",
5
5
  "keywords": [
6
6
  "sui",
@@ -4,10 +4,10 @@ export const SDK_API_BASE_URL = 'https://sdk.api.scallop.io' as const;
4
4
  export const IS_VE_SCA_TEST: boolean = false;
5
5
  export const USE_TEST_ADDRESS: boolean = false;
6
6
 
7
- export const ADDRESSES_ID =
7
+ export const ADDRESS_ID =
8
8
  IS_VE_SCA_TEST || USE_TEST_ADDRESS
9
9
  ? ('65fb07c39c845425d71d7b18' as const)
10
- : ('675c65cd301dd817ea262e76' as const);
10
+ : ('67c44a103fe1b8c454eb9699' as const);
11
11
  // : ('66f8e7ed9bb9e07fdfb86bbb' as const);
12
12
 
13
13
  export const PROTOCOL_OBJECT_ID = IS_VE_SCA_TEST
@@ -9,10 +9,10 @@ import type { SuiObjectArg, SuiTxArg } from '@scallop-io/sui-kit';
9
9
 
10
10
  export const queryKeys = {
11
11
  api: {
12
- getAddresses: (addressesId?: string) => [
12
+ getAddresses: (addressId?: string) => [
13
13
  'api',
14
14
  'getAddresses',
15
- { addressesId },
15
+ { addressId },
16
16
  ],
17
17
  getMarket: () => ['api', 'getMarket'],
18
18
  getSpools: () => ['api', 'getSpools'],
@@ -4,7 +4,7 @@ import { ScallopClient } from './scallopClient';
4
4
  import { ScallopBuilder } from './scallopBuilder';
5
5
  import { ScallopQuery } from './scallopQuery';
6
6
  import { ScallopUtils } from './scallopUtils';
7
- import { ADDRESSES_ID } from '../constants';
7
+ import { ADDRESS_ID } from '../constants';
8
8
  import type {
9
9
  ScallopBuilderParams,
10
10
  ScallopClientParams,
@@ -61,7 +61,7 @@ export class Scallop {
61
61
  );
62
62
  this.address = new ScallopAddress(
63
63
  {
64
- id: params?.addressesId ?? ADDRESSES_ID,
64
+ id: params?.addressId ?? ADDRESS_ID,
65
65
  network: params?.networkType,
66
66
  forceInterface: params?.forceAddressesInterface,
67
67
  },
@@ -642,12 +642,12 @@ export class ScallopAddress {
642
642
  * @return All addresses.
643
643
  */
644
644
  public async read(id?: string) {
645
- const addressesId = id || this._id || undefined;
646
- if (addressesId !== undefined) {
645
+ const addressId = id || this._id || undefined;
646
+ if (addressId !== undefined) {
647
647
  const response = await this.cache.queryClient.fetchQuery({
648
- queryKey: queryKeys.api.getAddresses(addressesId),
648
+ queryKey: queryKeys.api.getAddresses(addressId),
649
649
  queryFn: async () => {
650
- return await this._requestClient.get(`/addresses/${addressesId}`, {
650
+ return await this._requestClient.get(`/addresses/${addressId}`, {
651
651
  headers: {
652
652
  'Content-Type': 'application/json',
653
653
  },
@@ -1,6 +1,6 @@
1
1
  import { normalizeSuiAddress } from '@mysten/sui/utils';
2
2
  import { SuiKit } from '@scallop-io/sui-kit';
3
- import { ADDRESSES_ID } from '../constants';
3
+ import { ADDRESS_ID } from '../constants';
4
4
  import { newScallopTxBlock } from '../builders';
5
5
  import { ScallopAddress } from './scallopAddress';
6
6
  import { ScallopQuery } from './scallopQuery';
@@ -70,7 +70,7 @@ export class ScallopBuilder {
70
70
  });
71
71
  this.address = new ScallopAddress(
72
72
  {
73
- id: params?.addressesId ?? ADDRESSES_ID,
73
+ id: params?.addressId ?? ADDRESS_ID,
74
74
  network: params?.networkType,
75
75
  forceInterface: params?.forceAddressesInterface,
76
76
  },
@@ -1,7 +1,7 @@
1
1
  import { normalizeSuiAddress } from '@mysten/sui/utils';
2
2
  import { SuiKit } from '@scallop-io/sui-kit';
3
3
  import {
4
- ADDRESSES_ID,
4
+ ADDRESS_ID,
5
5
  SUPPORT_BORROW_INCENTIVE_POOLS,
6
6
  SUPPORT_SCOIN,
7
7
  SUPPORT_SPOOLS,
@@ -79,7 +79,7 @@ export class ScallopClient {
79
79
  });
80
80
  this.address = new ScallopAddress(
81
81
  {
82
- id: params?.addressesId ?? ADDRESSES_ID,
82
+ id: params?.addressId ?? ADDRESS_ID,
83
83
  network: params?.networkType,
84
84
  forceInterface: params?.forceAddressesInterface,
85
85
  },
@@ -1,5 +1,5 @@
1
1
  import { SuiKit, SuiObjectArg } from '@scallop-io/sui-kit';
2
- import { ADDRESSES_ID, SUPPORT_POOLS, SUPPORT_SPOOLS } from '../constants';
2
+ import { ADDRESS_ID, SUPPORT_POOLS, SUPPORT_SPOOLS } from '../constants';
3
3
  import {
4
4
  queryMarket,
5
5
  getObligations,
@@ -117,7 +117,7 @@ export class ScallopQuery {
117
117
  });
118
118
  this.address = new ScallopAddress(
119
119
  {
120
- id: params?.addressesId ?? ADDRESSES_ID,
120
+ id: params?.addressId ?? ADDRESS_ID,
121
121
  network: params?.networkType,
122
122
  forceInterface: params?.forceAddressesInterface,
123
123
  },
@@ -3,7 +3,7 @@ import { SuiKit } from '@scallop-io/sui-kit';
3
3
  import { SuiPriceServiceConnection } from '@pythnetwork/pyth-sui-js';
4
4
  import { ScallopAddress } from './scallopAddress';
5
5
  import {
6
- ADDRESSES_ID,
6
+ ADDRESS_ID,
7
7
  PROTOCOL_OBJECT_ID,
8
8
  SUPPORT_POOLS,
9
9
  SUPPORT_COLLATERALS,
@@ -96,7 +96,7 @@ export class ScallopUtils {
96
96
  instance?.address ??
97
97
  new ScallopAddress(
98
98
  {
99
- id: params?.addressesId ?? ADDRESSES_ID,
99
+ id: params?.addressId ?? ADDRESS_ID,
100
100
  network: params?.networkType,
101
101
  forceInterface: params?.forceAddressesInterface,
102
102
  },
@@ -64,7 +64,7 @@ export type ScallopAddressParams = {
64
64
  };
65
65
 
66
66
  export type ScallopParams = {
67
- addressesId?: string;
67
+ addressId?: string;
68
68
  forceAddressesInterface?: Partial<Record<NetworkType, AddressesInterface>>;
69
69
  walletAddress?: string;
70
70
  } & SuiKitParams;