Documentation ¶
Index ¶
- Variables
- func BroadcastTx(url string, signTx interface{}) (string, error)
- func DataTimeToTimestamp(dataTime string) (int64, error)
- func GetAddressBalance(url, address, assetId string) (*big.Int, error)
- func GetChainId(url string) (string, error)
- func GetRefBlockInfo(url string) (uint16, uint32, error)
- func GetWaitCrosschainInfo(url string, trxType int) (rsp *[]WithdrawOp, err error)
- func ReverseBytesInPlace(input []byte)
- func Uint64Supply(supply interface{}) (uint64, error)
- func X17_Byte_Sum256(input []byte) []byte
- func X17_Sum256(input string) []byte
- type AddressBalanceResult
- type AddressBalanceRsp
- type AddressMintInfoResult
- type AddressMintInfoRsp
- type AssetInfoResult
- type AssetInfoRsp
- type BindingAccountResult
- type BindingAccountRsp
- type BroadcastTxRsp
- type DepositAddressResult
- type DepositAddressRsp
- type HttpClient
- type InfoResult
- type InfoRsp
- type RefBlockInfoRsp
- type RpcReq
- type RpcResp
- type WithdrawAllData
- type WithdrawOp
- type WithdrawTransaction
Constants ¶
This section is empty.
Variables ¶
View Source
var AsciiPicure = `` /* 984-byte string literal not displayed */
View Source
var Bold = color.New(color.Bold).SprintFunc()
Functions ¶
func BroadcastTx ¶
func DataTimeToTimestamp ¶
func GetChainId ¶
func GetWaitCrosschainInfo ¶ added in v0.1.5
func GetWaitCrosschainInfo(url string, trxType int) (rsp *[]WithdrawOp, err error)
func ReverseBytesInPlace ¶
func ReverseBytesInPlace(input []byte)
func Uint64Supply ¶
func X17_Byte_Sum256 ¶ added in v0.1.2
func X17_Sum256 ¶ added in v0.1.2
Types ¶
type AddressBalanceResult ¶
type AddressBalanceResult struct { Amount interface{} `json:"amount"` AssetId string `json:"asset_id"` }
type AddressBalanceRsp ¶
type AddressBalanceRsp struct { Id int `json:"id"` Result []AddressBalanceResult `json:"result"` Error interface{} `json:"error"` }
type AddressMintInfoResult ¶
type AddressMintInfoRsp ¶
type AddressMintInfoRsp struct { Id int `json:"id"` Result AddressMintInfoResult `json:"result"` Error interface{} `json:"error"` }
func GetAddressMintInfo ¶
func GetAddressMintInfo(url string, addr, assetName string) (rsp *AddressMintInfoRsp, err error)
type AssetInfoResult ¶
type AssetInfoResult struct { Id string `json:"id"` Symbol string `json:"symbol"` Precision int64 `json:"precision"` Issuer string `json:"issuer"` CreateAddr string `json:"create_addr"` Options struct { MaxSupply interface{} `json:"max_supply"` MaxPerMint interface{} `json:"max_per_mint"` CreateTime string `json:"create_time"` Brc20Token bool `json:"brc20_token"` MintInterval int64 `json:"mint_interval"` MaxMintCountLimit interface{} `json:"max_mint_count_limit"` MarketFeePercent int64 `json:"market_fee_percent"` MaxMarketFee interface{} `json:"max_market_fee"` IssuerPermissions int64 `json:"issuer_permissions"` Flags int64 `json:"flags"` } `json:"options"` DynamicData struct { CurrentSupply interface{} `json:"current_supply"` CurrentNBits uint32 `json:"current_nBits"` } `json:"dynamic_data"` }
type AssetInfoRsp ¶
type AssetInfoRsp struct { Id int `json:"id"` Result AssetInfoResult `json:"result"` Error interface{} `json:"error"` }
func GetAssetInfo ¶
func GetAssetInfo(url string, assetName string) (rsp *AssetInfoRsp, err error)
type BindingAccountResult ¶
type BindingAccountResult struct { Id string `json:"id"` Owner string `json:"owner"` ChainType string `json:"chain_type"` BindAccount string `json:"bind_account"` }
func GetBindingAccount ¶
func GetBindingAccount(url string, addr string, asset string) ([]BindingAccountResult, error)
type BindingAccountRsp ¶
type BindingAccountRsp struct { Id int `json:"id"` Result []BindingAccountResult `json:"result"` Error interface{} `json:"error"` }
type BroadcastTxRsp ¶
type DepositAddressResult ¶
type DepositAddressResult struct { Id string `json:"id"` ChainType string `json:"chain_type"` BindAccountHot string `json:"bind_account_hot"` RedeemScriptHot string `json:"redeemScript_hot"` BindAccountCold string `json:"bind_account_cold"` RedeemScriptCold string `json:"redeemScript_cold"` EffectiveBlockNum int `json:"effective_block_num"` EndBlock int64 `json:"end_block"` }
func GetDepositAddress ¶
func GetDepositAddress(url string, asset string) (*DepositAddressResult, error)
type DepositAddressRsp ¶
type DepositAddressRsp struct { Id int `json:"id"` Result DepositAddressResult `json:"result"` Error interface{} `json:"error"` }
type HttpClient ¶
type HttpClient struct {
Timeout int64
}
type InfoResult ¶
type InfoResult struct {
ChainId string `json:"chain_id"`
}
type InfoRsp ¶
type InfoRsp struct { Id int `json:"id"` Result InfoResult `json:"result"` Error interface{} `json:"error"` }
type RefBlockInfoRsp ¶
type WithdrawAllData ¶ added in v0.1.5
type WithdrawAllData struct {
Result [][]interface{} `json:"result"`
}
type WithdrawOp ¶ added in v0.1.5
type WithdrawOp struct { Fee struct { Amount int `json:"amount"` AssetId string `json:"asset_id"` } `json:"fee"` WithdrawAccount string `json:"withdraw_account"` Amount string `json:"amount"` AssetSymbol string `json:"asset_symbol"` AssetId string `json:"asset_id"` CrosschainAccount string `json:"crosschain_account"` Memo string `json:"memo"` }
type WithdrawTransaction ¶ added in v0.1.5
type WithdrawTransaction struct { RefBlockNum interface{} `json:"ref_block_num"` RefBlockPrefix interface{} `json:"ref_block_prefix"` Expiration string `json:"expiration"` Operations [][]interface{} `json:"operations"` Extensions []interface{} `json:"extensions"` Nonce int `json:"nonce"` Signatures []string `json:"signatures"` }
Click to show internal directories.
Click to hide internal directories.