Documentation ¶
Index ¶
- Constants
- Variables
- func XRPInit()
- func XRP_FundAddress(toaddress string)
- func XRP_Remit(seed string, cryptoType string, keyseq *uint32, toaddress string, ...)
- func XRP_getAddress(k crypto.Key, sequence *uint32) string
- func XRP_getSig(tx data.Transaction, key crypto.Key, keyseq *uint32, hash data.Hash256, ...) []byte
- func XRP_importKeyFromSeed(seed string, cryptoType string) crypto.Key
- func XRP_importPublicKey(pubkey []byte) crypto.Key
- func XRP_makeSignedTx(tx data.Transaction, sig []byte) data.Transaction
- func XRP_newUnsignedPaymentTransaction(key crypto.Key, keyseq *uint32, txseq uint32, dest string, amt string, ...) (data.Transaction, data.Hash256, []byte)
- func XRP_newUnsignedSimplePaymentTransaction(fromAddress string, publicKey []byte, toAddress string, amount *big.Int, ...) (data.Transaction, data.Hash256, []byte)
- func XRP_publicKeyToAddress(pubkey []byte) string
- func XRP_submitTx(signedTx data.Transaction) string
- type Account
- type Account_info_Res
- type EcdsaPublic
- type JsonRet
- type XRPHandler
- func (h *XRPHandler) BuildUnsignedTransaction(fromAddress, fromPublicKey, toAddress string, amount *big.Int, ...) (transaction interface{}, digests []string, err error)
- func (h *XRPHandler) GetAddressBalance(address string, jsonstring string) (balance types.Balance, err error)
- func (h *XRPHandler) GetDefaultFee() types.Value
- func (h *XRPHandler) GetTransactionInfo(txhash string) (fromAddress string, txOutputs []types.TxOutput, jsonstring string, ...)
- func (h *XRPHandler) IsToken() bool
- func (h *XRPHandler) MakeSignedTransaction(rsv []string, transaction interface{}) (signedTransaction interface{}, err error)
- func (h *XRPHandler) PublicKeyToAddress(pubKeyHex string) (address string, err error)
- func (h *XRPHandler) SignTransaction(hash []string, privateKey interface{}) (rsv []string, err error)
- func (h *XRPHandler) SubmitTransaction(signedTransaction interface{}) (txhash string, err error)
Constants ¶
View Source
const ( PubKeyBytesLenCompressed = 33 PubKeyBytesLenUncompressed = 65 )
Variables ¶
View Source
var XRP_DEFAULT_FEE, _ = new(big.Int).SetString("10", 10)
Functions ¶
func XRP_FundAddress ¶
func XRP_FundAddress(toaddress string)
给一个地址打10000块钱激活, 需要一个有足够钱的大帐户 大帐户地址: rwLc28nRV7WZiBv6vsHnpxUGAVcj8qpAtE 大帐户seed: ssfL5tmpTTqCw5sHjnRHQ4yyUCQKf 大帐户密钥类型: ecdsa keysequence: 0
func XRP_Remit ¶
func XRP_Remit(seed string, cryptoType string, keyseq *uint32, toaddress string, amount *big.Int, fee int64)
普通xrp转账
func XRP_getSig ¶
func XRP_importKeyFromSeed ¶
cryptoType = "ed25519" or "ecdsa"
func XRP_importPublicKey ¶
func XRP_makeSignedTx ¶
func XRP_makeSignedTx(tx data.Transaction, sig []byte) data.Transaction
func XRP_newUnsignedPaymentTransaction ¶
func XRP_newUnsignedPaymentTransaction(key crypto.Key, keyseq *uint32, txseq uint32, dest string, amt string, fee int64, path string, nodirect bool, partial bool, limit bool) (data.Transaction, data.Hash256, []byte)
keyseq is only supported by ecdsa, leave nil when key crypto type is ed25519 amt format: "value/currency/issuer"
func XRP_publicKeyToAddress ¶
func XRP_submitTx ¶
func XRP_submitTx(signedTx data.Transaction) string
Types ¶
type Account_info_Res ¶
type Account_info_Res struct {
Account_data Account
}
type EcdsaPublic ¶
type EcdsaPublic struct {
// contains filtered or unexported fields
}
func (*EcdsaPublic) Id ¶
func (k *EcdsaPublic) Id(sequence *uint32) []byte
func (*EcdsaPublic) Private ¶
func (k *EcdsaPublic) Private(sequence *uint32) []byte
func (*EcdsaPublic) Public ¶
func (k *EcdsaPublic) Public(sequence *uint32) []byte
type JsonRet ¶
type JsonRet struct {
Result Account_info_Res
}
type XRPHandler ¶
type XRPHandler struct{}
func NewXRPHandler ¶
func NewXRPHandler() *XRPHandler
func (*XRPHandler) BuildUnsignedTransaction ¶
func (h *XRPHandler) BuildUnsignedTransaction(fromAddress, fromPublicKey, toAddress string, amount *big.Int, jsonstring string) (transaction interface{}, digests []string, err error)
jsonstring:'{"fee":1}'
func (*XRPHandler) GetAddressBalance ¶
func (*XRPHandler) GetDefaultFee ¶
func (h *XRPHandler) GetDefaultFee() types.Value
func (*XRPHandler) GetTransactionInfo ¶
func (*XRPHandler) IsToken ¶
func (h *XRPHandler) IsToken() bool
func (*XRPHandler) MakeSignedTransaction ¶
func (h *XRPHandler) MakeSignedTransaction(rsv []string, transaction interface{}) (signedTransaction interface{}, err error)
func (*XRPHandler) PublicKeyToAddress ¶
func (h *XRPHandler) PublicKeyToAddress(pubKeyHex string) (address string, err error)
func (*XRPHandler) SignTransaction ¶
func (h *XRPHandler) SignTransaction(hash []string, privateKey interface{}) (rsv []string, err error)
func (*XRPHandler) SubmitTransaction ¶
func (h *XRPHandler) SubmitTransaction(signedTransaction interface{}) (txhash string, err error)
Click to show internal directories.
Click to hide internal directories.