-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
перепроверил и переделал, надо еще доделать
- Loading branch information
1 parent
dd11837
commit 47fef25
Showing
11 changed files
with
288 additions
and
479 deletions.
There are no files selected for viewing
66 changes: 59 additions & 7 deletions
66
src/main/java/com/samuilolegovich/XRPLedgerApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,82 @@ | ||
package com.samuilolegovich; | ||
|
||
import com.samuilolegovich.model.*; | ||
import com.samuilolegovich.model.oldCode.SendXRPPayment; | ||
|
||
import java.math.BigDecimal; | ||
import java.util.Locale; | ||
|
||
|
||
public class XRPLedgerApplication { | ||
private static PaymentManagerXRP paymentManagerXRP = null; | ||
private static PaymentManagerXRP paymentManagerXRPTwo = null; | ||
private static PaymentManagerXRP paymentManagerXRPThree = null; | ||
private static PaymentManagerXRP paymentManagerXRPFour = null; | ||
|
||
public static void main(String[] args) { | ||
|
||
|
||
public static void main(String[] args) throws InterruptedException { | ||
// Обязательно стоит установить локаль иначе будет падать с ошибкой парсинга даты | ||
Locale.setDefault(Locale.ENGLISH); | ||
|
||
// new TestDtoClasses().run(); | ||
// new StartWorkPayment().run(); | ||
// new SendXRPPayment().run(); | ||
// new RealXRPWallet().run(); | ||
|
||
|
||
startTest(); | ||
// startReal(); | ||
|
||
|
||
|
||
|
||
|
||
} | ||
|
||
|
||
private static void startReal() { | ||
// ----------------------------- REAL ----------------------------- | ||
paymentManagerXRP = new PaymentManagerXRP(); | ||
paymentManagerXRPTwo = new PaymentManagerXRP(); | ||
// | ||
paymentManagerXRP.createNewWallet(); | ||
String seed = paymentManagerXRP.getSeed(); | ||
System.out.println("SEED\n" + seed + "\n"); | ||
|
||
System.out.println("----------------------------- TEST ONE -----------------------------"); | ||
System.out.println("Test Private Seed\n " + paymentManagerXRP.getPrivateSeed() + "\n"); | ||
System.out.println("Test Public Address\n " + paymentManagerXRP.getPublicAddress() + "\n"); | ||
|
||
paymentManagerXRP.createNewTestWallet(); | ||
System.out.println("Test Private Seed\n " + paymentManagerXRP.getTestPrivateSeed() + "\n"); | ||
System.out.println("Test Public Address\n " + paymentManagerXRP.getTestPublicAddress() + "\n"); | ||
// paymentManagerXRP.sendPayment("ra3GsPkHcLf3TS7asKXqzVAx2wR6mvaFs5", 777, BigDecimal.ONE); | ||
|
||
paymentManagerXRPTwo.connectAnExistingTestWallet(paymentManagerXRP.getTestPrivateSeed()); | ||
System.out.println("Test Private Seed\n " + paymentManagerXRPTwo.getTestPrivateSeed() + "\n"); | ||
System.out.println("Test Public Address\n " + paymentManagerXRPTwo.getTestPublicAddress() + "\n"); | ||
paymentManagerXRPTwo.connectAnExistingWallet(paymentManagerXRP.getSeed()); | ||
|
||
System.out.println("----------------------------- TEST TWO -----------------------------"); | ||
System.out.println("Test Private Seed\n " + paymentManagerXRPTwo.getPrivateSeed() + "\n"); | ||
System.out.println("Test Public Address\n " + paymentManagerXRPTwo.getPublicAddress() + "\n"); | ||
} | ||
|
||
private static void startTest() { | ||
// ----------------------------- TEST ----------------------------- | ||
paymentManagerXRPThree = new PaymentManagerXRP(); | ||
paymentManagerXRPFour = new PaymentManagerXRP(); | ||
// | ||
paymentManagerXRPThree.createNewTestWallet(); | ||
String seedTest = paymentManagerXRPThree.getTestSeed(); | ||
System.out.println("SEED TEST\n" + seedTest + "\n"); | ||
|
||
System.out.println("----------------------------- TEST ONE -----------------------------"); | ||
System.out.println("Test Private Seed\n " + paymentManagerXRPThree.getTestPrivateSeed() + "\n"); | ||
System.out.println("Test Public Address\n " + paymentManagerXRPThree.getTestPublicAddress() + "\n"); | ||
|
||
// paymentManagerXRPThree.sendPayment("ra3GsPkHcLf3TS7asKXqzVAx2wR6mvaFs5", 777, BigDecimal.ONE); | ||
|
||
paymentManagerXRPFour.connectAnExistingTestWallet(paymentManagerXRPThree.getTestSeed()); | ||
|
||
System.out.println("----------------------------- TEST TWO -----------------------------"); | ||
System.out.println("Test Private Seed\n " + paymentManagerXRPFour.getTestPrivateSeed() + "\n"); | ||
System.out.println("Test Public Address\n " + paymentManagerXRPFour.getTestPublicAddress() + "\n"); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
package com.samuilolegovich.model; | ||
|
||
import okhttp3.HttpUrl; | ||
|
||
public final class Addresses { | ||
// REAL | ||
public final static String FAUCET_CLIENT_HTTP_URL = "https://s.altnet.rippletest.net:51234/"; | ||
public final static String XTP_HTTP_URL_ONE = "https://xrplcluster.com"; | ||
public final static String XTP_HTTP_URL_TWO = "https://s1.ripple.com:51234/"; | ||
public final static String XTP_HTTP_URL_THREE = "https://s1.ripple.com:51234/"; | ||
public final static String XTP_HTTP_URL_ONE = "https://s1.ripple.com:51234/"; | ||
public final static String XTP_HTTP_URL_TWO = "https://s2.ripple.com:51234/"; | ||
|
||
// TEST | ||
public final static String FAUCET_CLIENT_HTTP_URL_TEST = "https://s.altnet.rippletest.net:51234/"; | ||
public final static String XTP_HTTP_URL_ONE_TEST = "https://s1.ripple.com:51234/"; | ||
public final static String FAUCET_CLIENT_HTTP_URL_TEST = "https://faucet.altnet.rippletest.net"; | ||
public final static String XTP_HTTP_URL_ONE_TEST = "https://s.altnet.rippletest.net:51234/"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../samuilolegovich/model/RealXRPWallet.java → ...legovich/model/oldCode/RealXRPWallet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...samuilolegovich/model/SendXRPPayment.java → ...egovich/model/oldCode/SendXRPPayment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...muilolegovich/model/StartWorkPayment.java → ...ovich/model/oldCode/StartWorkPayment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...samuilolegovich/model/TestDtoClasses.java → ...egovich/model/oldCode/TestDtoClasses.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.