Versions in this module Expand all Collapse all v0 v0.0.1 Sep 6, 2021 Changes in this version + const PREFIX_MAINNET + const PREFIX_TESTNET + func GetLockScriptArgsFromShortAddress(address string) (string, error) + func GetShortAddressFromLockScriptArgs(args string, isTestNet bool) (string, error) + type CkbWalletObj struct + LockScript *types.Script + Secp256k1Key *secp256k1.Secp256k1Key + SystemScripts *utils.SystemScripts + func InitCkbWallet(privateKeyHex string, systemScript *utils.SystemScripts) (*CkbWalletObj, error) + type EllipticCurve struct + A *big.Int + B *big.Int + G Point + H *big.Int + N *big.Int + P *big.Int + func (ec *EllipticCurve) Add(P, Q Point) (R Point) + func (ec *EllipticCurve) Decompress(x *big.Int, ylsb uint) (P Point, err error) + func (ec *EllipticCurve) IsInfinity(P Point) bool + func (ec *EllipticCurve) IsOnCurve(P Point) bool + func (ec *EllipticCurve) ScalarBaseMult(k *big.Int) (Q Point) + func (ec *EllipticCurve) ScalarMult(k *big.Int, P Point) (Q Point) + type HexStrObj struct + func (hs *HexStrObj) Bytes() []byte + type NewWalletObj struct + AddressHex string + PriKeyHex string + PubKeyHex string + func CreateCKBWallet(isTestNet bool) (*NewWalletObj, error) + func (n *NewWalletObj) Json() string + type Point struct + X *big.Int + Y *big.Int + type PrivateKey struct + D *big.Int + func GenerateKey(rand io.Reader) (priv PrivateKey, err error) + func NewPrivateKey(d *big.Int) *PrivateKey + func (priv *PrivateKey) ToBytes() (b []byte) + type PublicKey struct + func (pub *PublicKey) ToBytes() (b []byte) + func (pub *PublicKey) ToBytesUncompressed() (b []byte)