@near-mobile/connector 0.0.1-alpha-4 → 0.0.1-alpha-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.
@@ -1,9 +1,9 @@
1
1
  // src/strategies/qr-code/qr-code.config.ts
2
2
  var qrCodeConfig = {
3
- width: 180,
4
- height: 180,
3
+ width: 140,
4
+ height: 140,
5
5
  type: "svg",
6
- image: "https://peersyst-public-production.s3.eu-west-1.amazonaws.com/1f99365d-cd09-4058-bfea-bca5208f5f3a.svg",
6
+ image: "https://near-mobile-production.aws.peersyst.tech/connector/near-mobile-qr-logo.svg",
7
7
  dotsOptions: {
8
8
  color: "#FFFFFF"
9
9
  },
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  nearMobileConnectorConfig
3
- } from "./chunk-3DSGHXRT.mjs";
3
+ } from "./chunk-TNOFKWGZ.mjs";
4
4
 
5
5
  // src/utils.ts
6
6
  function buildNearMobileAppRequestUrl(id) {
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkG23324FQjs = require('./chunk-G23324FQ.js');
3
+ var _chunkZSGMXHWOjs = require('./chunk-ZSGMXHWO.js');
4
4
 
5
5
  // src/utils.ts
6
6
  function buildNearMobileAppRequestUrl(id) {
7
- return _chunkG23324FQjs.nearMobileConnectorConfig.mobileRequestUrl.replace("{id}", id);
7
+ return _chunkZSGMXHWOjs.nearMobileConnectorConfig.mobileRequestUrl.replace("{id}", id);
8
8
  }
9
9
  function buildNearMobileUniversalRequestUrl(id) {
10
- return _chunkG23324FQjs.nearMobileConnectorConfig.universalRequestUrl.replace("{id}", id);
10
+ return _chunkZSGMXHWOjs.nearMobileConnectorConfig.universalRequestUrl.replace("{id}", id);
11
11
  }
12
12
 
13
13
 
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  buildNearMobileAppRequestUrl
3
- } from "./chunk-U35PQ5X5.mjs";
3
+ } from "./chunk-FL7KKCCZ.mjs";
4
4
  import {
5
5
  qrCodeConfig
6
- } from "./chunk-7S6TVXAL.mjs";
6
+ } from "./chunk-AVS7JT4Z.mjs";
7
7
 
8
8
  // src/strategies/qr-code/qr-code.ts
9
9
  import QRCodeStyling from "qr-code-styling";
@@ -1,21 +1,21 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
- var _chunkZVJELL5Wjs = require('./chunk-ZVJELL5W.js');
3
+ var _chunkHFA6CLHGjs = require('./chunk-HFA6CLHG.js');
4
4
 
5
5
 
6
- var _chunkUR764XELjs = require('./chunk-UR764XEL.js');
6
+ var _chunkZTA2C53Ijs = require('./chunk-ZTA2C53I.js');
7
7
 
8
8
  // src/strategies/qr-code/qr-code.ts
9
9
  var _qrcodestyling = require('qr-code-styling'); var _qrcodestyling2 = _interopRequireDefault(_qrcodestyling);
