@scatterjs/core
Advanced tools
Comparing version 2.7.52 to 2.7.53
@@ -1,1 +0,1 @@ | ||
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=exports.WALLET_METHODS=void 0;var _ALTERNATES,_classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),WALLET_METHODS={disconnect:"disconnect",isConnected:"isConnected",isPaired:"isPaired",addEventHandler:"addEventHandler",removeEventHandler:"removeEventHandler",listen:"listen",getVersion:"getVersion",getIdentity:"getIdentity",getAllAccountsFor:"getAllAccountsFor",getIdentityFromPermissions:"getIdentityFromPermissions",forgetIdentity:"forgetIdentity",updateIdentity:"updateIdentity",authenticate:"authenticate",getArbitrarySignature:"getArbitrarySignature",getPublicKey:"getPublicKey",linkAccount:"linkAccount",hasAccountFor:"hasAccountFor",suggestNetwork:"suggestNetwork",requestTransfer:"requestTransfer",getAvatar:"getAvatar",requestSignature:"requestSignature",createTransaction:"createTransaction",addToken:"addToken",createSharedSecret:"createSharedSecret"};exports.WALLET_METHODS=WALLET_METHODS;var ALTERNATES=(_ALTERNATES={},(0,_defineProperty2["default"])(_ALTERNATES,WALLET_METHODS.getIdentity,"login"),(0,_defineProperty2["default"])(_ALTERNATES,WALLET_METHODS.getAllAccountsFor,"loginAll"),(0,_defineProperty2["default"])(_ALTERNATES,WALLET_METHODS.forgetIdentity,"logout"),(0,_defineProperty2["default"])(_ALTERNATES,WALLET_METHODS.getIdentityFromPermissions,"checkLogin"),_ALTERNATES),WalletInterface=/*#__PURE__*/function(){function a(b,c,d){(0,_classCallCheck2["default"])(this,a);var e=function(a){return function(){throw console.error("".concat(b," does not support the ").concat(a," method.")),new Error("".concat(b," does not support the ").concat(a," method."))}},f=function(a,b){"undefined"==typeof d[b]&&(d[b]=a?a:e(b)),ALTERNATES[b]&&"undefined"==typeof d[ALTERNATES[b]]&&(d[ALTERNATES[b]]=d[b]?d[b]:e(b))};Object.keys(WALLET_METHODS).map(function(a){return f(c[a],a)})}return(0,_createClass2["default"])(a,null,[{key:"bindBasics",value:function bindBasics(a){a.account=function(b){return a.identity?a.identity.accounts?a.identity.accounts.find(function(a){return a.blockchain===b}):void 0:void 0}}}]),a}();exports["default"]=WalletInterface; | ||
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=exports.WALLET_METHODS=void 0;var _ALTERNATES,_classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),WALLET_METHODS={disconnect:"disconnect",isConnected:"isConnected",isPaired:"isPaired",addEventHandler:"addEventHandler",removeEventHandler:"removeEventHandler",listen:"listen",getVersion:"getVersion",getIdentity:"getIdentity",getAllAccountsFor:"getAllAccountsFor",getIdentityFromPermissions:"getIdentityFromPermissions",forgetIdentity:"forgetIdentity",updateIdentity:"updateIdentity",authenticate:"authenticate",getArbitrarySignature:"getArbitrarySignature",getPublicKey:"getPublicKey",linkAccount:"linkAccount",hasAccountFor:"hasAccountFor",suggestNetwork:"suggestNetwork",requestTransfer:"requestTransfer",getAvatar:"getAvatar",requestSignature:"requestSignature",createTransaction:"createTransaction",addToken:"addToken",createEncryptionKey:"createEncryptionKey"};exports.WALLET_METHODS=WALLET_METHODS;var ALTERNATES=(_ALTERNATES={},(0,_defineProperty2["default"])(_ALTERNATES,WALLET_METHODS.getIdentity,"login"),(0,_defineProperty2["default"])(_ALTERNATES,WALLET_METHODS.getAllAccountsFor,"loginAll"),(0,_defineProperty2["default"])(_ALTERNATES,WALLET_METHODS.forgetIdentity,"logout"),(0,_defineProperty2["default"])(_ALTERNATES,WALLET_METHODS.getIdentityFromPermissions,"checkLogin"),_ALTERNATES),WalletInterface=/*#__PURE__*/function(){function a(b,c,d){(0,_classCallCheck2["default"])(this,a);var e=function(a){return function(){throw console.error("".concat(b," does not support the ").concat(a," method.")),new Error("".concat(b," does not support the ").concat(a," method."))}},f=function(a,b){"undefined"==typeof d[b]&&(d[b]=a?a:e(b)),ALTERNATES[b]&&"undefined"==typeof d[ALTERNATES[b]]&&(d[ALTERNATES[b]]=d[b]?d[b]:e(b))};Object.keys(WALLET_METHODS).map(function(a){return f(c[a],a)})}return(0,_createClass2["default"])(a,null,[{key:"bindBasics",value:function bindBasics(a){a.account=function(b){return a.identity?a.identity.accounts?a.identity.accounts.find(function(a){return a.blockchain===b}):void 0:void 0}}}]),a}();exports["default"]=WalletInterface; |
@@ -1,1 +0,1 @@ | ||
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=void 0;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),_classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass")),_WalletInterface=require("../models/WalletInterface"),WalletAPI=/*#__PURE__*/function(){function a(){(0,_classCallCheck2["default"])(this,a)}return(0,_createClass2["default"])(a,null,[{key:"getMethods",value:function getMethods(a,b){var c,d=function(b,c){return(b||c)&&(a.holderFns.get().identity=b),c||b};return c={},(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.disconnect,function(){return b().disconnect()}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.isConnected,function(){return b().isConnected()}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.isPaired,function(){return b().isPaired()}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.addEventHandler,function(a){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return b().addEventHandler(a,c)}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.removeEventHandler,function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;return b().removeEventHandler(a)}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.listen,function(a){return b().addEventHandler(a)}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.getVersion,function(){return b().sendApiRequest({type:"getVersion",payload:{}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.getIdentity,function(c){return b().sendApiRequest({type:"getOrRequestIdentity",payload:{fields:c?c:{accounts:[a.holderFns.get().network]}}}).then(d)}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.getAllAccountsFor,function(c){return b().sendApiRequest({type:"getAllAccountsFor",payload:{fields:c?c:{accounts:[a.holderFns.get().network]}}}).then(d)}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.getIdentityFromPermissions,function(){return b().sendApiRequest({type:"identityFromPermissions",payload:{}}).then(d)}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.forgetIdentity,function(){return b().sendApiRequest({type:"forgetIdentity",payload:{}}).then(function(a){return d(null,a)})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.updateIdentity,function(a){var c=a.name,e=a.kyc;return b().sendApiRequest({type:"updateIdentity",payload:{name:c,kyc:e}}).then(function(a){return a?d(a):null})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.authenticate,function(a){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,d=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return b().sendApiRequest({type:"authenticate",payload:{nonce:a,data:c,publicKey:d}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.getArbitrarySignature,function(a,c){return b().sendApiRequest({type:"requestArbitrarySignature",payload:{publicKey:a,data:c}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.getPublicKey,function(a){return b().sendApiRequest({type:"getPublicKey",payload:{blockchain:a}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.linkAccount,function(c,d){return b().sendApiRequest({type:"linkAccount",payload:{account:c,network:d||a.holderFns.get().network}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.hasAccountFor,function(c){return b().sendApiRequest({type:"hasAccountFor",payload:{network:c||a.holderFns.get().network}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.suggestNetwork,function(c){return b().sendApiRequest({type:"requestAddNetwork",payload:{network:c||a.holderFns.get().network}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.requestTransfer,function(c,d,e){var f=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};return b().sendApiRequest({type:"requestTransfer",payload:{network:c||a.holderFns.get().network,to:d,amount:e,options:f}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.getAvatar,function(){return b().sendApiRequest({type:"getAvatar",payload:{}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.requestSignature,function(a){return b().sendApiRequest({type:"requestSignature",payload:a})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.createTransaction,function(c,d,e,f){return b().sendApiRequest({type:"createTransaction",payload:{blockchain:c,actions:d,account:e,network:f||a.holderFns.get().network}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.addToken,function(c,d){return b().sendApiRequest({type:"addToken",payload:{token:c,network:d||a.holderFns.get().network}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.createSharedSecret,function(a,c){return b().sendApiRequest({type:"createSharedSecret",payload:{scatterPublicKey:a,otherPublicKey:c}})}),c}}]),a}();exports["default"]=WalletAPI; | ||
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=void 0;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),_classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass")),_WalletInterface=require("../models/WalletInterface"),WalletAPI=/*#__PURE__*/function(){function a(){(0,_classCallCheck2["default"])(this,a)}return(0,_createClass2["default"])(a,null,[{key:"getMethods",value:function getMethods(a,b){var c,d=function(b,c){return(b||c)&&(a.holderFns.get().identity=b),c||b};return c={},(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.disconnect,function(){return b().disconnect()}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.isConnected,function(){return b().isConnected()}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.isPaired,function(){return b().isPaired()}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.addEventHandler,function(a){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return b().addEventHandler(a,c)}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.removeEventHandler,function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;return b().removeEventHandler(a)}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.listen,function(a){return b().addEventHandler(a)}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.getVersion,function(){return b().sendApiRequest({type:"getVersion",payload:{}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.getIdentity,function(c){return b().sendApiRequest({type:"getOrRequestIdentity",payload:{fields:c?c:{accounts:[a.holderFns.get().network]}}}).then(d)}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.getAllAccountsFor,function(c){return b().sendApiRequest({type:"getAllAccountsFor",payload:{fields:c?c:{accounts:[a.holderFns.get().network]}}}).then(d)}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.getIdentityFromPermissions,function(){return b().sendApiRequest({type:"identityFromPermissions",payload:{}}).then(d)}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.forgetIdentity,function(){return b().sendApiRequest({type:"forgetIdentity",payload:{}}).then(function(a){return d(null,a)})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.updateIdentity,function(a){var c=a.name,e=a.kyc;return b().sendApiRequest({type:"updateIdentity",payload:{name:c,kyc:e}}).then(function(a){return a?d(a):null})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.authenticate,function(a){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,d=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return b().sendApiRequest({type:"authenticate",payload:{nonce:a,data:c,publicKey:d}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.getArbitrarySignature,function(a,c){return b().sendApiRequest({type:"requestArbitrarySignature",payload:{publicKey:a,data:c}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.getPublicKey,function(a){return b().sendApiRequest({type:"getPublicKey",payload:{blockchain:a}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.linkAccount,function(c,d){return b().sendApiRequest({type:"linkAccount",payload:{account:c,network:d||a.holderFns.get().network}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.hasAccountFor,function(c){return b().sendApiRequest({type:"hasAccountFor",payload:{network:c||a.holderFns.get().network}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.suggestNetwork,function(c){return b().sendApiRequest({type:"requestAddNetwork",payload:{network:c||a.holderFns.get().network}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.requestTransfer,function(c,d,e){var f=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};return b().sendApiRequest({type:"requestTransfer",payload:{network:c||a.holderFns.get().network,to:d,amount:e,options:f}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.getAvatar,function(){return b().sendApiRequest({type:"getAvatar",payload:{}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.requestSignature,function(a){return b().sendApiRequest({type:"requestSignature",payload:a})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.createTransaction,function(c,d,e,f){return b().sendApiRequest({type:"createTransaction",payload:{blockchain:c,actions:d,account:e,network:f||a.holderFns.get().network}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.addToken,function(c,d){return b().sendApiRequest({type:"addToken",payload:{token:c,network:d||a.holderFns.get().network}})}),(0,_defineProperty2["default"])(c,_WalletInterface.WALLET_METHODS.createEncryptionKey,function(a,c){var d=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return b().sendApiRequest({type:"createEncryptionKey",payload:{scatterPublicKey:a,otherPublicKey:c,nonce:d}})}),c}}]),a}();exports["default"]=WalletAPI; |
{ | ||
"name": "@scatterjs/core", | ||
"version": "2.7.52", | ||
"version": "2.7.53", | ||
"main": "dist/index.js", | ||
@@ -17,3 +17,3 @@ "license": "MIT", | ||
], | ||
"gitHead": "9d94200c75fe54c60fc60e0bd53a919fe829a07f", | ||
"gitHead": "5468cbc7388ce6291cad0fa1b75281b150dfb370", | ||
"publishConfig": { | ||
@@ -20,0 +20,0 @@ "access": "public" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64940