mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-23 19:54:18 +01:00
V2 tokens: rename field tokens to proofs, add documentation
This commit is contained in:
@@ -232,12 +232,12 @@ class TokenMintJson(BaseModel):
|
||||
ks: List[str]
|
||||
|
||||
|
||||
class TokenJson(BaseModel):
|
||||
tokens: List[Proof]
|
||||
class TokenV2(BaseModel):
|
||||
proofs: List[Proof]
|
||||
mints: Optional[Dict[str, TokenMintJson]] = None
|
||||
|
||||
def to_dict(self):
|
||||
return dict(
|
||||
tokens=[p.to_dict() for p in self.tokens],
|
||||
proofs=[p.to_dict() for p in self.proofs],
|
||||
mints={k: v.dict() for k, v in self.mints.items()}, # type: ignore
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user