func parseSeed(s string) *crypto.RootDeterministicKey { seed, err := crypto.NewRippleHashCheck(s, crypto.RIPPLE_FAMILY_SEED) checkErr(err) key, err := crypto.GenerateRootDeterministicKey(seed.Payload()) checkErr(err) return key }
// Expects address in base58 form func NewRegularKeyFromAddress(s string) (*RegularKey, error) { hash, err := crypto.NewRippleHashCheck(s, crypto.RIPPLE_ACCOUNT_ID) if err != nil { return nil, err } var regKey RegularKey copy(regKey[:], hash.Payload()) return ®Key, nil }
// Expects address in base58 form func NewAccountFromAddress(s string) (*Account, error) { hash, err := crypto.NewRippleHashCheck(s, crypto.RIPPLE_ACCOUNT_ID) if err != nil { return nil, err } var account Account copy(account[:], hash.Payload()) return &account, nil }