-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make WalletAccount, Domain and TonProof public in TonConnect
- Loading branch information
Showing
6 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
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
38 changes: 38 additions & 0 deletions
38
address/src/test/java/org/ton/java/address/TestAddressWithFift.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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.ton.java.address; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.JUnit4; | ||
import org.ton.java.fift.FiftRunner; | ||
|
||
import java.io.File; | ||
import java.net.URISyntaxException; | ||
import java.net.URL; | ||
import java.nio.file.Paths; | ||
|
||
@Slf4j | ||
@RunWith(JUnit4.class) | ||
public class TestAddressWithFift { | ||
@Test | ||
public void testAddressWithFift() throws URISyntaxException { | ||
|
||
URL resource = TestAddressWithFift.class.getResource("/test-address.fif"); | ||
File fiftFile = Paths.get(resource.toURI()).toFile(); | ||
String absolutePath = fiftFile.getAbsolutePath(); | ||
|
||
FiftRunner fiftRunner = FiftRunner.builder().build(); | ||
|
||
String result = fiftRunner.run(fiftFile.getParent(), "-s", absolutePath, "EQDkZIvi6fkgNVxLOgw5hzquGhxhUvhvJ4B836p-NQ-iLKCv"); | ||
log.info("output: {}", result); | ||
|
||
result = fiftRunner.run(fiftFile.getParent(), "-s", absolutePath, "Ef--_tW1zCy5ehTig0JrBEAiE67bbnSmqVtkuU8FFqlNUT9n"); | ||
log.info("output: {}", result); | ||
|
||
result = fiftRunner.run(fiftFile.getParent(), "-s", absolutePath, "-1:0000d5b5cc2cb97a14e283426b04402213aedb6e74a6a95b64b94f0516a90000"); | ||
log.info("output: {}", result); | ||
|
||
result = fiftRunner.run(fiftFile.getParent(), "-s", absolutePath, "EQCnuv-ZuR0QsIh5vwxUBuzzocSowbCa7ctdwl6QizBKzGVM"); | ||
log.info("output: {}", result); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/fift -s | ||
"TonUtil.fif" include | ||
"Asm.fif" include | ||
|
||
$1 $>smca 0= abort"bad address" | ||
rot . swap x. . cr | ||
|
||
$1 $>smca | ||
constant result | ||
constant flags | ||
constant wallet_addr | ||
constant wc | ||
|
||
."result: " result . cr | ||
."flags: " flags . cr | ||
."wallet_addr: " wallet_addr x. cr | ||
."wc: " wc . cr | ||
."Source wallet address = " wc wallet_addr .addr cr | ||
."Non-bounceable address (for init only): " wc wallet_addr 1 .Addr cr | ||
."Bounceable address (for later access): " wc wallet_addr 0 .Addr cr | ||
."Non-bounceable address, Base64url (for init): " wc wallet_addr 5 .Addr cr | ||
."Bounceable address, Base64url (for later access): " wc wallet_addr 4 .Addr cr |
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
@Setter | ||
@Getter | ||
@ToString | ||
class Domain { | ||
public class Domain { | ||
private int lengthBytes; | ||
private String value; | ||
} |
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
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