// 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 }