10
10
  var NearMobileQrCode = class extends _qrcodestyling2.default {
11
11
  constructor({ requestId, ...restOptions }) {
12
- const { image, imageOptions, ...restQrCodeConfig } = _chunkUR764XELjs.qrCodeConfig;
12
+ const { image, imageOptions, ...restQrCodeConfig } = _chunkZTA2C53Ijs.qrCodeConfig;
13
13
  super({
14
14
  ...restQrCodeConfig,
15
15
  ...restOptions,
16
16
  image,
17
17
  imageOptions,
18
- data: _chunkZVJELL5Wjs.buildNearMobileAppRequestUrl.call(void 0, requestId)
18
+ data: _chunkHFA6CLHGjs.buildNearMobileAppRequestUrl.call(void 0, requestId)
19
19
  });
20
20
  }
21
21
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkG23324FQjs = require('./chunk-G23324FQ.js');
3
+ var _chunkZSGMXHWOjs = require('./chunk-ZSGMXHWO.js');
4
4
 
5
5
 
6
6
  var _chunkMLKGABMKjs = require('./chunk-MLKGABMK.js');
@@ -483,12 +483,12 @@ function polling(fn, condition, options = {}) {
483
483
  }
484
484
 
485
485
  // src/connector.ts
486
- OpenAPI.BASE = _chunkG23324FQjs.nearMobileConnectorConfig.apiUrl;
486
+ OpenAPI.BASE = _chunkZSGMXHWOjs.nearMobileConnectorConfig.apiUrl;
487
487
  var createRequest = RequestApi.createRequest;
488
488
  var getRequest = RequestApi.getRequest;
489
489
  function pollResponse(id, options = {}) {
490
490
  const mergedOptions = {
491
- ..._chunkG23324FQjs.nearMobileConnectorConfig.responsePolling,
491
+ ..._chunkZSGMXHWOjs.nearMobileConnectorConfig.responsePolling,
492
492
  ...options
493
493
  };
494
494
  return polling(
@@ -1,8 +1,8 @@
1
1
  // src/config.ts
2
2
  var nearMobileConnectorConfig = {
3
- apiUrl: "https://near-mobile-connector.aws.peersyst.tech",
3
+ apiUrl: "https://near-mobile-production.aws.peersyst.tech/connector",
4
4
  mobileRequestUrl: "near-mobile-wallet://connector-request?id={id}",
5
- universalRequestUrl: "https://near-mobile-production.aws.peersyst.tech/api/deep-link/connector/request?id={id}",
5
+ universalRequestUrl: "https://near-mobile-production.aws.peersyst.tech/api/deep-link?path=connector-request&params=id%3D{id}",
6
6
  responsePolling: {
7
7
  delay: 3e3,
8
8
  maxIterations: 1e3
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  nearMobileConnectorConfig
3
- } from "./chunk-3DSGHXRT.mjs";
3
+ } from "./chunk-TNOFKWGZ.mjs";
4
4
  import {
5
5
  __export
6
6
  } from "./chunk-7P6ASYW6.mjs";
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/config.ts
2
2
  var nearMobileConnectorConfig = {
3
- apiUrl: "https://near-mobile-connector.aws.peersyst.tech",
3
+ apiUrl: "https://near-mobile-production.aws.peersyst.tech/connector",
4
4
  mobileRequestUrl: "near-mobile-wallet://connector-request?id={id}",
5
- universalRequestUrl: "https://near-mobile-production.aws.peersyst.tech/api/deep-link/connector/request?id={id}",
5
+ universalRequestUrl: "https://near-mobile-production.aws.peersyst.tech/api/deep-link?path=connector-request&params=id%3D{id}",
6
6
  responsePolling: {
7
7
  delay: 3e3,
8
8
  maxIterations: 1e3
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/strategies/qr-code/qr-code.config.ts
2
2
  var qrCodeConfig = {
3
- width: 180,
4
- height: 180,
3
+ width: 140,
4
+ height: 140,
5
5
  type: "svg",
6
- image: "https://peersyst-public-production.s3.eu-west-1.amazonaws.com/1f99365d-cd09-4058-bfea-bca5208f5f3a.svg",
6
+ image: "https://near-mobile-production.aws.peersyst.tech/connector/near-mobile-qr-logo.svg",
7
7
  dotsOptions: {
8
8
  color: "#FFFFFF"
9
9
  },
package/dist/config.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkG23324FQjs = require('./chunk-G23324FQ.js');
3
+ var _chunkZSGMXHWOjs = require('./chunk-ZSGMXHWO.js');
4
4
  require('./chunk-MLKGABMK.js');
5
5
 
6
6
 
7
- exports.nearMobileConnectorConfig = _chunkG23324FQjs.nearMobileConnectorConfig;
7
+ exports.nearMobileConnectorConfig = _chunkZSGMXHWOjs.nearMobileConnectorConfig;
package/dist/config.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  nearMobileConnectorConfig
3
- } from "./chunk-3DSGHXRT.mjs";
3
+ } from "./chunk-TNOFKWGZ.mjs";
4
4
  import "./chunk-7P6ASYW6.mjs";
5
5
  export {
6
6
  nearMobileConnectorConfig
package/dist/connector.js CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkJCZT5DVXjs = require('./chunk-JCZT5DVX.js');
6
- require('./chunk-G23324FQ.js');
5
+ var _chunkLNUWLTTKjs = require('./chunk-LNUWLTTK.js');
6
+ require('./chunk-ZSGMXHWO.js');
7
7
  require('./chunk-MLKGABMK.js');
8
8
 
9
9
 
10
10
 
11
11
 
12
- exports.createRequest = _chunkJCZT5DVXjs.createRequest; exports.getRequest = _chunkJCZT5DVXjs.getRequest; exports.pollResponse = _chunkJCZT5DVXjs.pollResponse;
12
+ exports.createRequest = _chunkLNUWLTTKjs.createRequest; exports.getRequest = _chunkLNUWLTTKjs.getRequest; exports.pollResponse = _chunkLNUWLTTKjs.pollResponse;
@@ -2,8 +2,8 @@ import {
2
2
  createRequest,
3
3
  getRequest,
4
4
  pollResponse
5
- } from "./chunk-QHFR6XJ4.mjs";
6
- import "./chunk-3DSGHXRT.mjs";
5
+ } from "./chunk-WLMETIV4.mjs";
6
+ import "./chunk-TNOFKWGZ.mjs";
7
7
  import "./chunk-7P6ASYW6.mjs";
8
8
  export {
9
9
  createRequest,
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-6KQS7CTR.js');
2
2
 
3
3
 
4
- var _chunkJCZT5DVXjs = require('./chunk-JCZT5DVX.js');
4
+ var _chunkLNUWLTTKjs = require('./chunk-LNUWLTTK.js');
5
5
  require('./chunk-6F4PWJZI.js');
6
6
 
7
7
 
8
8
 
9
- var _chunkZVJELL5Wjs = require('./chunk-ZVJELL5W.js');
10
- require('./chunk-G23324FQ.js');
9
+ var _chunkHFA6CLHGjs = require('./chunk-HFA6CLHG.js');
10
+ require('./chunk-ZSGMXHWO.js');
11
11
  require('./chunk-MLKGABMK.js');
12
12
 
13
13
 
14
14
 
15
15
 
16
- exports.NearMobileConnector = _chunkJCZT5DVXjs.connector_exports; exports.buildNearMobileAppRequestUrl = _chunkZVJELL5Wjs.buildNearMobileAppRequestUrl; exports.buildNearMobileUniversalRequestUrl = _chunkZVJELL5Wjs.buildNearMobileUniversalRequestUrl;
16
+ exports.NearMobileConnector = _chunkLNUWLTTKjs.connector_exports; exports.buildNearMobileAppRequestUrl = _chunkHFA6CLHGjs.buildNearMobileAppRequestUrl; exports.buildNearMobileUniversalRequestUrl = _chunkHFA6CLHGjs.buildNearMobileUniversalRequestUrl;
package/dist/index.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  import "./chunk-KZFT6V6I.mjs";
2
2
  import {
3
3
  connector_exports
4
- } from "./chunk-QHFR6XJ4.mjs";
4
+ } from "./chunk-WLMETIV4.mjs";
5
5
  import "./chunk-WBQAMGXK.mjs";
6
6
  import {
7
7
  buildNearMobileAppRequestUrl,
8
8
  buildNearMobileUniversalRequestUrl
9
- } from "./chunk-U35PQ5X5.mjs";
10
- import "./chunk-3DSGHXRT.mjs";
9
+ } from "./chunk-FL7KKCCZ.mjs";
10
+ import "./chunk-TNOFKWGZ.mjs";
11
11
  import "./chunk-7P6ASYW6.mjs";
12
12
  export {
13
13
  connector_exports as NearMobileConnector,
package/dist/main.js CHANGED
@@ -1,22 +1,22 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-6KQS7CTR.js');
2
2
 
3
3
 
4
- var _chunkJCZT5DVXjs = require('./chunk-JCZT5DVX.js');
4
+ var _chunkLNUWLTTKjs = require('./chunk-LNUWLTTK.js');
5
5
  require('./chunk-6F4PWJZI.js');
6
6
  require('./chunk-54IKIQKG.js');
7
7
 
8
8
 
9
- var _chunkLEUDYUOZjs = require('./chunk-LEUDYUOZ.js');
9
+ var _chunkLFZIFHVNjs = require('./chunk-LFZIFHVN.js');
10
10
 
11
11
 
12
12
 
13
- var _chunkZVJELL5Wjs = require('./chunk-ZVJELL5W.js');
14
- require('./chunk-G23324FQ.js');
15
- require('./chunk-UR764XEL.js');
13
+ var _chunkHFA6CLHGjs = require('./chunk-HFA6CLHG.js');
14
+ require('./chunk-ZSGMXHWO.js');
15
+ require('./chunk-ZTA2C53I.js');
16
16
  require('./chunk-MLKGABMK.js');
17
17
 
18
18
 
19
19
 
20
20
 
21
21
 
22
- exports.NearMobileConnector = _chunkJCZT5DVXjs.connector_exports; exports.NearMobileQrCode = _chunkLEUDYUOZjs.NearMobileQrCode; exports.buildNearMobileAppRequestUrl = _chunkZVJELL5Wjs.buildNearMobileAppRequestUrl; exports.buildNearMobileUniversalRequestUrl = _chunkZVJELL5Wjs.buildNearMobileUniversalRequestUrl;
22
+ exports.NearMobileConnector = _chunkLNUWLTTKjs.connector_exports; exports.NearMobileQrCode = _chunkLFZIFHVNjs.NearMobileQrCode; exports.buildNearMobileAppRequestUrl = _chunkHFA6CLHGjs.buildNearMobileAppRequestUrl; exports.buildNearMobileUniversalRequestUrl = _chunkHFA6CLHGjs.buildNearMobileUniversalRequestUrl;
package/dist/main.mjs CHANGED
@@ -1,18 +1,18 @@
1
1
  import "./chunk-KZFT6V6I.mjs";
2
2
  import {
3
3
  connector_exports
4
- } from "./chunk-QHFR6XJ4.mjs";
4
+ } from "./chunk-WLMETIV4.mjs";
5
5
  import "./chunk-WBQAMGXK.mjs";
6
6
  import "./chunk-CBQC7ETP.mjs";
7
7
  import {
8
8
  NearMobileQrCode
9
- } from "./chunk-YF5LEQ43.mjs";
9
+ } from "./chunk-IJX4BI6K.mjs";
10
10
  import {
11
11
  buildNearMobileAppRequestUrl,
12
12
  buildNearMobileUniversalRequestUrl
13
- } from "./chunk-U35PQ5X5.mjs";
14
- import "./chunk-3DSGHXRT.mjs";
15
- import "./chunk-7S6TVXAL.mjs";
13
+ } from "./chunk-FL7KKCCZ.mjs";
14
+ import "./chunk-TNOFKWGZ.mjs";
15
+ import "./chunk-AVS7JT4Z.mjs";
16
16
  import "./chunk-7P6ASYW6.mjs";
17
17
  export {
18
18
  connector_exports as NearMobileConnector,
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-54IKIQKG.js');
2
2
 
3
3
 
4
- var _chunkLEUDYUOZjs = require('../../chunk-LEUDYUOZ.js');
5
- require('../../chunk-ZVJELL5W.js');
6
- require('../../chunk-G23324FQ.js');
7
- require('../../chunk-UR764XEL.js');
4
+ var _chunkLFZIFHVNjs = require('../../chunk-LFZIFHVN.js');
5
+ require('../../chunk-HFA6CLHG.js');
6
+ require('../../chunk-ZSGMXHWO.js');
7
+ require('../../chunk-ZTA2C53I.js');
8
8
  require('../../chunk-MLKGABMK.js');
9
9
 
10
10
 
11
- exports.NearMobileQrCode = _chunkLEUDYUOZjs.NearMobileQrCode;
11
+ exports.NearMobileQrCode = _chunkLFZIFHVNjs.NearMobileQrCode;
@@ -1,10 +1,10 @@
1
1
  import "../../chunk-CBQC7ETP.mjs";
2
2
  import {
3
3
  NearMobileQrCode
4
- } from "../../chunk-YF5LEQ43.mjs";
5
- import "../../chunk-U35PQ5X5.mjs";
6
- import "../../chunk-3DSGHXRT.mjs";
7
- import "../../chunk-7S6TVXAL.mjs";
4
+ } from "../../chunk-IJX4BI6K.mjs";
5
+ import "../../chunk-FL7KKCCZ.mjs";
6
+ import "../../chunk-TNOFKWGZ.mjs";
7
+ import "../../chunk-AVS7JT4Z.mjs";
8
8
  import "../../chunk-7P6ASYW6.mjs";
9
9
  export {
10
10
  NearMobileQrCode
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkUR764XELjs = require('../../chunk-UR764XEL.js');
3
+ var _chunkZTA2C53Ijs = require('../../chunk-ZTA2C53I.js');
4
4
  require('../../chunk-MLKGABMK.js');
5
5
 
6
6
 
7
- exports.qrCodeConfig = _chunkUR764XELjs.qrCodeConfig;
7
+ exports.qrCodeConfig = _chunkZTA2C53Ijs.qrCodeConfig;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  qrCodeConfig
3
- } from "../../chunk-7S6TVXAL.mjs";
3
+ } from "../../chunk-AVS7JT4Z.mjs";
4
4
  import "../../chunk-7P6ASYW6.mjs";
