Documentation
¶
Index ¶
Constants ¶
View Source
const ( MagicAddressForZeroEVM = "0x0000000000000000000000000000000000000000" MagicContactAddressForNative = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" MagicContactAddressForNativeTRX = "TXka46PPwttNPWfFDPtt3GUodbPThyufaV" MagicContactAddressForNativeSOL = "So11111111111111111111111111111111111111112" MagicNumberForMaxAmount = "115792089237316195423570985008687907853269984665640564039457584007913129639935" )
Magic sentinel addresses used to denote a chain's native asset (as opposed to a token contract) when building transfers.
View Source
const ( TxTypeTransfer = "0" TxTypeMint = "1" TxTypeBurn = "2" TxTypeContractCall = "3" TxTypeAccountActivate = "4" TxTypeKrc20Commit = "5" TxTypeKrc20Reveal = "6" )
Transaction kinds understood by the per-chain transaction builders.
View Source
const ( FamilyOfNone = 0 FamilyOfEVM = 1 FamilyOfUTXO = 2 FamilyOfCOSMOS = 3 FamilyOfSUBSTRATE = 4 FamilyOfTRX = 5 FamilyOfKAS = 6 FamilyOfSOL = 7 FamilyOfAPT = 8 FamilyOfSUI = 9 FamilyOfEGLD = 10 )
Chain family identifiers, grouping chains that share an address/signature scheme.
Variables ¶
View Source
var Validator = validator.New()
Functions ¶
Types ¶
type AccountHandler ¶
type TxBuilderHandler ¶
type UtxoInfo ¶
type UtxoInfo struct {
Hash string `json:"hash" validate:"required,hex_str"`
Script string `json:"script" validate:"required,hex_str"`
Index string `json:"index" validate:"required,u64"`
Value string `json:"value" validate:"required,u64_gt0"`
Version string `json:"version,omitempty" validate:"omitempty,u64"`
IsCoinbase string `json:"isCoinbase,omitempty" validate:"omitempty,bool_str"`
BlockDAAScore string `json:"blockDAAScore,omitempty" validate:"omitempty,u64"`
}
type UtxoList ¶
type UtxoList struct {
List []*UtxoInfo `json:"list" validate:"required,min=1,dive"`
}
func NewUtxoList ¶
func NewUtxoList() *UtxoList
func (*UtxoList) AddUtxoInfo ¶
func (*UtxoList) SelectUtxo ¶
func (*UtxoList) SerializeFromStr ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
substratesdk/gethrpc
Package rpc implements bi-directional JSON-RPC 2.0 on multiple transports.
|
Package rpc implements bi-directional JSON-RPC 2.0 on multiple transports. |
Click to show internal directories.
Click to hide internal directories.