1 Star 0 Fork 0

符策委 / wallet-grpc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
chain.go 1.84 KB
一键复制 编辑 原始数据 按行查看 历史
符策委 提交于 2023-09-30 22:55 . fix: polka-address-transport;
package base
type Chain interface {
MainToken() Token
BalanceOfAddress(address string) (*Balance, error)
BalanceOfPublicKey(publicKey string) (*Balance, error)
BalanceOfAccount(account Account) (*Balance, error)
// Send the raw transaction on-chain
// @return the hex hash string
SendRawTransaction(signedTx string) (string, error)
// Send the signed transaction on-chain
// @return the hex hash string
SendSignedTransaction(signedTxn SignedTransaction) (*OptionalString, error)
// Fetch transaction details through transaction hash
FetchTransactionDetail(hash string) (*TransactionDetail, error)
// Fetch transaction status through transaction hash
FetchTransactionStatus(hash string) TransactionStatus
// Batch fetch the transaction status, the hash list and the return value,
// which can only be passed as strings separated by ","
// @param hashListString The hash of the transactions to be queried in batches, a string concatenated with ",": "hash1,hash2,hash3"
// @return Batch transaction status, its order is consistent with hashListString: "status1,status2,status3"
BatchFetchTransactionStatus(hashListString string) string
// Most chains can estimate the fee directly to the transaction object
// **But two chains don't work: `aptos`, `starcoin`**
//EstimateTransactionFee(transaction Transaction) (fee *OptionalString, err error)
// All chains can call this method to estimate the gas fee.
// **Chain `aptos`, `starcoin` must pass in publickey**
//EstimateTransactionFeeUsePublicKey(transaction Transaction, pubkey string) (fee *OptionalString, err error)
// -----------------------------
// polka
//GetSignDataFromChain(t *Transaction, walletAddress string) ([]byte, error)
//
//EstimateFeeForTransaction(transaction *Transaction) (s string, err error)
//FetchScriptHashForMiniX(transferTo, amount string) (*MiniXScriptHash, error)
}
Go
1
https://gitee.com/fu-ce-wei/wallet-grpc.git
git@gitee.com:fu-ce-wei/wallet-grpc.git
fu-ce-wei
wallet-grpc
wallet-grpc
3f3ae683dd35

搜索帮助