hylid-bridge 4.0.0-alpha.20 → 4.0.0-alpha.21

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.
@@ -134,9 +134,9 @@ var __generator = this && this.__generator || function (thisArg, body) {
134
134
  import md5 from 'crypto-js/md5';
135
135
  // 钱包密钥,混淆代码前,填入真实的密钥
136
136
  var appSecretMap = {
137
- TOSS: 'Y2RnWk5yJGy4x3pTVp9uI6g18v0XGfQh',
138
- MPAY: 'aLhI5S6C1JVc4fBX3i8yrZzVCtk',
139
- ALIPAY: '094d20e403eb8e8bf2a17e0f0ba7fcae'
137
+ TOSS: '',
138
+ MPAY: '',
139
+ ALIPAY: ''
140
140
  };
141
141
  // 登录接口, 当前MPAY用新的,TOSS本期保留rewards的,后续服务端统一迁移到新的alipayplusvoyager
142
142
  var authLoginApiMap = {
@@ -175,14 +175,14 @@ function randomUUID() {
175
175
  var authLoginPromise;
176
176
  var sendLoginHttp = function sendLoginHttp(params) {
177
177
  return __awaiter(void 0, void 0, void 0, function () {
178
- var sessionIdPreTime, clientKeyPreTime, httpRequest, getAuthParams, saveAuthParams, getAuthCode, getAppId, siteName, workspaceId, AUTH_LOGIN, tokenRes, token, appId, requestParams, authCodeRes, httpParams, signData, res;
178
+ var sessionIdPreTime, clientKeyPreTime, httpRequest, getAuthParams, saveAuthParams, getAuthCode, getAppId, siteName, AUTH_LOGIN, tokenRes, token, appId, requestParams, authCodeRes, httpParams, signData, res;
179
179
  var _a, _b;
180
180
  return __generator(this, function (_c) {
181
181
  switch (_c.label) {
182
182
  case 0:
183
183
  sessionIdPreTime = 60 * 1000;
184
184
  clientKeyPreTime = 3600 * 1000;
185
- httpRequest = params.httpRequest, getAuthParams = params.getAuthParams, saveAuthParams = params.saveAuthParams, getAuthCode = params.getAuthCode, getAppId = params.getAppId, siteName = params.siteName, workspaceId = params.workspaceId;
185
+ httpRequest = params.httpRequest, getAuthParams = params.getAuthParams, saveAuthParams = params.saveAuthParams, getAuthCode = params.getAuthCode, getAppId = params.getAppId, siteName = params.siteName;
186
186
  AUTH_LOGIN = authLoginApiMap[siteName];
187
187
  _c.label = 1;
188
188
  case 1:
@@ -213,7 +213,6 @@ var sendLoginHttp = function sendLoginHttp(params) {
213
213
  };
214
214
  signData = httpSign(httpParams, siteName);
215
215
  return [4 /*yield*/, httpRequest(__assign(__assign({}, httpParams), {
216
- workspaceId: workspaceId,
217
216
  headers: __assign({}, signData)
218
217
  }))];
219
218
  case 5:
@@ -10,15 +10,18 @@ var getAuthCodeAsync = promisify(getAuthCode);
10
10
  var getStorageAsync = promisify(getStorage);
11
11
  var setStorageAsync = promisify(setStorage);
12
12
  var getAppIdAsync = promisify(getAppId);
13
- var rpcWithAuth = implRpcWithAuth('MPAY', getStorageAsync, setStorageAsync, function () {
14
- return getAuthCodeAsync({
15
- scopes: ['auth_base']
16
- });
17
- }, function () {
18
- return getAppIdAsync();
19
- }, createWithoutAuthRpc({
20
- appId: 'MPAY_WALLET_MO',
21
- defaultGateway: 'https://imgs-sea-global.alipay.com/imgw.htm',
22
- request: request
23
- }));
13
+ var rpcWithAuth = function rpcWithAuth(args) {
14
+ return implRpcWithAuth('MPAY', getStorageAsync, setStorageAsync, function () {
15
+ return getAuthCodeAsync({
16
+ scopes: ['auth_base']
17
+ });
18
+ }, function () {
19
+ return getAppIdAsync();
20
+ }, createWithoutAuthRpc({
21
+ appId: 'MPAY_WALLET_MO',
22
+ workspaceId: args.workspaceId || 'default',
23
+ defaultGateway: 'https://imgs-sea-global.alipay.com/imgw.htm',
24
+ request: request
25
+ }))(args);
26
+ };
24
27
  export default rpcWithAuth;
@@ -10,15 +10,18 @@ var getAuthCodeAsync = promisify(getAuthCode);
10
10
  var getStorageAsync = promisify(getStorage);
11
11
  var setStorageAsync = promisify(setStorage);
12
12
  var getAppIdAsync = promisify(getAppId);
13
- var rpcWithAuth = implRpcWithAuth('TOSS', getStorageAsync, setStorageAsync, function () {
14
- return getAuthCodeAsync({
15
- scopes: ['auth_base']
16
- });
17
- }, function () {
18
- return getAppIdAsync();
19
- }, createWithoutAuthRpc({
20
- appId: 'TOSS_WALLET_KR',
21
- defaultGateway: 'https://imgs-sea-global.alipay.com/imgw.htm',
22
- request: request
23
- }));
13
+ var rpcWithAuth = function rpcWithAuth(args) {
14
+ return implRpcWithAuth('TOSS', getStorageAsync, setStorageAsync, function () {
15
+ return getAuthCodeAsync({
16
+ scopes: ['auth_base']
17
+ });
18
+ }, function () {
19
+ return getAppIdAsync();
20
+ }, createWithoutAuthRpc({
21
+ appId: 'TOSS_WALLET_KR',
22
+ workspaceId: args.workspaceId || 'default',
23
+ defaultGateway: 'https://imgs-sea-global.alipay.com/imgw.htm',
24
+ request: request
25
+ }))(args);
26
+ };
24
27
  export default rpcWithAuth;
@@ -9,20 +9,23 @@ import setStorage from "../../../../clients/web/alipay/setStorage";
9
9
  var getAuthCodeAsync = promisify(getAuthCode);
10
10
  var getStorageAsync = promisify(getStorage);
11
11
  var setStorageAsync = promisify(setStorage);
12
- var rpcWithAuthAPlus = implRpcWithAuth('ALIPAY', getStorageAsync, setStorageAsync, function () {
13
- var _a;
14
- return getAuthCodeAsync({
15
- scopes: ['auth_base'],
16
- appId: ((_a = defineRuntimeConfig({})) === null || _a === void 0 ? void 0 : _a.appId) || ''
17
- });
18
- }, function () {
19
- var _a;
20
- return Promise.resolve({
21
- appId: ((_a = defineRuntimeConfig({})) === null || _a === void 0 ? void 0 : _a.appId) || ''
22
- });
23
- }, createWithoutAuthRpc({
24
- appId: 'WALLET_CN',
25
- defaultGateway: 'https://imgs-sea-global.alipay.com/imgw.htm',
26
- request: request
27
- }));
12
+ var rpcWithAuthAPlus = function rpcWithAuthAPlus(args) {
13
+ return implRpcWithAuth('ALIPAY', getStorageAsync, setStorageAsync, function () {
14
+ var _a;
15
+ return getAuthCodeAsync({
16
+ scopes: ['auth_base'],
17
+ appId: ((_a = defineRuntimeConfig({})) === null || _a === void 0 ? void 0 : _a.appId) || ''
18
+ });
19
+ }, function () {
20
+ var _a;
21
+ return Promise.resolve({
22
+ appId: ((_a = defineRuntimeConfig({})) === null || _a === void 0 ? void 0 : _a.appId) || ''
23
+ });
24
+ }, createWithoutAuthRpc({
25
+ appId: 'WALLET_CN',
26
+ workspaceId: args.workspaceId || 'default',
27
+ defaultGateway: 'https://imgs-sea-global.alipay.com/imgw.htm',
28
+ request: request
29
+ }))(args);
30
+ };
28
31
  export default rpcWithAuthAPlus;