mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 18:01:39 +00:00
feat: add Motr support
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
package dwn
|
||||
|
||||
type Config struct {
|
||||
Ipfs *IPFS `pkl:"ipfs" json:"ipfs,omitempty"`
|
||||
Ipfs *IPFS `pkl:"ipfs"`
|
||||
|
||||
Sonr *Sonr `pkl:"sonr" json:"sonr,omitempty"`
|
||||
Sonr *Sonr `pkl:"sonr"`
|
||||
|
||||
Motr *Motr `pkl:"motr" json:"motr,omitempty"`
|
||||
Motr *Motr `pkl:"motr"`
|
||||
|
||||
Schema *Schema `pkl:"schema" json:"schema,omitempty"`
|
||||
Schema *Schema `pkl:"schema"`
|
||||
|
||||
ProxyUrl string `pkl:"proxyUrl" json:"proxyUrl,omitempty"`
|
||||
ProxyUrl string `pkl:"proxyUrl"`
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
package dwn
|
||||
|
||||
type IPFS struct {
|
||||
ApiUrl string `pkl:"apiUrl" json:"apiUrl,omitempty"`
|
||||
ApiUrl string `pkl:"apiUrl"`
|
||||
|
||||
GatewayUrl string `pkl:"gatewayUrl" json:"gatewayUrl,omitempty"`
|
||||
GatewayUrl string `pkl:"gatewayUrl"`
|
||||
}
|
||||
|
||||
+3
-3
@@ -2,9 +2,9 @@
|
||||
package dwn
|
||||
|
||||
type Motr struct {
|
||||
Keyshare string `pkl:"keyshare" json:"keyshare,omitempty"`
|
||||
Keyshare string `pkl:"keyshare"`
|
||||
|
||||
Address string `pkl:"address" json:"address,omitempty"`
|
||||
Address string `pkl:"address"`
|
||||
|
||||
Origin string `pkl:"origin" json:"origin,omitempty"`
|
||||
Origin string `pkl:"origin"`
|
||||
}
|
||||
|
||||
@@ -4,19 +4,19 @@ package dwn
|
||||
type Schema struct {
|
||||
Version int `pkl:"version"`
|
||||
|
||||
Account string `pkl:"account" json:"account,omitempty"`
|
||||
Account string `pkl:"account"`
|
||||
|
||||
Asset string `pkl:"asset" json:"asset,omitempty"`
|
||||
Asset string `pkl:"asset"`
|
||||
|
||||
Chain string `pkl:"chain" json:"chain,omitempty"`
|
||||
Chain string `pkl:"chain"`
|
||||
|
||||
Credential string `pkl:"credential" json:"credential,omitempty"`
|
||||
Credential string `pkl:"credential"`
|
||||
|
||||
Jwk string `pkl:"jwk" json:"jwk,omitempty"`
|
||||
Jwk string `pkl:"jwk"`
|
||||
|
||||
Grant string `pkl:"grant" json:"grant,omitempty"`
|
||||
Grant string `pkl:"grant"`
|
||||
|
||||
Keyshare string `pkl:"keyshare" json:"keyshare,omitempty"`
|
||||
Keyshare string `pkl:"keyshare"`
|
||||
|
||||
Profile string `pkl:"profile" json:"profile,omitempty"`
|
||||
Profile string `pkl:"profile"`
|
||||
}
|
||||
|
||||
+5
-5
@@ -2,13 +2,13 @@
|
||||
package dwn
|
||||
|
||||
type Sonr struct {
|
||||
ApiUrl string `pkl:"apiUrl" json:"apiUrl,omitempty"`
|
||||
ApiUrl string `pkl:"apiUrl"`
|
||||
|
||||
GrpcUrl string `pkl:"grpcUrl" json:"grpcUrl,omitempty"`
|
||||
GrpcUrl string `pkl:"grpcUrl"`
|
||||
|
||||
RpcUrl string `pkl:"rpcUrl" json:"rpcUrl,omitempty"`
|
||||
RpcUrl string `pkl:"rpcUrl"`
|
||||
|
||||
WebSocketUrl string `pkl:"webSocketUrl" json:"webSocketUrl,omitempty"`
|
||||
WebSocketUrl string `pkl:"webSocketUrl"`
|
||||
|
||||
ChainId string `pkl:"chainId" json:"chainId,omitempty"`
|
||||
ChainId string `pkl:"chainId"`
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
amends "https://pkl.sh/DWN.pkl";
|
||||
|
||||
dwn = 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";
|
||||
chainId = "sonr";
|
||||
};
|
||||
motr = new Motr {
|
||||
keyshare = JSON.parse(keyshare);
|
||||
address = address;
|
||||
origin = "sonr.id";
|
||||
};
|
||||
schema = new Schema {
|
||||
version = 1;
|
||||
account = "account";
|
||||
asset = "asset";
|
||||
chain = "chain";
|
||||
credential = "credential";
|
||||
jwk = "jwk";
|
||||
grant = "grant";
|
||||
keyshare = "keyshare";
|
||||
profile = "profile";
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user