generated at
Ethereum の署名済みトランザクションから署名したアカウントのアドレスと公開鍵を取得
Ethereum の署名済みトランザクションから署名したアカウントのアドレスと公開鍵を取得する方法です。
ここで紹介する方法では、ethereumjs-utilethereumjs-tx を使用します。

署名済みのトランザクションの例
0xf86b808504a817c800825208942890228d4478e2c3b0ebf5a38479e3396c1d6074872386f26fc100008029a0520e5053c1b573d747f823a0b23d52e5a619298f46cd781d677d0e5e78fbc750a075be461137c2c2a5594beff76ecb11a215384c574a7e5b620dba5cc63b0a0f13
このトランザクションは、実際に Ropsten ネットワークに送信されています。

署名済みトランザクションから署名したアカウントのアドレスと公開鍵を取得
ethereumjs-tx の Transaction オブジェクトを作成し、 getSenderAddress() getSenderPublicKey() を実行することで、それぞれアドレスと公開鍵を得ることができます。
example.js
const EthUtil = require('ethereumjs-util') const EthTx = require('ethereumjs-tx') // 署名済みトランザクション const signedTx = "0xf86b808504a817c800825208942890228d4478e2c3b0ebf5a38479e3396c1d6074872386f26fc100008029a0520e5053c1b573d747f823a0b23d52e5a619298f46cd781d677d0e5e78fbc750a075be461137c2c2a5594beff76ecb11a215384c574a7e5b620dba5cc63b0a0f13" // 署名済みトランザクションからトランザクションオブジェクトを作成 const tx = new EthTx(signedTx) // トランザクションに署名をしたアドレスを取得 const address = EthUtil.bufferToHex(tx.getSenderAddress()) // トランザクションに署名をしたアドレスの公開鍵を取得 const publicKey = EthUtil.bufferToHex(tx.getSenderPublicKey()) console.log(address) // => 0x89c24a88bad4abe0a4f5b2eb5a86db1fb323832c console.log(publicKey) // => 0xfff49b58b83104ff16875452852466a46c7169ba4e368d11830c9170624e0a9509080a05a38c18841718ea4fc13483ac467d3e2d728d41ff16b73b9c943734f8

ethereumjs-tx の内部で行われている処理について
Ethereum の公開鍵は、ecrecover による署名検証を行う際に取得されます。
ethereumjs-tx/index.js
verifySignature () { const msgHash = this.hash(false) // All transaction signatures whose s-value is greater than secp256k1n/2 are considered invalid. if (this._homestead && new BN(this.s).cmp(N_DIV_2) === 1) { return false } try { let v = ethUtil.bufferToInt(this.v) if (this._chainId > 0) { v -= this._chainId * 2 + 8 } this._senderPubKey = ethUtil.ecrecover(msgHash, v, this.r, this.s) } catch (e) { return false } return !!this._senderPubKey }

Ethereum のアドレスは、公開鍵から求められます。
ethereumjs-tx/index.js
getSenderAddress () { if (this._from) { return this._from } const pubkey = this.getSenderPublicKey() this._from = ethUtil.publicToAddress(pubkey) return this._from }