5
5
  export {
6
6
  qrCodeConfig
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkLEUDYUOZjs = require('../../chunk-LEUDYUOZ.js');
4
- require('../../chunk-ZVJELL5W.js');
5
- require('../../chunk-G23324FQ.js');
6
- require('../../chunk-UR764XEL.js');
3
+ var _chunkLFZIFHVNjs = require('../../chunk-LFZIFHVN.js');
4
+ require('../../chunk-HFA6CLHG.js');
5
+ require('../../chunk-ZSGMXHWO.js');
6
+ require('../../chunk-ZTA2C53I.js');
7
7
  require('../../chunk-MLKGABMK.js');
8
8
 
9
9
 
10
- exports.NearMobileQrCode = _chunkLEUDYUOZjs.NearMobileQrCode;
10
+ exports.NearMobileQrCode = _chunkLFZIFHVNjs.NearMobileQrCode;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  NearMobileQrCode
3
- } from "../../chunk-YF5LEQ43.mjs";
4
- import "../../chunk-U35PQ5X5.mjs";
5
- import "../../chunk-3DSGHXRT.mjs";
6
- import "../../chunk-7S6TVXAL.mjs";
3
+ } from "../../chunk-IJX4BI6K.mjs";
4
+ import "../../chunk-FL7KKCCZ.mjs";
5
+ import "../../chunk-TNOFKWGZ.mjs";
6
+ import "../../chunk-AVS7JT4Z.mjs";
7
7
  import "../../chunk-7P6ASYW6.mjs";
