Documentation
¶
Overview ¶
Package dogecoin provides Dogecoin network configuration parameters Registers Dogecoin MainNet, TestNet, and RegressionNet chain configs
dogecoin 包提供狗狗币网络配置参数 注册狗狗币主网、测试网和回归测试网链配置
Index ¶
Constants ¶
const ( // MinDustOutput represents hard dust limit (0.001 DOGE) // Outputs below this value are invalid and rejected // Reference: https://github.com/dogecoin/dogecoin/blob/master/doc/fee-recommendation.md // // MinDustOutput 代表硬性灰尘限制(0.001 DOGE) // 低于此值的输出无效且会被拒绝 // 参考:https://github.com/dogecoin/dogecoin/blob/master/doc/fee-recommendation.md MinDustOutput = 100000 // SoftDustLimit represents soft dust threshold (0.01 DOGE) // Outputs below this value require extra 0.01 DOGE fee per output // Reference: https://github.com/dogecoin/dogecoin/blob/master/doc/fee-recommendation.md // // SoftDustLimit 代表弹性灰尘限制(0.01 DOGE) // 低于此值的输出需要每个输出额外支付 0.01 DOGE // 参考:https://github.com/dogecoin/dogecoin/blob/master/doc/fee-recommendation.md SoftDustLimit = 1000000 // ExtraDustsFee represents extra fee charged per soft dust output (0.01 DOGE) // Applied at all txrules.FeeForSerializeSize calls to account for soft dust // // ExtraDustsFee 代表每个软灰尘输出额外收取的费用(0.01 DOGE) // 应用于所有 txrules.FeeForSerializeSize 调用以计入软灰尘费用 ExtraDustsFee = 1000000 )
Variables ¶
var MainNetParams = chaincfg.Params{ Name: "mainnet", Net: 0xc0c0c0c0, PubKeyHashAddrID: 30, ScriptHashAddrID: 22, PrivateKeyID: 158, HDPrivateKeyID: [4]byte{0x02, 0xfa, 0xc3, 0x98}, HDPublicKeyID: [4]byte{0x02, 0xfa, 0xca, 0xfd}, Bech32HRPSegwit: "doge", }
MainNetParams represents chain configuration for Dogecoin mainnet Includes network magic, address encoding, and HD wallet parameters
MainNetParams 代表狗狗币主网的链配置 包含网络标识、地址编码和 HD 钱包参数
var RegressionNetParams = chaincfg.Params{ Name: "regtest", Net: 0xfabfb5da, PubKeyHashAddrID: 111, ScriptHashAddrID: 196, PrivateKeyID: 239, HDPrivateKeyID: [4]byte{0x04, 0x35, 0x83, 0x94}, HDPublicKeyID: [4]byte{0x04, 0x35, 0x87, 0xcf}, Bech32HRPSegwit: "dogert", }
RegressionNetParams represents chain configuration for Dogecoin regression testing network Uses custom network magic to avoid collision with Bitcoin RegTest
RegressionNetParams 代表狗狗币回归测试网络的链配置 使用自定义网络标识以避免与比特币回归测试网冲突
var TestNetParams = chaincfg.Params{ Name: "testnet", Net: 0xfcc1b7dc, PubKeyHashAddrID: 113, ScriptHashAddrID: 196, PrivateKeyID: 241, HDPrivateKeyID: [4]byte{0x04, 0x35, 0x83, 0x94}, HDPublicKeyID: [4]byte{0x04, 0x35, 0x87, 0xcf}, Bech32HRPSegwit: "doget", }
TestNetParams represents chain configuration for Dogecoin testnet Includes test network magic, address encoding, and HD wallet parameters
TestNetParams 代表狗狗币测试网的链配置 包含测试网络标识、地址编码和 HD 钱包参数
Functions ¶
This section is empty.
Types ¶
type DustFee ¶
DustFee type alias from internal dusts package DustFee 来自 internal dusts 包的类型别名
func NewDogeDustFee ¶
func NewDogeDustFee() DustFee
NewDogeDustFee creates DustFee configuration with Dogecoin soft dust rules Configures soft dust threshold and extra fee based on Dogecoin specification Reference: https://github.com/dogecoin/dogecoin/blob/b4a5d2bef20f5cca54d9c14ca118dec259e47bb4/doc/fee-recommendation.md Dogecoin defines soft and hard dust limits - hard dust rejected, soft dust charged extra fee
NewDogeDustFee 创建使用狗狗币软灰尘规则的 DustFee 配置 根据狗狗币规范配置软灰尘阈值和额外费用 参考:https://github.com/dogecoin/dogecoin/blob/b4a5d2bef20f5cca54d9c14ca118dec259e47bb4/doc/fee-recommendation.md 狗狗币定义软灰尘和硬灰尘限制 - 硬灰尘会被拒绝,软灰尘会收取额外费用
type DustLimit ¶
DustLimit type alias from internal dusts package DustLimit 来自 internal dusts 包的类型别名
func NewDogeDustLimit ¶
func NewDogeDustLimit() *DustLimit
NewDogeDustLimit creates DustLimit with Dogecoin hard dust detection rules Uses simple constant comparison independent of fee rate Outputs below MinDustOutput are considered dust and rejected
NewDogeDustLimit 创建使用狗狗币硬灰尘检测规则的 DustLimit 使用独立于费率的简单常量比较 低于 MinDustOutput 的输出被视为灰尘并拒绝