Commit graph

137 commits

Author SHA1 Message Date
antiochp
caea305587
revert CbData changes
mining node calls build_coinbase and this needs to be consistent with grin node
2019-08-19 16:58:13 +01:00
antiochp
ec3d08a710
translate to/from TransactionV2 correctly in owner api and foreign api 2019-08-19 16:35:54 +01:00
Yeastplume
a58cae651e
Add init_api_secure function (#206)
* adding initial version of init_secure_api

* rustfmt

* fix ECDH algo

* rustfmt

* trying to figure out best way of doing encryption

* refactor secure requests and responses into json-rpc responses, with base64 payload for encrypted messages

* rustfmt

* return proper errors from encrypted api, include tests covering encrypted API error cases

* rustfmt

* add test for normal error (unencrypted)

* rustfmt

* change ports for test, add foreign listener to V2 sanity tests, add ability to select owner api port via command line

* rustfmt

* turn it to 11

* explicit teardown after rpc tests

* update tests with explicit teardowns

* update tests to perform explicit teardown

* fix warnings, ensure all tests teardown

* log output to diagnose CI windows build failures

* disable owner api doctests on windows

* rustfmt
2019-08-19 13:05:21 +01:00
Yeastplume
f8c316a351
Store XORed wallet seed in-mem (#200)
* experimental xor token work

* rustfmt

* test implementation of build_coinbase_t function

* rustfmt

* add separate foreign_rpc_s interface for secure functions

* rustfmt

* rustfmt

* fix http scheme to allow https as well

* add tokenized owner API, modify all functions to use token

* rustfmt

* fix for api doctests, tests passing up to api crate

* rustfmt

* controller crate compilation

* rustfmt

* controller tests passing and modified some to use masked keychains

* rustfmt

* fix wallet tests

* rustfmt

* build from github

* rustfmt
2019-08-06 12:50:41 +01:00
Antioch Peverell
5cdd412205 use VersionedSlate for the owner_rpc api (#202) 2019-08-06 11:34:59 +01:00
Yeastplume
c40e8a915b
Merge milestone/2.1.0 into master (#199)
* version bump for next potential release

* Merge master into milestone/2.1.0 (#182)

* Derive --version output dynamically from cargo package version (#174)

* add --txid to the `wallet txs` command (#176)

* add --txid to the `wallet txs` command

* add test for `wallet txs` command with `--txid` parameter

* Refactor - Split WalletCommAdapter into multiple traits (#180)

* Derive --version output dynamically from cargo package version (#174)

* add server auth argument to http client

* Revert "add server auth argument to http client"

This reverts commit f52a8d2c7c.

* modify WalletCommAdapter, moving dest argument into fields on implementors,
visiting havok on automated tests, at least one of which is now out of date and failing

* Split WalletCommAdapter into four traits, one for each of its intended behaviors.

* Remove two vestigals
1. args, a stringly typed argument to put_tx
2. NullAdapter, which is no longer used

* Remove unused "params" argument from listen method.

* Re-add previously existing TODO comment

* Fix non-test build

* completely Fix non-test build

* Full Lifecycle API Support (#184)

* refactoring wallet lib traits

* rustfmt

* rustfmt

* add new files

* explicit lifetime specifiers on all wallet traits

* rustfmt

* modify apis to use new walletinst

* rustfmt

* converting controller crate

* rustfmt

* controller crate compiling

* rustfmt

* compilation

* rustfmt

* Remove config from wallet, implement open_wallet, close_wallet in lifecycle provider, remove password + open_with_credentials from WalletBackend + impl

* rustfmt

* full compilation, changing recovery + init to new model

* rustfmt

* wallet initialisation working, init command output and flow identical to v2.0.0 wallet

* rustfmt

* fix listener and owner api startup

* rustfmt

* rustfmt

* move encryption test

* rustfmt

* fix api doctests

* rustfmt

* fix for most tests in controller crate

* rustfmt

* fix for check tests in controller crate

* fix main wallet tests

* rustfmt

* add explicit functions to handle mnemonic recovery, fix CLI recovery workflow

* rustfmt

* update keybase adapter to use new wallet format

* rustfmt

* test fix

* remove debug output
2019-07-29 13:25:03 +01:00
Yeastplume
f7c17c4ba9
update version number for next potential release 2019-07-01 14:44:22 +01:00
Yeastplume
c12f61d154
bump version number for release 2019-07-01 11:05:36 +01:00
Yeastplume
64e8c48c35
Merge 2.0.0 branch into master (#164)
* create 2.0.0 branch

* V0/V1 Slate Removal + Grin Header Version Bump (#140)

* Remove V0 and V1 Slates from Wallet

* rustfmt

* V1 API + V2 wallet to wallet impl (#144)

* remove v1 API

* rustfmt

* convert http adapter to use V2 api

* rustfmt

* V2 API conversion Pt2 - Check version (#146)

* call check_version on wallet before http send

* rustfmt

* Support new Bulletproof rewind scheme (#122)

* Restore with LegacyProofBuilder

* Switch to ProofBuilder at HF block

* Switch proof builder for coinbase outputs at hard fork

* Use valid_header_version to switch proof builder

* Fix compilation errors

* Use legacy proof builder for AutomatedTesting chain type

* Add macro to avoid duplicate code

* Read version info from server, react accordingly (#154)

* read and parse version, bump hf

* rustfmt

* add foreign api middleware check

* rustfmt

* add middleware checks

* rustfmt

* add check for incoming pre-hf slates

* api tests

* Add double rewind period (#155)

* Add double rewind period

* Simplify restore

* Fix comment

* bump imported version for beta release

* version bump for next (potential) release

* Provide more specific error when other wallet is outdated (#162)

* add appropriate error message when other wallet is out of date

* rustfmt

* missing cargo.lock
2019-06-27 10:41:05 +01:00
Yeastplume
c7a00478aa
fix future version number 2019-06-06 00:12:08 +01:00
Yeastplume
a1f2e1f2eb
update version for master maintenance 2019-06-05 23:51:07 +01:00
Yeastplume
ea4849a05f
fixes and version update for final 1.0.0 build 2019-06-05 22:35:11 +01:00
Gary Yu
36ab785589
cargo.lock crate version update, and remove 3 build warning from cargo 1.35.0 2019-06-01 10:46:45 +08:00
Yeastplume
9a7243fddd
version bump for beta.4 2019-05-31 08:41:20 +01:00
Yeastplume
b1738e33ed
Changes for 1.1.0 -> 2.0.0 Deployment strategy decisions (#126)
* make slate v0 the default for regular sends

* add block_header_version to slate

* update doc tests for latest grin version

* rustfmt

* HACF if HF height detected

* rustfmt
2019-05-31 08:33:23 +01:00
Yeastplume
af16dea6e1
Version Info API Function tweak, remove 'min_compat_version' from slate (#123)
* change slate version function to return list of supported slate formats

* rustfmt

* remove min_compat_version
2019-05-30 09:34:04 +01:00
Gary Yu
ad59c601e7 change the api repository to grin-wallet instead of grin (#118) 2019-05-24 15:43:05 +01:00
Yeastplume
85b55f5ca7
Add participant ID as part of key to stored private transaction context data (#117)
* add participant_id to saved tranasction context data

* rustfmt?

* change participant id for command line pay command
2019-05-23 16:27:57 +01:00
Yeastplume
e25c93161e
Updates for 1.1.0-beta.3 release (#106)
* bump version number and build from tag for beta 3 release

* update for latest grin tag
2019-05-16 10:50:31 +01:00
Yeastplume
45750c8837
docstring update and provide a bit of a readme (#104) 2019-05-16 09:17:54 +01:00
Yeastplume
3a3057defb
[WIP] Invoiced Transactions API Support (#90)
* basic invoiced tx working

* rustfmt

* teardown

* rustfmt

* rename, new struct for invoice args, begin to add new functions to RPC apis

* rustfmt

* add fns to rpc api

* rustfmt

* owner api functions RPC documentation in place

* rustfmt

* doctests for new invoicing functions

* rustfmt

* test fixes

* update documentation and doctests

* rustfmt

* invoice testing verification of tx log output

* rustfmt
2019-05-01 20:12:23 +01:00
Gary Yu
e509405b8a
Revert "Merge branch 'master' into master"
This reverts commit a63f2c7cea, reversing
changes made to d774272fee.
2019-04-25 14:59:45 +08:00
Gary Yu
a63f2c7cea
Merge branch 'master' into master 2019-04-25 14:45:43 +08:00
Yeastplume
d774272fee
Add check_version function to Foreign API (#87)
* move api deser types into separate types mod

* rustfmt

* missing types file

* make all exports from libwallet more explicit

* rustfmt

* add version check function to foreign api

* rustfmt

* change check_version return value to result, for consistency
2019-04-24 09:27:14 +01:00
Andrew Dirksen
bff07eb3f5 fix #88 (#89) 2019-04-24 09:26:52 +01:00
Yeastplume
47ee03cadd
V2 slate versioning enablement (#85)
* fix for command line listener port override

* reduce parameter query size

* Add slate versioning

* rustfmt

* bump version number

* Add tests for slate version conversion

* rustfmt

* Updates and test addition based on bdap's review

* rustfmt
2019-04-23 11:29:59 +01:00
Gary Yu
12909c9262
Store payment outputs in wallet database (#1)
* store receiver's output into the sender's database

* rustfmt

* payment output refresh

* fix the test code in libwallet

* rustfmt

* fix wallet_command_line test

* modify the warning message for self sending

* a bit of unit test according to review comments

* display unknown value for the case of multiple outputs on single receiver, normally it's not the case of this wallet implementation

* rustfmt

* fix merge missing parts

* rustfmt

* use PaymentCommitMapping struct instead of a tuple

* rustfmt

* fix the test

* fix the owner api rpc test
2019-04-22 12:40:58 +08:00
Yeastplume
f56e091d11
remove readme references for crates.io 2019-04-03 16:44:10 +01:00
Yeastplume
844822e430
increment version number for crates.io 2019-04-03 14:50:44 +01:00
Yeastplume
4bbce85b75
V2 API Enabling (#33)
* node height return value and documentation

* rustfmt

* add parameter struct for initiate tx functions

* rustfmt

* change tx estimate to use InitTxArgs

* rustfmt

* transaction estimate

* rustfmt

* initiate tx args fixed

* add send args to init

* rustfmt

* last owner api documentation

* api 2 wiring

* rustfmt

* wiring in V2 JSON-RPC API

* rustfmt

* some documentation on endpoint

* shorten endpoints
2019-04-01 11:16:49 +01:00
Yeastplume
427f42c552
Final Owner API Changes (#32)
* node height return value and documentation

* rustfmt

* add parameter struct for initiate tx functions

* rustfmt

* change tx estimate to use InitTxArgs

* rustfmt

* transaction estimate

* rustfmt

* initiate tx args fixed

* add send args to init

* rustfmt

* last owner api documentation
2019-03-29 16:00:02 +00:00
Yeastplume
7b8fe92f53
Foreign API documentation and small cleanup (#31)
* verify slate messages documentation

* rustfmt

* foreign API documentation

* rustfmt
2019-03-29 08:46:12 +00:00
Yeastplume
afa6003a8b
V2 Foreign API RPC Tests (#28)
* build_coinbase api doctest

* rustfmt

* foreign api recieve tx rpc

* rustfmt

* re-export grin dependencies

* re-export grin dependencies

* all foreign API rpc tests working
2019-03-26 16:02:31 +00:00
Yeastplume
94960b3edd
[WIP] V2 API Doctest generation (#24)
V2 API Doctest generation
2019-03-22 12:03:25 +00:00
Yeastplume
db015960a9
APIV2 refactoring (#23)
* continue refactor

* rustfmt

* further refactoring

* impl crate compiling

* main crate compilation

* rustfmt

* test fix

* rustfmt

* test compilation

* rustfmt

* refwallet tests passing

* rustfmt

* all tests passing

* move http listener startup out of adapter

* rustfmt

* rename refwallet->controller

* rustfmt

* travis tests and api doctests

* rustfmt
2019-03-17 19:14:58 +00:00
Yeastplume
8cca9821bd
Remove callbacks from transaction API functions (#22)
* remove callbacks from transaction creation

* rustfmt

* add missing functions to owner api rpc

* comment fix
2019-03-14 15:05:13 +00:00
Yeastplume
baa5e46d7d
Refactor crate names, API Crate refactor (#20)
* refactor/rename api crate contents, make crate naming consistent (all starting with grin_wallet)

* refactor/rename api crate contents, make crate naming consistent (all starting with grin_wallet)

* fix rpc api tests

* rustfmt

* done refactor

* rustfmt

* travis CI fixes
2019-03-14 12:06:03 +00:00