8
8
  export {
9
9
  NearMobileQrCode
package/dist/types.d.mts CHANGED
@@ -1,3 +1,13 @@
1
+ type ConnectorActionDto = {
2
+ type: string;
3
+ params?: Record<string, any>;
4
+ };
5
+
6
+ type ConnectorActionRequest = {
7
+ type: string;
8
+ params?: Array<Record<string, any>>;
9
+ };
10
+
1
11
  type ConnectorRequestDto = {
2
12
  method: 'signIn' | 'signMessage' | 'signAndSendTransaction' | 'signAndSendTransactions';
3
13
  status: 'pending' | 'approved' | 'rejected';
@@ -24,7 +34,7 @@ type ConnectorRequestResponseRequest = {
24
34
  };
25
35
 
26
36
  type ConnectorSignAndSendTransactionPayloadDto = {
27
- actions: Array<Record<string, any>>;
37
+ actions: Array<ConnectorActionDto>;
28
38
  signerId?: string;
29
39
  receiverId: string;
30
40
  };
@@ -32,17 +42,27 @@ type ConnectorSignAndSendTransactionPayloadDto = {
32
42
  type ConnectorSignAndSendTransactionPayloadRequest = {
33
43
  signerId?: string;
34
44
  receiverId: string;
35
- actions: Array<Record<string, any>>;
45
+ actions: Array<ConnectorActionRequest>;
46
+ };
47
+
48
+ type ConnectorTransactionDto = {
49
+ actions: Array<ConnectorActionDto>;
50
+ receiverId: string;
36
51
  };
37
52
 
38
53
  type ConnectorSignAndSendTransactionsPayloadDto = {
39
- transactions: Array<Record<string, any>>;
54
+ transactions: Array<ConnectorTransactionDto>;
40
55
  signerId?: string;
41
56
  };
42
57
 
58
+ type ConnectorTransactionRequest = {
59
+ receiverId: string;
60
+ actions: Array<ConnectorActionRequest>;
61
+ };
62
+
43
63
  type ConnectorSignAndSendTransactionsPayloadRequest = {
44
64
  signerId?: string;
45
- transactions: Array<string>;
65
+ transactions: Array<ConnectorTransactionRequest>;
46
66
  };
47
67
 
48
68
  type ConnectorSignInPayloadDto = {
@@ -62,14 +82,14 @@ type ConnectorSignInResponseDto = {
62
82
  type ConnectorSignMessagePayloadDto = {
63
83
  message: string;
64
84
  recipient: string;
65
- nonce: Record<string, any>;
85
+ nonce: Array<number>;
66
86
  signerId?: string;
67
87
  };
68
88
 
69
89
  type ConnectorSignMessagePayloadRequest = {
70
90
  message: string;
71
91
  recipient: string;
72
- nonce: Array<number>;
92
+ nonce: Array<string>;
73
93
  signerId?: string;
74
94
  };
75
95
 
@@ -79,16 +99,6 @@ type ConnectorSignMessageResponseDto = {
79
99
  signature: string;
80
100
  };
81
101
 
82
- type ConnectorTransactionDto = {
83
- actions: Array<Record<string, any>>;
84
- receiverId: string;
85
- };
86
-
87
- type ConnectorTransactionRequest = {
88
- receiverId: string;
89
- actions: Array<Record<string, any>>;
90
- };
91
-
92
102
  type Polling<R> = Promise<R> & {
93
103
  abort(): void;
94
104
  };
package/dist/types.d.ts CHANGED
@@ -1,3 +1,13 @@
1
+ type ConnectorActionDto = {
2
+ type: string;
3
+ params?: Record<string, any>;
4
+ };
5
+
6
+ type ConnectorActionRequest = {
7
+ type: string;
8
+ params?: Array<Record<string, any>>;
9
+ };
10
+
1
11
  type ConnectorRequestDto = {
2
12
  method: 'signIn' | 'signMessage' | 'signAndSendTransaction' | 'signAndSendTransactions';
3
13
  status: 'pending' | 'approved' | 'rejected';
@@ -24,7 +34,7 @@ type ConnectorRequestResponseRequest = {
24
34
  };
25
35
 
26
36
  type ConnectorSignAndSendTransactionPayloadDto = {
27
- actions: Array<Record<string, any>>;
37
+ actions: Array<ConnectorActionDto>;
28
38
  signerId?: string;
29
39
  receiverId: string;
30
40
  };
@@ -32,17 +42,27 @@ type ConnectorSignAndSendTransactionPayloadDto = {
32
42
  type ConnectorSignAndSendTransactionPayloadRequest = {
33
43
  signerId?: string;
34
44
  receiverId: string;
35
- actions: Array<Record<string, any>>;
45
+ actions: Array<ConnectorActionRequest>;
46
+ };
47
+
48
+ type ConnectorTransactionDto = {
49
+ actions: Array<ConnectorActionDto>;
50
+ receiverId: string;
36
51
  };
37
52
 
38
53
  type ConnectorSignAndSendTransactionsPayloadDto = {
39
- transactions: Array<Record<string, any>>;
54
+ transactions: Array<ConnectorTransactionDto>;
40
55
  signerId?: string;
41
56
  };
42
57
 
58
+ type ConnectorTransactionRequest = {
59
+ receiverId: string;
60
+ actions: Array<ConnectorActionRequest>;
61
+ };
62
+
43
63
  type ConnectorSignAndSendTransactionsPayloadRequest = {
44
64
  signerId?: string;
45
- transactions: Array<string>;
65
+ transactions: Array<ConnectorTransactionRequest>;
46
66
  };
47
67
 
48
68
  type ConnectorSignInPayloadDto = {
@@ -62,14 +82,14 @@ type ConnectorSignInResponseDto = {
62
82
  type ConnectorSignMessagePayloadDto = {
63
83
  message: string;
64
84
  recipient: string;
65
- nonce: Record<string, any>;
85
+ nonce: Array<number>;
66
86
  signerId?: string;
67
87
  };
68
88
 
69
89
  type ConnectorSignMessagePayloadRequest = {
70
90
  message: string;
71
91
  recipient: string;
72
- nonce: Array<number>;
92
+ nonce: Array<string>;
73
93
  signerId?: string;
74
94
  };
75
95
 
@@ -79,16 +99,6 @@ type ConnectorSignMessageResponseDto = {
79
99
  signature: string;
80
100
  };
81
101
 
82
- type ConnectorTransactionDto = {
83
- actions: Array<Record<string, any>>;
84
- receiverId: string;
85
- };
86
-
87
- type ConnectorTransactionRequest = {
88
- receiverId: string;
89
- actions: Array<Record<string, any>>;
90
- };
91
-
92
102
  type Polling<R> = Promise<R> & {
93
103
  abort(): void;
94
104
  };
package/dist/utils.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkZVJELL5Wjs = require('./chunk-ZVJELL5W.js');
5
- require('./chunk-G23324FQ.js');
4
+ var _chunkHFA6CLHGjs = require('./chunk-HFA6CLHG.js');
5
+ require('./chunk-ZSGMXHWO.js');
6
6
  require('./chunk-MLKGABMK.js');
7
7
 
8
8
 
9
9
 
10
- exports.buildNearMobileAppRequestUrl = _chunkZVJELL5Wjs.buildNearMobileAppRequestUrl; exports.buildNearMobileUniversalRequestUrl = _chunkZVJELL5Wjs.buildNearMobileUniversalRequestUrl;
10
+ exports.buildNearMobileAppRequestUrl = _chunkHFA6CLHGjs.buildNearMobileAppRequestUrl; exports.buildNearMobileUniversalRequestUrl = _chunkHFA6CLHGjs.buildNearMobileUniversalRequestUrl;
package/dist/utils.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  buildNearMobileAppRequestUrl,
3
3
  buildNearMobileUniversalRequestUrl
4
- } from "./chunk-U35PQ5X5.mjs";
5
- import "./chunk-3DSGHXRT.mjs";
4
+ } from "./chunk-FL7KKCCZ.mjs";
5
+ import "./chunk-TNOFKWGZ.mjs";
6
6
  import "./chunk-7P6ASYW6.mjs";
7
7
  export {
8
8
  buildNearMobileAppRequestUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@near-mobile/connector",
3
- "version": "0.0.1-alpha-4",
3
+ "version": "0.0.1-alpha-6",
4
4
  "description": "Public client for the Near Mobile Connector: create requests, poll for responses, build deep-link URLs, and generate QR codes for wallet connections.",
5
5
  "author": "Peersyst",
6
6
  "license": "MIT",