Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wallet classes #89

Open
wants to merge 146 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
f690c16
Add beginnings of easy class
astrojarred Jun 29, 2022
c76a8ff
Rename base Amount class
astrojarred Jun 29, 2022
58647e7
Update Imports
astrojarred Jul 1, 2022
f27b750
Check Token metadata for issues
astrojarred Jul 1, 2022
c6646de
Automatically add blockfrost context if correct env vars are set
astrojarred Jul 1, 2022
2c5c5d6
Add methods for sending transactions
astrojarred Jul 1, 2022
ae84ee0
Start adding a mint token class
astrojarred Jul 2, 2022
21ee7a8
Add TokenPolicy class
astrojarred Jul 4, 2022
0e27088
Add bytes_name() to Token
astrojarred Jul 4, 2022
a025a95
Add message option to transactions
astrojarred Jul 4, 2022
8aa8d71
Add working token minter
astrojarred Jul 4, 2022
14ad5f0
Add id property to token policy
astrojarred Jul 4, 2022
85e3838
Remove policy datafield from Wallet
astrojarred Jul 4, 2022
17c1ce9
Add method to fetch conchain metadata for Tokens
astrojarred Jul 4, 2022
c87d906
Remove unneeded import
astrojarred Jul 4, 2022
72c98ad
Add method to get all wallet token metadata
astrojarred Jul 4, 2022
a3164de
Automatically load in all wallet policies for which it is a signer
astrojarred Jul 4, 2022
d6e2489
Get Wallet utxos block times and sort
astrojarred Jul 4, 2022
ed5d42b
Add burning capabilities to mint_tokens
astrojarred Jul 6, 2022
9f2238e
Merge branch 'cffls:main' into add-ease-classes
astrojarred Jul 6, 2022
eb89412
Merge branch 'cffls:main' into add-ease-classes
astrojarred Jul 7, 2022
dc2d9eb
Add full manual transactions
astrojarred Jul 14, 2022
d63666f
Allow return of signed tx without submission
astrojarred Jul 17, 2022
942cdff
Automatically create stake credentials
astrojarred Jul 17, 2022
1928fd5
Format with Black
astrojarred Jul 17, 2022
aeb0b1f
Support signing messages with stake keys
astrojarred Jul 17, 2022
a37319c
Update todo list
astrojarred Jul 17, 2022
30ea14b
Add script interaction
astrojarred Jul 17, 2022
08a5997
Update when stake keys are generated
astrojarred Jul 17, 2022
ea24571
Add Policy script property
astrojarred Jul 17, 2022
2bd2247
Rename sign message to sign data
astrojarred Jul 17, 2022
f551bd1
Change print to debug statement
astrojarred Jul 17, 2022
dabd052
Add example notebook
astrojarred Jul 17, 2022
4e9019f
Fix many type errors
astrojarred Jul 21, 2022
9a77f33
Add stake registration, delegation, and withdrawal
astrojarred Jul 21, 2022
0a8df7b
Add stake features to manual mode
astrojarred Jul 21, 2022
bd5e7f1
rename manual to transact
astrojarred Jul 21, 2022
91248d0
Merge branch 'cffls:main' into add-ease-classes
astrojarred Aug 16, 2022
4cabb3f
Fix some typos
astrojarred Aug 24, 2022
6599108
Start adding docstrings
astrojarred Aug 25, 2022
23053c7
Start commenting in the code
astrojarred Aug 29, 2022
997ed0f
Add all docstrings
astrojarred Aug 30, 2022
71ba3a5
Merge branch 'cffls:main' into add-ease-classes
astrojarred Aug 30, 2022
8bc0452
Update todo list
astrojarred Aug 30, 2022
1246584
Merge branch 'add-ease-classes' of https://github.com/astrojarred/pyc…
astrojarred Aug 30, 2022
15f341d
Fix typo in Token docs
astrojarred Sep 24, 2022
93be468
Merge branch 'cffls:main' into add-ease-classes
astrojarred Sep 24, 2022
a219f49
Fix typo is Ada.as_ada()
astrojarred Sep 25, 2022
d85d34d
Add first tests for Wallet class
astrojarred Sep 25, 2022
78cce6e
Catch non-integer lovelace values
astrojarred Sep 25, 2022
4214625
Add preview and preprod net functionality
astrojarred Sep 27, 2022
37e0a80
Update first methods to use transact directly
astrojarred Sep 27, 2022
0fc796d
Make outputs and optional param for transact
astrojarred Sep 27, 2022
eacc6ee
Update withdraw method to use transact
astrojarred Sep 27, 2022
ca916aa
Rewrite wallet minting method to use transact
astrojarred Sep 27, 2022
9ca4edc
Remove unfinished tests
astrojarred Sep 27, 2022
5d84148
Remove unused test functions
astrojarred Sep 27, 2022
bb2cc74
Add tests for wallet policy and token
astrojarred Sep 28, 2022
a4c010a
Fix order in which token policy is loaded
astrojarred Sep 28, 2022
b3b87c2
Set default amount to 0
astrojarred Sep 28, 2022
d92e2dc
Add method for auto burning tokens
astrojarred Sep 28, 2022
a4019ed
Update min lovelace calculations
astrojarred Sep 28, 2022
3ccf395
Update todo list
astrojarred Sep 28, 2022
4571579
Format with black
astrojarred Sep 28, 2022
0c88796
Remove example notebook
astrojarred Sep 28, 2022
76105b4
Add wallet example code
astrojarred Sep 28, 2022
01a454f
Add further clarification about transaction kwargs
astrojarred Sep 28, 2022
78b1095
Fix input bug on mint/burn tokens
astrojarred Oct 7, 2022
8ee307a
Fix bug in mint/burn input variable
astrojarred Oct 7, 2022
221b130
Add blockfrost context checker as function wrapper
astrojarred Oct 9, 2022
e6d2fb9
Convert Amount and subclasses to frozen dataclass
astrojarred Oct 9, 2022
b153ebd
Rename query_utxos to sync
astrojarred Oct 9, 2022
75b35a1
Rename withdraw to withdraw_rewards
astrojarred Oct 9, 2022
0f73616
Rename call of query_utxos to sync
astrojarred Oct 9, 2022
a7463cb
Remove all independent checks for BF chain context
astrojarred Oct 9, 2022
24081c6
Remove call of logging function
astrojarred Oct 9, 2022
005e552
import dataclass needed for Amount
astrojarred Oct 9, 2022
c237618
Remove another independent check for BF context
astrojarred Oct 9, 2022
dafa084
Remove final independent check for BF chain context
astrojarred Oct 9, 2022
1f0360d
Remove unused variable
astrojarred Oct 9, 2022
dd38172
Clean code and format with makefile
astrojarred Oct 9, 2022
9973e82
Format and clean code
astrojarred Oct 9, 2022
fc54cd0
Merge in utxo fix from remote
astrojarred Oct 9, 2022
f06c839
Push suggested fixes of PR89 review
astrojarred Oct 9, 2022
c30fba1
Add example payment staking keys under new names
astrojarred Oct 9, 2022
c2c8be8
Add last_block_slot to FixedChainContext
astrojarred Oct 23, 2022
4d002b2
Remove unnecessary math operators
astrojarred Oct 23, 2022
719a5f4
Create easily testable get_now() method
astrojarred Oct 23, 2022
abda6e1
Add coverage for Amount and TokenPolicy
astrojarred Oct 23, 2022
e8cf33d
Make signing a tx optional
astrojarred Oct 23, 2022
34d67fe
Add tests for token metadata
astrojarred Oct 23, 2022
5cacd41
Remove unused imports
astrojarred Oct 23, 2022
cb8166e
Return objects of wallet key hashes instead of str
astrojarred Oct 23, 2022
03a78d9
Merge branch 'Python-Cardano:main' into add-wallet-classes
astrojarred Oct 28, 2022
bdb72a3
Merge branch 'Python-Cardano:main' into add-wallet-classes
astrojarred Oct 30, 2022
6c2b440
Only add token policies if not already in tx
astrojarred Oct 30, 2022
671adc6
Fix bug in blockfrost_only function wrapper
astrojarred Oct 30, 2022
5b4e026
Replace 'sign' transaction parameter with 'build_only'
astrojarred Oct 30, 2022
a71bf4e
Add change address option to token burning
astrojarred Nov 4, 2022
8574e05
Add an example script which automatically mints a CIP-27 royalty token
astrojarred Nov 4, 2022
cef5535
Increase coverage of TokenPolicy and Token classes
astrojarred Nov 5, 2022
3f902cc
Format automatic royalty example
astrojarred Nov 5, 2022
ba1ec7d
Remove manual typecheck in Output class
astrojarred Nov 5, 2022
5a5514a
Add tests for Output class
astrojarred Nov 5, 2022
bbb77f7
Add test for wallet without stake
astrojarred Nov 5, 2022
bb4bda3
Remove unneeded if statement
astrojarred Nov 5, 2022
6e12a8c
Add tests for wallet init
astrojarred Nov 5, 2022
6dff7fc
Format code
astrojarred Nov 5, 2022
8495eb8
Remove blockfrost_only decorator in favor of strict typechecking
astrojarred Nov 13, 2022
9085077
Add tests for onchain token metadata
astrojarred Nov 13, 2022
91f0a6a
Add patching for mocking blockfost
astrojarred Nov 13, 2022
154b70b
Format
astrojarred Nov 13, 2022
ea4b818
Format
astrojarred Nov 13, 2022
53b0a3e
Merge branch 'Python-Cardano:main' into add-wallet-classes
astrojarred Nov 13, 2022
fe9cf8d
Merge branch 'add-wallet-classes' of https://github.com/astrojarred/p…
astrojarred Nov 13, 2022
8a83a8d
Format tests
astrojarred Nov 13, 2022
04dfdec
Add typechecking to all helper classes
astrojarred Nov 13, 2022
64df216
Change type hints from List to Sequence
astrojarred Nov 13, 2022
328d0dc
Merge branch 'Python-Cardano:main' into add-wallet-classes
astrojarred Nov 15, 2022
cb4bc51
Merge branch 'add-wallet-classes' of https://github.com/astrojarred/p…
astrojarred Nov 15, 2022
6801ada
Add strict typing with mypy
astrojarred Nov 15, 2022
a7cf5ce
Update native script typing with Sequence
astrojarred Nov 15, 2022
8f435d7
Test required signatures when non sig scripts are present
astrojarred Nov 16, 2022
e66fa81
Add __all__
astrojarred Nov 16, 2022
41de108
Add note about bad isinstance
astrojarred Nov 16, 2022
c93d327
Fix policy script not being passed properly to ttl
astrojarred Nov 25, 2022
527e818
Remove full address property
astrojarred Nov 25, 2022
b0afc63
Add Wallet.to_address method to return full addr
astrojarred Nov 25, 2022
2c9f400
Format with black
astrojarred Nov 25, 2022
17de247
Update usage of input parameters for TokenPolicy
astrojarred Nov 25, 2022
ab26c48
Test a policy with multiple conditions
astrojarred Jun 29, 2023
2cc0969
Test a policy with multiple conditions
astrojarred Jun 29, 2023
1f256fc
set wallet context to null to avoid auto-checking chain
astrojarred Jun 29, 2023
c948fbd
Try using the blockfrost patch to check chain
astrojarred Jun 29, 2023
efd1f3d
Merge remote-tracking branch 'upstream/main' into add-wallet-classes
astrojarred Jun 29, 2023
312a88f
Fix typechecking issue with getting stake address
astrojarred Jun 29, 2023
8021ebe
Format and style
astrojarred Jun 29, 2023
8c2860b
Remove burn tokens from outputs in mint transactions
astrojarred Aug 8, 2023
4c1cf9e
Remove burned tokens from output in burn transactions
astrojarred Aug 8, 2023
491747d
Merge branch 'main' into add-wallet-classes
cffls Jun 16, 2024
7d3ea22
lint: fix mypy issues
KINGH242 Jun 17, 2024
ef11f06
feat: add query stake address info to chain contexts
KINGH242 Jun 18, 2024
8cb1824
fix: use query stake address info and other minor fixes
KINGH242 Jun 18, 2024
f7b39d2
test: add some more tests around wallet
KINGH242 Jun 18, 2024
bf3bb79
test: add test for cli stake address info
KINGH242 Jun 18, 2024
22583c3
Merge pull request #33 from KINGH242/add-wallet-classes
astrojarred Jul 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
210 changes: 210 additions & 0 deletions examples/automatic_royalty_token.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
import datetime as dt
import logging
import time
from pprint import pformat

from pycardano import wallet

# This script mints and burns an NFT royalty token based off of CIP-0027 (https://github.com/cardano-foundation/CIPs/tree/master/CIP-0027)

# 1. Make sure to create a wallet for the policy, with name POLICY_WALLET_NAME
# 2. Create your policy with the name POLICY_NAME and the above wallet as a signer
# 3. Fill out the details below and run the script, make sure your BlockFrost ENV variables are set.

POLICY_NAME = "myPolicy"
POLICY_WALLET_NAME = "myPolicyWallet"

ROYALTY_ADDRESS = "addr_test1qpxh0m34vqkzsaucxx6venpnetgay6ylacuwvrdfdv5wnmw34uylg63pcm2dmsjzx8rrndy0lhwhht2h9f0kt8kv2qrswzxgy0"
ROYALTY_PERCENT = "0.05"

WALLET_NAME = "royaltytest" # This is a temporary wallet generated by the script to mint the token.
CODED_AMOUNT = wallet.Ada(3.555432) # pick a random amount between 3 and 4 ADA
NETWORK = "preprod"

# Set up logging!
root = logging.getLogger()
root.setLevel(logging.DEBUG)

logging_timestamp = dt.datetime.now(tz=dt.timezone.utc).strftime("%Y-%m-%d-%H-%M-%S")
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s %(name)-12s %(levelname)-8s %(message)s",
datefmt="%m-%d %H:%M",
filename=f"./{WALLET_NAME}.log",
filemode="a",
)

fh = logging.FileHandler(filename=f"./{WALLET_NAME}.log")
fh.name = "File Logger"
fh.setLevel(logging.DEBUG)
root.addHandler(fh)

# define a Handler which writes INFO messages or higher to the sys.stderr
console = logging.StreamHandler()
console.name = "Console Logger"
console.setLevel(logging.INFO)
# set a format which is simpler for console use
formatter = logging.Formatter("%(name)-12s: %(levelname)-8s %(message)s")
# tell the handler to use this format
console.setFormatter(formatter)
# add the handler to the root logger
root.addHandler(console)


def chunkstring(string, length):
return (string[0 + i : length + i] for i in range(0, len(string), length))


def create_royalty_metadata(royalty_address: str, royalty_percent: str):
"""Write royalty metadata to a file"""

metadata = {"777": {}}
metadata["777"] = {}

# add rate
metadata["777"]["rate"] = royalty_percent

# add address, and split it longer than 64 characters
if len(royalty_address) > 64:
metadata["777"]["addr"] = list(chunkstring(royalty_address, 64))
else:
metadata["777"]["addr"] = royalty_address

return metadata


def launch():
logger = logging.getLogger(__name__)

logger.info("Welcome to the royalty NFT generation script!")
logger.info(f"Network: {NETWORK}")

