Commit graph

64 commits

Author SHA1 Message Date
Andrea Maria Piana d84da4f515 Fix some tests and restore private/public RPC client 2021-07-20 10:57:38 +02:00
Andrea Maria Piana 4b0daeb47b Move services to status-node
Move all the services to status-node, as some of them were there, some
of them were in the geth backend and scattered around.
2021-07-20 10:57:38 +02:00
Shivek Khurana 81171ad9e6
Expose password reset function (#2223)
Handled edge-cases
2021-06-23 14:51:21 +05:30
Andrea Maria Piana 566e9a3ade remove nimbus 2021-05-21 07:22:58 +02:00
RichΛrd 244686e3a8
add GetNodeConfig() function to backend API (#2216) 2021-04-29 15:22:10 -04:00
Andrea Maria Piana ddc93981a7 Add V4 endpoints 2021-04-19 14:49:28 +02:00
Roman Volosovskyi f3ee49c110
[wallet] cleanup 2021-04-08 23:30:27 +03:00
Andrea Maria Piana b1a1a223c2
Add export/import methods 2021-01-26 09:39:54 +01:00
Samuel Hawksby-Robinson 193ab30ada Refactor injecting multiaccounts into messenger and service 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson fcbd9285f6 Implemented API for full CRD of IdentityImages 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson c8450586fd Moved profile image handling into geth_backend 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 38043c2cb9 import fix 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 3b7fbf94d3 Added SaveProfileImage endpoint
Also added EncodeToBestSize func
2020-12-17 14:10:00 +01:00
Roman Volosovskyi 002f9a5597
[wallet] Reduce number of RPC requests
- Wallet service is not started on foreground event on status-go side
  anymore, it leaves a client side opportunity to decide whether new
  blocks should be watched.
- `watchNewBlocks` parameter is added to `StartWallet`.
- Some requests are removed/moved to the place where they are necessary.
2020-11-25 12:20:23 +02:00
Andrea Maria Piana 40343b3140 Remove unused onboarding code
Fixes: #1539
Fixes: #1538

Unused code from onboarding
2020-11-03 11:18:05 +01:00
Gheorghe Pinzaru d04e54e54e
Local notifications service (#2026)
Also adds implementation for eth transactions notifications
2020-10-28 10:56:14 +03:00
Roman Volosovskyi aa1b898fe4 Stop/start wallet methods 2020-08-17 12:53:37 +02:00
Roman Volosovskyi 0b3cdf7362
DeleteMultiaccount method 2020-07-13 16:20:02 +03:00
Roman Volosovskyi 6d5a93287b
Separate keystore directory per multiacc
This commit provides `MigrateKeyStoreDir` method which moves multiacc's
keys from a common keystore directory to multiacc specific directory.
2020-07-09 12:41:47 +03:00
Samuel Hawksby-Robinson 157f20a7c8
Added link to specs for key compression API (#1995) 2020-06-24 14:39:42 +01:00
Samuel Hawksby-Robinson c8f9dad554
Feature/key compression (#1990)
## What has changed?

I've introduced to the public binding functionality that will compress and decompress public keys of a variety of encoding and key types. This functionality supports all major byte encoding formats and the following EC public key types:

- `secp256k1` pks
- `bls12-381 g1` pks
- `bls12-381 g2` pks

## Why make the change?

We want shorter public (chat) keys and we want to be future proof and encoding agnostic. See the issue here https://github.com/status-im/status-go/issues/1937

---

* Added basic signature for compresspk and uncompresspk

* Added basic encoding information

* make vendor

* formatted imports for the linter

* Reformatted imports hoping linter likes it

* This linter is capricious

* Added check that the secp256k1 key is valid

* Added test for valid key

* Added multiformat/go-varint dep

* Added public key type handling

* Added key decompression with key type handling

* Added handling for '0x' type indentifying

* Added more robust testing

* Less lint for the linting gods

* make vendor for bls12_381

* Added bls12-381 compression tests

* Added decompress key expected results

* Refactor of typed and untyped keys in tests

* Lint god appeasment

* Refactor of sample public keys

* Implemented bls12-381 decompression

* gofmt

* Renamed decode/encode funcs to be more descriptive

* Added binary bindings for key de/compression

* Refactor of func parameters

gomobile is a bit tempermental using raw bytes as a parameter, so I've decided to use string only inputs and outputs

* gofmt

* Added function documentation

* Moved multiformat de/compression into api/multiformat ns

* Moved multiformat de/compression into api/multiformat ns

* Changed compress to serialize on API
2020-06-23 11:47:17 +01:00
Andrea Maria Piana b8d64cbb1e Generate bindings dynamically
Before we had two directories `lib/` and `mobile/` that generated
respectively the bindings for desktop and ios/android.

This needed to be kept in sync and there was a fair amount of code
duplication, plus some missing methods on one or the other side.

I have made a change so the whole `lib/` namespace is generated by
parsing the `AST` of `mobile`, and bindings are generated before
compiling.
2020-06-03 11:07:04 +02:00
Adam Babik 2169a27454
Clarify situation between lib and mobile (#1909) 2020-03-24 11:22:55 +01:00
Adam Babik f335d1cf7e
Prevent starting node without APIModules (#1876) 2020-02-26 20:35:47 +01:00
Andrea Maria Piana 141f917e7c
Initialize protocol when waku active (#1832) 2020-02-17 15:38:59 +01:00
Pedro Pombeiro 6537cae606 Nimbus node support 2020-01-20 13:15:17 +01:00
Pedro Pombeiro c0c963bdaa Use eth-node keystore for generator.go 2020-01-06 15:45:31 +01:00
Pedro Pombeiro c8a911ebd1 Use goimports instead of gofmt 2020-01-06 10:17:23 +01:00
yenda 024f30f0b9 Put settings in a table with schema (#1746)
Move settings table schema from a key-value store to a one row table with many columns.

We now save the first row with initial data in saveAccountAndLogin and follow up saveSetting calls are only saving one setting at a time.

Co-authored-by: Adam Babik <a.babik@designfortress.com>
2019-12-27 10:58:25 +01:00
yenda 655031616c
fix 1741 (#1742)
* fix 1741

save accounts with SaveAccountAndStartNodeWithKey

* initialize keycard accountManager with the proper addresses
2019-12-18 16:09:04 +01:00
acolytec3 2d2f2fbc51 Add ValidateMnemonic method (#1713) 2019-12-16 14:55:02 +01:00
Roman Volosovskyi 4c0d8dedea
Replace address with keyUid in accounts db
Account's address was used as a primary key in accounts db and as a
deterministic id of an account in some API calls. Also it was used as a
part of the name of the account specific database. This revealed some
extra information about the account and wasn't necessary.
At first the hash of the address was planned to be used as a
deterministic id, but we already have a keyUid which is calculated as
sha256 hash of account's public key and has similar properties:
- it is deterministic
- doesn't reveal accounts public key or address in plain
2019-12-09 11:20:12 +02:00
Pedro Pombeiro 26b6d7c36a Create a home submodule for Eth node bridges- Rename StatusBackend to GethStatusBackend 2019-11-27 17:02:09 +01:00
Pedro Pombeiro ed5a5c154d
Move to monorepo structure (#1684)
Move to a monorepo structure with submodules

- Rename status-protocol-go to status-go/protocol
2019-11-21 17:19:22 +01:00
Pedro Pombeiro 6ce437255e Remove FCM implementation 2019-11-17 17:54:55 +01:00
Andrea Maria Piana 9a3ed980c9
Generate gfycat and identicon in status-protocol-go (#1611) 2019-09-26 09:01:17 +02:00
Dmitry Shulyak 63dcdd4e94 Statefull login with keycard (#1587) 2019-09-02 21:03:15 +02:00
Dmitry cf3dc0664c Make stop node part of the logout blocking 2019-08-27 16:23:52 +03:00
Dmitry Shulyak be9c55bc16
Accounts data management (#1530)
* WIP accounts implementation

* Accounts datasore and changes to status mobile API

* Add library changes and method to update config

* Handle error after account selection

* Add two methods to start account to backend

* Use encrypted database for settings and add a service for them

* Resolve linter warning

* Bring back StartNode StopNode for tests

* Add sub accounts and get/save api

* Changes to accounts structure

* Login use root address and fetch necessary info from database

* Cover accounts store with tests

* Refactor in progress

* Initialize status keystore instance before starting ethereum node

* Rework library tests

* Resolve failures in private api test and send transaction test

* Pass pointer to initialized config to unmarshal

* Use multiaccounts/accounts naming consistently

Multiaccount is used as a login identifier
Account references an address and a key, if account is not watch-only.

* Add login timestamp stored in the database to accounts.Account object

* Add photo-path field for multiaccount struct

* Add multiaccoutns rpc with updateAccount method

Update to any other account that wasn't used for login will return an error

* Fix linter in services/accounts

* Select account before starting a node

* Save list of accounts on first login

* Pass account manager to accounts service to avoid selecting account before starting a node

* Add logs to login with save and regualr login
2019-08-20 18:38:40 +03:00
Andrea Maria Piana cb769ccca9 Revert "Initialize status keystore instance before starting ethereum node"
This reverts commit 476240fbd1.
2019-08-05 16:03:18 +02:00
Dmitry 476240fbd1 Initialize status keystore instance before starting ethereum node 2019-08-01 11:01:02 +03:00
Andrea Franz acfe9a721c
Multi account login (#1525)
* multi-account login and signing

put methods count threshold back to 20

* validate login params

* refactoring

* use common.Address

* remove unused var in test
2019-07-26 16:45:10 +02:00
Andrea Franz 2b96aa5456
add multi-account LoadAccount, ImportMnemonic, and Reset functions (#1542)
* add multi-account LoadAccount and Reset functions

* add MultiAccountImportMnemonic

* rename StoreDerived to StoreDerivedAccounts

* add docs
2019-07-26 11:33:38 +02:00
Andrea Franz dcb0fa5262
add multi-account support (#1500)
* add multiaccount support

add multi account ImportPrivateKey and StoreAccount

test derivation from normal keys

* add multiaccount to mobile pkg

* use multiaccount params structs from the mobile pkg

* move multiaccount tests together with the other lib tests

* fix codeclimate warning and temporarily increase methods threshold

* split library_test_utils.go to avoid linter warnings
2019-07-24 20:59:15 +02:00
Andrea Maria Piana 3a1e244bdf
Restore installation endpoints (#1509) 2019-07-01 15:15:13 +02:00
Andrea Franz dd17860302
create random accounts in memory for onboarding (#1464)
* add account onboarding struct

* add onboarding to account manager

* allow resetting onboarding

* add onboarding functions to lib and mobile

* fix lint warnings

* update mnemonic test

* remove unused fmt

* reset onboarding before selecting account

* expose ResetOnboaring to lib and mobile

* refactoring

* add comment

* update StartOnboarding function

* remove unused var

* update VERSION

* fix returned accounts slice
2019-06-27 00:28:16 +02:00
Andrea Maria Piana 5335a2b4fd
Move installations to status-go (#1499)
* Move installations to status-go

This commit moves installations management/storage to status-go.
We remove the native binding and provide RPC endpoints to set the
metadata and return a list of our own installations.
2019-06-26 11:32:59 +02:00
Andrea Maria Piana f6fba1d3d6 Publish contact code periodically 2019-06-19 17:38:45 +02:00
Andrea Maria Piana 1aa3e2812a Add support for partitioned topic 2019-06-19 17:38:45 +02:00
Andrea Franz 28ec255d77
fix HashMessage to decode hex only if needed (#1450)
* hash message expects a string and not a hex string

* refactor HashMessage

* swap returned values
2019-04-30 01:26:41 +02:00