Skip to content

Commit

Permalink
Merge branch 'develop' into feat/capacitor-iota-wallet-plugin
Browse files Browse the repository at this point in the history
* develop: (70 commits)
  Feat: rocksdb as optional storage (iotaledger#1728)
  apply version updates (iotaledger#1755)
  Make the voting output mandatory in input selection for voting functions (iotaledger#1753)
  fix: tag-prefix passed as a string (iotaledger#1752)
  apply version updates (iotaledger#1750)
  Use OutputMetadataDto (iotaledger#1749)
  feat: create arm64 builds (iotaledger#1751)
  Allow voting output in inputs if required (iotaledger#1748)
  apply version updates (iotaledger#1745)
  Use new Input Selection (iotaledger#1744)
  Fix dependabot audit (iotaledger#1747)
  Add Python integration guide with IOTA and Shimmer (iotaledger#1743)
  Change sync options (iotaledger#1737)
  Add inputs to transaction to align incoming transactions (iotaledger#1722)
  apply version updates (iotaledger#1729)
  Send requests in parallel, check participation output unlock conditions (iotaledger#1740)
  Move all participation methods from the AccountManager to the Account (iotaledger#1736)
  Limit max parallel request in request_incoming_transaction_data() (iotaledger#1720)
  Remove useless old code (iotaledger#1731)
  chore: add more alignment for participation code (iotaledger#1727)
  ...

Signed-off-by: Amadeo Marchioni <[email protected]>
  • Loading branch information
amadeu2 committed Jan 26, 2023
2 parents fc9e401 + 3a9800e commit 22c7d7e
Show file tree
Hide file tree
Showing 268 changed files with 5,177 additions and 3,762 deletions.
7 changes: 7 additions & 0 deletions .changes/align-transactions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"nodejs-binding": patch
---

Return `Transaction` for incoming transactions.
Add inputs field to `Transaction`.
Remove `IncomingTransactionData`.
5 changes: 5 additions & 0 deletions .changes/clearlistener-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Moved clearListeners internally from a direct method call to using the messaging interface
17 changes: 4 additions & 13 deletions .changes/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,16 @@
"getPublishedVersion": "npm view ${ pkgFile.pkg.name } version",
"prepublish": [
{
"command": "false || dasel put object -f Cargo.toml '.dependencies.iota-wallet' -t string -t string git='https://github.com/iotaledger/wallet.rs' rev=$GITHUB_SHA"
"command": "false || dasel put -f Cargo.toml '.dependencies.iota-wallet.rev' -v $GITHUB_SHA"
},
{
"command": "dasel put string -f Cargo.toml '.dependencies.iota-wallet.features.[0]' mnemonic"
"command": "dasel put -f Cargo.toml '.dependencies.iota-wallet.git' -v https://github.com/iotaledger/wallet.rs"
},
{
"command": "dasel put string -f Cargo.toml '.dependencies.iota-wallet.features.[1]' events"
"command": "dasel delete -f Cargo.toml '.dependencies.iota-wallet.path'"
},
{
"command": "dasel put string -f Cargo.toml '.dependencies.iota-wallet.features.[2]' ledger_nano"
},
{
"command": "dasel put string -f Cargo.toml '.dependencies.iota-wallet.features.[3]' storage"
},
{
"command": "dasel put string -f Cargo.toml '.dependencies.iota-wallet.features.[4]' stronghold"
},
{
"command": "dasel put string -f Cargo.toml '.dependencies.iota-wallet.features.[5]' message_interface"
"command": "dasel delete -f Cargo.toml '.dependencies.iota-wallet.default-features'"
},
{
"command": "yarn --ignore-scripts"
Expand Down
5 changes: 5 additions & 0 deletions .changes/expose-participation-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Expose extra participation type and add answers field to TrackedParticipationOverview
5 changes: 5 additions & 0 deletions .changes/faucet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Add account.requestFundsFromFaucet() command.
5 changes: 5 additions & 0 deletions .changes/getParticipationOverview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

`Account::getParticipationOverview` sends requests now in parallel.
5 changes: 5 additions & 0 deletions .changes/improve-output-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Fix faulty types for getParticipationEventStatus return value
5 changes: 5 additions & 0 deletions .changes/move-participation-functions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Move AccountManager participation methods to the Account.
5 changes: 5 additions & 0 deletions .changes/nt-foundry-metadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Add optional `NativeTokensBalance::metadata` and `SyncOptions::syncNativeTokenFoundries` fields.
5 changes: 5 additions & 0 deletions .changes/outputTypesFilter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Add `outputTypes` to `FilterOptions` and make `lowerBoundBookedTimestamp` and `lowerBoundBookedTimestamp` optional.
5 changes: 5 additions & 0 deletions .changes/participation-events-empty-array.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Return an empty array if no participation events were registered.
10 changes: 10 additions & 0 deletions .changes/participation-rename.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"nodejs-binding": patch
---

Rename:
- `Event` to `ParticipationEvent`;
- `EventId` to `ParticipationEventId`;
- `EventData` to `ParticipationEventData`;
- `EventStatus` to `ParticipationEventStatus`;
- `EventPayload` to `ParticipationEventPayload`;
5 changes: 5 additions & 0 deletions .changes/participation-types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Export participation types
27 changes: 26 additions & 1 deletion .changes/pre.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,52 @@
{
"tag": "rc",
"changes": [
".changes/account-bech32-hrp.md",
".changes/account-recovery.md",
".changes/align-transactions.md",
".changes/clearlistener-move.md",
".changes/downgrade-rocksb.md",
".changes/expose-participation-type.md",
".changes/faucet.md",
".changes/fix-not-synced-timestamp.md",
".changes/fixNftPrepareOutput.md",
".changes/fixPrepareOutput.md",
".changes/generateAddress.md",
".changes/get-incoming-tx.md",
".changes/getAccountIndexes.md",
".changes/getParticipationOverview.md",
".changes/improve-consolidation-logic.md",
".changes/improve-output-type.md",
".changes/incomingtransactions-type.md",
".changes/move-participation-functions.md",
".changes/nft-options-features.md",
".changes/nft-output-claiming.md",
".changes/nft-outputs-syncing.md",
".changes/nt-foundry-metadata.md",
".changes/outputTypesFilter.md",
".changes/participation-events-empty-array.md",
".changes/participation-on-account-manager.md",
".changes/participation-rename.md",
".changes/participation-types.md",
".changes/prebuild.md",
".changes/private-account-meta.md",
".changes/query-all-participation-events-from-node.md",
".changes/remove-deleteAccountsAndDatabase.md",
".changes/remove-list-prefix.md",
".changes/required-storage-deposit.md",
".changes/retry-transaction-until-included.md",
".changes/revoting.md",
".changes/rocksdb-19.md",
".changes/syncOptions.md",
".changes/syncing.md",
".changes/tagAndMetadataHex.md",
".changes/tagged-data-payload.md",
".changes/tx-len-validation.md",
".changes/uint8array-replace-number-array.md.md",
".changes/voting-methods.md"
".changes/use-new-isa.md",
".changes/voting-methods.md",
".changes/voting-output-input-selection.md",
".changes/voting-output-mandatory.md",
".changes/voting-power-not-available.md"
]
}
5 changes: 5 additions & 0 deletions .changes/query-all-participation-events-from-node.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Add method to retrieve IDs of all participation events being tracked by a node.
5 changes: 5 additions & 0 deletions .changes/revoting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

`Account::vote()` parameters are optional to support revoting.
5 changes: 5 additions & 0 deletions .changes/rocksdb-19.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Bring back rocksdb 0.19.
7 changes: 7 additions & 0 deletions .changes/syncOptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"nodejs-binding": patch
---

Renamed AccountSyncOptions to SyncOptions;
Added AccountSyncOptions, AliasSyncOptions and NftSyncOptions;
Replaced SyncOptions::syncAliasesAndNfts with SyncOptions::{account, alias, nft};
5 changes: 5 additions & 0 deletions .changes/tagged-data-payload.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Fix tagged data payload type.
5 changes: 5 additions & 0 deletions .changes/use-new-isa.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Use new Input Selection Algorithm.
5 changes: 5 additions & 0 deletions .changes/voting-output-input-selection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Allow voting output in inputs if required.
5 changes: 5 additions & 0 deletions .changes/voting-output-mandatory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Make the voting output mandatory in input selection for voting functions.
5 changes: 5 additions & 0 deletions .changes/voting-power-not-available.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Subtract voting power from available balance.
13 changes: 9 additions & 4 deletions .github/actions/private-tangle/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ description: 'Setup a private tangle'
runs:
using: "composite"
steps:
- uses: mikefarah/yq@master
- name: Clone private tangle files
uses: actions/checkout@v3
with:
repository: iotaledger/hornet
path: hornet

- name: Setup private tangle
shell: bash
run: |
Expand All @@ -17,8 +22,6 @@ runs:
# curl -L -o private_tangle.tar.gz $DOWNLOAD_URL
# tar -xf private_tangle.tar.gz
# TODO: remove next lines when a working hornet release is published
git clone https://github.com/iotaledger/hornet.git
cd hornet/private_tangle
# Set protocol_parameters to the same values as in the shimmer network
jq '.tokenSupply="1813620509061365" | .rentStructure.vByteCost=100' protocol_parameters.json > tmp.json && mv tmp.json protocol_parameters.json
jq --color-output . protocol_parameters.json
Expand All @@ -29,7 +32,9 @@ runs:
# Start Tangle
sudo ./cleanup.sh
sudo ./bootstrap.sh
sudo ./run.sh -d
sudo ./run.sh -d --quiet-pull
working-directory: hornet/private_tangle

- name: Wait for tangle to start
shell: bash
run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/$WAIT_FOR_VERSION/wait-for | sh -s -- -t 60 http://localhost:14265/health -- echo "Tangle is up"
Expand Down
6 changes: 2 additions & 4 deletions .github/actions/private-tangle/tear-down/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@ runs:
#cd private_tangle
# TODO: remove next line when a working hornet release is published
cd hornet/private_tangle
docker-compose down
cd ..
sudo rm -rf private_tangle
sudo ./cleanup.sh
working-directory: hornet/private_tangle
70 changes: 70 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main
- dev
- develop
- ci/**
pull_request:
branches:
- dev
Expand Down Expand Up @@ -194,6 +195,75 @@ jobs:
run: npm ci --build-from-source
working-directory: bindings/nodejs

swift-bindings:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]

steps:
- uses: actions/checkout@v3

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'

- name: Install required packages (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install libudev-dev libusb-1.0-0-dev
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
# Add date to the cache to keep it up to date
key: ${{ matrix.os }}-stable-cargo-registry-${{ hashFiles('**/Cargo.lock') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.os }}-stable-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
${{ matrix.os }}-stable-cargo-registry-
- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
# Add date to the cache to keep it up to date
key: ${{ matrix.os }}-stable-cargo-index-${{ hashFiles('**/Cargo.lock') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.os }}-stable-cargo-index-${{ hashFiles('**/Cargo.lock') }}
${{ matrix.os }}-stable-cargo-index-
- name: Build library
timeout-minutes: 60
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features --release --manifest-path bindings/swift/Cargo.toml

- name: Move built library to xcode folder
run: mv "$GITHUB_WORKSPACE/bindings/swift/target/release/libiota_wallet.dylib" "$GITHUB_WORKSPACE/bindings/swift/xcode/IotaWallet/iota_wallet"

- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Build project
run: |
set -o pipefail
xcodebuild build -scheme IotaWallet -project IotaWallet.xcodeproj -destination 'platform=macOS' | xcpretty
working-directory: bindings/swift/xcode/IotaWallet

python-bindings:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/covector-version-or-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ jobs:
run: |
git config --global user.name "${{ github.event.pusher.name }}"
git config --global user.email "${{ github.event.pusher.email }}"
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Install Dasel
run: |
curl -sSLf "$(curl -sSLf https://api.github.com/repos/tomwright/dasel/releases/latest | grep browser_download_url | grep linux_amd64 | grep -v .gz | cut -d\" -f 4)" -L -o dasel && chmod +x dasel
mv ./dasel /usr/local/bin/dasel
brew update --preinstall
brew install dasel
- name: covector version or publish (publish when no change files present)
uses: jbolda/covector/packages/action@covector-v0
Expand Down Expand Up @@ -98,7 +101,7 @@ jobs:
if: matrix.os == 'windows-2019'

- name: Set deployment target (macOS)
run: echo "MACOSX_DEPLOYMENT_TARGET=10.12" >> $GITHUB_ENV
run: echo "MACOSX_DEPLOYMENT_TARGET=10.14" >> $GITHUB_ENV # 10.12 should be supported, but waiting for new rocksDB to test this
if: matrix.os == 'macos-11'

- name: Get current date
Expand Down Expand Up @@ -140,8 +143,12 @@ jobs:
run: npm install typescript && npm ci
working-directory: bindings/nodejs

- name: Build Node.js prebuild
run: npm run prebuild
- name: Build Node.js prebuild (x64)
run: npm run prebuild-x64
working-directory: bindings/nodejs

- name: Build Node.js prebuild (arm64)
run: npm run prebuild-arm64
working-directory: bindings/nodejs

- name: Upload prebuild to GitHub release
Expand Down
Loading

0 comments on commit 22c7d7e

Please sign in to comment.