Socket
Socket
Sign inDemoInstall

@terra-money/terra.js

Package Overview
Dependencies
55
Maintainers
5
Versions
230
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.19 to 0.5.0-beta.0

15

dist/extension/index.d.ts

@@ -1,9 +0,3 @@

import { Msg } from '../core/Msg';
import { LCDClientConfig } from '../client';
import { CreateTxOptions, LCDClientConfig } from '../client';
declare type SendDataType = 'connect' | 'post' | 'sign';
interface SignOptions {
lcdClientConfig?: LCDClientConfig;
account_number?: number;
sequence?: number;
}
interface SendData {

@@ -21,2 +15,5 @@ id: number | string;

}
interface Option extends CreateTxOptions {
lcdClientConfig?: LCDClientConfig;
}
/**

@@ -91,3 +88,3 @@ * Extension class is for communicating between page and extension

*/
sign(msgs: Msg[], options?: SignOptions): number;
sign(options: Option): number;
/**

@@ -112,4 +109,4 @@ * Request to Station Extension for sign and post to LCD server

*/
post(msgs: Msg[], lcdClientConfig?: LCDClientConfig): number;
post(options: Option): number;
}
export {};

18

dist/extension/index.js

@@ -114,5 +114,6 @@ "use strict";

*/
Extension.prototype.sign = function (msgs, options) {
Extension.prototype.sign = function (options) {
var _a, _b, _c;
var id = this.generateId();
this.send(__assign(__assign({}, options), { id: id, type: 'sign', msgs: msgs.map(function (msg) { return msg.toJSON(); }) }));
this.send(__assign(__assign({}, options), { id: id, type: 'sign', lcdClientConfig: options.lcdClientConfig, account_number: options.account_number, sequence: options.sequence, memo: options.memo, msgs: options.msgs.map(function (msg) { return msg.toJSON(); }), fee: (_a = options.fee) === null || _a === void 0 ? void 0 : _a.toJSON(), gasPrices: (_b = options.gasPrices) === null || _b === void 0 ? void 0 : _b.toString(), gasAdjustment: (_c = options.gasAdjustment) === null || _c === void 0 ? void 0 : _c.toString() }));
return id;

@@ -139,3 +140,4 @@ };

*/
Extension.prototype.post = function (msgs, lcdClientConfig) {
Extension.prototype.post = function (options) {
var _a, _b, _c;
var id = this.generateId();

@@ -145,4 +147,10 @@ this.send({

type: 'post',
msgs: msgs.map(function (msg) { return msg.toJSON(); }),
lcdClientConfig: lcdClientConfig,
lcdClientConfig: options.lcdClientConfig,
account_number: options.account_number,
sequence: options.sequence,
memo: options.memo,
msgs: options.msgs.map(function (msg) { return msg.toJSON(); }),
fee: (_a = options.fee) === null || _a === void 0 ? void 0 : _a.toJSON(),
gasPrices: (_b = options.gasPrices) === null || _b === void 0 ? void 0 : _b.toString(),
gasAdjustment: (_c = options.gasAdjustment) === null || _c === void 0 ? void 0 : _c.toString(),
});

@@ -149,0 +157,0 @@ return id;

{
"version": "0.4.19",
"version": "0.5.0-beta.0",
"license": "MIT",

@@ -4,0 +4,0 @@ "main": "dist/index.js",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc