-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tonlib builder now supports lite-server index - liteServerIndex();
Tonlib builder has a new parameter of type TonGlobalConfig, .globalConfig() - anyone can construct custom global.config now; Also in case of connection failure automatically tries to connect to other lite-servers from the list - WIP.
- Loading branch information
neodiX
committed
Aug 4, 2024
1 parent
68943cd
commit 014bfd8
Showing
24 changed files
with
691 additions
and
65 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
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
26 changes: 26 additions & 0 deletions
26
tonlib/src/main/java/org/ton/java/tonlib/types/globalconfig/AddrList.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,26 @@ | ||
package org.ton.java.tonlib.types.globalconfig; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.apache.commons.lang3.builder.ToStringStyle; | ||
|
||
@Builder | ||
@Setter | ||
@Getter | ||
public class AddrList { | ||
@SerializedName(value = "@type") | ||
String type; | ||
DhtAddr[] addrs; | ||
long version; | ||
long reinit_date; | ||
long priority; | ||
long expire_at; | ||
|
||
@Override | ||
public String toString() { | ||
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
tonlib/src/main/java/org/ton/java/tonlib/types/globalconfig/BlockInfo.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,24 @@ | ||
package org.ton.java.tonlib.types.globalconfig; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.apache.commons.lang3.builder.ToStringStyle; | ||
|
||
@Builder | ||
@Setter | ||
@Getter | ||
public class BlockInfo { | ||
|
||
private String file_hash; | ||
private String root_hash; | ||
private long seqno; | ||
private long workchain; | ||
private long shard; | ||
|
||
@Override | ||
public String toString() { | ||
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
tonlib/src/main/java/org/ton/java/tonlib/types/globalconfig/Dht.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,24 @@ | ||
package org.ton.java.tonlib.types.globalconfig; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.apache.commons.lang3.builder.ToStringStyle; | ||
|
||
@Builder | ||
@Setter | ||
@Getter | ||
public class Dht { | ||
@SerializedName(value = "@type") | ||
String type; | ||
int a; | ||
int k; | ||
StaticNodes static_nodes; | ||
|
||
@Override | ||
public String toString() { | ||
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
tonlib/src/main/java/org/ton/java/tonlib/types/globalconfig/DhtAddr.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,23 @@ | ||
package org.ton.java.tonlib.types.globalconfig; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.apache.commons.lang3.builder.ToStringStyle; | ||
|
||
@Builder | ||
@Setter | ||
@Getter | ||
public class DhtAddr { | ||
@SerializedName(value = "@type") | ||
String type; | ||
long ip; | ||
long port; | ||
|
||
@Override | ||
public String toString() { | ||
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
tonlib/src/main/java/org/ton/java/tonlib/types/globalconfig/DhtNode.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,25 @@ | ||
package org.ton.java.tonlib.types.globalconfig; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.apache.commons.lang3.builder.ToStringStyle; | ||
|
||
@Builder | ||
@Setter | ||
@Getter | ||
public class DhtNode { | ||
@SerializedName(value = "@type") | ||
String type; | ||
DhtNodeId id; | ||
AddrList addr_list; | ||
long version; | ||
String signature; | ||
|
||
@Override | ||
public String toString() { | ||
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
tonlib/src/main/java/org/ton/java/tonlib/types/globalconfig/DhtNodeId.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,22 @@ | ||
package org.ton.java.tonlib.types.globalconfig; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.apache.commons.lang3.builder.ToStringStyle; | ||
|
||
@Builder | ||
@Setter | ||
@Getter | ||
public class DhtNodeId { | ||
@SerializedName(value = "@type") | ||
String type; | ||
String key; | ||
|
||
@Override | ||
public String toString() { | ||
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
tonlib/src/main/java/org/ton/java/tonlib/types/globalconfig/KeyStoreType.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,5 @@ | ||
package org.ton.java.tonlib.types.globalconfig; | ||
|
||
public interface KeyStoreType { | ||
|
||
} |
Oops, something went wrong.