@masa-finance/masa-sdk
Advanced tools
Comparing version 0.2.4 to 0.2.5
{ | ||
"name": "@masa-finance/masa-sdk", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "Brand new masa SDK", | ||
@@ -33,3 +33,3 @@ "main": "dist/src/index.js", | ||
"dependencies": { | ||
"@masa-finance/masa-contracts-identity": "^0.4.1", | ||
"@masa-finance/masa-contracts-identity": "^0.4.2", | ||
"arweave": "^1.11.6", | ||
@@ -36,0 +36,0 @@ "axios": "^1.1.3", |
@@ -9,3 +9,3 @@ import { BigNumber } from "ethers"; | ||
} | undefined>; | ||
create: () => Promise<{ | ||
create: (phoneNumber: string) => Promise<{ | ||
tokenId: string | BigNumber; | ||
@@ -12,0 +12,0 @@ success: boolean; |
@@ -9,3 +9,3 @@ "use strict"; | ||
mint: (address, signature) => masa.client.twofaMint(address, signature), | ||
create: () => (0, create_1.create2fa)(masa), | ||
create: (phoneNumber) => (0, create_1.create2fa)(masa, phoneNumber), | ||
burn: (twofaId) => (0, burn_1.burn2fa)(masa, twofaId), | ||
@@ -12,0 +12,0 @@ list: (address) => (0, list_1.list2fas)(masa, address), |
import Masa from "../masa"; | ||
import { BigNumber } from "ethers"; | ||
export declare const create2fa: (masa: Masa) => Promise<{ | ||
export declare const get2faTemplate: (phoneNumber: string) => string; | ||
export declare const create2fa: (masa: Masa, phoneNumber: string) => Promise<{ | ||
tokenId: string | BigNumber; | ||
@@ -5,0 +6,0 @@ success: boolean; |
@@ -12,4 +12,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.create2fa = void 0; | ||
const create2fa = (masa) => __awaiter(void 0, void 0, void 0, function* () { | ||
exports.create2fa = exports.get2faTemplate = void 0; | ||
const get2faTemplate = (phoneNumber) => `Phone Number: ${phoneNumber}`; | ||
exports.get2faTemplate = get2faTemplate; | ||
const create2fa = (masa, phoneNumber) => __awaiter(void 0, void 0, void 0, function* () { | ||
if (yield masa.session.checkLogin()) { | ||
@@ -20,4 +22,3 @@ const address = yield masa.config.wallet.getAddress(); | ||
return; | ||
// todo do something cooler here | ||
const msg = `${address}`; | ||
const msg = (0, exports.get2faTemplate)(phoneNumber); | ||
console.log(`Signer Address: '${address}'`); | ||
@@ -24,0 +25,0 @@ console.log(`Signing: \n'${msg}'\n`); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.account = void 0; | ||
const getBalances_1 = require("./getBalances"); | ||
const get_balances_1 = require("./get-balances"); | ||
const account = (mass) => ({ | ||
getBalances: (address) => (0, getBalances_1.getBalances)(mass, address), | ||
getBalances: (address) => (0, get_balances_1.getBalances)(mass, address), | ||
}); | ||
exports.account = account; | ||
//# sourceMappingURL=account.js.map |
@@ -1,3 +0,3 @@ | ||
export * from "./createRandomWallet"; | ||
export * from "./getBalances"; | ||
export * from "./create-random-wallet"; | ||
export * from "./get-balances"; | ||
export * from "./account"; |
@@ -17,5 +17,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./createRandomWallet"), exports); | ||
__exportStar(require("./getBalances"), exports); | ||
__exportStar(require("./create-random-wallet"), exports); | ||
__exportStar(require("./get-balances"), exports); | ||
__exportStar(require("./account"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import { ContractService } from "./contractService"; | ||
import { ContractService } from "./contract-service"; | ||
import Masa from "../masa"; | ||
@@ -3,0 +3,0 @@ export declare const contracts: (masa: Masa) => { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.contracts = void 0; | ||
const contractService_1 = require("./contractService"); | ||
const loadIdentityContracts_1 = require("./loadIdentityContracts"); | ||
const contract_service_1 = require("./contract-service"); | ||
const load_Identity_contracts_1 = require("./load-Identity-contracts"); | ||
const addresses_1 = require("./addresses"); | ||
const contracts = (masa) => ({ | ||
service: new contractService_1.ContractService(masa), | ||
loadIdentityContracts: () => (0, loadIdentityContracts_1.loadIdentityContracts)({ | ||
service: new contract_service_1.ContractService(masa), | ||
loadIdentityContracts: () => (0, load_Identity_contracts_1.loadIdentityContracts)({ | ||
provider: masa.config.wallet.provider, | ||
@@ -11,0 +11,0 @@ network: masa.config.network, |
export * from "./addresses"; | ||
export * from "./contractService"; | ||
export * from "./loadIdentityContracts"; | ||
export * from "./contract-service"; | ||
export * from "./load-Identity-contracts"; | ||
export * from "./contracts"; |
@@ -18,5 +18,5 @@ "use strict"; | ||
__exportStar(require("./addresses"), exports); | ||
__exportStar(require("./contractService"), exports); | ||
__exportStar(require("./loadIdentityContracts"), exports); | ||
__exportStar(require("./contract-service"), exports); | ||
__exportStar(require("./load-Identity-contracts"), exports); | ||
__exportStar(require("./contracts"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -104,3 +104,3 @@ import { MasaClient } from "./utils"; | ||
} | undefined>; | ||
create: () => Promise<{ | ||
create: (phoneNumber: string) => Promise<{ | ||
tokenId: string | import("ethers").BigNumber; | ||
@@ -107,0 +107,0 @@ success: boolean; |
@@ -6,5 +6,5 @@ "use strict"; | ||
const account_1 = require("./account"); | ||
const creditScore_1 = require("./creditScore"); | ||
const credit_score_1 = require("./credit-score"); | ||
const identity_1 = require("./identity"); | ||
const soulNames_1 = require("./soulNames"); | ||
const soul_names_1 = require("./soul-names"); | ||
const _2fa_1 = require("./2fa"); | ||
@@ -22,4 +22,4 @@ const utils_1 = require("./utils"); | ||
this.identity = (0, identity_1.identity)(this); | ||
this.soulNames = (0, soulNames_1.soulNames)(this); | ||
this.creditScore = (0, creditScore_1.creditScore)(this); | ||
this.soulNames = (0, soul_names_1.soulNames)(this); | ||
this.creditScore = (0, credit_score_1.creditScore)(this); | ||
this.account = (0, account_1.account)(this); | ||
@@ -26,0 +26,0 @@ this.contracts = (0, contracts_1.contracts)(this); |
export * from "./check-login"; | ||
export * from "./get-session"; | ||
export * from "./get-logintemplate"; | ||
export * from "./get-login-template"; | ||
export * from "./login"; | ||
export * from "./logout"; | ||
export * from "./session"; |
@@ -19,3 +19,3 @@ "use strict"; | ||
__exportStar(require("./get-session"), exports); | ||
__exportStar(require("./get-logintemplate"), exports); | ||
__exportStar(require("./get-login-template"), exports); | ||
__exportStar(require("./login"), exports); | ||
@@ -22,0 +22,0 @@ __exportStar(require("./logout"), exports); |
@@ -13,3 +13,3 @@ "use strict"; | ||
exports.login = void 0; | ||
const get_logintemplate_1 = require("./get-logintemplate"); | ||
const get_login_template_1 = require("./get-login-template"); | ||
const helpers_1 = require("../helpers"); | ||
@@ -26,3 +26,3 @@ const login = (masa) => __awaiter(void 0, void 0, void 0, function* () { | ||
// sign | ||
const msg = (0, get_logintemplate_1.getLoginTemplate)(challengeData.challenge, challengeData.expires); | ||
const msg = (0, get_login_template_1.getLoginTemplate)(challengeData.challenge, challengeData.expires); | ||
const address = yield masa.config.wallet.getAddress(); | ||
@@ -29,0 +29,0 @@ console.log(`Signer Address: '${address}'`); |
@@ -13,5 +13,5 @@ "use strict"; | ||
logout: () => (0, logout_1.logout)(masa), | ||
getSession: () => (0, get_session_1.getSession)(masa) | ||
getSession: () => (0, get_session_1.getSession)(masa), | ||
}); | ||
exports.session = session; | ||
//# sourceMappingURL=session.js.map |
{ | ||
"name": "@masa-finance/masa-sdk", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "Brand new masa SDK", | ||
@@ -33,3 +33,3 @@ "main": "dist/src/index.js", | ||
"dependencies": { | ||
"@masa-finance/masa-contracts-identity": "^0.4.1", | ||
"@masa-finance/masa-contracts-identity": "^0.4.2", | ||
"arweave": "^1.11.6", | ||
@@ -36,0 +36,0 @@ "axios": "^1.1.3", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
157598
2347