parazyd
a71b2775fe
bin: Remove unused files.
2021-09-29 17:10:20 +02:00
parazyd
13f94a5ea3
Clean up some error mapping.
2021-09-29 16:50:23 +02:00
parazyd
71f3bcace4
More memory cleanups.
2021-09-29 16:31:35 +02:00
ghassmo
d8f729de55
service/sol: change the return type to SolResult in internal functions
2021-09-29 17:26:50 +03:00
ghassmo
70a5e542f4
cashierd: save the generated solana main keypair in cashierdb if it's not exist
2021-09-29 16:48:36 +03:00
parazyd
e3dffd044f
service/sol: Working SPL token deposits.
2021-09-29 15:01:51 +02:00
parazyd
a45f9d3144
Fix amount_in_apo in util.rs.
...
And some small lints/cleanups.
2021-09-29 14:50:17 +02:00
parazyd
ab73708346
util: Add explicit check if token.len is 44.
...
This should allow base58 Solana mint addresses.
2021-09-29 13:07:51 +02:00
parazyd
259050da13
service/sol: Initial stab at SPL token transfers.
2021-09-29 11:50:58 +02:00
lunar-mining
f39068c20b
src/util: completed f64 to u64 conversion in parse_param
2021-09-29 09:33:07 +02:00
lunar-mining
ffe6afccdf
Revert "src/util: made TokenList struct called in darkfid::main()"
...
This reverts commit 873d259bd2 .
2021-09-29 09:04:02 +02:00
lunar-mining
873d259bd2
src/util: made TokenList struct called in darkfid::main()
2021-09-29 08:56:56 +02:00
ghassmo
0b6fe5811b
move parsing params functions and NetworkName enum to src/util.rs
2021-09-29 02:39:10 +03:00
ghassmo
ef9e32a86b
darkfid: add NetworkName enum and clean up
2021-09-28 21:08:41 +03:00
ghassmo
e8c54c0a49
Merge branch 'master' of github.com:darkrenaissance/darkfi
2021-09-28 20:50:27 +03:00
ghassmo
8f015b548b
cashierdb: remove token_id from main_keypair
2021-09-28 20:49:53 +03:00
lunar-mining
685f8e96ff
bin/darkfi: test function for f64 -> u64
2021-09-28 19:44:39 +02:00
lunar-mining
0e372a8f57
bin/darkfid: renamed parse_network to parse_params
2021-09-28 19:44:39 +02:00
lunar-mining
712650b58b
bin/darkfid: removed testcase
2021-09-28 19:44:39 +02:00
ghassmo
10b3bec61b
NetworkName: minor changes
2021-09-28 20:37:46 +03:00
parazyd
61cb717aba
service/sol: Pay fees from main wallet when sending tx.
...
This comes with an implication that the main wallet has some funds
for this operation.
2021-09-28 18:08:11 +02:00
parazyd
b9d82a23e4
Makefile updates.
2021-09-28 18:08:11 +02:00
ghassmo
b90d2c09a1
remove hardcoded network name across the project and use enum instead
2021-09-28 18:55:05 +03:00
parazyd
cf2870061d
service/sol: More cleanups.
2021-09-28 17:43:32 +02:00
ghassmo
00bacb3555
Cashierd: listen to notification from bridge listen() function
2021-09-28 18:00:15 +03:00
ghassmo
796c41983f
Bridge: implement listen() function
2021-09-28 17:59:40 +03:00
parazyd
c6e4e3f3b4
service/sol: Implement function for fetching SPL Token balance.
...
It can be used as follows:
fn main() {
let main_pk = Pubkey::from_str("mainWallet").unwrap();
let mint_pk = Pubkey::from_str("usdcMint").unwrap();
let (tokn_pk, _) = get_associated_token_account(&main_pk, &mint_pk);
let (bal, dec) = get_account_token_balance(
"https://api.mainnet-beta.solana.com ".to_string(),
&tokn_pk,
&mint_pk
).unwrap();
println!("Balance: {}", bal);
println!("Decimals: {}", dec);
println!("UI representation: {}", bal / u64::pow(10, dec as u32));
}
2021-09-28 15:46:14 +02:00
parazyd
3ac9d7edbe
service/sol: Fix and clean up account subscription handling.
2021-09-28 14:24:48 +02:00
parazyd
a8941a7045
rpc: Add Clone implementation for structs, and use untagged enum.
2021-09-28 14:24:48 +02:00
ghassmo
e6c68c76bf
update todo.md
2021-09-28 15:12:16 +03:00
ghassmo
ca85a4e59c
cashierdb: attach token_id to the main keypair for tokens & change
...
asset_id name to token_id in schema and all functions
2021-09-28 14:57:57 +03:00
ghassmo
c142c83bda
util: generate_id() function take &str as token_id instead of
...
json::Value
2021-09-28 14:56:54 +03:00
lunar-mining
2b0dc655c6
bin/darkfid: float->u64 conversion test case
2021-09-28 10:21:46 +02:00
Janus
5c12623b95
Move script subscribe into BtcClient from BitcoinKeys
2021-09-27 09:50:37 -04:00
ghassmo
aed1a17f1f
BtcClient: minor changes
2021-09-27 16:16:57 +03:00
ghassmo
d81cca4030
BtcClient: remove hardcoded network endpoints
2021-09-27 15:49:26 +03:00
Janus
780d9ccb3a
Restructure BitcoinKeys
2021-09-27 08:23:41 -04:00
Janus
0e56638463
Remove commented btc fn from cashierdb
2021-09-27 08:23:06 -04:00
Janus
21298801b4
Add rand feature to secp256k1 crate
2021-09-27 08:20:53 -04:00
parazyd
5e9a87eed9
sol: Don't hardcode network endpoints.
2021-09-27 12:06:43 +02:00
lunar-mining
11230c6252
renamed parse_token() to symbol_to_id()
2021-09-27 10:14:52 +02:00
lunar-mining
97083e4592
renamed parse_id to generate_id
2021-09-27 10:10:38 +02:00
lunar-mining
5031d8a7d5
todo: standardize 'asset' to 'token'
2021-09-27 10:01:11 +02:00
lunar-mining
190c419f0b
bin/darkfid: implemented transfer()
2021-09-27 09:52:50 +02:00
lunar-mining
9964cb301f
darkfid.toml, cli/cli_config: added gateway URLs and mint/spend path
2021-09-27 08:34:38 +02:00
ghassmo
027fa103f2
SolClient: WIP clean up & change subscribe commitment to finalized & calculate the fee when send received balance to main keypair
2021-09-26 21:38:09 +03:00
ghassmo
6d40023181
change futures crate version
2021-09-26 21:37:48 +03:00
ghassmo
dbafb55bb2
Bridge: change struct name of TokenClient to NetworkClient & minor
...
changes
2021-09-25 22:30:13 +03:00
lunar-mining
8c502a6c7c
src/util: return token_id if serialize correctly
2021-09-25 20:35:29 +02:00
lunar-mining
e40b197598
src/error: added NetworkParse error
2021-09-25 20:34:47 +02:00