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

@tharsis/transactions

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tharsis/transactions - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

27

dist/messages/staking.d.ts

@@ -117,2 +117,29 @@ import { Chain, Fee, Sender } from './common';

};
export interface MsgMultipleWithdrawDelegatorRewardParams {
validatorAddresses: string[];
}
export declare function createTxMsgMultipleWithdrawDelegatorReward(chain: Chain, sender: Sender, fee: Fee, memo: string, params: MsgMultipleWithdrawDelegatorRewardParams): {
signDirect: {
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
signBytes: string;
};
legacyAmino: {
body: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.TxBody;
authInfo: import("@tharsis/proto/dist/proto/cosmos/tx/v1beta1/tx").cosmos.tx.v1beta1.AuthInfo;
signBytes: string;
};
eipToSign: {
types: object;
primaryType: string;
domain: {
name: string;
version: string;
chainId: number;
verifyingContract: string;
salt: string;
};
message: object;
};
};
//# sourceMappingURL=staking.d.ts.map

21

dist/messages/staking.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createTxMsgWithdrawDelegatorReward = exports.createTxMsgUndelegate = exports.createTxMsgBeginRedelegate = exports.createTxMsgDelegate = void 0;
exports.createTxMsgMultipleWithdrawDelegatorReward = exports.createTxMsgWithdrawDelegatorReward = exports.createTxMsgUndelegate = exports.createTxMsgBeginRedelegate = exports.createTxMsgDelegate = void 0;
const proto_1 = require("@tharsis/proto");

@@ -66,2 +66,21 @@ const eip712_1 = require("@tharsis/eip712");

exports.createTxMsgWithdrawDelegatorReward = createTxMsgWithdrawDelegatorReward;
function createTxMsgMultipleWithdrawDelegatorReward(chain, sender, fee, memo, params) {
const feeObject = (0, eip712_1.generateFee)(fee.amount, fee.denom, fee.gas, sender.accountAddress);
const types = (0, eip712_1.generateTypes)(eip712_1.MSG_WITHDRAW_DELEGATOR_REWARD_TYPES);
const msgs = [];
const protoMsgs = [];
params.validatorAddresses.forEach((validator) => {
msgs.push((0, eip712_1.createMsgWithdrawDelegatorReward)(sender.accountAddress, validator));
protoMsgs.push((0, proto_1.createMsgWithdrawDelegatorReward)(sender.accountAddress, validator));
});
const messages = (0, eip712_1.generateMessageWithMultipleTransactions)(sender.accountNumber.toString(), sender.sequence.toString(), chain.cosmosChainId, memo, feeObject, msgs);
const eipToSign = (0, eip712_1.createEIP712)(types, chain.chainId, messages);
const tx = (0, proto_1.createTransactionWithMultipleMessages)(protoMsgs, memo, fee.amount, fee.denom, parseInt(fee.gas, 10), 'ethsecp256', sender.pubkey, sender.sequence, sender.accountNumber, chain.cosmosChainId);
return {
signDirect: tx.signDirect,
legacyAmino: tx.legacyAmino,
eipToSign,
};
}
exports.createTxMsgMultipleWithdrawDelegatorReward = createTxMsgMultipleWithdrawDelegatorReward;
//# sourceMappingURL=staking.js.map

8

package.json
{
"name": "@tharsis/transactions",
"description": "Transactions generator for EVMOS",
"version": "0.2.0",
"version": "0.2.1",
"license": "MIT",

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

"dependencies": {
"@tharsis/eip712": "^0.2.0",
"@tharsis/proto": "^0.1.14",
"@tharsis/eip712": "^0.2.1",
"@tharsis/proto": "^0.1.15",
"@types/node": "^17.0.21",

@@ -36,3 +36,3 @@ "link-module-alias": "^1.2.0",

},
"gitHead": "55dc1dc340a3c9c842803f502d480968a10ddb85"
"gitHead": "9e7e24e5c9e8248a664bc72ca3032c5c355df901"
}

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