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

@terra-money/terra.js

Package Overview
Dependencies
Maintainers
10
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@terra-money/terra.js - npm Package Compare versions

Comparing version 2.0.15-beta.1 to 2.0.15

8

dist/client/lcd/api/TxAPI.d.ts

@@ -130,3 +130,9 @@ import { BaseAPI } from './BaseAPI';

*/
estimateFee(sourceAddress: string, msgs: Msg[], options?: Partial<CreateTxOptions>): Promise<StdFee>;
estimateFee(sourceAddress: string, msgs: Msg[], options?: {
memo?: string;
gas?: string;
gasPrices?: Coins.Input;
gasAdjustment?: Numeric.Input;
feeDenoms?: string[];
}): Promise<StdFee>;
/**

@@ -133,0 +139,0 @@ * Encode a transaction to Amino-encoding

17

dist/client/lcd/api/TxAPI.js

@@ -169,9 +169,10 @@ "use strict";

TxAPI.prototype.estimateFee = function (sourceAddress, msgs, options) {
if (options === void 0) { options = {}; }
return __awaiter(this, void 0, void 0, function () {
var gasPrices, gasAdjustment, feeDenoms, gasPricesCoins, gasPricesCoinsFiltered, data;
var memo, gas, gasPrices, gasAdjustment, feeDenoms, gasPricesCoins, gasPricesCoinsFiltered, data;
return __generator(this, function (_a) {
gasPrices = options.gasPrices || this.lcd.config.gasPrices;
gasAdjustment = options.gasAdjustment || this.lcd.config.gasAdjustment;
feeDenoms = options.feeDenoms || ['uluna'];
memo = options === null || options === void 0 ? void 0 : options.memo;
gas = options === null || options === void 0 ? void 0 : options.gas;
gasPrices = (options === null || options === void 0 ? void 0 : options.gasPrices) || this.lcd.config.gasPrices;
gasAdjustment = (options === null || options === void 0 ? void 0 : options.gasAdjustment) || this.lcd.config.gasAdjustment;
feeDenoms = (options === null || options === void 0 ? void 0 : options.feeDenoms) || ['uluna'];
if (gasPrices) {

@@ -191,9 +192,7 @@ gasPricesCoins = new core_1.Coins(gasPrices);

chain_id: this.lcd.config.chainID,
memo: options.memo,
memo: memo,
from: sourceAddress,
gas: options.gas || 'auto',
gas: gas || 'auto',
gas_prices: gasPricesCoins && gasPricesCoins.toData(),
gas_adjustment: gasAdjustment && gasAdjustment.toString(),
account_number: typeof options.account_number === 'number' && options.account_number.toString(),
sequence: typeof options.sequence === 'number' && options.sequence.toString(),
},

@@ -200,0 +199,0 @@ msgs: msgs.map(function (m) { return m.toData(); }),

@@ -0,1 +1,2 @@

/// <reference types="node" />
import { CreateTxOptions } from '../client';

@@ -14,2 +15,6 @@ interface ResponseData {

}
interface SignBytesOption {
bytes: Buffer;
purgeQueue?: boolean;
}
declare global {

@@ -117,2 +122,16 @@ interface Window {

/**
* Request for signing bytes
*
* @return {string} name 'onSign'
* @return {object} payload
* @return {number} payload.id identifier
* @return {string} payload.origin origin address
* @return {Msg[]} payload.msgs requested msgs
* @return {boolean} payload.success
* @return {string} payload.result.public_key Base64 encoded public key
* @return {string} payload.result.signature Base64 encoded signature
* @return {number} payload.result.recid Recovery id
*/
signBytes(options: SignBytesOption): number;
/**
* Request for sign and post to LCD server

@@ -119,0 +138,0 @@ *

@@ -198,2 +198,21 @@ "use strict";

/**
* Request for signing bytes
*
* @return {string} name 'onSign'
* @return {object} payload
* @return {number} payload.id identifier
* @return {string} payload.origin origin address
* @return {Msg[]} payload.msgs requested msgs
* @return {boolean} payload.success
* @return {string} payload.result.public_key Base64 encoded public key
* @return {string} payload.result.signature Base64 encoded signature
* @return {number} payload.result.recid Recovery id
*/
Extension.prototype.signBytes = function (options) {
return this.send('sign', {
bytes: options.bytes.toString('base64'),
purgeQueue: options.purgeQueue,
});
};
/**
* Request for sign and post to LCD server

@@ -200,0 +219,0 @@ *

{
"name": "@terra-money/terra.js",
"version": "2.0.15-beta.1",
"version": "2.0.15",
"description": "The JavaScript SDK for Terra",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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

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