@scallop-io/sui-scallop-sdk 0.47.5 → 0.47.6
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/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -2
- package/dist/index.mjs.map +1 -1
- package/dist/types/model.d.ts +3 -0
- package/package.json +1 -1
- package/src/models/scallop.ts +1 -0
- package/src/models/scallopAddress.ts +13 -1
- package/src/models/scallopClient.ts +1 -0
- package/src/types/model.ts +3 -0
package/dist/index.mjs
CHANGED
|
@@ -1932,7 +1932,7 @@ var EMPTY_ADDRESSES = {
|
|
|
1932
1932
|
};
|
|
1933
1933
|
var ScallopAddress = class {
|
|
1934
1934
|
constructor(params, instance) {
|
|
1935
|
-
const { id, auth, network } = params;
|
|
1935
|
+
const { id, auth, network, forceInterface } = params;
|
|
1936
1936
|
this.cache = instance?.cache ?? new ScallopCache(
|
|
1937
1937
|
instance?.suiKit ?? new SuiKit({}),
|
|
1938
1938
|
void 0,
|
|
@@ -1953,6 +1953,17 @@ var ScallopAddress = class {
|
|
|
1953
1953
|
this._addressesMap = USE_TEST_ADDRESS ? /* @__PURE__ */ new Map([["mainnet", TEST_ADDRESSES]]) : /* @__PURE__ */ new Map();
|
|
1954
1954
|
if (USE_TEST_ADDRESS)
|
|
1955
1955
|
this._currentAddresses = TEST_ADDRESSES;
|
|
1956
|
+
if (forceInterface) {
|
|
1957
|
+
for (const [network2, addresses] of Object.entries(
|
|
1958
|
+
forceInterface
|
|
1959
|
+
)) {
|
|
1960
|
+
if (["localnet", "devnet", "testnet", "mainnet"].includes(network2)) {
|
|
1961
|
+
if (network2 === this._network)
|
|
1962
|
+
this._currentAddresses = addresses;
|
|
1963
|
+
this._addressesMap.set(network2, addresses);
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1956
1967
|
}
|
|
1957
1968
|
/**
|
|
1958
1969
|
* Get addresses API id.
|
|
@@ -7253,6 +7264,7 @@ var ScallopClient = class {
|
|
|
7253
7264
|
this.address = new ScallopAddress(
|
|
7254
7265
|
{
|
|
7255
7266
|
id: params?.addressesId || ADDRESSES_ID,
|
|
7267
|
+
forceInterface: params?.forceAddressesInterface,
|
|
7256
7268
|
network: params?.networkType
|
|
7257
7269
|
},
|
|
7258
7270
|
{
|
|
@@ -7916,7 +7928,8 @@ var Scallop = class {
|
|
|
7916
7928
|
this.address = new ScallopAddress(
|
|
7917
7929
|
{
|
|
7918
7930
|
id: params?.addressesId || ADDRESSES_ID,
|
|
7919
|
-
network: params?.networkType
|
|
7931
|
+
network: params?.networkType,
|
|
7932
|
+
forceInterface: params?.forceAddressesInterface
|
|
7920
7933
|
},
|
|
7921
7934
|
{ cache: this.cache }
|
|
7922
7935
|
);
|