@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.
- package/dist/{chunk-7S6TVXAL.mjs → chunk-AVS7JT4Z.mjs} +3 -3
- package/dist/{chunk-U35PQ5X5.mjs → chunk-FL7KKCCZ.mjs} +1 -1
- package/dist/{chunk-ZVJELL5W.js → chunk-HFA6CLHG.js} +3 -3
- package/dist/{chunk-YF5LEQ43.mjs → chunk-IJX4BI6K.mjs} +2 -2
- package/dist/{chunk-LEUDYUOZ.js → chunk-LFZIFHVN.js} +4 -4
- package/dist/{chunk-JCZT5DVX.js → chunk-LNUWLTTK.js} +3 -3
- package/dist/{chunk-3DSGHXRT.mjs → chunk-TNOFKWGZ.mjs} +2 -2
- package/dist/{chunk-QHFR6XJ4.mjs → chunk-WLMETIV4.mjs} +1 -1
- package/dist/{chunk-G23324FQ.js → chunk-ZSGMXHWO.js} +2 -2
- package/dist/{chunk-UR764XEL.js → chunk-ZTA2C53I.js} +3 -3
- package/dist/config.js +2 -2
- package/dist/config.mjs +1 -1
- package/dist/connector.js +3 -3
- package/dist/connector.mjs +2 -2
- package/dist/index.js +4 -4
- package/dist/index.mjs +3 -3
- package/dist/main.js +6 -6
- package/dist/main.mjs +5 -5
- package/dist/strategies/qr-code/index.js +5 -5
- package/dist/strategies/qr-code/index.mjs +4 -4
- package/dist/strategies/qr-code/qr-code.config.js +2 -2
- package/dist/strategies/qr-code/qr-code.config.mjs +1 -1
- package/dist/strategies/qr-code/qr-code.js +5 -5
- package/dist/strategies/qr-code/qr-code.mjs +4 -4
- package/dist/types.d.mts +26 -16
- package/dist/types.d.ts +26 -16
- package/dist/utils.js +3 -3
- package/dist/utils.mjs +2 -2
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// src/strategies/qr-code/qr-code.config.ts
|
|
2
2
|
var qrCodeConfig = {
|
|
3
|
-
width:
|
|
4
|
-
height:
|
|
3
|
+
width: 140,
|
|
4
|
+
height: 140,
|
|
5
5
|
type: "svg",
|
|
6
|
-
image: "https://
|
|
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,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkZSGMXHWOjs = require('./chunk-ZSGMXHWO.js');
|
|
4
4
|
|
|
5
5
|
// src/utils.ts
|
|
6
6
|
function buildNearMobileAppRequestUrl(id) {
|
|
7
|
-
return
|
|
7
|
+
return _chunkZSGMXHWOjs.nearMobileConnectorConfig.mobileRequestUrl.replace("{id}", id);
|
|
8
8
|
}
|
|
9
9
|
function buildNearMobileUniversalRequestUrl(id) {
|
|
10
|
-
return
|
|
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-
|
|
3
|
+
} from "./chunk-FL7KKCCZ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
qrCodeConfig
|
|
6
|
-
} from "./chunk-
|
|
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
|
|
3
|
+
var _chunkHFA6CLHGjs = require('./chunk-HFA6CLHG.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
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 } =
|
|
12
|
+
const { image, imageOptions, ...restQrCodeConfig } = _chunkZTA2C53Ijs.qrCodeConfig;
|
|
13
13
|
super({
|
|
14
14
|
...restQrCodeConfig,
|
|
15
15
|
...restOptions,
|
|
16
16
|
image,
|
|
17
17
|
imageOptions,
|
|
18
|
-
data:
|
|
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
|
|
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 =
|
|
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
|
-
...
|
|
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-
|
|
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
|
|
5
|
+
universalRequestUrl: "https://near-mobile-production.aws.peersyst.tech/api/deep-link?path=connector-request¶ms=id%3D{id}",
|
|
6
6
|
responsePolling: {
|
|
7
7
|
delay: 3e3,
|
|
8
8
|
maxIterations: 1e3
|
|
@@ -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-
|
|
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
|
|
5
|
+
universalRequestUrl: "https://near-mobile-production.aws.peersyst.tech/api/deep-link?path=connector-request¶ms=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:
|
|
4
|
-
height:
|
|
3
|
+
width: 140,
|
|
4
|
+
height: 140,
|
|
5
5
|
type: "svg",
|
|
6
|
-
image: "https://
|
|
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
|
|
3
|
+
var _chunkZSGMXHWOjs = require('./chunk-ZSGMXHWO.js');
|
|
4
4
|
require('./chunk-MLKGABMK.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.nearMobileConnectorConfig =
|
|
7
|
+
exports.nearMobileConnectorConfig = _chunkZSGMXHWOjs.nearMobileConnectorConfig;
|
package/dist/config.mjs
CHANGED
package/dist/connector.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
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 =
|
|
12
|
+
exports.createRequest = _chunkLNUWLTTKjs.createRequest; exports.getRequest = _chunkLNUWLTTKjs.getRequest; exports.pollResponse = _chunkLNUWLTTKjs.pollResponse;
|
package/dist/connector.mjs
CHANGED
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
|
|
4
|
+
var _chunkLNUWLTTKjs = require('./chunk-LNUWLTTK.js');
|
|
5
5
|
require('./chunk-6F4PWJZI.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
10
|
-
require('./chunk-
|
|
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 =
|
|
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-
|
|
4
|
+
} from "./chunk-WLMETIV4.mjs";
|
|
5
5
|
import "./chunk-WBQAMGXK.mjs";
|
|
6
6
|
import {
|
|
7
7
|
buildNearMobileAppRequestUrl,
|
|
8
8
|
buildNearMobileUniversalRequestUrl
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
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
|
|
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
|
|
9
|
+
var _chunkLFZIFHVNjs = require('./chunk-LFZIFHVN.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
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 =
|
|
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-
|
|
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-
|
|
9
|
+
} from "./chunk-IJX4BI6K.mjs";
|
|
10
10
|
import {
|
|
11
11
|
buildNearMobileAppRequestUrl,
|
|
12
12
|
buildNearMobileUniversalRequestUrl
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
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
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
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 =
|
|
11
|
+
exports.NearMobileQrCode = _chunkLFZIFHVNjs.NearMobileQrCode;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../../chunk-CBQC7ETP.mjs";
|
|
2
2
|
import {
|
|
3
3
|
NearMobileQrCode
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
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
|
|
3
|
+
var _chunkZTA2C53Ijs = require('../../chunk-ZTA2C53I.js');
|
|
4
4
|
require('../../chunk-MLKGABMK.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.qrCodeConfig =
|
|
7
|
+
exports.qrCodeConfig = _chunkZTA2C53Ijs.qrCodeConfig;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
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 =
|
|
10
|
+
exports.NearMobileQrCode = _chunkLFZIFHVNjs.NearMobileQrCode;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NearMobileQrCode
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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:
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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:
|
|
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<
|
|
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
|
|
5
|
-
require('./chunk-
|
|
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 =
|
|
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-
|
|
5
|
-
import "./chunk-
|
|
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-
|
|
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",
|