Initial commit: Python SDK for Dragonchain (Prime)
Synchronous Python SDK modeled on prime-sdk-go. Provides DC1-HMAC-SHA256 auth, dataclass models, and resource clients for system, transaction, transaction-type, smart-contract, and block endpoints, plus a YAML credentials loader.
This commit is contained in:
12
prime_sdk/block.py
Normal file
12
prime_sdk/block.py
Normal file
@@ -0,0 +1,12 @@
|
||||
"""Block endpoints."""
|
||||
|
||||
from .client import Client
|
||||
from .models import Block
|
||||
|
||||
|
||||
class BlockClient:
|
||||
def __init__(self, client: Client):
|
||||
self._client = client
|
||||
|
||||
def get(self, block_id: str) -> Block:
|
||||
return self._client.get(f"/api/v1/block/{block_id}", Block)
|
||||
Reference in New Issue
Block a user