ORIGINAL_SENDER = None
DONE = False

# generate royalty metadata
royalty_metadata = create_royalty_metadata(ROYALTY_ADDRESS, ROYALTY_PERCENT)

# create receiving wallet
tmp_wallet = wallet.Wallet(name="tmp_royalty_wallet", network=NETWORK)
policy_wallet = wallet.Wallet(name=POLICY_WALLET_NAME, network=NETWORK)
policy = wallet.TokenPolicy(name=POLICY_NAME)

logger.info(
f"Generating a 777 royalty NFT with {ROYALTY_PERCENT}/1 ({float(ROYALTY_PERCENT)*100}%) to address {ROYALTY_ADDRESS}"
)
logger.info("Metadata:")
logger.info(pformat(royalty_metadata))
time.sleep(2)

logger.info(
f"If this looks right, please send exactly {CODED_AMOUNT.ada} ADA to\n {tmp_wallet.address}"
)
time.sleep(2)

while not DONE:
loop_start_time = dt.datetime.now(dt.timezone.utc)
logger.info(f"Starting loop {loop_start_time}")

tmp_wallet.sync()
tmp_wallet.get_utxo_creators()

for utxo in tmp_wallet.utxos:
# check whether or not to mint
can_mint = False
if wallet.Lovelace(utxo.output.amount.coin) == CODED_AMOUNT:
logger.info(
f"Coded amount of {CODED_AMOUNT.ada} ADA recieved: can mint 777 token!"
)
can_mint = True
else:
logger.info(
f"Please send exactly {CODED_AMOUNT.ada} ADA to\n {tmp_wallet.address}"
)

