Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amp-wallet

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amp-wallet - npm Package Compare versions

Comparing version 1.0.33 to 1.0.34

9

lib/index.d.ts

@@ -54,2 +54,5 @@ import { AccountResponse } from 'stellar-sdk';

* CREATE an asset that's are include issue account and distributor
* @param name string asset name
* @param distSec string main distributor secret key
* @param startingAmount number starting balance for that asset
*/

@@ -66,1 +69,7 @@ export declare function createAsset(name: string, distSec: string, startingAmount: number): Promise<{

}>;
/**
* get accounts balance for specific asset
* @param publicKey string account public key
* @param assetName string asset's name
*/
export declare function getAccountBalanceForAsset(publicKey: string, assetName: string): Promise<object[]>;

26

lib/index.js

@@ -39,3 +39,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.createAsset = exports.History = exports.createWallet = exports.loadFriendBot = exports.sendPayment = exports.getWallet = exports.isWalletExists = exports.getAllAccountBalances = void 0;
exports.getAccountBalanceForAsset = exports.createAsset = exports.History = exports.createWallet = exports.loadFriendBot = exports.sendPayment = exports.getWallet = exports.isWalletExists = exports.getAllAccountBalances = void 0;
var payment_1 = require("./interface/payment");

@@ -220,2 +220,5 @@ var wallet_1 = require("./wallet");

* CREATE an asset that's are include issue account and distributor
* @param name string asset name
* @param distSec string main distributor secret key
* @param startingAmount number starting balance for that asset
*/

@@ -267,1 +270,22 @@ function createAsset(name, distSec, startingAmount) {

exports.createAsset = createAsset;
/**
* get accounts balance for specific asset
* @param publicKey string account public key
* @param assetName string asset's name
*/
function getAccountBalanceForAsset(publicKey, assetName) {
return __awaiter(this, void 0, void 0, function () {
var balances;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, getAllAccountBalances(publicKey)];
case 1:
balances = _a.sent();
return [2 /*return*/, balances.filter(function (balance) {
return balance.asset_code === assetName;
})];
}
});
});
}
exports.getAccountBalanceForAsset = getAccountBalanceForAsset;

5

lib/interface/payment.js

@@ -38,8 +38,5 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.transaction = void 0;
var stellar_sdk_1 = __importDefault(require("stellar-sdk"));
var stellar_sdk_1 = require("stellar-sdk");
var setting_1 = require("../setting");

@@ -46,0 +43,0 @@ /**

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -57,9 +38,6 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createTrustLine = exports.setupIssuer = exports.convertTransactionHistory = exports.transactionHistory = exports.friendbot = exports.createAccount = exports.createPair = exports.getAllBalances = exports.getWalletObj = void 0;
var axios_1 = __importDefault(require("axios"));
var stellar_sdk_1 = __importStar(require("stellar-sdk"));
var axios_1 = require("axios");
var stellar_sdk_1 = require("stellar-sdk");
var setting_1 = require("./setting");

@@ -66,0 +44,0 @@ //---------get Wallet object from blockchain----------

{
"name": "amp-wallet",
"version": "1.0.33",
"version": "1.0.34",
"description": "Amanatpay Blockchain Wallet",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc