Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
overcat committed Aug 25, 2023
1 parent 10afb59 commit 1c720bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
2 changes: 2 additions & 0 deletions stellar_sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from . import scval
from .__version__ import (
__author__,
__author_email__,
Expand Down Expand Up @@ -30,6 +31,7 @@
from .server_async import *
from .signer import *
from .signer_key import *
from .soroban_server import *
from .strkey import *
from .time_bounds import *
from .transaction import *
Expand Down
17 changes: 1 addition & 16 deletions stellar_sdk/soroban_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
from pydantic import BaseModel, Field
from pydantic.generics import GenericModel

from .xdr.sc_val import SCVal as XdrSCVal

T = TypeVar("T")

Id = Union[str, int]
Expand All @@ -15,7 +13,7 @@
# JSON-RPC 2.0 definitions
class Request(GenericModel, Generic[T]):
jsonrpc: str = "2.0"
id: Id # TODO: Optional?
id: Id
method: str
params: Optional[T]

Expand Down Expand Up @@ -44,15 +42,6 @@ class GetAccountResponse(BaseModel):


# get_events
class SegmentFilter(BaseModel):
wildcard: Optional[str]
scval: Optional[XdrSCVal]

class Config:
json_encoders = {
XdrSCVal: lambda v: v.to_xdr(),
}
arbitrary_types_allowed = True


class EventFilterType(Enum):
Expand Down Expand Up @@ -176,10 +165,6 @@ class TransactionResponseError(BaseModel):
data: Dict[str, Any]


class SCVal(BaseModel):
xdr: str


class GetTransactionRequest(BaseModel):
hash: str

Expand Down

0 comments on commit 1c720bc

Please sign in to comment.