mycelium-stellar 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,62 @@
1
+ Metadata-Version: 2.4
2
+ Name: mycelium-stellar
3
+ Version: 0.1.0
4
+ Summary: Mycelium — Python-first smart-contract + agent toolchain for Stellar/Soroban (one install: DSL, SDK, CLI, compiler). Install: pip install mycelium-stellar; import mycelium.
5
+ Author: Mycelium
6
+ Project-URL: Homepage, https://github.com/Srizdebnath/Mycelium
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: mycelium-sdk==0.1.0
10
+ Requires-Dist: mycelium-cli==0.1.0
11
+ Requires-Dist: mycelium-compiler==0.1.0
12
+ Provides-Extra: langgraph
13
+ Requires-Dist: langgraph; extra == "langgraph"
14
+ Requires-Dist: langchain-core; extra == "langgraph"
15
+ Provides-Extra: gemini
16
+ Requires-Dist: google-generativeai; extra == "gemini"
17
+ Provides-Extra: anthropic
18
+ Requires-Dist: anthropic; extra == "anthropic"
19
+
20
+ # Mycelium
21
+
22
+ **The Python-first framework for smart-contract development and agentic orchestration on Stellar/Soroban.**
23
+
24
+ Installing `mycelium` gives you the whole toolchain in one shot:
25
+
26
+ - `import mycelium` — the contract-authoring DSL (`@contract`, `@external`, `@view`, typed primitives) plus the SDK facade (`AgentContext`, `HiveClient`, x402).
27
+ - `import mycelium_sdk` — the on-chain agent SDK (signing, live Soroban contract calls, hive discovery, escrow/x402, AI adapters).
28
+ - the `mycelium` CLI command — `init`, `newwallet`, `compile`, `check`, `deploy`, `register`, `agent`.
29
+ - the Python → Soroban-WASM compiler.
30
+
31
+ ## Install
32
+
33
+ ```bash
34
+ pip install mycelium
35
+ # optional AI-framework adapters:
36
+ pip install "mycelium[langgraph]" # or [gemini] / [anthropic]
37
+ ```
38
+
39
+ ## Quickstart
40
+
41
+ ```bash
42
+ mycelium init my_agent
43
+ cd my_agent
44
+ mycelium newwallet
45
+ mycelium compile
46
+ mycelium deploy --network testnet
47
+ mycelium register
48
+ ```
49
+
50
+ ```python
51
+ from mycelium import AgentContext, HiveClient
52
+
53
+ ctx = AgentContext(keypair_path=".mycelium/wallet.json", network_type="testnet")
54
+ hive = HiveClient(ctx)
55
+ hive.register("sentinel_alpha", ["data-analysis"], "https://sentinel.example/api")
56
+ print(hive.resolve_agent("sentinel_alpha"))
57
+ ```
58
+
59
+ The `mycelium compile` / `deploy` commands need the `stellar` CLI (v27.0.0); the
60
+ compiler auto-downloads it on first use.
61
+
62
+ Licensed under MIT.
@@ -0,0 +1,43 @@
1
+ # Mycelium
2
+
3
+ **The Python-first framework for smart-contract development and agentic orchestration on Stellar/Soroban.**
4
+
5
+ Installing `mycelium` gives you the whole toolchain in one shot:
6
+
7
+ - `import mycelium` — the contract-authoring DSL (`@contract`, `@external`, `@view`, typed primitives) plus the SDK facade (`AgentContext`, `HiveClient`, x402).
8
+ - `import mycelium_sdk` — the on-chain agent SDK (signing, live Soroban contract calls, hive discovery, escrow/x402, AI adapters).
9
+ - the `mycelium` CLI command — `init`, `newwallet`, `compile`, `check`, `deploy`, `register`, `agent`.
10
+ - the Python → Soroban-WASM compiler.
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ pip install mycelium
16
+ # optional AI-framework adapters:
17
+ pip install "mycelium[langgraph]" # or [gemini] / [anthropic]
18
+ ```
19
+
20
+ ## Quickstart
21
+
22
+ ```bash
23
+ mycelium init my_agent
24
+ cd my_agent
25
+ mycelium newwallet
26
+ mycelium compile
27
+ mycelium deploy --network testnet
28
+ mycelium register
29
+ ```
30
+
31
+ ```python
32
+ from mycelium import AgentContext, HiveClient
33
+
34
+ ctx = AgentContext(keypair_path=".mycelium/wallet.json", network_type="testnet")
35
+ hive = HiveClient(ctx)
36
+ hive.register("sentinel_alpha", ["data-analysis"], "https://sentinel.example/api")
37
+ print(hive.resolve_agent("sentinel_alpha"))
38
+ ```
39
+
40
+ The `mycelium compile` / `deploy` commands need the `stellar` CLI (v27.0.0); the
41
+ compiler auto-downloads it on first use.
42
+
43
+ Licensed under MIT.
@@ -0,0 +1,18 @@
1
+ from mycelium.types import (
2
+ contract, external, view, storage, event, auth, state,
3
+ Symbol, i128, i64, i32, u64, u32,
4
+ Address, U128, U64, U32, I128, I32, Bool, Bytes, Map, Vec, Env
5
+ )
6
+ from mycelium_sdk.context import AgentContext, StellarNetwork, TxResult
7
+ from mycelium_sdk.hive import HiveClient
8
+ from mycelium_sdk.x402.settlement import EscrowPaymentRouter, EscrowPaymentManager
9
+ from mycelium_sdk.agent_loop import run_agent_loop, ContractTool
10
+
11
+ __all__ = [
12
+ "contract", "external", "view", "storage", "event", "auth", "state",
13
+ "Symbol", "i128", "i64", "i32", "u64", "u32",
14
+ "Address", "U128", "U64", "U32", "I128", "I32", "Bool", "Bytes", "Map", "Vec", "Env",
15
+ "AgentContext", "StellarNetwork", "TxResult", "HiveClient",
16
+ "EscrowPaymentRouter", "EscrowPaymentManager",
17
+ "run_agent_loop", "ContractTool",
18
+ ]
@@ -0,0 +1,15 @@
1
+ """
2
+ Re-export of SDK constants under the `mycelium` namespace so that
3
+ `from mycelium.constants import HIVEMIND_REGISTRY_ADDRESS` (as used in sdk.md
4
+ examples) resolves. The canonical definitions live in `mycelium_sdk.constants`.
5
+ """
6
+
7
+ from mycelium_sdk.constants import ( # noqa: F401
8
+ HIVEMIND_REGISTRY_ADDRESS,
9
+ SOROBAN_RPC_URLS,
10
+ HORIZON_URLS,
11
+ NETWORK_PASSPHRASES,
12
+ FRIENDBOT_URL,
13
+ MAINNET_MIN_XLM,
14
+ normalize_network,
15
+ )
@@ -0,0 +1,62 @@
1
+ Metadata-Version: 2.4
2
+ Name: mycelium-stellar
3
+ Version: 0.1.0
4
+ Summary: Mycelium — Python-first smart-contract + agent toolchain for Stellar/Soroban (one install: DSL, SDK, CLI, compiler). Install: pip install mycelium-stellar; import mycelium.
5
+ Author: Mycelium
6
+ Project-URL: Homepage, https://github.com/Srizdebnath/Mycelium
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: mycelium-sdk==0.1.0
10
+ Requires-Dist: mycelium-cli==0.1.0
11
+ Requires-Dist: mycelium-compiler==0.1.0
12
+ Provides-Extra: langgraph
13
+ Requires-Dist: langgraph; extra == "langgraph"
14
+ Requires-Dist: langchain-core; extra == "langgraph"
15
+ Provides-Extra: gemini
16
+ Requires-Dist: google-generativeai; extra == "gemini"
17
+ Provides-Extra: anthropic
18
+ Requires-Dist: anthropic; extra == "anthropic"
19
+
20
+ # Mycelium
21
+
22
+ **The Python-first framework for smart-contract development and agentic orchestration on Stellar/Soroban.**
23
+
24
+ Installing `mycelium` gives you the whole toolchain in one shot:
25
+
26
+ - `import mycelium` — the contract-authoring DSL (`@contract`, `@external`, `@view`, typed primitives) plus the SDK facade (`AgentContext`, `HiveClient`, x402).
27
+ - `import mycelium_sdk` — the on-chain agent SDK (signing, live Soroban contract calls, hive discovery, escrow/x402, AI adapters).
28
+ - the `mycelium` CLI command — `init`, `newwallet`, `compile`, `check`, `deploy`, `register`, `agent`.
29
+ - the Python → Soroban-WASM compiler.
30
+
31
+ ## Install
32
+
33
+ ```bash
34
+ pip install mycelium
35
+ # optional AI-framework adapters:
36
+ pip install "mycelium[langgraph]" # or [gemini] / [anthropic]
37
+ ```
38
+
39
+ ## Quickstart
40
+
41
+ ```bash
42
+ mycelium init my_agent
43
+ cd my_agent
44
+ mycelium newwallet
45
+ mycelium compile
46
+ mycelium deploy --network testnet
47
+ mycelium register
48
+ ```
49
+
50
+ ```python
51
+ from mycelium import AgentContext, HiveClient
52
+
53
+ ctx = AgentContext(keypair_path=".mycelium/wallet.json", network_type="testnet")
54
+ hive = HiveClient(ctx)
55
+ hive.register("sentinel_alpha", ["data-analysis"], "https://sentinel.example/api")
56
+ print(hive.resolve_agent("sentinel_alpha"))
57
+ ```
58
+
59
+ The `mycelium compile` / `deploy` commands need the `stellar` CLI (v27.0.0); the
60
+ compiler auto-downloads it on first use.
61
+
62
+ Licensed under MIT.
@@ -0,0 +1,13 @@
1
+ README.md
2
+ __init__.py
3
+ constants.py
4
+ pyproject.toml
5
+ types.py
6
+ ./__init__.py
7
+ ./constants.py
8
+ ./types.py
9
+ mycelium_stellar.egg-info/PKG-INFO
10
+ mycelium_stellar.egg-info/SOURCES.txt
11
+ mycelium_stellar.egg-info/dependency_links.txt
12
+ mycelium_stellar.egg-info/requires.txt
13
+ mycelium_stellar.egg-info/top_level.txt
@@ -0,0 +1,13 @@
1
+ mycelium-sdk==0.1.0
2
+ mycelium-cli==0.1.0
3
+ mycelium-compiler==0.1.0
4
+
5
+ [anthropic]
6
+ anthropic
7
+
8
+ [gemini]
9
+ google-generativeai
10
+
11
+ [langgraph]
12
+ langgraph
13
+ langchain-core
@@ -0,0 +1,39 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ # Distribution name on PyPI is `mycelium-stellar` (the bare `mycelium` name is
7
+ # taken by an unrelated project). The IMPORT name stays `import mycelium` — see
8
+ # [tool.setuptools.package-dir] below.
9
+ name = "mycelium-stellar"
10
+ version = "0.1.0"
11
+ description = "Mycelium — Python-first smart-contract + agent toolchain for Stellar/Soroban (one install: DSL, SDK, CLI, compiler). Install: pip install mycelium-stellar; import mycelium."
12
+ readme = "README.md"
13
+ requires-python = ">=3.10"
14
+ authors = [{ name = "Mycelium" }]
15
+ # Installing `mycelium-stellar` pulls in the whole toolchain: this package
16
+ # provides the `import mycelium` DSL + SDK facade, and the dependencies below
17
+ # provide the `mycelium_sdk` library, the `mycelium` CLI command (from
18
+ # mycelium-cli's [project.scripts]), and the Python-to-WASM compiler.
19
+ dependencies = [
20
+ "mycelium-sdk==0.1.0",
21
+ "mycelium-cli==0.1.0",
22
+ "mycelium-compiler==0.1.0",
23
+ ]
24
+
25
+ [project.optional-dependencies]
26
+ langgraph = ["langgraph", "langchain-core"]
27
+ gemini = ["google-generativeai"]
28
+ anthropic = ["anthropic"]
29
+
30
+ [project.urls]
31
+ Homepage = "https://github.com/Srizdebnath/Mycelium"
32
+
33
+ # The package `mycelium` lives directly in this directory (flat-as-package
34
+ # layout), so map the import name to "." explicitly rather than auto-discovering.
35
+ [tool.setuptools]
36
+ packages = ["mycelium"]
37
+
38
+ [tool.setuptools.package-dir]
39
+ mycelium = "."
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,124 @@
1
+ # Core Mycelium Type System for Compiler validation and AST Type Enforcement
2
+
3
+ class Symbol(str):
4
+ pass
5
+
6
+ class i128(int):
7
+ pass
8
+
9
+ class i64(int):
10
+ pass
11
+
12
+ class i32(int):
13
+ pass
14
+
15
+ class u64(int):
16
+ pass
17
+
18
+ class u32(int):
19
+ pass
20
+
21
+ # Mock collections for type validator checks
22
+ class Map(dict):
23
+ pass
24
+
25
+ class Vec(list):
26
+ pass
27
+
28
+ class Bytes(bytes):
29
+ pass
30
+
31
+ # Capitalized Types
32
+ class Address(str):
33
+ def require_auth(self):
34
+ pass
35
+
36
+ class U128(int):
37
+ pass
38
+
39
+ class U64(int):
40
+ pass
41
+
42
+ class U32(int):
43
+ pass
44
+
45
+ class I128(int):
46
+ pass
47
+
48
+ class I32(int):
49
+ pass
50
+
51
+ class Bool:
52
+ pass
53
+
54
+ class StorageMock:
55
+ def get(self, key, default=None):
56
+ return default
57
+ def set(self, key, value):
58
+ pass
59
+ def has(self, key):
60
+ return False
61
+ def remove(self, key):
62
+ pass
63
+
64
+ class Env:
65
+ def storage(self):
66
+ return StorageMock()
67
+ def ledger(self):
68
+ return self
69
+ def timestamp(self):
70
+ return 0
71
+ def sequence(self):
72
+ return 0
73
+ def current_contract_address(self):
74
+ return Address("")
75
+ def current_contract(self):
76
+ return Address("")
77
+ def call(self, contract, method, args):
78
+ pass
79
+ def invoke_contract(self, contract, method, args):
80
+ pass
81
+ def transfer(self, from_addr, to_addr, token, amount):
82
+ pass
83
+ def emit_event(self, topic, data):
84
+ pass
85
+ def crypto(self):
86
+ return self
87
+ def sha256(self, data):
88
+ return Bytes(b"")
89
+ def keccak256(self, data):
90
+ return Bytes(b"")
91
+ def verify_sig_ed25519(self, pk, msg, sig):
92
+ return True
93
+
94
+ # Decorators
95
+ def contract(cls):
96
+ return cls
97
+
98
+ def external(func):
99
+ return func
100
+
101
+ def view(func):
102
+ return func
103
+
104
+ def storage(func):
105
+ return func
106
+
107
+ def event(cls):
108
+ return cls
109
+
110
+ def auth(func):
111
+ return func
112
+
113
+ class state:
114
+ @staticmethod
115
+ def instance(func):
116
+ return func
117
+
118
+ @staticmethod
119
+ def persistent(func):
120
+ return func
121
+
122
+ @staticmethod
123
+ def temporary(func):
124
+ return func