Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
feat: introduce account 1 for Alice in devenv (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
friedger authored Oct 2, 2023
1 parent d0e2000 commit 88c3a3d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
7 changes: 5 additions & 2 deletions devenv/utils/deposit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

dir="$(dirname "$0")"

btc_wif=$(source $dir/get_credentials.sh | jq -r '.credentials["0"].bitcoin.p2wpkh.wif')
# the sbtc wallet
btc_p2tr_address=$(source $dir/get_credentials.sh | jq -r '.credentials["0"].bitcoin.p2tr.address')
stacks_address=$(source $dir/get_credentials.sh | jq -r '.credentials["0"].stacks.address')
# Alice's btc address
btc_wif=$(source $dir/get_credentials.sh | jq -r '.credentials["1"].bitcoin.p2wpkh.wif')
# Alice's stx address
stacks_address=$(source $dir/get_credentials.sh | jq -r '.credentials["1"].stacks.address')

amount=$((RANDOM%9000+1000))

Expand Down
2 changes: 1 addition & 1 deletion devenv/utils/get_credentials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

mnemonic="twice kind fence tip hidden tilt action fragile skin nothing glory cousin green tomorrow spring wrist shed math olympic multiply hip blue scout claw"

sbtc generate-from -s testnet -b regtest mnemonic "$mnemonic"
sbtc generate-from -s testnet -b regtest --accounts 2 mnemonic "$mnemonic"
11 changes: 8 additions & 3 deletions devenv/utils/withdraw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@

dir="$(dirname "$0")"

btc_wif=$(source $dir/get_credentials.sh | jq -r '.credentials["0"].bitcoin.p2wpkh.wif')
btc_address=$(source $dir/get_credentials.sh | jq -r '.credentials["0"].bitcoin.p2wpkh.address')
# the sbtc wallet
btc_p2tr_address=$(source $dir/get_credentials.sh | jq -r '.credentials["0"].bitcoin.p2tr.address')
stacks_wif=$(source $dir/get_credentials.sh | jq -r '.credentials["0"].stacks.wif')

# Alice's btc credential as wif
btc_wif=$(source $dir/get_credentials.sh | jq -r '.credentials["1"].bitcoin.p2wpkh.wif')
# Alice's btc address
btc_address=$(source $dir/get_credentials.sh | jq -r '.credentials["1"].bitcoin.p2wpkh.address')
# Alice's stx credential as wif
stacks_wif=$(source $dir/get_credentials.sh | jq -r '.credentials["1"].stacks.wif')

amount=$((RANDOM%1000+1000))
fulfillment_fee=$((RANDOM%1000+1000))
Expand Down

0 comments on commit 88c3a3d

Please sign in to comment.