Commit graph

61 commits

Author SHA1 Message Date
silverpill
64fb51e92a Update subscription state after processing invoice 2022-08-31 20:42:59 +00:00
silverpill
2eb7ec2f64 Add chain ID column to subscription table
Set chain ID to "eip155:31337" for existing entries.
2022-08-31 20:42:56 +00:00
silverpill
cc6d9d7688 Refactor ethereum subscription monitor 2022-08-31 20:42:37 +00:00
silverpill
690a03946e Use Currency enum to refer to CAIP-2 namespaces instead of chain IDs 2022-08-29 15:12:18 +00:00
silverpill
e2f8408b1e Search for subscription recipient by DID instead of login address 2022-08-15 22:02:11 +00:00
silverpill
dc7d533c42 Allow blockchain config to have sub-types 2022-08-10 11:57:35 +00:00
silverpill
c4e5438ac2 Parse chain ID into CAIP-2 ChainId type during blockchain config deserialization 2022-08-10 11:14:17 +00:00
silverpill
46526fd4be Add currency() method to DidPkh type 2022-08-04 15:44:48 +00:00
silverpill
af0563759d Add CAIP-2 chain ID type 2022-08-04 15:38:26 +00:00
silverpill
3c8c0c7163 Move currencies module to utils 2022-08-04 12:34:31 +00:00
silverpill
85d35f9733 Wait for required number of confirmations before processing block 2022-07-28 13:14:12 +00:00
silverpill
c47822ff53 Add tests for SyncState::get_scan_range method 2022-07-28 11:30:32 +00:00
silverpill
1554780b35 Add API method for adding subscription as payment option 2022-07-25 21:38:58 +00:00
silverpill
3a28219405 Read blockchain sync step and max reorg depth from config 2022-07-17 02:01:15 +00:00
silverpill
0a8e06995b Send Remove(Person) activity when subscription expires 2022-07-17 00:11:02 +00:00
silverpill
0f5a2edf7f Send AddPerson() activity when subscription payment is detected 2022-07-17 00:11:02 +00:00
silverpill
6f247ad40d Send notification to sender when subscription expires
Only if sender is local.
2022-07-15 23:53:21 +00:00
silverpill
545dd6d92b Enable contract feature detection
Contracts updated to version 0.5.0.
2022-06-30 12:20:14 +00:00
silverpill
6615f372e2 Refactor load_abi to return ethabi::Contract type 2022-06-29 14:35:13 +00:00
silverpill
f8aaeb01a7 Update contracts to v0.4.0
configureSubscription() method signature has changed.
2022-06-28 18:28:40 +00:00
silverpill
2f532307a1 Switch to incremental blockchain synchronization 2022-06-25 11:59:03 +00:00
silverpill
b618c5b31f Use shared ContractSet object when verifing user during registration
Server will not start if blockchain configuration is invalid.
2022-06-23 22:03:51 +00:00
silverpill
d8972a9286 Add CLI command for updating current block 2022-06-21 15:28:19 +00:00
silverpill
0148343655 Use initial block number as lower bound when making log query 2022-06-14 21:31:42 +00:00
silverpill
29ace97b0e Refactor process_nft_events function 2022-06-14 18:57:00 +00:00
silverpill
30f7f5d996 Initialize contract set in main() 2022-06-14 10:46:15 +00:00
silverpill
f700d79754 Ignore subscription event if sender changes their ethereum address in profile 2022-06-05 19:42:48 +00:00
silverpill
4ffec71c24 Send notification when subscription payment is received 2022-05-28 19:00:24 +00:00
silverpill
c2c3ff1544 Verify chain ID on start 2022-05-28 00:04:21 +00:00
silverpill
50699b5ab5 Don't use update_post() to set ipfs_cid, token_id and token_tx_id fields 2022-05-10 22:18:43 +00:00
silverpill
b7849c8264 Check TX ID when saving token ID to database 2022-05-10 22:12:54 +00:00
silverpill
75a4dec009 Update siwe-rs package to version 0.3.0 2022-05-09 19:58:42 +00:00
silverpill
ff5f707cba Prioritize verified results when searching for profile by subscription address 2022-04-27 22:57:49 +00:00
silverpill
303827ffc6 Include results based on identity proofs when searching profiles by wallet address 2022-04-27 22:19:50 +00:00
silverpill
a1af35997c Use currency enum instead of WALLET_CURRENCY_CODE constant 2022-04-27 22:19:14 +00:00
silverpill
fd6b71073a Add IdentityProof type 2022-04-26 19:56:32 +00:00
silverpill
e697461e70 Add function that performs address ownership verification 2022-04-26 19:32:08 +00:00
silverpill
fc60bb78f2 Implement ToString and FromStr traits for SignatureData 2022-04-26 19:32:02 +00:00
silverpill
bffe3bbe7d Don't hash initial message when making EIP-191 signature 2022-04-22 21:27:53 +00:00
silverpill
536c7ecb21 Bump web3 to 0.18.0 2022-04-20 17:30:30 +00:00
silverpill
ffdda2ac51 Add recover_address() function
It can be used to recover ethereum address from signature.
2022-04-19 22:59:09 +00:00
silverpill
0d6807e5a2 Move address_to_string to ethereum::utils module 2022-04-16 22:32:50 +00:00
silverpill
e8a29a3af1 Implement EIP-4361 authentication 2022-02-14 23:16:00 +00:00
silverpill
71fc2d9dad Save subscription state to database when processing blockchain event 2022-02-06 12:05:14 +00:00
silverpill
a095ea7061 Add periodic task that monitors subscription events 2022-02-05 23:52:56 +00:00
silverpill
4e0f14df4c Add API method for getting authorization of paid subscription setup transaction 2022-02-05 23:51:12 +00:00
silverpill
dfc9902092 Move get_nft_contract function to ethereum::contracts module
Preparing for more contracts.
2022-01-30 17:47:07 +00:00
silverpill
fd0c7edb59 Retrieve event ABI from Contract instance in process_events() 2022-01-28 00:42:36 +00:00
silverpill
a3f20149cf Remove actual ethereum contracts and use interfaces instead 2022-01-28 00:42:36 +00:00
silverpill
237185bb14 Move functions for creating ethereum signatures to ethereum::signatures module 2022-01-28 00:42:36 +00:00