if can_mint:
ORIGINAL_SENDER = utxo.creator
logger.info(
f"Original sender of {CODED_AMOUNT.ada} ADA is {ORIGINAL_SENDER}"
)

token = wallet.Token(
policy=policy, amount=1, name="", metadata=royalty_metadata
)

logger.info("Minting token, please wait for confirmation...")

mint_tx = tmp_wallet.mint_tokens(
to=tmp_wallet,
mints=token,
utxos=utxo,
signers=[tmp_wallet, policy_wallet],
await_confirmation=True,
)

logger.info(f"Mint successful: Tx ID {mint_tx}")
logger.info(
"DO NOT STOP SCRIPT YET! Please wait so we can burn the token."
)

continue

# check if we can burn the token
can_burn = False
utxo_tokens = utxo.output.amount.multi_asset

if utxo_tokens:
if (
len(utxo_tokens) == 1
and str(list(utxo_tokens.keys())[0]) == policy.id
):
logger.info(f"No name token found: can burn 777 token!")
logger.info(
f"Will send change to original sender: {ORIGINAL_SENDER}"
)
can_burn = True

if can_burn:
# get original sender
utxo_info = tmp_wallet.context.api.transaction_utxos(
str(utxo.input.transaction_id)
)
input_utxo = utxo_info.inputs[0].tx_hash
ORIGINAL_SENDER = (
tmp_wallet.context.api.transaction_utxos(str(input_utxo))
.inputs[0]
.address
)

token = wallet.Token(
policy=policy,
amount=-1,
name="",
)

logger.info(
"Burning the royalty token. Please wait for confirmation..."
)
burn_tx = tmp_wallet.mint_tokens(
to=ORIGINAL_SENDER,
mints=token,
signers=[tmp_wallet, policy_wallet],
utxos=utxo,
change_address=ORIGINAL_SENDER,
await_confirmation=True,
)

logger.info(f"Burn successful! Tx ID: {burn_tx}")

DONE = True

continue

time.sleep(5)

logger.info("Your royalties are ready!")
logger.info(f"https://cardanoscan.io/tokenPolicy/{policy.id}")


if __name__ == "__main__":
launch()
158 changes: 158 additions & 0 deletions examples/wallet.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
"""
This is a walk through of the Wallet class in pycardano.
This class offers a number of methods which simplify many basic use cases,
and abstracts away some of the lower level details.
If you need more advanced functionality, you can directly use the lower level classes and methods,
sometimes in tandem with the Wallet class.

Note: If you plan to use Blockfrost as your chain context, you can set the following environment variables:
`BLOCKFROST_ID_MAINNET` for mainnet
`BLOCKFROST_ID_PREPROD` for preprod
`BLOCKFROST_ID_PREVIEW` for preview


"""

from datetime import datetime
from multiprocessing import pool

from pycardano import *
from pycardano.wallet import Ada, Output, Token, TokenPolicy, Wallet

"""Create a new wallet"""
# Make sure to provide a name so you can easily load it later
# this will save the keys to ./keys/my_wallet.*
# payment and staking keys will be automatically generated, or loaded a wallet of the given name already exists
w = Wallet(
name="my_wallet"
) # set the parameter `network` to mainnet, preprod, or preview


w.sync() # query the wallet for its balance

w.utxos # list of wallets UTXOs
w.ada # view total amount of ADA
w.lovelace # view total amount of lovelace
w.tokens # get a list of all tokens in the wallet


"""Send ADA using the wallet"""

receiver = Address("addr_test1vrm9x2zsux7va6w892g38tvchnzahvcd9tykqf3ygnmwtaqyfg52x")

