Skip to content

Commit 40f22c0

Browse files
committed
pyo3 stubs
1 parent c9b818c commit 40f22c0

File tree

1 file changed

+129
-10
lines changed

1 file changed

+129
-10
lines changed

pyo3/chia_wallet_sdk.pyi

Lines changed: 129 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import List, Optional, Union, Awaitable
22
from enum import IntEnum
33

4-
ClvmType = Union[Program, PublicKey, Signature, K1PublicKey, K1Signature, R1PublicKey, R1Signature, Remark, AggSigParent, AggSigPuzzle, AggSigAmount, AggSigPuzzleAmount, AggSigParentAmount, AggSigParentPuzzle, AggSigUnsafe, AggSigMe, CreateCoin, ReserveFee, CreateCoinAnnouncement, CreatePuzzleAnnouncement, AssertCoinAnnouncement, AssertPuzzleAnnouncement, AssertConcurrentSpend, AssertConcurrentPuzzle, AssertSecondsRelative, AssertSecondsAbsolute, AssertHeightRelative, AssertHeightAbsolute, AssertBeforeSecondsRelative, AssertBeforeSecondsAbsolute, AssertBeforeHeightRelative, AssertBeforeHeightAbsolute, AssertMyCoinId, AssertMyParentId, AssertMyPuzzleHash, AssertMyAmount, AssertMyBirthSeconds, AssertMyBirthHeight, AssertEphemeral, SendMessage, ReceiveMessage, Softfork, Pair, NftMetadata, CurriedProgram, MipsMemo, InnerPuzzleMemo, RestrictionMemo, WrapperMemo, Force1of2RestrictedVariableMemo, MemoKind, MemberMemo, MofNMemo, MeltSingleton, TransferNft, RunCatTail, UpdateNftMetadata, UpdateDataStoreMerkleRoot, str, int, bool, bytes, None, List['ClvmType']]
4+
ClvmType = Union[Program, PublicKey, Signature, K1PublicKey, K1Signature, R1PublicKey, R1Signature, Remark, AggSigParent, AggSigPuzzle, AggSigAmount, AggSigPuzzleAmount, AggSigParentAmount, AggSigParentPuzzle, AggSigUnsafe, AggSigMe, CreateCoin, ReserveFee, CreateCoinAnnouncement, CreatePuzzleAnnouncement, AssertCoinAnnouncement, AssertPuzzleAnnouncement, AssertConcurrentSpend, AssertConcurrentPuzzle, AssertSecondsRelative, AssertSecondsAbsolute, AssertHeightRelative, AssertHeightAbsolute, AssertBeforeSecondsRelative, AssertBeforeSecondsAbsolute, AssertBeforeHeightRelative, AssertBeforeHeightAbsolute, AssertMyCoinId, AssertMyParentId, AssertMyPuzzleHash, AssertMyAmount, AssertMyBirthSeconds, AssertMyBirthHeight, AssertEphemeral, SendMessage, ReceiveMessage, Softfork, Pair, NftMetadata, CurriedProgram, MipsMemo, InnerPuzzleMemo, RestrictionMemo, WrapperMemo, Force1of2RestrictedVariableMemo, MemoKind, MemberMemo, MofNMemo, MeltSingleton, TransferNft, RunCatTail, UpdateNftMetadata, UpdateDataStoreMerkleRoot, OptionMetadata, NotarizedPayment, Payment, str, int, bool, bytes, None, List['ClvmType']]
55

