Mark Spanbroek
f7d06a995b
Rename: PrivateKey -> EthPrivateKey, PublicKey -> EthPublicKey
2021-04-07 09:15:26 +02:00
Mark Spanbroek
6d75ca5948
Wallet exposes its public key
2021-04-06 13:49:06 +02:00
Mark Spanbroek
469a8d4154
JSON serialization of signed states
2021-04-06 12:25:47 +02:00
Mark Spanbroek
aa744f4d6f
Remove unused import
2021-04-06 11:34:41 +02:00
Mark Spanbroek
bd75f78244
By default, return balance of wallet address
2021-03-22 15:48:04 +01:00
Mark Spanbroek
85ff1d3835
Payment is not accepted when there are unexpected changes in state
2021-03-22 15:23:31 +01:00
Mark Spanbroek
f5022a6ee1
Do not allow channels with same id as existing channel
2021-03-22 14:43:09 +01:00
Mark Spanbroek
28c0f9b076
Remove superfluous tuple from signatures
2021-03-22 14:23:14 +01:00
Mark Spanbroek
b797a53e32
Accepting payments
2021-03-22 14:04:28 +01:00
Mark Spanbroek
40b4782f9d
Return updated signed state after payment
2021-03-22 09:24:34 +01:00
Mark Spanbroek
40cfe54144
make payments
2021-03-18 14:16:42 +01:00
Mark Spanbroek
e798964ba5
Rename: ChannelUpdate -> SignedState
2021-03-17 13:10:49 +01:00
Mark Spanbroek
f498228bb9
Replace Channel by ChannelId
2021-03-17 12:53:30 +01:00
Mark Spanbroek
2737732e6d
Accept incoming channel
2021-03-16 12:50:46 +01:00
Mark Spanbroek
48e27a9bd1
Verify signatures
2021-03-16 10:19:13 +01:00
Mark Spanbroek
c680d34a18
Recover ethereum address from signature
2021-03-15 17:36:16 +01:00
Mark Spanbroek
292a7ec2ac
Wallet: open ledger channel
2021-03-15 16:38:04 +01:00
Mark Spanbroek
c824a3edd1
Update to latest version of questionable
2021-03-15 11:23:02 +01:00
Mark Spanbroek
5837a655e0
Add wallet
2021-03-09 16:53:15 +01:00
Mark Spanbroek
a945698ec6
Add convenience initializer to Outcome
2021-03-09 16:48:47 +01:00
Mark Spanbroek
a8b2cfab5a
Rename: EthAddress.fromHex() -> EthAddress.parse()
2021-03-09 14:05:32 +01:00
Mark Spanbroek
b758751211
Add Destination (abstraction for either channel id or eth address)
2021-03-09 14:02:01 +01:00
Mark Spanbroek
7395029f19
Move test basics up one level
2021-03-09 13:18:31 +01:00
Mark Spanbroek
63b9b5452f
Rename: Channel -> ChannelDefinition
...
To avoid name clash with upcoming channel abstraction
in the wallet.
2021-03-09 12:41:51 +01:00
Mark Spanbroek
f7dda63c04
Move common imports into a "basics" module
2021-03-09 11:07:35 +01:00
Mark Spanbroek
2e9896c13a
Move everything into nitro/protocol
2021-03-04 11:30:32 +01:00
Mark Spanbroek
72ba624cdc
Return Option[T] instead of raising exceptions
2021-03-03 09:57:03 +01:00
Mark Spanbroek
8ddd78ed68
Sign Nitro states
2021-03-02 07:37:38 +01:00
Mark Spanbroek
34072f4749
Fix ABI encoding of Nitro state to match javascript implementation
...
- rewrite ABI encoding to properly handle dynamic tuples
- surround Nitro types with extra tuples to match javascript
- test with examples of encoding extracted from javascript
2021-02-25 09:11:46 +01:00
Mark Spanbroek
3867258fe6
Fix ABI encoding of outcome; should be in a tuple
2021-02-23 12:30:55 +01:00
Mark Spanbroek
aaa394fc0c
Fix ABI encoding of app part; should be in a tuple
2021-02-23 12:01:06 +01:00
Mark Spanbroek
61df75b1a1
Fix ABI encoding of channel; should be in a tuple
2021-02-23 11:34:09 +01:00
Mark Spanbroek
38a6e6ab95
Fix ABI encoding of tuples
...
Offset of dynamic elements is relative to the start of the tuple,
not relative to the start of the element.
2021-02-23 11:32:41 +01:00
Mark Spanbroek
763a758b0a
Fix ABI encoding of Ethereum Addresses
...
They should be encoded as if they were UInt160, which means they
should be left-padded with zeroes, instead of right-padded.
2021-02-23 10:24:09 +01:00
Mark Spanbroek
ab2a39a704
Nitro state, including ABI encoding and hashing
2021-02-22 15:32:48 +01:00