tx_id = w.send_ada(receiver, Ada(2)) # send 2 ADA to the receiver


"""Sending an entire UTxO"""
# useful if you have to send a refund, for example
tx_id = w.send_utxo(
receiver, w.utxos[0]
) # send the first UTXO in the wallet to the receiver


"""Empty an entire wallet"""
# Careful with this one!
tx_id = w.empty_wallet(receiver)


"""Sign data"""
# can sign a message with either the payment or stake keys
signed_message = w.sign_data(
"Hello world!", mode="payment"
) # default mode is "payment"


"""Mint a token"""

# first generate a policy
my_policy = TokenPolicy(name="my_policy") # give it a descriptive name

# generate a locking policy with expiration
# note: the actual policy locking time might be slightly off from the datetime provided
# this will save a file to ./policy/my_policy.policy
my_policy.generate_minting_policy(signers=w, expiration=datetime(2025, 5, 12, 12, 0, 0))

# create a token with metadata
metadata = {
"description": "This is my first NFT thanks to PyCardano",
"name": "PyCardano NFT example token 1",
"id": 1,
"image": "ipfs://QmRhTTbUrPYEw3mJGGhQqQST9k86v1DPBiTTWJGKDJsVFw",
}

my_nft = Token(policy=my_policy, amount=2, name="MY_NFT_1", metadata=metadata)

tx_id = w.mint_tokens(
to=receiver,
mints=my_nft, # can be a single Token or list of multiple
)


"""Burn a token"""
# Oops, we minted two. Let's burn one.
# There are two ways to do this:

# Method 2
# create a token object with the quantity you want to burn
# note you don't have to include metadata here since it's only relevant for minting, not burning
my_nft = Token(policy=my_policy, amount=1, name="MY_NFT_1")

# this will automatically switch the amount to negative and burn them
tx_id = w.burn_tokens(my_nft)

# Method 2
# this method might be relevant in case you want to mint and burn multiple tokens in one transaction
# set amount to negative integer to burn
my_nft = Token(policy=my_policy, amount=-1, name="MY_NFT_1")

# then use the mint_tokens method
tx_id = w.mint_tokens(
to=receiver,
mints=my_nft, # can be a single Token or list of multiple
)


"""Register a stake address and delegate to a pool"""

pool_hash = "pool17arkxvwwh8rx0ldrzc54ysmpq4pd6gwzl66qe84a0nmh7qx7ze5"

tx_id = w.delegate(pool_hash)


"""Withdraw staking rewards"""
# withdraws all rewards by default, otherwise set `withdraw_amount` to a specific quantity
tx_id = w.withdraw()

"""Fully Manual Transaction"""
# Let's make a monster transaction with all the bells and whistles
# Note: All the above examples are based on the following `transact` method
# so you can also pass any of the following parameters to the above methods as well as **kwargs
# e.g. `change_address`, `signers`, `message`, `await_confirmation`, etc.

my_nft = Token(policy=my_policy, amount=1, name="MY_NFT_1", metadata=metadata)
your_nft = Token(
policy=my_policy, amount=1, name="YOUR_NFT_1", metadata={"Name": "Your NFT"}
)


tx_id = w.transact(
inputs=w, # use all UTXOs in the wallet, can also specify unique UTxOs or addresses
outputs=[
Output(
w, Ada(0), [my_nft]
), # mint an NFT to myself, setting Ada(0) will automatically calculate the minimum amount of ADA needed
Output(receiver, Ada(10), [my_nft]), # send 10 ADA and an NFT to the receiver
],
mints=[
my_nft,
your_nft,
], # must list all mints/burns here, even if they are sent to yourself
# signers = [w, other_w], # if you want to sign with multiple wallets or keys, specify them here
delegations=pool_hash, # delegate to a pool
withdrawals=Ada(2), # withdraw 2 ADA
# change_address=w, # specify a change address, will default to itself if not specified
message="I love PyCardano", # attach a message to the transaction metadata [CIP-0020]
other_metadata={"247": {"random": "metadata"}}, # attach any other metadata
# submit=True # set to False to return the transaction body as CBOR
await_confirmation=True, # set to True to block the code and periodically check until the transaction is confirmed
)
Loading
Loading