66
def m_of_n_hash(config: MemberConfig, required: int, items: List[bytes]) -> bytes: ...
77
def k1_member_hash(config: MemberConfig, publicKey: K1PublicKey, fastForward: bool) -> bytes: ...
@@ -105,11 +105,14 @@ class Clvm:
105105
def delegated_spend(self, conditions: List[Program]) -> Spend: ...
106106
def standard_spend(self, syntheticKey: PublicKey, spend: Spend) -> Spend: ...
107107
def spend_standard_coin(self, coin: Coin, syntheticKey: PublicKey, spend: Spend) -> None: ...
108+
def settlement_spend(self, notarizedPayments: List[NotarizedPayment]) -> Spend: ...
109+
def spend_settlement_coin(self, coin: Coin, notarizedPayments: List[NotarizedPayment]) -> None: ...
108110
def spend_cats(self, catSpends: List[CatSpend]) -> List[Cat]: ...
109111
def mint_nfts(self, parentCoinId: bytes, nftMints: List[NftMint]) -> MintedNfts: ...
110112
def spend_nft(self, nft: Nft, innerSpend: Spend) -> Nft: ...
111113
def create_eve_did(self, parentCoinId: bytes, p2PuzzleHash: bytes) -> CreatedDid: ...
112114
def spend_did(self, did: Did, innerSpend: Spend) -> Optional[Did]: ...
115+
def spend_option(self, option: OptionContract, innerSpend: Spend) -> Optional[OptionContract]: ...
113116
def spend_streamed_asset(self, streamedAsset: StreamedAsset, paymentTime: int, clawback: bool) -> None: ...
114117
def mint_vault(self, parentCoinId: bytes, custodyHash: bytes, memos: Program) -> VaultMint: ...
115118
def mips_spend(self, coin: Coin, delegatedSpend: Spend) -> MipsSpend: ...
@@ -1310,6 +1313,17 @@ class Mnemonic:
13101313
def to_string(self) -> str: ...
13111314
def to_entropy(self) -> bytes: ...
13121315
def to_seed(self, password: str) -> bytes: ...
1316+
class NotarizedPayment:
1317+
def clone(self) -> NotarizedPayment: ...
1318+
def __init__(self, nonce: bytes, payments: List[Payment]) -> None: ...
1319+
nonce: bytes
1320+
payments: List[Payment]
1321+
class Payment:
1322+
def clone(self) -> Payment: ...
1323+
def __init__(self, puzzleHash: bytes, amount: int, memos: Optional[Program] = None) -> None: ...
1324+
puzzle_hash: bytes
1325+
amount: int
1326+
memos: Optional[Program]
13131327
class Program:
13141328
def clone(self) -> Program: ...
13151329
def compile(self) -> Output: ...
@@ -1375,19 +1389,28 @@ class Program:
13751389
def parse_run_cat_tail(self) -> Optional[RunCatTail]: ...
13761390
def parse_update_nft_metadata(self) -> Optional[UpdateNftMetadata]: ...
13771391
def parse_update_data_store_merkle_root(self) -> Optional[UpdateDataStoreMerkleRoot]: ...
1392+
def parse_option_metadata(self) -> Optional[OptionMetadata]: ...
1393+
def parse_payment(self) -> Optional[Payment]: ...
1394+
def parse_notarized_payment(self) -> Optional[NotarizedPayment]: ...
13781395
class Puzzle:
13791396
def clone(self) -> Puzzle: ...
13801397
def __init__(self, puzzleHash: bytes, program: Program, modHash: bytes, args: Optional[Program] = None) -> None: ...
13811398
puzzle_hash: bytes
13821399
program: Program
13831400
mod_hash: bytes
13841401
args: Optional[Program]
1385-
def parse_cat(self) -> Optional[ParsedCat]: ...
1402+
def parse_cat_info(self) -> Optional[ParsedCatInfo]: ...
1403+
def parse_cat(self, coin: Coin, solution: Program) -> Optional[ParsedCat]: ...
13861404
def parse_child_cats(self, parentCoin: Coin, parentSolution: Program) -> Optional[List[Cat]]: ...
1387-
def parse_nft(self) -> Optional[ParsedNft]: ...
1405+
def parse_nft_info(self) -> Optional[ParsedNftInfo]: ...
1406+
def parse_nft(self, coin: Coin, solution: Program) -> Optional[ParsedNft]: ...
13881407
def parse_child_nft(self, parentCoin: Coin, parentSolution: Program) -> Optional[Nft]: ...
1389-
def parse_did(self) -> Optional[ParsedDid]: ...
1408+
def parse_did_info(self) -> Optional[ParsedDidInfo]: ...
1409+
def parse_did(self, coin: Coin, solution: Program) -> Optional[ParsedDid]: ...
13901410
def parse_child_did(self, parentCoin: Coin, parentSolution: Program, coin: Coin) -> Optional[Did]: ...
1411+
def parse_option_info(self) -> Optional[ParsedOptionInfo]: ...
1412+
def parse_option(self, coin: Coin, solution: Program) -> Optional[ParsedOption]: ...
1413+
def parse_child_option(self, parentCoin: Coin, parentSolution: Program) -> Optional[OptionContract]: ...
13911414
def parse_inner_streaming_puzzle(self) -> Optional[StreamingPuzzleInfo]: ...
13921415
def parse_child_clawbacks(self, parentSolution: Program) -> Optional[List[Clawback]]: ...
13931416
class StreamedAssetParsingResult:
@@ -1421,11 +1444,17 @@ class CatSpend:
14211444
def __init__(self, cat: Cat, spend: Spend) -> None: ...
14221445
@staticmethod
14231446
def revoke(cat: Cat, spend: Spend) -> CatSpend: ...
1424-
class ParsedCat:
1425-
def clone(self) -> ParsedCat: ...
1447+
class ParsedCatInfo:
1448+
def clone(self) -> ParsedCatInfo: ...
14261449
def __init__(self, info: CatInfo, p2Puzzle: Optional[Puzzle] = None) -> None: ...
14271450
info: CatInfo
14281451
p2_puzzle: Optional[Puzzle]
1452+
class ParsedCat:
1453+
def clone(self) -> ParsedCat: ...
1454+
def __init__(self, cat: Cat, p2Puzzle: Puzzle, p2Solution: Program) -> None: ...
1455+
cat: Cat
1456+
p2_puzzle: Puzzle
1457+
p2_solution: Program
14291458
class Nft:
14301459
def clone(self) -> Nft: ...
14311460
def __init__(self, coin: Coin, proof: Proof, info: NftInfo) -> None: ...
@@ -1447,11 +1476,17 @@ class NftInfo:
14471476
p2_puzzle_hash: bytes
14481477
def inner_puzzle_hash(self) -> bytes: ...
14491478
def puzzle_hash(self) -> bytes: ...
1450-
class ParsedNft:
1451-
def clone(self) -> ParsedNft: ...
1479+
class ParsedNftInfo:
1480+
def clone(self) -> ParsedNftInfo: ...
14521481
def __init__(self, info: NftInfo, p2Puzzle: Puzzle) -> None: ...
14531482
info: NftInfo
14541483
p2_puzzle: Puzzle
1484+
class ParsedNft:
1485+
def clone(self) -> ParsedNft: ...
1486+
def __init__(self, nft: Nft, p2Puzzle: Puzzle, p2Solution: Program) -> None: ...
1487+
nft: Nft
1488+
p2_puzzle: Puzzle
1489+
p2_solution: Program
14551490
class NftMetadata:
14561491
def clone(self) -> NftMetadata: ...
14571492
def __init__(self, editionNumber: int, editionTotal: int, dataUris: List[str], dataHash: Optional[bytes], metadataUris: List[str], metadataHash: Optional[bytes], licenseUris: List[str], licenseHash: Optional[bytes] = None) -> None: ...
@@ -1496,16 +1531,100 @@ class DidInfo:
14961531
p2_puzzle_hash: bytes
14971532
def inner_puzzle_hash(self) -> bytes: ...
14981533
def puzzle_hash(self) -> bytes: ...
1499-
class ParsedDid:
1500-
def clone(self) -> ParsedDid: ...
1534+
class ParsedDidInfo:
1535+
def clone(self) -> ParsedDidInfo: ...
15011536
def __init__(self, info: DidInfo, p2Puzzle: Puzzle) -> None: ...
15021537
info: DidInfo
15031538
p2_puzzle: Puzzle
1539+
class ParsedDid:
1540+
def clone(self) -> ParsedDid: ...
1541+
def __init__(self, did: Did, p2Spend: Optional[ParsedDidSpend] = None) -> None: ...
1542+
did: Did
1543+
p2_spend: Optional[ParsedDidSpend]
1544+
class ParsedDidSpend:
1545+
def clone(self) -> ParsedDidSpend: ...
1546+
def __init__(self, puzzle: Puzzle, solution: Program) -> None: ...
1547+
puzzle: Puzzle
1548+
solution: Program
15041549
class CreatedDid:
15051550
def clone(self) -> CreatedDid: ...
15061551
def __init__(self, did: Did, parentConditions: List[Program]) -> None: ...
15071552
did: Did
15081553
parent_conditions: List[Program]
1554+
class OptionContract:
1555+
def clone(self) -> OptionContract: ...
1556+
def __init__(self, coin: Coin, proof: Proof, info: OptionInfo) -> None: ...
1557+
coin: Coin
1558+
proof: Proof
1559+
info: OptionInfo
1560+
class OptionInfo:
1561+
def clone(self) -> OptionInfo: ...
1562+
def __init__(self, launcherId: bytes, underlyingCoinId: bytes, underlyingDelegatedPuzzleHash: bytes, p2PuzzleHash: bytes) -> None: ...
1563+
launcher_id: bytes
1564+
underlying_coin_id: bytes
1565+
underlying_delegated_puzzle_hash: bytes
1566+
p2_puzzle_hash: bytes
1567+
def inner_puzzle_hash(self) -> bytes: ...
1568+
def puzzle_hash(self) -> bytes: ...
1569+
class ParsedOptionInfo:
1570+
def clone(self) -> ParsedOptionInfo: ...
1571+
def __init__(self, info: OptionInfo, p2Puzzle: Puzzle) -> None: ...
1572+
info: OptionInfo
1573+
p2_puzzle: Puzzle
1574+
class ParsedOption:
1575+
def clone(self) -> ParsedOption: ...
1576+
def __init__(self, option: OptionContract, p2Puzzle: Puzzle, p2Solution: Program) -> None: ...
1577+
option: OptionContract
1578+
p2_puzzle: Puzzle
1579+
p2_solution: Program
1580+
class OptionUnderlying:
1581+
def clone(self) -> OptionUnderlying: ...
1582+
def __init__(self, launcherId: bytes, creatorPuzzleHash: bytes, seconds: int, amount: int, strikeType: OptionType) -> None: ...
1583+
launcher_id: bytes
1584+
creator_puzzle_hash: bytes
1585+
seconds: int
1586+
amount: int
1587+
strike_type: OptionType
1588+
def exercise_spend(self, clvm: Clvm, singletonInnerPuzzleHash: bytes, singletonAmount: int) -> Spend: ...
1589+
def clawback_spend(self, spend: Spend) -> Spend: ...
1590+
def puzzle_hash(self) -> bytes: ...
1591+
def delegated_puzzle_hash(self) -> bytes: ...
1592+
class OptionMetadata:
1593+
def clone(self) -> OptionMetadata: ...
1594+
def __init__(self, expirationSeconds: int, strikeType: OptionType) -> None: ...
1595+
expiration_seconds: int
1596+
strike_type: OptionType
1597+
class OptionType:
1598+
def clone(self) -> OptionType: ...
1599+
@staticmethod
1600+
def xch(amount: int) -> OptionType: ...
1601+
@staticmethod
1602+
def cat(assetId: bytes, amount: int) -> OptionType: ...
1603+
@staticmethod
1604+
def revocable_cat(assetId: bytes, hiddenPuzzleHash: bytes, amount: int) -> OptionType: ...
1605+
@staticmethod
1606+
def nft(launcherId: bytes, settlementPuzzleHash: bytes, amount: int) -> OptionType: ...
1607+
def to_xch(self) -> Optional[OptionTypeXch]: ...
1608+
def to_cat(self) -> Optional[OptionTypeCat]: ...
1609+
def to_revocable_cat(self) -> Optional[OptionTypeRevocableCat]: ...
1610+
def to_nft(self) -> Optional[OptionTypeNft]: ...
1611+
class OptionTypeXch:
1612+
def clone(self) -> OptionTypeXch: ...
1613+
amount: int
1614+
class OptionTypeCat:
1615+
def clone(self) -> OptionTypeCat: ...
1616+
asset_id: bytes
1617+
amount: int
1618+
class OptionTypeRevocableCat:
1619+
def clone(self) -> OptionTypeRevocableCat: ...
1620+
asset_id: bytes
1621+
hidden_puzzle_hash: bytes
1622+
amount: int
1623+
class OptionTypeNft:
1624+
def clone(self) -> OptionTypeNft: ...
1625+
launcher_id: bytes
1626+
settlement_puzzle_hash: bytes
1627+
amount: int
15091628
class StreamingPuzzleInfo:
15101629
def clone(self) -> StreamingPuzzleInfo: ...
15111630
def __init__(self, recipient: bytes, clawbackPh: Optional[bytes], endTime: int, lastPaymentTime: int) -> None: ...

0 commit comments

Comments
 (0)