2024-09-18 02:22:17 -04:00
|
|
|
@go.Package { name = "github.com/onsonr/sonr/config/dwn" }
|
|
|
|
|
|
|
|
module dwn
|
|
|
|
|
|
|
|
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
|
|
|
|
|
|
|
typealias JSON = String
|
|
|
|
|
|
|
|
class JsonField extends go.Field {
|
|
|
|
structTags {
|
|
|
|
["json"] = "%{name},omitempty"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Config {
|
|
|
|
@JsonField
|
|
|
|
ipfs: IPFS
|
|
|
|
|
|
|
|
@JsonField
|
|
|
|
sonr: Sonr
|
|
|
|
|
|
|
|
@JsonField
|
2024-09-19 02:04:22 -04:00
|
|
|
motr: Motr
|
2024-09-18 02:22:17 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
class IPFS {
|
2024-09-19 02:04:22 -04:00
|
|
|
@JsonField
|
2024-09-18 02:22:17 -04:00
|
|
|
apiUrl: String
|
2024-09-19 02:04:22 -04:00
|
|
|
|
|
|
|
@JsonField
|
2024-09-18 02:22:17 -04:00
|
|
|
gatewayUrl: String
|
|
|
|
}
|
|
|
|
|
2024-09-19 02:04:22 -04:00
|
|
|
class Motr {
|
|
|
|
@JsonField
|
|
|
|
keyshare: JSON
|
|
|
|
|
|
|
|
@JsonField
|
|
|
|
address: String
|
|
|
|
|
|
|
|
@JsonField
|
|
|
|
origin: String
|
|
|
|
}
|
|
|
|
|
2024-09-18 02:22:17 -04:00
|
|
|
class Sonr {
|
2024-09-19 02:04:22 -04:00
|
|
|
@JsonField
|
2024-09-18 02:22:17 -04:00
|
|
|
apiUrl: String
|
2024-09-19 02:04:22 -04:00
|
|
|
|
|
|
|
@JsonField
|
2024-09-18 02:22:17 -04:00
|
|
|
grpcUrl: String
|
2024-09-19 02:04:22 -04:00
|
|
|
|
|
|
|
@JsonField
|
2024-09-18 02:22:17 -04:00
|
|
|
rpcUrl: String
|
2024-09-19 02:04:22 -04:00
|
|
|
|
|
|
|
@JsonField
|
2024-09-18 02:22:17 -04:00
|
|
|
webSocketUrl: String
|
2024-09-19 02:04:22 -04:00
|
|
|
|
|
|
|
@JsonField
|
|
|
|
chainId: String
|
2024-09-18 02:22:17 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
config = new Config {
|
|
|
|
ipfs = new IPFS {
|
|
|
|
apiUrl = "https://api.sonr-ipfs.land"
|
|
|
|
gatewayUrl = "https://ipfs.sonr.land"
|
|
|
|
}
|
|
|
|
|
|
|
|
sonr = new Sonr {
|
|
|
|
apiUrl = "https://api.sonr.land"
|
|
|
|
grpcUrl = "https://grpc.sonr.land"
|
|
|
|
rpcUrl = "https://rpc.sonr.land"
|
|
|
|
webSocketUrl = "wss://rpc.sonr.land/ws"
|
|
|
|
}
|
|
|
|
}
|