Documentation ¶
Index ¶
- Constants
- func DeploySimpleMultiSigContract(nonceBucketNum uint16, chainID *big.Int, backend bind.ContractBackend, ...) (string, error)
- func ExecuteTX(txp *TxParams) (string, error)
- func GetContractInfo(caller bind.ContractCaller, contractAddress string) (addrs []string, mRequired int64, err error)
- func New(bip44Path string, seed []byte) (c *eth, err error)
- func NewFromMetadata(md core.MetadataProvider) (c *eth, err error)
- func NewOperatingMessage(prefix string, toAddress common.Address, value *big.Int, data []byte, ...) *operatingMessage
- func NewOperatingMessageFromHex(hex string) (opMsg *operatingMessage, err error)
- func NewTransactionFromHex(hex string) (transaction *types.Transaction, err error)
- func SimpleMultiSigExecuteSign(expireTime *big.Int, chainID int64, signerPrivkHex string, ...) (uint8, [32]byte, [32]byte, error)
- type MultiSignTx
- type TxParams
Constants ¶
View Source
const ( ETHER = "ETHER" ERC20 = "ERC20" )
Variables ¶
This section is empty.
Functions ¶
func DeploySimpleMultiSigContract ¶
func DeploySimpleMultiSigContract(nonceBucketNum uint16, chainID *big.Int, backend bind.ContractBackend, privkHex string, hexAddress []string, mRequired uint8) (string, error)
DeploySimpleMultiSigContract 创建部署一个多签合约,返回合约地址 address: 签名的参与者, mRequired: m-n 至少多少人签名生效 return: address_hex,txid
func GetContractInfo ¶
func GetContractInfo(caller bind.ContractCaller, contractAddress string) (addrs []string, mRequired int64, err error)
GetContractInfo 获取多签合约地址内的地址和签名人数
func NewFromMetadata ¶
func NewFromMetadata(md core.MetadataProvider) (c *eth, err error)
func NewOperatingMessage ¶
func NewTransactionFromHex ¶
func NewTransactionFromHex(hex string) (transaction *types.Transaction, err error)
func SimpleMultiSigExecuteSign ¶
func SimpleMultiSigExecuteSign(expireTime *big.Int, chainID int64, signerPrivkHex string, multisigContractAddr, destinationAddr, executor string, nonce *big.Int, value, gasLimit *big.Int, data []byte) (uint8, [32]byte, [32]byte, error)
SimpleMultiSigExecuteSign return v,r,s
Types ¶
type MultiSignTx ¶
type MultiSignTx struct { ExpireTime *big.Int //time.Time.Unix()值,在该时间之后区块打包会失败, (不用int64, int64会导致RLP encode失败) ChainID uint64 Symbol string MultisigAddr string ToAddr string Creator string Executor string Nonce *big.Int Value *big.Int GasLimit *big.Int GasPrice *big.Int Data []byte }
func NewMultiSignTxFromHex ¶
func NewMultiSignTxFromHex(hex string) (*MultiSignTx, error)
func (*MultiSignTx) Sign ¶
func (tx *MultiSignTx) Sign(privateKey *ecdsa.PrivateKey) (string, error)
type TxParams ¶
type TxParams struct { Backend bind.ContractBackend BucketIdx uint16 ExpireTime *big.Int SigV []uint8 //签名 SigR, SigS [][32]byte //签名 PrivkHex string MultisigContractAddress, FromAddress string //多签合约地址,发起地址 Destination, Executor string //toAddress Value, GasLimit *big.Int Data []byte }
TxParams 交易参数
Click to show internal directories.
Click to hide internal directories.