@reyaxyz/wallet-sdk 0.16.237 → 0.17.1
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.
|
@@ -18,8 +18,7 @@ var WalletClient = /** @class */ (function () {
|
|
|
18
18
|
this._tosSignatureAppClient = new tos_app_1.default(WalletClient.config.apiEndpoint, WalletClient.config.logging);
|
|
19
19
|
}
|
|
20
20
|
WalletClient.configure = function (environment) {
|
|
21
|
-
WalletClient.config =
|
|
22
|
-
common_1.API_CLIENT_CONFIGS[environment] || common_1.API_CLIENT_CONFIGS['test'];
|
|
21
|
+
WalletClient.config = (0, common_1.getApiClientConfig)(environment);
|
|
23
22
|
WalletClient.instance = new WalletClient();
|
|
24
23
|
};
|
|
25
24
|
WalletClient.getInstance = function () {
|
|
@@ -80,7 +79,7 @@ var WalletClient = /** @class */ (function () {
|
|
|
80
79
|
enumerable: false,
|
|
81
80
|
configurable: true
|
|
82
81
|
});
|
|
83
|
-
WalletClient.config = common_1.
|
|
82
|
+
WalletClient.config = (0, common_1.getApiClientConfig)('test');
|
|
84
83
|
return WalletClient;
|
|
85
84
|
}());
|
|
86
85
|
exports.WalletClient = WalletClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet-client.js","sourceRoot":"/","sources":["clients/wallet-client.ts"],"names":[],"mappings":";;;;;;AAAA,0CAIyB;AACzB,wDAAwC;AACxC,sDAA+C;AAC/C,8DAAsD;AACtD;;GAEG;AACH;IAOE;QACE,IAAI,CAAC,WAAW,GAAG,IAAI,cAAU,CAC/B,YAAY,CAAC,MAAM,CAAC,WAAW,EAC/B,YAAY,CAAC,MAAM,CAAC,OAAO,CAC5B,CAAC;QACF,IAAI,CAAC,mBAAmB,GAAG,IAAI,aAAkB,CAC/C,YAAY,CAAC,MAAM,CAAC,WAAW,EAC/B,YAAY,CAAC,MAAM,CAAC,OAAO,CAC5B,CAAC;QACF,IAAI,CAAC,sBAAsB,GAAG,IAAI,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C;YACpD,CAAC;YACD,OAAO,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC;QACnC,CAAC;;;OAAA;IASD,sBAAkB,oBAAI;QAPtB;;;;;;WAMG;aACH;YACE,OAAO,YAAY,CAAC,WAAW,EAAE,CAAC,WAAW,CAAC;QAChD,CAAC;;;OAAA;IASD,sBAAkB,4BAAY;QAP9B;;;;;;WAMG;aACH;YACE,OAAO,YAAY,CAAC,WAAW,EAAE,CAAC,mBAAmB,CAAC;QACxD,CAAC;;;OAAA;IASD,sBAAkB,+BAAe;QAPjC;;;;;;WAMG;aACH;YACE,OAAO,YAAY,CAAC,WAAW,EAAE,CAAC,sBAAsB,CAAC;QAC3D,CAAC;;;OAAA;IAxEc,mBAAM,GAAkB,IAAA,2BAAkB,EAAC,MAAM,CAAC,CAAC;IAyEpE,mBAAC;CAAA,AA3ED,IA2EC;AA3EY,oCAAY","sourcesContent":["import {\n getApiClientConfig,\n ReyaChainId,\n ServiceConfig,\n} from '@reyaxyz/common';\nimport RiskClient from './modules/risk';\nimport ToSSignatureClient from './modules/tos';\nimport ToSSignatureAppClient from './modules/tos-app';\n/**\n * @description Client for Wallet\n */\nexport class WalletClient {\n private static instance: WalletClient;\n private static config: ServiceConfig = getApiClientConfig('test');\n private readonly _riskClient: RiskClient;\n private readonly _tosSignatureClient: ToSSignatureClient;\n private readonly _tosSignatureAppClient: ToSSignatureAppClient;\n\n private constructor() {\n this._riskClient = new RiskClient(\n WalletClient.config.apiEndpoint,\n WalletClient.config.logging,\n );\n this._tosSignatureClient = new ToSSignatureClient(\n WalletClient.config.apiEndpoint,\n WalletClient.config.logging,\n );\n this._tosSignatureAppClient = new ToSSignatureAppClient(\n WalletClient.config.apiEndpoint,\n WalletClient.config.logging,\n );\n }\n\n public static configure(environment: ServiceConfig['environment']): void {\n WalletClient.config = getApiClientConfig(environment);\n WalletClient.instance = new WalletClient();\n }\n\n private static getInstance(): WalletClient {\n if (!WalletClient.instance) {\n throw new Error(\n 'WalletClient is not configured. Please configure it before using.',\n );\n }\n return WalletClient.instance;\n }\n\n public static get network(): ReyaChainId {\n if (!WalletClient.config.chain) {\n throw new Error('WalletClient is not configured');\n }\n return WalletClient.config.chain;\n }\n\n /**\n * Provides access to the RiskClient instance.\n * This getter allows for interacting with risk-related API functionalities.\n *\n * @returns {RiskClient} An instance of RiskClient for risk-related operations.\n * @memberof WalletClient\n */\n public static get risk(): RiskClient {\n return WalletClient.getInstance()._riskClient;\n }\n\n /**\n * Provides access to the ToSSignatureClient instance for LGE.\n * This getter allows for interacting with tos signature related API functionalities.\n *\n * @returns {ToSSignatureClient} An instance of ToSSignatureClient for account-related operations.\n * @memberof WalletClient\n */\n public static get tosSignature(): ToSSignatureClient {\n return WalletClient.getInstance()._tosSignatureClient;\n }\n\n /**\n * Provides general access to the ToSSignatureAppClient instance.\n * This getter allows for interacting with tos signature related API functionalities.\n *\n * @returns {ToSSignatureClient} An instance of ToSSignatureClient for account-related operations.\n * @memberof WalletClient\n */\n public static get tosSignatureApp(): ToSSignatureAppClient {\n return WalletClient.getInstance()._tosSignatureAppClient;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet-client.d.ts","sourceRoot":"/","sources":["clients/wallet-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EACX,aAAa,EACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,UAAU,MAAM,gBAAgB,CAAC;AACxC,OAAO,kBAAkB,MAAM,eAAe,CAAC;AAC/C,OAAO,qBAAqB,MAAM,mBAAmB,CAAC;AACtD;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAe;IACtC,OAAO,CAAC,MAAM,CAAC,MAAM,CAA6C;IAClE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IACzC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAqB;IACzD,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAwB;IAE/D,OAAO;WAeO,SAAS,CAAC,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"wallet-client.d.ts","sourceRoot":"/","sources":["clients/wallet-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EACX,aAAa,EACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,UAAU,MAAM,gBAAgB,CAAC;AACxC,OAAO,kBAAkB,MAAM,eAAe,CAAC;AAC/C,OAAO,qBAAqB,MAAM,mBAAmB,CAAC;AACtD;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAe;IACtC,OAAO,CAAC,MAAM,CAAC,MAAM,CAA6C;IAClE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IACzC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAqB;IACzD,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAwB;IAE/D,OAAO;WAeO,SAAS,CAAC,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC,GAAG,IAAI;IAKxE,OAAO,CAAC,MAAM,CAAC,WAAW;IAS1B,WAAkB,OAAO,IAAI,WAAW,CAKvC;IAED;;;;;;OAMG;IACH,WAAkB,IAAI,IAAI,UAAU,CAEnC;IAED;;;;;;OAMG;IACH,WAAkB,YAAY,IAAI,kBAAkB,CAEnD;IAED;;;;;;OAMG;IACH,WAAkB,eAAe,IAAI,qBAAqB,CAEzD;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reyaxyz/wallet-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"generate:coverage-badges": "npx istanbul-badges-readme --silent"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@reyaxyz/common": "0.
|
|
36
|
+
"@reyaxyz/common": "0.266.1",
|
|
37
37
|
"axios": "^1.6.2",
|
|
38
38
|
"bignumber.js": "^9.1.2",
|
|
39
39
|
"ethers": "6.9.0"
|
|
40
40
|
},
|
|
41
41
|
"packageManager": "pnpm@8.3.1",
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "5f46db5257ebd0b9c4df5403c2a2369ad1e6d2cc"
|
|
43
43
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
getApiClientConfig,
|
|
3
3
|
ReyaChainId,
|
|
4
4
|
ServiceConfig,
|
|
5
5
|
} from '@reyaxyz/common';
|
|
@@ -11,7 +11,7 @@ import ToSSignatureAppClient from './modules/tos-app';
|
|
|
11
11
|
*/
|
|
12
12
|
export class WalletClient {
|
|
13
13
|
private static instance: WalletClient;
|
|
14
|
-
private static config: ServiceConfig =
|
|
14
|
+
private static config: ServiceConfig = getApiClientConfig('test');
|
|
15
15
|
private readonly _riskClient: RiskClient;
|
|
16
16
|
private readonly _tosSignatureClient: ToSSignatureClient;
|
|
17
17
|
private readonly _tosSignatureAppClient: ToSSignatureAppClient;
|
|
@@ -32,8 +32,7 @@ export class WalletClient {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
public static configure(environment: ServiceConfig['environment']): void {
|
|
35
|
-
WalletClient.config =
|
|
36
|
-
API_CLIENT_CONFIGS[environment] || API_CLIENT_CONFIGS['test'];
|
|
35
|
+
WalletClient.config = getApiClientConfig(environment);
|
|
37
36
|
WalletClient.instance = new WalletClient();
|
|
38
37
|
}
|
|
39
38
|
|