@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.js
CHANGED
|
@@ -2009,7 +2009,7 @@ var EMPTY_ADDRESSES = {
|
|
|
2009
2009
|
};
|
|
2010
2010
|
var ScallopAddress = class {
|
|
2011
2011
|
constructor(params, instance) {
|
|
2012
|
-
const { id, auth, network } = params;
|
|
2012
|
+
const { id, auth, network, forceInterface } = params;
|
|
2013
2013
|
this.cache = instance?.cache ?? new ScallopCache(
|
|
2014
2014
|
instance?.suiKit ?? new import_sui_kit2.SuiKit({}),
|
|
2015
2015
|
void 0,
|
|
@@ -2030,6 +2030,17 @@ var ScallopAddress = class {
|
|
|
2030
2030
|
this._addressesMap = USE_TEST_ADDRESS ? /* @__PURE__ */ new Map([["mainnet", TEST_ADDRESSES]]) : /* @__PURE__ */ new Map();
|
|
2031
2031
|
if (USE_TEST_ADDRESS)
|
|
2032
2032
|
this._currentAddresses = TEST_ADDRESSES;
|
|
2033
|
+
if (forceInterface) {
|
|
2034
|
+
for (const [network2, addresses] of Object.entries(
|
|
2035
|
+
forceInterface
|
|
2036
|
+
)) {
|
|
2037
|
+
if (["localnet", "devnet", "testnet", "mainnet"].includes(network2)) {
|
|
2038
|
+
if (network2 === this._network)
|
|
2039
|
+
this._currentAddresses = addresses;
|
|
2040
|
+
this._addressesMap.set(network2, addresses);
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2033
2044
|
}
|
|
2034
2045
|
/**
|
|
2035
2046
|
* Get addresses API id.
|
|
@@ -7316,6 +7327,7 @@ var ScallopClient = class {
|
|
|
7316
7327
|
this.address = new ScallopAddress(
|
|
7317
7328
|
{
|
|
7318
7329
|
id: params?.addressesId || ADDRESSES_ID,
|
|
7330
|
+
forceInterface: params?.forceAddressesInterface,
|
|
7319
7331
|
network: params?.networkType
|
|
7320
7332
|
},
|
|
7321
7333
|
{
|
|
@@ -7979,7 +7991,8 @@ var Scallop = class {
|
|
|
7979
7991
|
this.address = new ScallopAddress(
|
|
7980
7992
|
{
|
|
7981
7993
|
id: params?.addressesId || ADDRESSES_ID,
|
|
7982
|
-
network: params?.networkType
|
|
7994
|
+
network: params?.networkType,
|
|
7995
|
+
forceInterface: params?.forceAddressesInterface
|
|
7983
7996
|
},
|
|
7984
7997
|
{ cache: this.cache }
|
|
7985
7998
|
);
|