mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
feature/1121 implement ucan validation (#1176)
- **refactor: remove unused auth components** - **refactor: improve devbox configuration and deployment process** - **refactor: improve devnet and testnet setup** - **fix: update templ version to v0.2.778** - **refactor: rename pkl/net.matrix to pkl/matrix.net** - **refactor: migrate webapp components to nebula** - **refactor: protobuf types** - **chore: update dependencies for improved security and stability** - **feat: implement landing page and vault gateway servers** - **refactor: Migrate data models to new module structure and update related files** - **feature/1121-implement-ucan-validation** - **refactor: Replace hardcoded constants with model types in attns.go** - **feature/1121-implement-ucan-validation** - **chore: add origin Host struct and update main function to handle multiple hosts** - **build: remove unused static files from dwn module** - **build: remove unused static files from dwn module** - **refactor: Move DWN models to common package** - **refactor: move models to pkg/common** - **refactor: move vault web app assets to embed module** - **refactor: update session middleware import path** - **chore: configure port labels and auto-forwarding behavior** - **feat: enhance devcontainer configuration** - **feat: Add UCAN middleware for Echo with flexible token validation** - **feat: add JWT middleware for UCAN authentication** - **refactor: update package URI and versioning in PklProject files** - **fix: correct sonr.pkl import path** - **refactor: move JWT related code to auth package** - **feat: introduce vault configuration retrieval and management** - **refactor: Move vault components to gateway module and update file paths** - **refactor: remove Dexie and SQLite database implementations** - **feat: enhance frontend with PWA features and WASM integration** - **feat: add Devbox features and streamline Dockerfile** - **chore: update dependencies to include TigerBeetle** - **chore(deps): update go version to 1.23** - **feat: enhance devnet setup with PATH environment variable and updated PWA manifest** - **fix: upgrade tigerbeetle-go dependency and remove indirect dependency** - **feat: add PostgreSQL support to devnet and testnet deployments** - **refactor: rename keyshare cookie to token cookie** - **feat: upgrade Go version to 1.23.3 and update dependencies** - **refactor: update devnet and testnet configurations** - **feat: add IPFS configuration for devnet** - **I'll help you update the ipfs.config.pkl to include all the peers from the shell script. Here's the updated configuration:** - **refactor: move mpc package to crypto directory** - **feat: add BIP32 support for various cryptocurrencies** - **feat: enhance ATN.pkl with additional capabilities** - **refactor: simplify smart account and vault attenuation creation** - **feat: add new capabilities to the Attenuation type** - **refactor: Rename MPC files for clarity and consistency** - **feat: add DIDKey support for cryptographic operations** - **feat: add devnet and testnet deployment configurations** - **fix: correct key derivation in bip32 package** - **refactor: rename crypto/bip32 package to crypto/accaddr** - **fix: remove duplicate indirect dependency** - **refactor: move vault package to root directory** - **refactor: update routes for gateway and vault** - **refactor: remove obsolete web configuration file** - **refactor: remove unused TigerBeetle imports and update host configuration** - **refactor: adjust styles directory path** - **feat: add broadcastTx and simulateTx functions to gateway** - **feat: add PinVault handler**
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# Sonr Pkl Definitions
|
||||
|
||||
## Overview
|
||||
|
||||
This directory contains the protobuf definitions for the Sonr blockchain.
|
||||
|
||||
## Directory Structure
|
||||
|
||||
### `did`
|
||||
|
||||
The `did` directory contains the protobuf definitions for the DID module.
|
||||
|
||||
### `dwn`
|
||||
|
||||
The `dwn` directory contains the protobuf definitions for the Vault module.
|
||||
|
||||
### `svc`
|
||||
|
||||
The `service` directory contains the protobuf definitions for the Service module.
|
||||
@@ -32,13 +32,13 @@ local function findRootModule(mod: reflect.Module): Module =
|
||||
else findRootModule(supermodule)
|
||||
|
||||
package {
|
||||
baseUri = "package://pkl.sh/\(name)@\(version)"
|
||||
packageZipUrl = "https://github.com/onsonr/sonr/releases/download/\(name)@\(version).zip"
|
||||
baseUri = "package://pkl.sh/\(name)"
|
||||
packageZipUrl = "https://pkl.sh/\(name)@\(version).zip"
|
||||
license = "Apache-2.0"
|
||||
authors {
|
||||
"Prad N <prad@sonr.email>"
|
||||
}
|
||||
description = myModule.docComment
|
||||
issueTracker = "https://github.com/onsonr/sonr/issues"
|
||||
sourceCode = "https://github.com/onsonr/sonr/tree/third_party/pkl/packages/\(name)"
|
||||
sourceCode = "https://github.com/onsonr/sonr/tree/pkl/\(name)"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,275 @@
|
||||
module ipfs.net.Config
|
||||
|
||||
API: API
|
||||
|
||||
Addresses: Addresses
|
||||
|
||||
AutoNAT: Dynamic
|
||||
|
||||
Bootstrap: Listing
|
||||
|
||||
DNS: DNS
|
||||
|
||||
Datastore: Datastore
|
||||
|
||||
Discovery: Discovery
|
||||
|
||||
Experimental: Experimental
|
||||
|
||||
Gateway: Gateway
|
||||
|
||||
Identity: Identity
|
||||
|
||||
Internal: Dynamic
|
||||
|
||||
Ipns: Ipns
|
||||
|
||||
Migration: Migration
|
||||
|
||||
Mounts: Mounts
|
||||
|
||||
Peering: Peering
|
||||
|
||||
Pinning: Pinning
|
||||
|
||||
Plugins: Plugins
|
||||
|
||||
Provider: Provider
|
||||
|
||||
Pubsub: Pubsub
|
||||
|
||||
Reprovider: Reprovider
|
||||
|
||||
Routing: Routing
|
||||
|
||||
Swarm: Swarm
|
||||
|
||||
class API {
|
||||
HTTPHeaders: HTTPHeaders
|
||||
}
|
||||
|
||||
class HTTPHeaders {
|
||||
`Access-Control-Allow-Origin`: Listing
|
||||
}
|
||||
|
||||
class Addresses {
|
||||
API: String
|
||||
|
||||
Announce: Listing<Any>
|
||||
|
||||
AppendAnnounce: Listing<Any>
|
||||
|
||||
Gateway: String
|
||||
|
||||
NoAnnounce: Listing<Any>
|
||||
|
||||
Swarm: Listing
|
||||
}
|
||||
|
||||
class DNS {
|
||||
Resolvers: Dynamic
|
||||
}
|
||||
|
||||
class Datastore {
|
||||
BloomFilterSize: Int
|
||||
|
||||
GCPeriod: String
|
||||
|
||||
HashOnRead: Boolean
|
||||
|
||||
Spec: Spec
|
||||
|
||||
StorageGCWatermark: Int
|
||||
|
||||
StorageMax: String
|
||||
}
|
||||
|
||||
class Spec {
|
||||
mounts: Listing
|
||||
|
||||
type: String
|
||||
}
|
||||
|
||||
class MountsItem0 {
|
||||
child: Child
|
||||
|
||||
mountpoint: String
|
||||
|
||||
prefix: String
|
||||
|
||||
type: String
|
||||
}
|
||||
|
||||
class Child {
|
||||
path: String
|
||||
|
||||
shardFunc: String
|
||||
|
||||
sync: Boolean
|
||||
|
||||
type: String
|
||||
}
|
||||
|
||||
class MountsItem1 {
|
||||
child: MountsItem1Child
|
||||
|
||||
mountpoint: String
|
||||
|
||||
prefix: String
|
||||
|
||||
type: String
|
||||
}
|
||||
|
||||
class MountsItem1Child {
|
||||
compression: String
|
||||
|
||||
path: String
|
||||
|
||||
type: String
|
||||
}
|
||||
|
||||
class Discovery {
|
||||
MDNS: MDNS
|
||||
}
|
||||
|
||||
class MDNS {
|
||||
Enabled: Boolean
|
||||
}
|
||||
|
||||
class Experimental {
|
||||
AcceleratedDHTClient: Boolean
|
||||
|
||||
FilestoreEnabled: Boolean
|
||||
|
||||
GraphsyncEnabled: Boolean
|
||||
|
||||
Libp2pStreamMounting: Boolean
|
||||
|
||||
P2pHttpProxy: Boolean
|
||||
|
||||
StrategicProviding: Boolean
|
||||
|
||||
UrlstoreEnabled: Boolean
|
||||
}
|
||||
|
||||
class Gateway {
|
||||
APICommands: Listing<Any>
|
||||
|
||||
HTTPHeaders: GatewayHTTPHeaders
|
||||
|
||||
NoDNSLink: Boolean
|
||||
|
||||
NoFetch: Boolean
|
||||
|
||||
PathPrefixes: Listing<Any>
|
||||
|
||||
PublicGateways: Any
|
||||
|
||||
RootRedirect: String
|
||||
|
||||
Writable: Boolean
|
||||
}
|
||||
|
||||
class GatewayHTTPHeaders {
|
||||
`Access-Control-Allow-Headers`: Listing
|
||||
|
||||
`Access-Control-Allow-Methods`: Listing
|
||||
|
||||
`Access-Control-Allow-Origin`: Listing
|
||||
}
|
||||
|
||||
class Identity {
|
||||
PeerID: String
|
||||
|
||||
PrivKey: String
|
||||
}
|
||||
|
||||
class Ipns {
|
||||
RecordLifetime: String
|
||||
|
||||
RepublishPeriod: String
|
||||
|
||||
ResolveCacheSize: Int
|
||||
}
|
||||
|
||||
class Migration {
|
||||
DownloadSources: Listing<Any>
|
||||
|
||||
Keep: String
|
||||
}
|
||||
|
||||
class Mounts {
|
||||
FuseAllowOther: Boolean
|
||||
|
||||
IPFS: String
|
||||
|
||||
IPNS: String
|
||||
}
|
||||
|
||||
class Peering {
|
||||
Peers: Listing
|
||||
}
|
||||
|
||||
class PeersItem11 {
|
||||
Addrs: Listing
|
||||
|
||||
ID: String
|
||||
}
|
||||
|
||||
class Pinning {
|
||||
RemoteServices: Dynamic
|
||||
}
|
||||
|
||||
class Plugins {
|
||||
Plugins: Any
|
||||
}
|
||||
|
||||
class Provider {
|
||||
Strategy: String
|
||||
}
|
||||
|
||||
class Pubsub {
|
||||
DisableSigning: Boolean
|
||||
|
||||
Router: String
|
||||
}
|
||||
|
||||
class Reprovider {
|
||||
Interval: String
|
||||
|
||||
Strategy: String
|
||||
}
|
||||
|
||||
class Routing {
|
||||
Methods: Any
|
||||
|
||||
Routers: Any
|
||||
|
||||
Type: String
|
||||
}
|
||||
|
||||
class Swarm {
|
||||
AddrFilters: Any
|
||||
|
||||
ConnMgr: Dynamic
|
||||
|
||||
DisableBandwidthMetrics: Boolean
|
||||
|
||||
DisableNatPortMap: Boolean
|
||||
|
||||
RelayClient: Dynamic
|
||||
|
||||
RelayService: Dynamic
|
||||
|
||||
ResourceMgr: Dynamic
|
||||
|
||||
Transports: Transports
|
||||
}
|
||||
|
||||
class Transports {
|
||||
Multiplexers: Dynamic
|
||||
|
||||
Network: Dynamic
|
||||
|
||||
Security: Dynamic
|
||||
}
|
||||
@@ -17,6 +17,6 @@
|
||||
amends "../basePklProject.pkl"
|
||||
|
||||
package {
|
||||
name = "net.matrix"
|
||||
version = "0.0.1"
|
||||
name = "ipfs.net"
|
||||
version = "0.0.4"
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
open module matrix.net.AppService
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module net.svcs.Homeserver
|
||||
open module matrix.net.Homeserver
|
||||
|
||||
version = 2
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
amends "../basePklProject.pkl"
|
||||
|
||||
package {
|
||||
name = "net.matrix"
|
||||
name = "matrix.net"
|
||||
version = "0.0.1"
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
module net.svcs.Synapse
|
||||
open module matrix.net.Synapse
|
||||
|
||||
version = 2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module config.sonr.App
|
||||
open module sonr.chain.App
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-pantry/pkl.toml@1.0.0#/toml.pkl"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module config.sonr.Chain
|
||||
open module sonr.chain.Config
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-pantry/pkl.toml@1.0.0#/toml.pkl"
|
||||
|
||||
@@ -65,7 +65,7 @@ class P2p {
|
||||
laddr: String = "tcp://0.0.0.0:26656"
|
||||
external_address: String = ""
|
||||
seeds: String = ""
|
||||
persistent_peers: String = "7698b304905ac4459e8bf5fe8f8373aa46a528a5@192.168.0.2:26656,b1aee1db2ac83c57ffe561624ba169bdcd80dc1a@192.168.0.4:26656,cda55214016021246cd26f8991bd842a0c1dc3fb@192.168.0.3:26656"
|
||||
persistent_peers: String = read("env:SONR_PERSISTENT_PEERS") ?? ""
|
||||
addr_book_file: String = "config/addrbook.json"
|
||||
addr_book_strict: Boolean = true
|
||||
max_num_inbound_peers: Int = 40
|
||||
@@ -138,7 +138,7 @@ class Storage {
|
||||
|
||||
class TxIndex {
|
||||
indexer: String = "kv"
|
||||
`psql-conn`: String = ""
|
||||
`psql-conn`: String = read("env:SONR_PSQL_CONN") ?? ""
|
||||
}
|
||||
|
||||
class Instrumentation {
|
||||
+745
-1
@@ -1,3 +1,747 @@
|
||||
module config.sonr.Genesis
|
||||
open module sonr.chain.Genesis
|
||||
|
||||
app_name: String
|
||||
|
||||
app_version: String
|
||||
|
||||
genesis_time: String
|
||||
|
||||
chain_id: String
|
||||
|
||||
initial_height: Int
|
||||
|
||||
app_hash: Any
|
||||
|
||||
app_state: AppState
|
||||
|
||||
consensus: Consensus
|
||||
|
||||
class AppState {
|
||||
`07-tendermint`: Any
|
||||
|
||||
auth: Auth
|
||||
|
||||
authz: Authz
|
||||
|
||||
bank: Bank
|
||||
|
||||
capability: Capability
|
||||
|
||||
circuit: Circuit
|
||||
|
||||
consensus: Any
|
||||
|
||||
crisis: Crisis
|
||||
|
||||
did: Did
|
||||
|
||||
distribution: Distribution
|
||||
|
||||
dwn: Dwn
|
||||
|
||||
evidence: Evidence
|
||||
|
||||
feegrant: Feegrant
|
||||
|
||||
feeibc: Feeibc
|
||||
|
||||
genutil: Genutil
|
||||
|
||||
globalfee: Globalfee
|
||||
|
||||
gov: Gov
|
||||
|
||||
group: Group
|
||||
|
||||
ibc: Ibc
|
||||
|
||||
interchainaccounts: Interchainaccounts
|
||||
|
||||
mint: Mint
|
||||
|
||||
nft: Nft
|
||||
|
||||
packetfowardmiddleware: Packetfowardmiddleware
|
||||
|
||||
params: Any
|
||||
|
||||
poa: Poa
|
||||
|
||||
slashing: Slashing
|
||||
|
||||
staking: Staking
|
||||
|
||||
svc: Svc
|
||||
|
||||
tokenfactory: Tokenfactory
|
||||
|
||||
transfer: Transfer
|
||||
|
||||
upgrade: Dynamic
|
||||
|
||||
vesting: Dynamic
|
||||
}
|
||||
|
||||
class Auth {
|
||||
params: Params
|
||||
|
||||
accounts: Listing
|
||||
}
|
||||
|
||||
class Params {
|
||||
max_memo_characters: String
|
||||
|
||||
tx_sig_limit: String
|
||||
|
||||
tx_size_cost_per_byte: String
|
||||
|
||||
sig_verify_cost_ed25519: String
|
||||
|
||||
sig_verify_cost_secp256k1: String
|
||||
}
|
||||
|
||||
class AccountsItem1 {
|
||||
`@type`: String
|
||||
|
||||
address: String
|
||||
|
||||
pub_key: Any
|
||||
|
||||
account_number: String
|
||||
|
||||
sequence: String
|
||||
}
|
||||
|
||||
class Authz {
|
||||
authorization: Listing<Any>
|
||||
}
|
||||
|
||||
class Bank {
|
||||
params: BankParams
|
||||
|
||||
balances: Listing
|
||||
|
||||
supply: Listing
|
||||
|
||||
denom_metadata: Listing<Any>
|
||||
|
||||
send_enabled: Listing<Any>
|
||||
}
|
||||
|
||||
class BankParams {
|
||||
send_enabled: Listing<Any>
|
||||
|
||||
default_send_enabled: Boolean
|
||||
}
|
||||
|
||||
class BalancesItem1 {
|
||||
address: String
|
||||
|
||||
coins: Listing
|
||||
}
|
||||
|
||||
class ExpeditedMinDepositItem0 {
|
||||
denom: String
|
||||
|
||||
amount: String
|
||||
}
|
||||
|
||||
class Capability {
|
||||
index: String
|
||||
|
||||
owners: Listing<Any>
|
||||
}
|
||||
|
||||
class Circuit {
|
||||
account_permissions: Listing<Any>
|
||||
|
||||
disabled_type_urls: Listing<Any>
|
||||
}
|
||||
|
||||
class Crisis {
|
||||
constant_fee: ExpeditedMinDepositItem0
|
||||
}
|
||||
|
||||
class Did {
|
||||
params: Dynamic
|
||||
}
|
||||
|
||||
class Distribution {
|
||||
params: DistributionParams
|
||||
|
||||
fee_pool: FeePool
|
||||
|
||||
delegator_withdraw_infos: Listing<Any>
|
||||
|
||||
previous_proposer: String
|
||||
|
||||
outstanding_rewards: Listing<Any>
|
||||
|
||||
validator_accumulated_commissions: Listing<Any>
|
||||
|
||||
validator_historical_rewards: Listing<Any>
|
||||
|
||||
validator_current_rewards: Listing<Any>
|
||||
|
||||
delegator_starting_infos: Listing<Any>
|
||||
|
||||
validator_slash_events: Listing<Any>
|
||||
}
|
||||
|
||||
class DistributionParams {
|
||||
community_tax: String
|
||||
|
||||
base_proposer_reward: String
|
||||
|
||||
bonus_proposer_reward: String
|
||||
|
||||
withdraw_addr_enabled: Boolean
|
||||
}
|
||||
|
||||
class FeePool {
|
||||
community_pool: Listing<Any>
|
||||
}
|
||||
|
||||
class Dwn {
|
||||
params: DwnParams
|
||||
}
|
||||
|
||||
class DwnParams {
|
||||
allowed_public_keys: Dynamic
|
||||
|
||||
conveyance_preference: String
|
||||
|
||||
attestation_formats: Listing
|
||||
|
||||
schema: Schema
|
||||
|
||||
allowed_operators: Listing
|
||||
}
|
||||
|
||||
class Schema {
|
||||
version: Int
|
||||
|
||||
account: String
|
||||
|
||||
asset: String
|
||||
|
||||
chain: String
|
||||
|
||||
credential: String
|
||||
|
||||
did: String
|
||||
|
||||
jwk: String
|
||||
|
||||
grant: String
|
||||
|
||||
keyshare: String
|
||||
|
||||
profile: String
|
||||
}
|
||||
|
||||
class Evidence {
|
||||
evidence: Listing<Any>
|
||||
}
|
||||
|
||||
class Feegrant {
|
||||
allowances: Listing<Any>
|
||||
}
|
||||
|
||||
class Feeibc {
|
||||
identified_fees: Listing<Any>
|
||||
|
||||
fee_enabled_channels: Listing<Any>
|
||||
|
||||
registered_payees: Listing<Any>
|
||||
|
||||
registered_counterparty_payees: Listing<Any>
|
||||
|
||||
forward_relayers: Listing<Any>
|
||||
}
|
||||
|
||||
class Genutil {
|
||||
gen_txs: Listing
|
||||
}
|
||||
|
||||
class GenTxsItem0 {
|
||||
body: Body
|
||||
|
||||
auth_info: AuthInfo
|
||||
|
||||
signatures: Listing
|
||||
}
|
||||
|
||||
class Body {
|
||||
messages: Listing
|
||||
|
||||
memo: String
|
||||
|
||||
timeout_height: String
|
||||
|
||||
extension_options: Listing<Any>
|
||||
|
||||
non_critical_extension_options: Listing<Any>
|
||||
}
|
||||
|
||||
class MessagesItem0 {
|
||||
`@type`: String
|
||||
|
||||
description: Description
|
||||
|
||||
commission: Commission
|
||||
|
||||
min_self_delegation: String
|
||||
|
||||
delegator_address: String
|
||||
|
||||
validator_address: String
|
||||
|
||||
pubkey: PublicKey
|
||||
|
||||
value: ExpeditedMinDepositItem0
|
||||
}
|
||||
|
||||
class Description {
|
||||
moniker: String
|
||||
|
||||
identity: String
|
||||
|
||||
website: String
|
||||
|
||||
security_contact: String
|
||||
|
||||
details: String
|
||||
}
|
||||
|
||||
class Commission {
|
||||
rate: String
|
||||
|
||||
max_rate: String
|
||||
|
||||
max_change_rate: String
|
||||
}
|
||||
|
||||
class PublicKey {
|
||||
`@type`: String
|
||||
|
||||
key: String
|
||||
}
|
||||
|
||||
class AuthInfo {
|
||||
signer_infos: Listing
|
||||
|
||||
fee: Fee
|
||||
|
||||
tip: Any
|
||||
}
|
||||
|
||||
class SignerInfosItem0 {
|
||||
public_key: PublicKey
|
||||
|
||||
mode_info: ModeInfo
|
||||
|
||||
sequence: String
|
||||
}
|
||||
|
||||
class ModeInfo {
|
||||
single: Single
|
||||
}
|
||||
|
||||
class Single {
|
||||
mode: String
|
||||
}
|
||||
|
||||
class Fee {
|
||||
amount: Listing<Any>
|
||||
|
||||
gas_limit: String
|
||||
|
||||
payer: String
|
||||
|
||||
granter: String
|
||||
}
|
||||
|
||||
class Globalfee {
|
||||
params: GlobalfeeParams
|
||||
}
|
||||
|
||||
class GlobalfeeParams {
|
||||
minimum_gas_prices: Listing
|
||||
}
|
||||
|
||||
class MinimumGasPricesItem0 {
|
||||
amount: String
|
||||
|
||||
denom: String
|
||||
}
|
||||
|
||||
class Gov {
|
||||
starting_proposal_id: String
|
||||
|
||||
deposits: Listing<Any>
|
||||
|
||||
votes: Listing<Any>
|
||||
|
||||
proposals: Listing<Any>
|
||||
|
||||
deposit_params: Any
|
||||
|
||||
voting_params: Any
|
||||
|
||||
tally_params: Any
|
||||
|
||||
params: GovParams
|
||||
|
||||
constitution: String
|
||||
}
|
||||
|
||||
class GovParams {
|
||||
min_deposit: Listing
|
||||
|
||||
max_deposit_period: String
|
||||
|
||||
voting_period: String
|
||||
|
||||
quorum: String
|
||||
|
||||
threshold: String
|
||||
|
||||
veto_threshold: String
|
||||
|
||||
min_initial_deposit_ratio: String
|
||||
|
||||
proposal_cancel_ratio: String
|
||||
|
||||
proposal_cancel_dest: String
|
||||
|
||||
expedited_voting_period: String
|
||||
|
||||
expedited_threshold: String
|
||||
|
||||
expedited_min_deposit: Listing
|
||||
|
||||
burn_vote_quorum: Boolean
|
||||
|
||||
burn_proposal_deposit_prevote: Boolean
|
||||
|
||||
burn_vote_veto: Boolean
|
||||
|
||||
min_deposit_ratio: String
|
||||
}
|
||||
|
||||
class Group {
|
||||
group_seq: String
|
||||
|
||||
groups: Listing<Any>
|
||||
|
||||
group_members: Listing<Any>
|
||||
|
||||
group_policy_seq: String
|
||||
|
||||
group_policies: Listing<Any>
|
||||
|
||||
proposal_seq: String
|
||||
|
||||
proposals: Listing<Any>
|
||||
|
||||
votes: Listing<Any>
|
||||
}
|
||||
|
||||
class Ibc {
|
||||
client_genesis: ClientGenesis
|
||||
|
||||
connection_genesis: ConnectionGenesis
|
||||
|
||||
channel_genesis: ChannelGenesis
|
||||
}
|
||||
|
||||
class ClientGenesis {
|
||||
clients: Listing<Any>
|
||||
|
||||
clients_consensus: Listing<Any>
|
||||
|
||||
clients_metadata: Listing<Any>
|
||||
|
||||
params: ClientGenesisParams
|
||||
|
||||
create_localhost: Boolean
|
||||
|
||||
next_client_sequence: String
|
||||
}
|
||||
|
||||
class ClientGenesisParams {
|
||||
allowed_clients: Listing
|
||||
}
|
||||
|
||||
class ConnectionGenesis {
|
||||
connections: Listing<Any>
|
||||
|
||||
client_connection_paths: Listing<Any>
|
||||
|
||||
next_connection_sequence: String
|
||||
|
||||
params: ConnectionGenesisParams
|
||||
}
|
||||
|
||||
class ConnectionGenesisParams {
|
||||
max_expected_time_per_block: String
|
||||
}
|
||||
|
||||
class ChannelGenesis {
|
||||
channels: Listing<Any>
|
||||
|
||||
acknowledgements: Listing<Any>
|
||||
|
||||
commitments: Listing<Any>
|
||||
|
||||
receipts: Listing<Any>
|
||||
|
||||
send_sequences: Listing<Any>
|
||||
|
||||
recv_sequences: Listing<Any>
|
||||
|
||||
ack_sequences: Listing<Any>
|
||||
|
||||
next_channel_sequence: String
|
||||
|
||||
params: ChannelGenesisParams
|
||||
}
|
||||
|
||||
class ChannelGenesisParams {
|
||||
upgrade_timeout: UpgradeTimeout
|
||||
}
|
||||
|
||||
class UpgradeTimeout {
|
||||
height: Height
|
||||
|
||||
timestamp: String
|
||||
}
|
||||
|
||||
class Height {
|
||||
revision_number: String
|
||||
|
||||
revision_height: String
|
||||
}
|
||||
|
||||
class Interchainaccounts {
|
||||
controller_genesis_state: ControllerGenesisState
|
||||
|
||||
host_genesis_state: HostGenesisState
|
||||
}
|
||||
|
||||
class ControllerGenesisState {
|
||||
active_channels: Listing<Any>
|
||||
|
||||
interchain_accounts: Listing<Any>
|
||||
|
||||
ports: Listing<Any>
|
||||
|
||||
params: ControllerGenesisStateParams
|
||||
}
|
||||
|
||||
class ControllerGenesisStateParams {
|
||||
controller_enabled: Boolean
|
||||
}
|
||||
|
||||
class HostGenesisState {
|
||||
active_channels: Listing<Any>
|
||||
|
||||
interchain_accounts: Listing<Any>
|
||||
|
||||
port: String
|
||||
|
||||
params: HostGenesisStateParams
|
||||
}
|
||||
|
||||
class HostGenesisStateParams {
|
||||
host_enabled: Boolean
|
||||
|
||||
allow_messages: Listing
|
||||
}
|
||||
|
||||
class Mint {
|
||||
minter: Minter
|
||||
|
||||
params: MintParams
|
||||
}
|
||||
|
||||
class Minter {
|
||||
inflation: String
|
||||
|
||||
annual_provisions: String
|
||||
}
|
||||
|
||||
class MintParams {
|
||||
mint_denom: String
|
||||
|
||||
inflation_rate_change: String
|
||||
|
||||
inflation_max: String
|
||||
|
||||
inflation_min: String
|
||||
|
||||
goal_bonded: String
|
||||
|
||||
blocks_per_year: String
|
||||
}
|
||||
|
||||
class Nft {
|
||||
classes: Listing<Any>
|
||||
|
||||
entries: Listing<Any>
|
||||
}
|
||||
|
||||
class Packetfowardmiddleware {
|
||||
params: PacketfowardmiddlewareParams
|
||||
|
||||
in_flight_packets: Dynamic
|
||||
}
|
||||
|
||||
class PacketfowardmiddlewareParams {
|
||||
fee_percentage: String
|
||||
}
|
||||
|
||||
class Poa {
|
||||
params: PoaParams
|
||||
}
|
||||
|
||||
class PoaParams {
|
||||
admins: Listing
|
||||
|
||||
allow_validator_self_exit: Boolean
|
||||
}
|
||||
|
||||
class Slashing {
|
||||
params: SlashingParams
|
||||
|
||||
signing_infos: Listing<Any>
|
||||
|
||||
missed_blocks: Listing<Any>
|
||||
}
|
||||
|
||||
class SlashingParams {
|
||||
signed_blocks_window: String
|
||||
|
||||
min_signed_per_window: String
|
||||
|
||||
downtime_jail_duration: String
|
||||
|
||||
slash_fraction_double_sign: String
|
||||
|
||||
slash_fraction_downtime: String
|
||||
}
|
||||
|
||||
class Staking {
|
||||
params: StakingParams
|
||||
|
||||
last_total_power: String
|
||||
|
||||
last_validator_powers: Listing<Any>
|
||||
|
||||
validators: Listing<Any>
|
||||
|
||||
delegations: Listing<Any>
|
||||
|
||||
unbonding_delegations: Listing<Any>
|
||||
|
||||
redelegations: Listing<Any>
|
||||
|
||||
exported: Boolean
|
||||
}
|
||||
|
||||
class StakingParams {
|
||||
unbonding_time: String
|
||||
|
||||
max_validators: Int
|
||||
|
||||
max_entries: Int
|
||||
|
||||
historical_entries: Int
|
||||
|
||||
bond_denom: String
|
||||
|
||||
min_commission_rate: String
|
||||
}
|
||||
|
||||
class Svc {
|
||||
params: SvcParams
|
||||
}
|
||||
|
||||
class SvcParams {
|
||||
categories: Any
|
||||
|
||||
types: Any
|
||||
}
|
||||
|
||||
class Tokenfactory {
|
||||
params: TokenfactoryParams
|
||||
|
||||
factory_denoms: Listing<Any>
|
||||
}
|
||||
|
||||
class TokenfactoryParams {
|
||||
denom_creation_fee: Listing<Any>
|
||||
|
||||
denom_creation_gas_consume: Int
|
||||
}
|
||||
|
||||
class Transfer {
|
||||
port_id: String
|
||||
|
||||
denom_traces: Listing<Any>
|
||||
|
||||
params: TransferParams
|
||||
|
||||
total_escrowed: Listing<Any>
|
||||
}
|
||||
|
||||
class TransferParams {
|
||||
send_enabled: Boolean
|
||||
|
||||
receive_enabled: Boolean
|
||||
}
|
||||
|
||||
class Consensus {
|
||||
params: ConsensusParams
|
||||
}
|
||||
|
||||
class ConsensusParams {
|
||||
block: Block
|
||||
|
||||
evidence: ParamsEvidence
|
||||
|
||||
validator: Validator
|
||||
|
||||
version: Version
|
||||
|
||||
abci: Abci
|
||||
}
|
||||
|
||||
class Block {
|
||||
max_bytes: String
|
||||
|
||||
max_gas: String
|
||||
}
|
||||
|
||||
class ParamsEvidence {
|
||||
max_age_num_blocks: String
|
||||
|
||||
max_age_duration: String
|
||||
|
||||
max_bytes: String
|
||||
}
|
||||
|
||||
class Validator {
|
||||
pub_key_types: Listing
|
||||
}
|
||||
|
||||
class Version {
|
||||
app: String
|
||||
}
|
||||
|
||||
class Abci {
|
||||
vote_extensions_enable_height: String
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
amends "../basePklProject.pkl"
|
||||
|
||||
package {
|
||||
name = "chain.sonr"
|
||||
version = "0.0.1"
|
||||
name = "sonr.chain"
|
||||
version = "0.0.2"
|
||||
}
|
||||
|
||||
@@ -1,275 +0,0 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/pkg/common/models" }
|
||||
|
||||
module common.types.ORM
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
|
||||
// Enums
|
||||
typealias AssetType = "native"|"wrapped"|"staking"|"pool"|"ibc"|"cw20"
|
||||
|
||||
typealias DIDMethod = "ipfs"|"sonr"|"bitcoin"|"ethereum"|"ibc"|"webauthn"|"dwn"|"service"
|
||||
|
||||
typealias KeyAlgorithm = "es256"|"es384"|"es512"|"eddsa"|"es256k"|"ecdsa"
|
||||
|
||||
typealias KeyCurve = "p256"|"p384"|"p521"|"x25519"|"x448"|"ed25519"|"ed448"|"secp256k1"|"bls12381"|"keccak256"
|
||||
|
||||
typealias KeyEncoding = "raw"|"hex"|"multibase"
|
||||
|
||||
typealias KeyRole = "authentication"|"assertion"|"delegation"|"invocation"
|
||||
|
||||
typealias KeyType = "octet"|"elliptic"|"rsa"|"symmetric"|"hmac"|"mpc"|"zk"|"webauthn"|"bip32"
|
||||
|
||||
typealias KeyShareRole = "user"|"validator"
|
||||
|
||||
typealias PermissionGrant = "none"|"read"|"write"|"verify"|"broadcast"|"admin"
|
||||
|
||||
typealias PermissionScope = "profile"|"metadata"|"permissions"|"wallets"|"transactions"|"user"|"validator"
|
||||
|
||||
typealias Base58 = String
|
||||
typealias Base64 = String
|
||||
|
||||
typealias Bech32 = String
|
||||
typealias Keccak = String
|
||||
|
||||
typealias ChainCode = UInt
|
||||
typealias Scope = String
|
||||
|
||||
typealias Hex = String
|
||||
|
||||
class PrimaryKey extends go.Field {
|
||||
structTags {
|
||||
["json"] = "%{name},omitempty"
|
||||
["query"] = "%{name}"
|
||||
}
|
||||
}
|
||||
|
||||
class JsonField extends go.Field {
|
||||
structTags {
|
||||
["json"] = "%{name},omitempty"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Account {
|
||||
@PrimaryKey
|
||||
id: String
|
||||
|
||||
@JsonField
|
||||
name: String
|
||||
|
||||
@JsonField
|
||||
address: Bech32|Keccak|String
|
||||
|
||||
@JsonField
|
||||
publicKey: Base58
|
||||
|
||||
@JsonField
|
||||
chainCode: ChainCode
|
||||
|
||||
@JsonField
|
||||
index: Int
|
||||
|
||||
@JsonField
|
||||
controller: Bech32
|
||||
|
||||
@JsonField
|
||||
createdAt: String?
|
||||
}
|
||||
|
||||
class Asset {
|
||||
@PrimaryKey
|
||||
id: String
|
||||
|
||||
@JsonField
|
||||
name: String
|
||||
|
||||
@JsonField
|
||||
symbol: String
|
||||
|
||||
@JsonField
|
||||
decimals: Int
|
||||
|
||||
@JsonField
|
||||
chainCode: ChainCode
|
||||
|
||||
@JsonField
|
||||
createdAt: String?
|
||||
}
|
||||
|
||||
class Chain {
|
||||
@PrimaryKey
|
||||
id: String
|
||||
|
||||
@JsonField
|
||||
name: String
|
||||
|
||||
@JsonField
|
||||
networkId: String
|
||||
|
||||
@JsonField
|
||||
chainCode: ChainCode
|
||||
|
||||
@JsonField
|
||||
createdAt: String?
|
||||
}
|
||||
|
||||
class Credential {
|
||||
@PrimaryKey
|
||||
id: String
|
||||
|
||||
@JsonField
|
||||
subject: String
|
||||
|
||||
@JsonField
|
||||
controller: Bech32
|
||||
|
||||
@JsonField
|
||||
attestationType: String
|
||||
|
||||
@JsonField
|
||||
origin: String
|
||||
|
||||
@JsonField
|
||||
label: String?
|
||||
|
||||
@JsonField
|
||||
deviceId: String?
|
||||
|
||||
@JsonField
|
||||
credentialId: Base64
|
||||
|
||||
@JsonField
|
||||
publicKey: Base64
|
||||
|
||||
@JsonField
|
||||
transport: List<String>
|
||||
|
||||
@JsonField
|
||||
signCount: UInt
|
||||
|
||||
@JsonField
|
||||
userPresent: Boolean
|
||||
|
||||
@JsonField
|
||||
userVerified: Boolean
|
||||
|
||||
@JsonField
|
||||
backupEligible: Boolean
|
||||
|
||||
@JsonField
|
||||
backupState: Boolean
|
||||
|
||||
@JsonField
|
||||
cloneWarning: Boolean
|
||||
|
||||
@JsonField
|
||||
createdAt: String?
|
||||
|
||||
@JsonField
|
||||
updatedAt: String?
|
||||
}
|
||||
|
||||
class DID {
|
||||
@PrimaryKey
|
||||
id: String
|
||||
role: KeyRole
|
||||
algorithm: KeyAlgorithm
|
||||
encoding: KeyEncoding
|
||||
curve: KeyCurve
|
||||
key_type: KeyType
|
||||
raw: Base64
|
||||
jwk: JWK
|
||||
}
|
||||
|
||||
class JWK {
|
||||
@JsonField
|
||||
kty: String
|
||||
|
||||
@JsonField
|
||||
crv: String
|
||||
|
||||
@JsonField
|
||||
x: String
|
||||
|
||||
@JsonField
|
||||
y: String
|
||||
|
||||
@JsonField
|
||||
n: String
|
||||
|
||||
@JsonField
|
||||
e: String
|
||||
}
|
||||
|
||||
class Grant {
|
||||
@PrimaryKey
|
||||
id: UInt
|
||||
|
||||
@JsonField
|
||||
subject: String
|
||||
|
||||
@JsonField
|
||||
controller: Bech32
|
||||
|
||||
@JsonField
|
||||
origin: String
|
||||
|
||||
@JsonField
|
||||
token: String
|
||||
|
||||
@JsonField
|
||||
scopes: List<String>
|
||||
|
||||
@JsonField
|
||||
createdAt: String?
|
||||
|
||||
@JsonField
|
||||
updatedAt: String?
|
||||
}
|
||||
|
||||
class Keyshare {
|
||||
@PrimaryKey
|
||||
id: String
|
||||
|
||||
@JsonField
|
||||
data: Base64
|
||||
|
||||
@JsonField
|
||||
role: Int
|
||||
|
||||
@JsonField
|
||||
createdAt: String?
|
||||
|
||||
@JsonField
|
||||
lastRefreshed: String?
|
||||
}
|
||||
|
||||
class Profile {
|
||||
@PrimaryKey
|
||||
id: String
|
||||
|
||||
@JsonField
|
||||
subject: String
|
||||
|
||||
@JsonField
|
||||
controller: Bech32
|
||||
|
||||
@JsonField
|
||||
originUri: String?
|
||||
|
||||
@JsonField
|
||||
publicMetadata: String?
|
||||
|
||||
@JsonField
|
||||
privateMetadata: String?
|
||||
|
||||
@JsonField
|
||||
createdAt: String?
|
||||
|
||||
@JsonField
|
||||
updatedAt: String?
|
||||
}
|
||||
|
||||
db_name: String = "vault"
|
||||
db_version: Int = 1
|
||||
@@ -1,6 +1,6 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/pkg/common/types" }
|
||||
|
||||
module common.types.Ctx
|
||||
module sonr.hway.Ctx
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/pkg/gateway/types" }
|
||||
|
||||
module sonr.hway.Gate
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
class JsonField extends go.Field {
|
||||
structTags {
|
||||
["json"] = "%{name},omitempty"
|
||||
}
|
||||
}
|
||||
|
||||
class Config {
|
||||
@JsonField
|
||||
chainId: String
|
||||
|
||||
@JsonField
|
||||
ipfsGatewayUrl: String
|
||||
|
||||
@JsonField
|
||||
landingUrl: String
|
||||
|
||||
@JsonField
|
||||
authProxyUrl: String
|
||||
|
||||
@JsonField
|
||||
sonrApiUrl: String
|
||||
|
||||
@JsonField
|
||||
sonrRpcUrl: String
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/pkg/common/models" }
|
||||
|
||||
module common.types.ORM
|
||||
module sonr.motr.ORM
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
@@ -25,7 +25,6 @@ typealias KeyShareRole = "user"|"validator"
|
||||
typealias PermissionGrant = "none"|"read"|"write"|"verify"|"broadcast"|"admin"
|
||||
|
||||
typealias PermissionScope = "profile"|"metadata"|"permissions"|"wallets"|"transactions"|"user"|"validator"
|
||||
|
||||
typealias Base58 = String
|
||||
typealias Base64 = String
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
amends "../basePklProject.pkl"
|
||||
|
||||
package {
|
||||
name = "base.types"
|
||||
name = "sonr.hway"
|
||||
version = "0.0.1"
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/x/dwn/types/attns" }
|
||||
|
||||
module sonr.motr.ATN
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
|
||||
// Capability hierarchy for smart account operations
|
||||
// ----------------------------------------------
|
||||
// OWNER
|
||||
// └─ OPERATOR
|
||||
// └─ AUTHENTICATE
|
||||
// └─ AUTHORIZE
|
||||
// └─ DELEGATE
|
||||
// ├─ EXECUTE
|
||||
// └─ INVOKE
|
||||
// ├─ PROPOSE
|
||||
// └─ SIGN
|
||||
// └─ VOTE
|
||||
// └─ SET_POLICY
|
||||
// └─ SET_THRESHOLD
|
||||
// └─ RECOVER
|
||||
// └─ SOCIAL
|
||||
// └─ VAULT
|
||||
|
||||
|
||||
typealias Capability = "CAP_OWNER"|"CAP_OPERATOR"|"CAP_OBSERVER"|"CAP_AUTHENTICATE"|"CAP_AUTHORIZE"|"CAP_DELEGATE"|"CAP_INVOKE"|"CAP_EXECUTE"|"CAP_PROPOSE"|"CAP_SIGN"|"CAP_SET_POLICY"|"CAP_SET_THRESHOLD"|"CAP_RECOVER"|"CAP_SOCIAL"|"CAP_VOTE"
|
||||
|
||||
typealias ResourceType = "RES_ACCOUNT"|"RES_TRANSACTION"|"RES_POLICY"|"RES_RECOVERY"|"RES_VAULT"
|
||||
|
||||
typealias PolicyType = "POLICY_THRESHOLD"|"POLICY_TIMELOCK"|"POLICY_WHITELIST"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/pkg/core/dwn" }
|
||||
@go.Package { name = "github.com/onsonr/sonr/pkg/vault/types" }
|
||||
|
||||
module common.types.DWN
|
||||
module sonr.motr.DWN
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
@@ -17,7 +17,7 @@ class Config {
|
||||
ipfsGatewayUrl: String
|
||||
|
||||
@JsonField
|
||||
motrKeyshare: String
|
||||
motrToken: String
|
||||
|
||||
@JsonField
|
||||
motrAddress: String
|
||||
@@ -38,16 +38,16 @@ class Config {
|
||||
class Environment {
|
||||
@JsonField
|
||||
isDevelopment: Boolean
|
||||
|
||||
|
||||
@JsonField
|
||||
cacheVersion: String
|
||||
|
||||
|
||||
@JsonField
|
||||
httpserverPath: String
|
||||
|
||||
|
||||
@JsonField
|
||||
wasmExecPath: String
|
||||
|
||||
|
||||
@JsonField
|
||||
wasmPath: String
|
||||
}
|
||||
@@ -57,26 +57,25 @@ class Schema {
|
||||
|
||||
@JsonField
|
||||
account: String
|
||||
|
||||
|
||||
@JsonField
|
||||
asset: String
|
||||
|
||||
|
||||
@JsonField
|
||||
chain: String
|
||||
|
||||
|
||||
@JsonField
|
||||
credential: String
|
||||
|
||||
@JsonField
|
||||
jwk: String
|
||||
|
||||
|
||||
@JsonField
|
||||
grant: String
|
||||
|
||||
|
||||
@JsonField
|
||||
keyshare: String
|
||||
|
||||
@JsonField
|
||||
profile: String
|
||||
}
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
amends "../basePklProject.pkl"
|
||||
|
||||
package {
|
||||
name = "base.types"
|
||||
name = "sonr.motr"
|
||||
version = "0.0.1"
|
||||
}
|
||||
Reference in New Issue
Block a user