UNPKG

@secux/app-eth

Version:
50 lines (46 loc) 1.66 kB
/*! Copyright 2022 SecuX Technology Inc Copyright Chen Wei-En Copyright Wu Tsung-Yu Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /// <reference types="node" /> /// <reference types="node" /> export { getBuilder, ETHTransactionBuilder, EIP1559Builder }; declare function getBuilder(data: any): ETHTransactionBuilder; declare class ETHTransactionBuilder { static deserialize(serialized: Buffer): ETHTransactionBuilder; constructor(tx: any); /** * * @param {boolean} toHash * @returns {Buffer} transaction (keccak256 hashed or not) */ serialize(toHash?: boolean): Buffer; /** * sign transaction * @param {string} signature * @returns {Buffer} signed transaction */ withSignature(sig: Buffer): Buffer; getSignature(sig: Buffer): Buffer; protected prepare(): any[]; protected verify(data: Buffer): boolean; get chainId(): number | undefined; get tx(): any; } declare class EIP1559Builder extends ETHTransactionBuilder { constructor(tx: any); serialize(toHash?: boolean): Buffer; withSignature(sig: Buffer): Buffer; getSignature(sig: Buffer): Buffer; protected prepare(): any[]; }