From e77478744e2688fc6352ec46e9691d3d6853ec5e Mon Sep 17 00:00:00 2001 From: "Fifo (Fabricius Zatti)" <62725221+fazzatti@users.noreply.github.com> Date: Thu, 1 Aug 2024 17:10:26 -0300 Subject: [PATCH] Update Stellar SDK version (#164) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: fix circular import * test: add build transaction unit tests * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * refactor: make networkConfig variable private * test: add unit test for submit transaction pipeline * Add unit tests for the classic asset handler (#128) * refactor: adjust outter imports/exports * test: add unit tests for the classic asset handler * Standardize default network configs and custom (#133) * feat: standardize network config options as functions under network * test: adjust tests for new network config format * feat: require rpc url for default rpc handler to initialize * feat: require horizon url to initialize default horizon handler * test: remove local testing from coverage * feat: remove soroban client * feat: convert horizon load account error to sp error * feat: add allowhttp to network config * test: add unit tests to default horizon handler * test: add default rpc handler unit tests * fix: account changes with network new config format * test: add network configuration unit tests * refactor: allowhttp object Co-authored-by: Caio Teixeira --------- Co-authored-by: Caio Teixeira * Minor fixes (#141) * feat: standardize network config options as functions under network * fix: duplicate imports * fix: read from contract output * chore: bump version * chore: bump version to 0.8.2 * feat: Implement verbose output for transactions pipelines (#147) * feat: implement verbose output for classic pipeline * feat: implement verbose output for soroban pipeline * chore: bump version to 0.9.0 * Feat integration tests (#150) * feat: Implement verbose output for transactions pipelines (#148) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) * test: add build transaction unit tests * chore: merge with develop * test: add build transaction failure tests * refactor: make networkConfig variable private * test: add unit test for fee bump pipeline (#113) * test: add unit tests for classic signature requirements pipeline (#115) * Adjustments to release library as open source 🚀 (#107) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) --------- Co-authored-by: Bruno Nascimento * fix: setoptions op threshold requirement * fix: revoke operation variants threshold calculation * test: add unit tests to classig sign requirements pipeline * refactor: rearrange as per aaa pattern --------- Co-authored-by: Bruno Nascimento * Add unit tests for simulate transaction pipeline (#117) * refactor: eslint adjustments * test: initial simulate transaction unit tests * feat: add assemble transaction sp error * test: complete coverage for simulate transaction pipeline * refactor: clean up comments and adjust imports * Add unit tests for classic transaction pipeline (#118) * test: add unit tests for classic transaction pipeline * refactor: adjust imports * test: add unit tests for soroban transaction pipeline (#119) * test: add unit test for sign transaction pipeline * test: add unit test for submit transaction pipeline * Add unit tests soroban auth (#123) * fix: remove validation from contract engine initialization * style: remove comment * feat: modify account handler mocker payload * test: add unit test to soroban auth pipeline --------- Co-authored-by: Bruno Nascimento * Complete unit test coverage for account handlers (#125) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * Create test-coverage.yml action (#126) * Create test-coverage.yml action * Update test-coverage.yml * Add unit test for base account handler (#127) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * test: add unit tests for base account handler * Add unit test for soroban get transaction pipeline (#124) * refactor: soroban get transaction pipeline constructor * fix: remove old log * test: add unit tests for soroban get transaction pipeline * style: adjust imports * Add unit tests for the classic asset handler (#128) * refactor: adjust outter imports/exports * test: add unit tests for the classic asset handler * feat: remove issuer requirement for classic assets (#129) * refactor: allow for no payload for dah * feat: remove issuer necessity for classic assets to better include native * test: add unit test to soroban token handler (#131) * feat: remove helper classes for account (#132) * feat: remove helper classes for account * refactor: remove unused error for base account * test: complete unit coverage for base account errors * Standardize default network configs and custom (#133) * feat: standardize network config options as functions under network * test: adjust tests for new network config format * feat: require rpc url for default rpc handler to initialize * feat: require horizon url to initialize default horizon handler * test: remove local testing from coverage * feat: remove soroban client * feat: convert horizon load account error to sp error * feat: add allowhttp to network config * test: add unit tests to default horizon handler * test: add default rpc handler unit tests * fix: account changes with network new config format * test: add network configuration unit tests * refactor: allowhttp object Co-authored-by: Caio Teixeira --------- Co-authored-by: Caio Teixeira * packaging: bump version to v0.8.0 * Fix merge issues (#137) * feat: standardize network config options as functions under network * fix: duplicate imports * Update stellar sdk (#139) * Release v0.8.0 (#136) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) * test: add build transaction unit tests * chore: merge with develop * test: add build transaction failure tests * refactor: make networkConfig variable private * test: add unit test for fee bump pipeline (#113) * test: add unit tests for classic signature requirements pipeline (#115) * Adjustments to release library as open source 🚀 (#107) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) --------- Co-authored-by: Bruno Nascimento * fix: setoptions op threshold requirement * fix: revoke operation variants threshold calculation * test: add unit tests to classig sign requirements pipeline * refactor: rearrange as per aaa pattern --------- Co-authored-by: Bruno Nascimento * Add unit tests for simulate transaction pipeline (#117) * refactor: eslint adjustments * test: initial simulate transaction unit tests * feat: add assemble transaction sp error * test: complete coverage for simulate transaction pipeline * refactor: clean up comments and adjust imports * Add unit tests for classic transaction pipeline (#118) * test: add unit tests for classic transaction pipeline * refactor: adjust imports * test: add unit tests for soroban transaction pipeline (#119) * test: add unit test for sign transaction pipeline * test: add unit test for submit transaction pipeline * Add unit tests soroban auth (#123) * fix: remove validation from contract engine initialization * style: remove comment * feat: modify account handler mocker payload * test: add unit test to soroban auth pipeline --------- Co-authored-by: Bruno Nascimento * Complete unit test coverage for account handlers (#125) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * Create test-coverage.yml action (#126) * Create test-coverage.yml action * Update test-coverage.yml * Add unit test for base account handler (#127) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * test: add unit tests for base account handler * Add unit test for soroban get transaction pipeline (#124) * refactor: soroban get transaction pipeline constructor * fix: remove old log * test: add unit tests for soroban get transaction pipeline * style: adjust imports * Add unit tests for the classic asset handler (#128) * refactor: adjust outter imports/exports * test: add unit tests for the classic asset handler * feat: remove issuer requirement for classic assets (#129) * refactor: allow for no payload for dah * feat: remove issuer necessity for classic assets to better include native * test: add unit test to soroban token handler (#131) * feat: remove helper classes for account (#132) * feat: remove helper classes for account * refactor: remove unused error for base account * test: complete unit coverage for base account errors * Standardize default network configs and custom (#133) * feat: standardize network config options as functions under network * test: adjust tests for new network config format * feat: require rpc url for default rpc handler to initialize * feat: require horizon url to initialize default horizon handler * test: remove local testing from coverage * feat: remove soroban client * feat: convert horizon load account error to sp error * feat: add allowhttp to network config * test: add unit tests to default horizon handler * test: add default rpc handler unit tests * fix: account changes with network new config format * test: add network configuration unit tests * refactor: allowhttp object Co-authored-by: Caio Teixeira --------- Co-authored-by: Caio Teixeira * packaging: bump version to v0.8.0 * Fix merge issues (#137) * feat: standardize network config options as functions under network * fix: duplicate imports --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira * chore: update stellar sdk * feat: add function to return secret key to default account handler * test: default account handler getters --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira * packaging: bump version to 0.8.1 * Minor fixes (#141) * feat: standardize network config options as functions under network * fix: duplicate imports * fix: read from contract output * chore: bump version * chore: bump version to 0.8.2 * Contract engine improvements (#144) * feat: standardize network config options as functions under network * fix: duplicate imports * version 0.8.2 (#142) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) * test: add build transaction unit tests * chore: merge with develop * test: add build transaction failure tests * refactor: make networkConfig variable private * test: add unit test for fee bump pipeline (#113) * test: add unit tests for classic signature requirements pipeline (#115) * Adjustments to release library as open source 🚀 (#107) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) --------- Co-authored-by: Bruno Nascimento * fix: setoptions op threshold requirement * fix: revoke operation variants threshold calculation * test: add unit tests to classig sign requirements pipeline * refactor: rearrange as per aaa pattern --------- Co-authored-by: Bruno Nascimento * Add unit tests for simulate transaction pipeline (#117) * refactor: eslint adjustments * test: initial simulate transaction unit tests * feat: add assemble transaction sp error * test: complete coverage for simulate transaction pipeline * refactor: clean up comments and adjust imports * Add unit tests for classic transaction pipeline (#118) * test: add unit tests for classic transaction pipeline * refactor: adjust imports * test: add unit tests for soroban transaction pipeline (#119) * test: add unit test for sign transaction pipeline * test: add unit test for submit transaction pipeline * Add unit tests soroban auth (#123) * fix: remove validation from contract engine initialization * style: remove comment * feat: modify account handler mocker payload * test: add unit test to soroban auth pipeline --------- Co-authored-by: Bruno Nascimento * Complete unit test coverage for account handlers (#125) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * Create test-coverage.yml action (#126) * Create test-coverage.yml action * Update test-coverage.yml * Add unit test for base account handler (#127) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * test: add unit tests for base account handler * Add unit test for soroban get transaction pipeline (#124) * refactor: soroban get transaction pipeline constructor * fix: remove old log * test: add unit tests for soroban get transaction pipeline * style: adjust imports * Add unit tests for the classic asset handler (#128) * refactor: adjust outter imports/exports * test: add unit tests for the classic asset handler * feat: remove issuer requirement for classic assets (#129) * refactor: allow for no payload for dah * feat: remove issuer necessity for classic assets to better include native * test: add unit test to soroban token handler (#131) * feat: remove helper classes for account (#132) * feat: remove helper classes for account * refactor: remove unused error for base account * test: complete unit coverage for base account errors * Standardize default network configs and custom (#133) * feat: standardize network config options as functions under network * test: adjust tests for new network config format * feat: require rpc url for default rpc handler to initialize * feat: require horizon url to initialize default horizon handler * test: remove local testing from coverage * feat: remove soroban client * feat: convert horizon load account error to sp error * feat: add allowhttp to network config * test: add unit tests to default horizon handler * test: add default rpc handler unit tests * fix: account changes with network new config format * test: add network configuration unit tests * refactor: allowhttp object Co-authored-by: Caio Teixeira --------- Co-authored-by: Caio Teixeira * packaging: bump version to v0.8.0 * Fix merge issues (#137) * feat: standardize network config options as functions under network * fix: duplicate imports * Update stellar sdk (#139) * Release v0.8.0 (#136) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) * test: add build transaction unit tests * chore: merge with develop * test: add build transaction failure tests * refactor: make networkConfig variable private * test: add unit test for fee bump pipeline (#113) * test: add unit tests for classic signature requirements pipeline (#115) * Adjustments to release library as open source 🚀 (#107) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) --------- Co-authored-by: Bruno Nascimento * fix: setoptions op threshold requirement * fix: revoke operation variants threshold calculation * test: add unit tests to classig sign requirements pipeline * refactor: rearrange as per aaa pattern --------- Co-authored-by: Bruno Nascimento * Add unit tests for simulate transaction pipeline (#117) * refactor: eslint adjustments * test: initial simulate transaction unit tests * feat: add assemble transaction sp error * test: complete coverage for simulate transaction pipeline * refactor: clean up comments and adjust imports * Add unit tests for classic transaction pipeline (#118) * test: add unit tests for classic transaction pipeline * refactor: adjust imports * test: add unit tests for soroban transaction pipeline (#119) * test: add unit test for sign transaction pipeline * test: add unit test for submit transaction pipeline * Add unit tests soroban auth (#123) * fix: remove validation from contract engine initialization * style: remove comment * feat: modify account handler mocker payload * test: add unit test to soroban auth pipeline --------- Co-authored-by: Bruno Nascimento * Complete unit test coverage for account handlers (#125) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * Create test-coverage.yml action (#126) * Create test-coverage.yml action * Update test-coverage.yml * Add unit test for base account handler (#127) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * test: add unit tests for base account handler * Add unit test for soroban get transaction pipeline (#124) * refactor: soroban get transaction pipeline constructor * fix: remove old log * test: add unit tests for soroban get transaction pipeline * style: adjust imports * Add unit tests for the classic asset handler (#128) * refactor: adjust outter imports/exports * test: add unit tests for the classic asset handler * feat: remove issuer requirement for classic assets (#129) * refactor: allow for no payload for dah * feat: remove issuer necessity for classic assets to better include native * test: add unit test to soroban token handler (#131) * feat: remove helper classes for account (#132) * feat: remove helper classes for account * refactor: remove unused error for base account * test: complete unit coverage for base account errors * Standardize default network configs and custom (#133) * feat: standardize network config options as functions under network * test: adjust tests for new network config format * feat: require rpc url for default rpc handler to initialize * feat: require horizon url to initialize default horizon handler * test: remove local testing from coverage * feat: remove soroban client * feat: convert horizon load account error to sp error * feat: add allowhttp to network config * test: add unit tests to default horizon handler * test: add default rpc handler unit tests * fix: account changes with network new config format * test: add network configuration unit tests * refactor: allowhttp object Co-authored-by: Caio Teixeira --------- Co-authored-by: Caio Teixeira * packaging: bump version to v0.8.0 * Fix merge issues (#137) * feat: standardize network config options as functions under network * fix: duplicate imports --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira * chore: update stellar sdk * feat: add function to return secret key to default account handler * test: default account handler getters --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira * packaging: bump version to 0.8.1 * Minor fixes (#141) * feat: standardize network config options as functions under network * fix: duplicate imports * fix: read from contract output * chore: bump version * chore: bump version to 0.8.2 --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira * Documentation (#143) * GITBOOK-34: No subject * GITBOOK-35: update issuing your first asset tutorial * GITBOOK-36: update CD tutorial * GITBOOK-37: update profiler plugin * GITBOOK-38: Remove soroban token duplicate link * GITBOOK-39: update soroban token handler * GITBOOK-40: Improve Validation Cloud RPC page * GITBOOK-41: Improve the Welcome Page * GITBOOK-42: Improve Quick Start page * GITBOOK-45: Soroban Auth Pipeline * GITBOOK-47: update general doc --------- Co-authored-by: Fernanda Hahn * feat: remove spec requirement to instantiate contract engine * test: add unit test to spec requirement * feat: export stellar-sdk contract spec --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira Co-authored-by: Fernanda Hahn * chore: bump version to 0.8.3 * fix: soroban auth simulation fails if partial auth entries are present * chore: bump version to 0.8.4 * feat: Implement verbose output for transactions pipelines (#147) * feat: implement verbose output for classic pipeline * feat: implement verbose output for soroban pipeline * chore: bump version to 0.9.0 --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira Co-authored-by: Fernanda Hahn * test: configure different test types * feat: add test ledger * test: add account management integration tests * feat: add regex utils * test: move integration tests * test: add example smart contract hello world * test: add load wasm util * test: add integration test for hello world * test: add simple tx invocation helper * style: remove unused imports * test: add classic asset management integration test * ci: update coverage check to include integration plus unit * test: add util to derivate feebump header from tx invocation * fix: read from contract with channel accounts handle not having signers * test: add channel accounts plugin integration tests * test: adjust plugin imports for coverage * refactor: adjust plugins exports * test: add unit tests to debug plugin * test: add profiler plugin integration tests * chore: remove unused mocks * docs: update readme with testing section --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira Co-authored-by: Fernanda Hahn * build(deps-dev): bump axios from 0.21.4 to 1.7.2 Bumps [axios](https://github.com/axios/axios) from 0.21.4 to 1.7.2. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v0.21.4...v1.7.2) --- updated-dependencies: - dependency-name: axios dependency-type: indirect ... Signed-off-by: dependabot[bot] * Bundle v0.10.0 (#157) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) * test: add build transaction unit tests * chore: merge with develop * test: add build transaction failure tests * refactor: make networkConfig variable private * test: add unit test for fee bump pipeline (#113) * test: add unit tests for classic signature requirements pipeline (#115) * Adjustments to release library as open source 🚀 (#107) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) --------- Co-authored-by: Bruno Nascimento * fix: setoptions op threshold requirement * fix: revoke operation variants threshold calculation * test: add unit tests to classig sign requirements pipeline * refactor: rearrange as per aaa pattern --------- Co-authored-by: Bruno Nascimento * Add unit tests for simulate transaction pipeline (#117) * refactor: eslint adjustments * test: initial simulate transaction unit tests * feat: add assemble transaction sp error * test: complete coverage for simulate transaction pipeline * refactor: clean up comments and adjust imports * Add unit tests for classic transaction pipeline (#118) * test: add unit tests for classic transaction pipeline * refactor: adjust imports * test: add unit tests for soroban transaction pipeline (#119) * test: add unit test for sign transaction pipeline * test: add unit test for submit transaction pipeline * Add unit tests soroban auth (#123) * fix: remove validation from contract engine initialization * style: remove comment * feat: modify account handler mocker payload * test: add unit test to soroban auth pipeline --------- Co-authored-by: Bruno Nascimento * Complete unit test coverage for account handlers (#125) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * Create test-coverage.yml action (#126) * Create test-coverage.yml action * Update test-coverage.yml * Add unit test for base account handler (#127) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * test: add unit tests for base account handler * Add unit test for soroban get transaction pipeline (#124) * refactor: soroban get transaction pipeline constructor * fix: remove old log * test: add unit tests for soroban get transaction pipeline * style: adjust imports * Add unit tests for the classic asset handler (#128) * refactor: adjust outter imports/exports * test: add unit tests for the classic asset handler * feat: remove issuer requirement for classic assets (#129) * refactor: allow for no payload for dah * feat: remove issuer necessity for classic assets to better include native * test: add unit test to soroban token handler (#131) * feat: remove helper classes for account (#132) * feat: remove helper classes for account * refactor: remove unused error for base account * test: complete unit coverage for base account errors * Standardize default network configs and custom (#133) * feat: standardize network config options as functions under network * test: adjust tests for new network config format * feat: require rpc url for default rpc handler to initialize * feat: require horizon url to initialize default horizon handler * test: remove local testing from coverage * feat: remove soroban client * feat: convert horizon load account error to sp error * feat: add allowhttp to network config * test: add unit tests to default horizon handler * test: add default rpc handler unit tests * fix: account changes with network new config format * test: add network configuration unit tests * refactor: allowhttp object Co-authored-by: Caio Teixeira --------- Co-authored-by: Caio Teixeira * packaging: bump version to v0.8.0 * Fix merge issues (#137) * feat: standardize network config options as functions under network * fix: duplicate imports * Update stellar sdk (#139) * Release v0.8.0 (#136) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) * test: add build transaction unit tests * chore: merge with develop * test: add build transaction failure tests * refactor: make networkConfig variable private * test: add unit test for fee bump pipeline (#113) * test: add unit tests for classic signature requirements pipeline (#115) * Adjustments to release library as open source 🚀 (#107) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) --------- Co-authored-by: Bruno Nascimento * fix: setoptions op threshold requirement * fix: revoke operation variants threshold calculation * test: add unit tests to classig sign requirements pipeline * refactor: rearrange as per aaa pattern --------- Co-authored-by: Bruno Nascimento * Add unit tests for simulate transaction pipeline (#117) * refactor: eslint adjustments * test: initial simulate transaction unit tests * feat: add assemble transaction sp error * test: complete coverage for simulate transaction pipeline * refactor: clean up comments and adjust imports * Add unit tests for classic transaction pipeline (#118) * test: add unit tests for classic transaction pipeline * refactor: adjust imports * test: add unit tests for soroban transaction pipeline (#119) * test: add unit test for sign transaction pipeline * test: add unit test for submit transaction pipeline * Add unit tests soroban auth (#123) * fix: remove validation from contract engine initialization * style: remove comment * feat: modify account handler mocker payload * test: add unit test to soroban auth pipeline --------- Co-authored-by: Bruno Nascimento * Complete unit test coverage for account handlers (#125) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * Create test-coverage.yml action (#126) * Create test-coverage.yml action * Update test-coverage.yml * Add unit test for base account handler (#127) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * test: add unit tests for base account handler * Add unit test for soroban get transaction pipeline (#124) * refactor: soroban get transaction pipeline constructor * fix: remove old log * test: add unit tests for soroban get transaction pipeline * style: adjust imports * Add unit tests for the classic asset handler (#128) * refactor: adjust outter imports/exports * test: add unit tests for the classic asset handler * feat: remove issuer requirement for classic assets (#129) * refactor: allow for no payload for dah * feat: remove issuer necessity for classic assets to better include native * test: add unit test to soroban token handler (#131) * feat: remove helper classes for account (#132) * feat: remove helper classes for account * refactor: remove unused error for base account * test: complete unit coverage for base account errors * Standardize default network configs and custom (#133) * feat: standardize network config options as functions under network * test: adjust tests for new network config format * feat: require rpc url for default rpc handler to initialize * feat: require horizon url to initialize default horizon handler * test: remove local testing from coverage * feat: remove soroban client * feat: convert horizon load account error to sp error * feat: add allowhttp to network config * test: add unit tests to default horizon handler * test: add default rpc handler unit tests * fix: account changes with network new config format * test: add network configuration unit tests * refactor: allowhttp object Co-authored-by: Caio Teixeira --------- Co-authored-by: Caio Teixeira * packaging: bump version to v0.8.0 * Fix merge issues (#137) * feat: standardize network config options as functions under network * fix: duplicate imports --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira * chore: update stellar sdk * feat: add function to return secret key to default account handler * test: default account handler getters --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira * packaging: bump version to 0.8.1 * Minor fixes (#141) * feat: standardize network config options as functions under network * fix: duplicate imports * fix: read from contract output * chore: bump version * chore: bump version to 0.8.2 * Contract engine improvements (#144) * feat: standardize network config options as functions under network * fix: duplicate imports * version 0.8.2 (#142) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) * test: add build transaction unit tests * chore: merge with develop * test: add build transaction failure tests * refactor: make networkConfig variable private * test: add unit test for fee bump pipeline (#113) * test: add unit tests for classic signature requirements pipeline (#115) * Adjustments to release library as open source 🚀 (#107) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) --------- Co-authored-by: Bruno Nascimento * fix: setoptions op threshold requirement * fix: revoke operation variants threshold calculation * test: add unit tests to classig sign requirements pipeline * refactor: rearrange as per aaa pattern --------- Co-authored-by: Bruno Nascimento * Add unit tests for simulate transaction pipeline (#117) * refactor: eslint adjustments * test: initial simulate transaction unit tests * feat: add assemble transaction sp error * test: complete coverage for simulate transaction pipeline * refactor: clean up comments and adjust imports * Add unit tests for classic transaction pipeline (#118) * test: add unit tests for classic transaction pipeline * refactor: adjust imports * test: add unit tests for soroban transaction pipeline (#119) * test: add unit test for sign transaction pipeline * test: add unit test for submit transaction pipeline * Add unit tests soroban auth (#123) * fix: remove validation from contract engine initialization * style: remove comment * feat: modify account handler mocker payload * test: add unit test to soroban auth pipeline --------- Co-authored-by: Bruno Nascimento * Complete unit test coverage for account handlers (#125) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * Create test-coverage.yml action (#126) * Create test-coverage.yml action * Update test-coverage.yml * Add unit test for base account handler (#127) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * test: add unit tests for base account handler * Add unit test for soroban get transaction pipeline (#124) * refactor: soroban get transaction pipeline constructor * fix: remove old log * test: add unit tests for soroban get transaction pipeline * style: adjust imports * Add unit tests for the classic asset handler (#128) * refactor: adjust outter imports/exports * test: add unit tests for the classic asset handler * feat: remove issuer requirement for classic assets (#129) * refactor: allow for no payload for dah * feat: remove issuer necessity for classic assets to better include native * test: add unit test to soroban token handler (#131) * feat: remove helper classes for account (#132) * feat: remove helper classes for account * refactor: remove unused error for base account * test: complete unit coverage for base account errors * Standardize default network configs and custom (#133) * feat: standardize network config options as functions under network * test: adjust tests for new network config format * feat: require rpc url for default rpc handler to initialize * feat: require horizon url to initialize default horizon handler * test: remove local testing from coverage * feat: remove soroban client * feat: convert horizon load account error to sp error * feat: add allowhttp to network config * test: add unit tests to default horizon handler * test: add default rpc handler unit tests * fix: account changes with network new config format * test: add network configuration unit tests * refactor: allowhttp object Co-authored-by: Caio Teixeira --------- Co-authored-by: Caio Teixeira * packaging: bump version to v0.8.0 * Fix merge issues (#137) * feat: standardize network config options as functions under network * fix: duplicate imports * Update stellar sdk (#139) * Release v0.8.0 (#136) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) * test: add build transaction unit tests * chore: merge with develop * test: add build transaction failure tests * refactor: make networkConfig variable private * test: add unit test for fee bump pipeline (#113) * test: add unit tests for classic signature requirements pipeline (#115) * Adjustments to release library as open source 🚀 (#107) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) --------- Co-authored-by: Bruno Nascimento * fix: setoptions op threshold requirement * fix: revoke operation variants threshold calculation * test: add unit tests to classig sign requirements pipeline * refactor: rearrange as per aaa pattern --------- Co-authored-by: Bruno Nascimento * Add unit tests for simulate transaction pipeline (#117) * refactor: eslint adjustments * test: initial simulate transaction unit tests * feat: add assemble transaction sp error * test: complete coverage for simulate transaction pipeline * refactor: clean up comments and adjust imports * Add unit tests for classic transaction pipeline (#118) * test: add unit tests for classic transaction pipeline * refactor: adjust imports * test: add unit tests for soroban transaction pipeline (#119) * test: add unit test for sign transaction pipeline * test: add unit test for submit transaction pipeline * Add unit tests soroban auth (#123) * fix: remove validation from contract engine initialization * style: remove comment * feat: modify account handler mocker payload * test: add unit test to soroban auth pipeline --------- Co-authored-by: Bruno Nascimento * Complete unit test coverage for account handlers (#125) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * Create test-coverage.yml action (#126) * Create test-coverage.yml action * Update test-coverage.yml * Add unit test for base account handler (#127) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * test: add unit tests for base account handler * Add unit test for soroban get transaction pipeline (#124) * refactor: soroban get transaction pipeline constructor * fix: remove old log * test: add unit tests for soroban get transaction pipeline * style: adjust imports * Add unit tests for the classic asset handler (#128) * refactor: adjust outter imports/exports * test: add unit tests for the classic asset handler * feat: remove issuer requirement for classic assets (#129) * refactor: allow for no payload for dah * feat: remove issuer necessity for classic assets to better include native * test: add unit test to soroban token handler (#131) * feat: remove helper classes for account (#132) * feat: remove helper classes for account * refactor: remove unused error for base account * test: complete unit coverage for base account errors * Standardize default network configs and custom (#133) * feat: standardize network config options as functions under network * test: adjust tests for new network config format * feat: require rpc url for default rpc handler to initialize * feat: require horizon url to initialize default horizon handler * test: remove local testing from coverage * feat: remove soroban client * feat: convert horizon load account error to sp error * feat: add allowhttp to network config * test: add unit tests to default horizon handler * test: add default rpc handler unit tests * fix: account changes with network new config format * test: add network configuration unit tests * refactor: allowhttp object Co-authored-by: Caio Teixeira --------- Co-authored-by: Caio Teixeira * packaging: bump version to v0.8.0 * Fix merge issues (#137) * feat: standardize network config options as functions under network * fix: duplicate imports --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira * chore: update stellar sdk * feat: add function to return secret key to default account handler * test: default account handler getters --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira * packaging: bump version to 0.8.1 * Minor fixes (#141) * feat: standardize network config options as functions under network * fix: duplicate imports * fix: read from contract output * chore: bump version * chore: bump version to 0.8.2 --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira * Documentation (#143) * GITBOOK-34: No subject * GITBOOK-35: update issuing your first asset tutorial * GITBOOK-36: update CD tutorial * GITBOOK-37: update profiler plugin * GITBOOK-38: Remove soroban token duplicate link * GITBOOK-39: update soroban token handler * GITBOOK-40: Improve Validation Cloud RPC page * GITBOOK-41: Improve the Welcome Page * GITBOOK-42: Improve Quick Start page * GITBOOK-45: Soroban Auth Pipeline * GITBOOK-47: update general doc --------- Co-authored-by: Fernanda Hahn * feat: remove spec requirement to instantiate contract engine * test: add unit test to spec requirement * feat: export stellar-sdk contract spec --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira Co-authored-by: Fernanda Hahn * chore: bump version to 0.8.3 * fix: soroban auth simulation fails if partial auth entries are present * chore: bump version to 0.8.4 * feat: Implement verbose output for transactions pipelines (#147) * feat: implement verbose output for classic pipeline * feat: implement verbose output for soroban pipeline * chore: bump version to 0.9.0 * build(deps-dev): bump braces from 3.0.2 to 3.0.3 Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] * Feat integration tests (#150) * feat: Implement verbose output for transactions pipelines (#148) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) * test: add build transaction unit tests * chore: merge with develop * test: add build transaction failure tests * refactor: make networkConfig variable private * test: add unit test for fee bump pipeline (#113) * test: add unit tests for classic signature requirements pipeline (#115) * Adjustments to release library as open source 🚀 (#107) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) --------- Co-authored-by: Bruno Nascimento * fix: setoptions op threshold requirement * fix: revoke operation variants threshold calculation * test: add unit tests to classig sign requirements pipeline * refactor: rearrange as per aaa pattern --------- Co-authored-by: Bruno Nascimento * Add unit tests for simulate transaction pipeline (#117) * refactor: eslint adjustments * test: initial simulate transaction unit tests * feat: add assemble transaction sp error * test: complete coverage for simulate transaction pipeline * refactor: clean up comments and adjust imports * Add unit tests for classic transaction pipeline (#118) * test: add unit tests for classic transaction pipeline * refactor: adjust imports * test: add unit tests for soroban transaction pipeline (#119) * test: add unit test for sign transaction pipeline * test: add unit test for submit transaction pipeline * Add unit tests soroban auth (#123) * fix: remove validation from contract engine initialization * style: remove comment * feat: modify account handler mocker payload * test: add unit test to soroban auth pipeline --------- Co-authored-by: Bruno Nascimento * Complete unit test coverage for account handlers (#125) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * Create test-coverage.yml action (#126) * Create test-coverage.yml action * Update test-coverage.yml * Add unit test for base account handler (#127) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * test: add unit tests for base account handler * Add unit test for soroban get transaction pipeline (#124) * refactor: soroban get transaction pipeline constructor * fix: remove old log * test: add unit tests for soroban get transaction pipeline * style: adjust imports * Add unit tests for the classic asset handler (#128) * refactor: adjust outter imports/exports * test: add unit tests for the classic asset handler * feat: remove issuer requirement for classic assets (#129) * refactor: allow for no payload for dah * feat: remove issuer necessity for classic assets to better include native * test: add unit test to soroban token handler (#131) * feat: remove helper classes for account (#132) * feat: remove helper classes for account * refactor: remove unused error for base account * test: complete unit coverage for base account errors * Standardize default network configs and custom (#133) * feat: standardize network config options as functions under network * test: adjust tests for new network config format * feat: require rpc url for default rpc handler to initialize * feat: require horizon url to initialize default horizon handler * test: remove local testing from coverage * feat: remove soroban client * feat: convert horizon load account error to sp error * feat: add allowhttp to network config * test: add unit tests to default horizon handler * test: add default rpc handler unit tests * fix: account changes with network new config format * test: add network configuration unit tests * refactor: allowhttp object Co-authored-by: Caio Teixeira --------- Co-authored-by: Caio Teixeira * packaging: bump version to v0.8.0 * Fix merge issues (#137) * feat: standardize network config options as functions under network * fix: duplicate imports * Update stellar sdk (#139) * Release v0.8.0 (#136) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) * test: add build transaction unit tests * chore: merge with develop * test: add build transaction failure tests * refactor: make networkConfig variable private * test: add unit test for fee bump pipeline (#113) * test: add unit tests for classic signature requirements pipeline (#115) * Adjustments to release library as open source 🚀 (#107) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) --------- Co-authored-by: Bruno Nascimento * fix: setoptions op threshold requirement * fix: revoke operation variants threshold calculation * test: add unit tests to classig sign requirements pipeline * refactor: rearrange as per aaa pattern --------- Co-authored-by: Bruno Nascimento * Add unit tests for simulate transaction pipeline (#117) * refactor: eslint adjustments * test: initial simulate transaction unit tests * feat: add assemble transaction sp error * test: complete coverage for simulate transaction pipeline * refactor: clean up comments and adjust imports * Add unit tests for classic transaction pipeline (#118) * test: add unit tests for classic transaction pipeline * refactor: adjust imports * test: add unit tests for soroban transaction pipeline (#119) * test: add unit test for sign transaction pipeline * test: add unit test for submit transaction pipeline * Add unit tests soroban auth (#123) * fix: remove validation from contract engine initialization * style: remove comment * feat: modify account handler mocker payload * test: add unit test to soroban auth pipeline --------- Co-authored-by: Bruno Nascimento * Complete unit test coverage for account handlers (#125) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * Create test-coverage.yml action (#126) * Create test-coverage.yml action * Update test-coverage.yml * Add unit test for base account handler (#127) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * test: add unit tests for base account handler * Add unit test for soroban get transaction pipeline (#124) * refactor: soroban get transaction pipeline constructor * fix: remove old log * test: add unit tests for soroban get transaction pipeline * style: adjust imports * Add unit tests for the classic asset handler (#128) * refactor: adjust outter imports/exports * test: add unit tests for the classic asset handler * feat: remove issuer requirement for classic assets (#129) * refactor: allow for no payload for dah * feat: remove issuer necessity for classic assets to better include native * test: add unit test to soroban token handler (#131) * feat: remove helper classes for account (#132) * feat: remove helper classes for account * refactor: remove unused error for base account * test: complete unit coverage for base account errors * Standardize default network configs and custom (#133) * feat: standardize network config options as functions under network * test: adjust tests for new network config format * feat: require rpc url for default rpc handler to initialize * feat: require horizon url to initialize default horizon handler * test: remove local testing from coverage * feat: remove soroban client * feat: convert horizon load account error to sp error * feat: add allowhttp to network config * test: add unit tests to default horizon handler * test: add default rpc handler unit tests * fix: account changes with network new config format * test: add network configuration unit tests * refactor: allowhttp object Co-authored-by: Caio Teixeira --------- Co-authored-by: Caio Teixeira * packaging: bump version to v0.8.0 * Fix merge issues (#137) * feat: standardize network config options as functions under network * fix: duplicate imports --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira * chore: update stellar sdk * feat: add function to return secret key to default account handler * test: default account handler getters --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira * packaging: bump version to 0.8.1 * Minor fixes (#141) * feat: standardize network config options as functions under network * fix: duplicate imports * fix: read from contract output * chore: bump version * chore: bump version to 0.8.2 * Contract engine improvements (#144) * feat: standardize network config options as functions under network * fix: duplicate imports * version 0.8.2 (#142) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) * test: add build transaction unit tests * chore: merge with develop * test: add build transaction failure tests * refactor: make networkConfig variable private * test: add unit test for fee bump pipeline (#113) * test: add unit tests for classic signature requirements pipeline (#115) * Adjustments to release library as open source 🚀 (#107) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) --------- Co-authored-by: Bruno Nascimento * fix: setoptions op threshold requirement * fix: revoke operation variants threshold calculation * test: add unit tests to classig sign requirements pipeline * refactor: rearrange as per aaa pattern --------- Co-authored-by: Bruno Nascimento * Add unit tests for simulate transaction pipeline (#117) * refactor: eslint adjustments * test: initial simulate transaction unit tests * feat: add assemble transaction sp error * test: complete coverage for simulate transaction pipeline * refactor: clean up comments and adjust imports * Add unit tests for classic transaction pipeline (#118) * test: add unit tests for classic transaction pipeline * refactor: adjust imports * test: add unit tests for soroban transaction pipeline (#119) * test: add unit test for sign transaction pipeline * test: add unit test for submit transaction pipeline * Add unit tests soroban auth (#123) * fix: remove validation from contract engine initialization * style: remove comment * feat: modify account handler mocker payload * test: add unit test to soroban auth pipeline --------- Co-authored-by: Bruno Nascimento * Complete unit test coverage for account handlers (#125) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * Create test-coverage.yml action (#126) * Create test-coverage.yml action * Update test-coverage.yml * Add unit test for base account handler (#127) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * test: add unit tests for base account handler * Add unit test for soroban get transaction pipeline (#124) * refactor: soroban get transaction pipeline constructor * fix: remove old log * test: add unit tests for soroban get transaction pipeline * style: adjust imports * Add unit tests for the classic asset handler (#128) * refactor: adjust outter imports/exports * test: add unit tests for the classic asset handler * feat: remove issuer requirement for classic assets (#129) * refactor: allow for no payload for dah * feat: remove issuer necessity for classic assets to better include native * test: add unit test to soroban token handler (#131) * feat: remove helper classes for account (#132) * feat: remove helper classes for account * refactor: remove unused error for base account * test: complete unit coverage for base account errors * Standardize default network configs and custom (#133) * feat: standardize network config options as functions under network * test: adjust tests for new network config format * feat: require rpc url for default rpc handler to initialize * feat: require horizon url to initialize default horizon handler * test: remove local testing from coverage * feat: remove soroban client * feat: convert horizon load account error to sp error * feat: add allowhttp to network config * test: add unit tests to default horizon handler * test: add default rpc handler unit tests * fix: account changes with network new config format * test: add network configuration unit tests * refactor: allowhttp object Co-authored-by: Caio Teixeira --------- Co-authored-by: Caio Teixeira * packaging: bump version to v0.8.0 * Fix merge issues (#137) * feat: standardize network config options as functions under network * fix: duplicate imports * Update stellar sdk (#139) * Release v0.8.0 (#136) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) * test: add build transaction unit tests * chore: merge with develop * test: add build transaction failure tests * refactor: make networkConfig variable private * test: add unit test for fee bump pipeline (#113) * test: add unit tests for classic signature requirements pipeline (#115) * Adjustments to release library as open source 🚀 (#107) * chore: add jest setup to coverage all files (#101) * refactor: fix circular import * test: contract engine initial structure * Contract Engine unit tests (#103) * refactor: contract engine errors * feat: validate required initialization arguments * test: contract engine initialization workflow * test: complete contract engine main coverage * refactor: update deprecated methods * refactor: contract engine errors (#104) * Update docs and minor adjustments to jsdocs (#105) * fix: missing error CE009 * docs: update jsdoc * docs: update readme for public release * packaging: bump version to 0.7.0 (#108) --------- Co-authored-by: Bruno Nascimento * fix: setoptions op threshold requirement * fix: revoke operation variants threshold calculation * test: add unit tests to classig sign requirements pipeline * refactor: rearrange as per aaa pattern --------- Co-authored-by: Bruno Nascimento * Add unit tests for simulate transaction pipeline (#117) * refactor: eslint adjustments * test: initial simulate transaction unit tests * feat: add assemble transaction sp error * test: complete coverage for simulate transaction pipeline * refactor: clean up comments and adjust imports * Add unit tests for classic transaction pipeline (#118) * test: add unit tests for classic transaction pipeline * refactor: adjust imports * test: add unit tests for soroban transaction pipeline (#119) * test: add unit test for sign transaction pipeline * test: add unit test for submit transaction pipeline * Add unit tests soroban auth (#123) * fix: remove validation from contract engine initialization * style: remove comment * feat: modify account handler mocker payload * test: add unit test to soroban auth pipeline --------- Co-authored-by: Bruno Nascimento * Complete unit test coverage for account handlers (#125) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * Create test-coverage.yml action (#126) * Create test-coverage.yml action * Update test-coverage.yml * Add unit test for base account handler (#127) * test: add unit tests for the default account handler * test: validate error to sign auth entry * feat: add fee bump type to sign payload * test: refactor freighter account handler unit tests * test: add unit tests for base account handler * Add unit test for soroban get transaction pipeline (#124) * refactor: soroban get transaction pipeline constructor * fix: remove old log * test: add unit tests for soroban get transaction pipeline * style: adjust imports * Add unit tests for the classic asset handler (#128) * refactor: adjust outter imports/exports * test: add unit tests for the classic asset handler * feat: remove issuer requirement for classic assets (#129) * refactor: allow for no payload for dah * feat: remove issuer necessity for classic assets to better include native * test: add unit test to soroban token handler (#131) * feat: remove helper classes for account (#132) * feat: remove helper classes for account * refactor: remove unused error for base account * test: complete unit coverage for base account errors * Standardize default network configs and custom (#133) * feat: standardize network config options as functions under network * test: adjust tests for new network config format * feat: require rpc url for default rpc handler to initialize * feat: require horizon url to initialize default horizon handler * test: remove local testing from coverage * feat: remove soroban client * feat: convert horizon load account error to sp error * feat: add allowhttp to network config * test: add unit tests to default horizon handler * test: add default rpc handler unit tests * fix: account changes with network new config format * test: add network configuration unit tests * refactor: allowhttp object Co-authored-by: Caio Teixeira --------- Co-authored-by: Caio Teixeira * packaging: bump version to v0.8.0 * Fix merge issues (#137) * feat: standardize network config options as functions under network * fix: duplicate imports --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira * chore: update stellar sdk * feat: add function to return secret key to default account handler * test: default account handler getters --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira * packaging: bump version to 0.8.1 * Minor fixes (#141) * feat: standardize network config options as functions under network * fix: duplicate imports * fix: read from contract output * chore: bump version * chore: bump version to 0.8.2 --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira * Documentation (#143) * GITBOOK-34: No subject * GITBOOK-35: update issuing your first asset tutorial * GITBOOK-36: update CD tutorial * GITBOOK-37: update profiler plugin * GITBOOK-38: Remove soroban token duplicate link * GITBOOK-39: update soroban token handler * GITBOOK-40: Improve Validation Cloud RPC page * GITBOOK-41: Improve the Welcome Page * GITBOOK-42: Improve Quick Start page * GITBOOK-45: Soroban Auth Pipeline * GITBOOK-47: update general doc --------- Co-authored-by: Fernanda Hahn * feat: remove spec requirement to instantiate contract engine * test: add unit test to spec requirement * feat: export stellar-sdk contract spec --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira Co-authored-by: Fernanda Hahn * chore: bump version to 0.8.3 * fix: soroban auth simulation fails if partial auth entries are present * chore: bump version to 0.8.4 * feat: Implement verbose output for transactions pipelines (#147) * feat: implement verbose output for classic pipeline * feat: implement verbose output for soroban pipeline * chore: bump version to 0.9.0 --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira Co-authored-by: Fernanda Hahn * test: configure different test types * feat: add test ledger * test: add account management integration tests * feat: add regex utils * test: move integration tests * test: add example smart contract hello world * test: add load wasm util * test: add integration test for hello world * test: add simple tx invocation helper * style: remove unused imports * test: add classic asset management integration test * ci: update coverage check to include integration plus unit * test: add util to derivate feebump header from tx invocation * fix: read from contract with channel accounts handle not having signers * test: add channel accounts plugin integration tests * test: adjust plugin imports for coverage * refactor: adjust plugins exports * test: add unit tests to debug plugin * test: add profiler plugin integration tests * chore: remove unused mocks * docs: update readme with testing section --------- Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira Co-authored-by: Fernanda Hahn * build(deps-dev): bump axios from 0.21.4 to 1.7.2 Bumps [axios](https://github.com/axios/axios) from 0.21.4 to 1.7.2. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v0.21.4...v1.7.2) --- updated-dependencies: - dependency-name: axios dependency-type: indirect ... Signed-off-by: dependabot[bot] * Feat: unit conversion (#153) * feat: add unit conversion utils * test: add unit conversion unit tests * feat: add balance conversion with strings * test: add unit test to balance conversion with strings * docs: improve ts-docs for unit conversion * Feat verify signature (#156) * feat: add signData feature to default account handler * feat: add verifySignature feature to base account handler * test: add unit test to signData * test: add unit test to verifySignature * chore: bump version to v0.10.0 --------- Signed-off-by: dependabot[bot] Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira Co-authored-by: Fernanda Hahn Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: bump v0.10.1 * build(deps): bump socket.io and @hyperledger/cactus-test-tooling (#158) Dependabot couldn't find the original pull request head commit, 0825ad78436fa498982933f99aac21eb36ef91d1. Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: add handling of wrapped contract to contract engine (#161) chore: bump version to 0.10.2 chore: update package lock * Update stellar sdk version (#163) * fix: handle contract authorization for subinvocation * chore: update stellar sdk to 12.2.0 * chore: bump version to 0.11.0 --------- Signed-off-by: dependabot[bot] Co-authored-by: Bruno Nascimento Co-authored-by: Caio Teixeira Co-authored-by: Fernanda Hahn Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 288 +++++++++--------- package.json | 6 +- src/stellar-plus/asset/classic/types.ts | 6 +- .../asset/soroban-token/constants.ts | 4 +- src/stellar-plus/asset/soroban-token/index.ts | 7 +- .../asset/soroban-token/index.unit.test.ts | 5 +- src/stellar-plus/asset/soroban-token/types.ts | 4 +- .../asset/stellar-asset-contract/index.ts | 3 +- .../asset/stellar-asset-contract/types.ts | 4 +- .../core/contract-engine/index.ts | 7 +- .../core/contract-engine/types.ts | 5 +- src/stellar-plus/core/index.ts | 5 +- .../build-transaction/index.unit.test.ts | 3 +- .../pipelines/classic-transaction/types.ts | 5 +- .../core/pipelines/soroban-auth/errors.ts | 16 + .../core/pipelines/soroban-auth/index.ts | 19 +- .../pipelines/submit-transaction/errors.ts | 4 +- .../pipelines/submit-transaction/index.ts | 9 +- .../pipelines/submit-transaction/types.ts | 5 +- src/stellar-plus/core/spec.ts | 7 + src/stellar-plus/error/helpers/horizon.ts | 17 +- .../certificate-of-deposit/constants.ts | 5 +- .../contracts/certificate-of-deposit/index.ts | 5 +- .../contracts/certificate-of-deposit/types.ts | 4 +- src/stellar-plus/types.ts | 4 +- .../extract-invocation-output/index.ts | 6 +- .../extract-invocation-output/index.ts | 6 +- .../index.integration.test.ts | 6 - .../index.integration.test.ts | 10 +- .../index.integration.test.ts | 8 +- .../profiler-plugin/index.integration.test.ts | 14 +- tsconfig.json | 10 +- 32 files changed, 262 insertions(+), 245 deletions(-) create mode 100644 src/stellar-plus/core/spec.ts diff --git a/package-lock.json b/package-lock.json index a75f095d..5d2630ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@hyperledger/cactus-test-tooling": "^2.0.0-rc.2", "@stellar/freighter-api": "^1.7.1", - "@stellar/stellar-sdk": "^11.2.2", + "@stellar/stellar-sdk": "^12.2.0", "axios": "^1.6.2", "uuid": "^9.0.1" }, @@ -44,7 +44,7 @@ "tsc-alias": "^1.8.8", "tsconfig-paths": "^4.2.0", "tslib": "^2.6.2", - "typescript": "^5.3.2" + "typescript": "^5.5.4" } }, "node_modules/@ampproject/remapping": { @@ -72,7 +72,7 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.9", + "version": "7.25.2", "dev": true, "license": "MIT", "engines": { @@ -80,20 +80,20 @@ } }, "node_modules/@babel/core": { - "version": "7.24.9", + "version": "7.25.2", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.9", - "@babel/helper-compilation-targets": "^7.24.8", - "@babel/helper-module-transforms": "^7.24.9", - "@babel/helpers": "^7.24.8", - "@babel/parser": "^7.24.8", - "@babel/template": "^7.24.7", - "@babel/traverse": "^7.24.8", - "@babel/types": "^7.24.9", + "@babel/generator": "^7.25.0", + "@babel/helper-compilation-targets": "^7.25.2", + "@babel/helper-module-transforms": "^7.25.2", + "@babel/helpers": "^7.25.0", + "@babel/parser": "^7.25.0", + "@babel/template": "^7.25.0", + "@babel/traverse": "^7.25.2", + "@babel/types": "^7.25.2", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -117,11 +117,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.10", + "version": "7.25.0", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.24.9", + "@babel/types": "^7.25.0", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -142,11 +142,11 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.24.8", + "version": "7.25.2", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.24.8", + "@babel/compat-data": "^7.25.2", "@babel/helper-validator-option": "^7.24.8", "browserslist": "^4.23.1", "lru-cache": "^5.1.1", @@ -164,40 +164,6 @@ "semver": "bin/semver.js" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-module-imports": { "version": "7.24.7", "dev": true, @@ -211,15 +177,14 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.24.9", + "version": "7.25.2", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", "@babel/helper-module-imports": "^7.24.7", "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7" + "@babel/helper-validator-identifier": "^7.24.7", + "@babel/traverse": "^7.25.2" }, "engines": { "node": ">=6.9.0" @@ -248,17 +213,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-string-parser": { "version": "7.24.8", "dev": true, @@ -284,12 +238,12 @@ } }, "node_modules/@babel/helpers": { - "version": "7.24.8", + "version": "7.25.0", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.8" + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.0" }, "engines": { "node": ">=6.9.0" @@ -361,9 +315,12 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.8", + "version": "7.25.3", "dev": true, "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.2" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -535,31 +492,28 @@ } }, "node_modules/@babel/template": { - "version": "7.24.7", + "version": "7.25.0", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.24.8", + "version": "7.25.3", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.8", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/parser": "^7.24.8", - "@babel/types": "^7.24.8", + "@babel/generator": "^7.25.0", + "@babel/parser": "^7.25.3", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.2", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -576,7 +530,7 @@ } }, "node_modules/@babel/types": { - "version": "7.24.9", + "version": "7.25.2", "dev": true, "license": "MIT", "dependencies": { @@ -2310,17 +2264,20 @@ }, "node_modules/@stellar/freighter-api": { "version": "1.7.1", - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/@stellar/freighter-api/-/freighter-api-1.7.1.tgz", + "integrity": "sha512-XvPO+XgEbkeP0VhP0U1edOkds+rGS28+y8GRGbCVXeZ9ZslbWqRFQoETAdX8IXGuykk2ib/aPokiLc5ZaWYP7w==" }, "node_modules/@stellar/js-xdr": { "version": "3.1.2", - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/@stellar/js-xdr/-/js-xdr-3.1.2.tgz", + "integrity": "sha512-VVolPL5goVEIsvuGqDc5uiKxV03lzfWdvYg1KikvwheDmTBO68CKDji3bAZ/kppZrx5iTA8z3Ld5yuytcvhvOQ==" }, "node_modules/@stellar/stellar-base": { - "version": "11.0.1", - "license": "Apache-2.0", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/@stellar/stellar-base/-/stellar-base-12.1.0.tgz", + "integrity": "sha512-pWwn+XWP5NotmIteZNuJzHeNn9DYSqH3lsYbtFUoSYy1QegzZdi9D8dK6fJ2fpBAnf/rcDjHgHOw3gtHaQFVbg==", "dependencies": { - "@stellar/js-xdr": "^3.1.1", + "@stellar/js-xdr": "^3.1.2", "base32.js": "^0.1.0", "bignumber.js": "^9.1.2", "buffer": "^6.0.3", @@ -2328,15 +2285,16 @@ "tweetnacl": "^1.0.3" }, "optionalDependencies": { - "sodium-native": "^4.0.10" + "sodium-native": "^4.1.1" } }, "node_modules/@stellar/stellar-sdk": { - "version": "11.3.0", - "license": "Apache-2.0", + "version": "12.2.0", + "resolved": "https://registry.npmjs.org/@stellar/stellar-sdk/-/stellar-sdk-12.2.0.tgz", + "integrity": "sha512-Wy5sDOqb5JvAC76f4sQIV6Pe3JNyZb0PuyVNjwt3/uWsjtxRkFk6s2yTHTefBLWoR+mKxDjO7QfzhycF1v8FXQ==", "dependencies": { - "@stellar/stellar-base": "^11.0.1", - "axios": "^1.6.8", + "@stellar/stellar-base": "^12.1.0", + "axios": "^1.7.2", "bignumber.js": "^9.1.2", "eventsource": "^2.0.2", "randombytes": "^2.1.0", @@ -2514,7 +2472,7 @@ } }, "node_modules/@types/node": { - "version": "20.14.11", + "version": "20.14.13", "license": "MIT", "dependencies": { "undici-types": "~5.26.4" @@ -2563,7 +2521,7 @@ } }, "node_modules/@types/ssh2/node_modules/@types/node": { - "version": "18.19.41", + "version": "18.19.42", "license": "MIT", "dependencies": { "undici-types": "~5.26.4" @@ -3872,7 +3830,7 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001643", + "version": "1.0.30001646", "dev": true, "funding": [ { @@ -4055,14 +4013,14 @@ } }, "node_modules/cli-cursor": { - "version": "4.0.0", + "version": "5.0.0", "dev": true, "license": "MIT", "dependencies": { - "restore-cursor": "^4.0.0" + "restore-cursor": "^5.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -4632,7 +4590,7 @@ } }, "node_modules/debug": { - "version": "4.3.5", + "version": "4.3.6", "license": "MIT", "dependencies": { "ms": "2.1.2" @@ -5045,7 +5003,7 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.0", + "version": "1.5.4", "dev": true, "license": "ISC" }, @@ -5148,6 +5106,33 @@ "node": ">=10.0.0" } }, + "node_modules/engine.io/node_modules/ws": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/engine.io-parser": { + "version": "5.0.7", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/enhanced-resolve": { "version": "5.17.1", "dev": true, @@ -5178,6 +5163,17 @@ "node": ">=6" } }, + "node_modules/environment": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/error-ex": { "version": "1.3.2", "dev": true, @@ -6093,7 +6089,7 @@ } }, "node_modules/ethereum-bloom-filters": { - "version": "1.1.0", + "version": "1.2.0", "license": "MIT", "dependencies": { "@noble/hashes": "^1.4.0" @@ -6717,18 +6713,6 @@ "version": "1.0.0", "license": "ISC" }, - "node_modules/fsevents": { - "version": "2.3.3", - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "license": "MIT", @@ -9637,14 +9621,14 @@ } }, "node_modules/listr2": { - "version": "8.2.3", + "version": "8.2.4", "dev": true, "license": "MIT", "dependencies": { "cli-truncate": "^4.0.0", "colorette": "^2.0.20", "eventemitter3": "^5.0.1", - "log-update": "^6.0.0", + "log-update": "^6.1.0", "rfdc": "^1.4.1", "wrap-ansi": "^9.0.0" }, @@ -9725,13 +9709,13 @@ "license": "MIT" }, "node_modules/log-update": { - "version": "6.0.0", + "version": "6.1.0", "dev": true, "license": "MIT", "dependencies": { - "ansi-escapes": "^6.2.0", - "cli-cursor": "^4.0.0", - "slice-ansi": "^7.0.0", + "ansi-escapes": "^7.0.0", + "cli-cursor": "^5.0.0", + "slice-ansi": "^7.1.0", "strip-ansi": "^7.1.0", "wrap-ansi": "^9.0.0" }, @@ -9743,11 +9727,14 @@ } }, "node_modules/log-update/node_modules/ansi-escapes": { - "version": "6.2.1", + "version": "7.0.0", "dev": true, "license": "MIT", + "dependencies": { + "environment": "^1.0.0" + }, "engines": { - "node": ">=14.16" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -9990,6 +9977,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/mimic-function": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/mimic-response": { "version": "1.0.1", "license": "MIT", @@ -11263,6 +11261,18 @@ "node": ">= 6" } }, + "node_modules/pkcs11js": { + "version": "1.3.1", + "license": "MIT", + "optional": true, + "dependencies": { + "nan": "^2.15.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/PeculiarVentures" + } + }, "node_modules/pkg-dir": { "version": "4.2.0", "dev": true, @@ -11357,7 +11367,7 @@ } }, "node_modules/postcss": { - "version": "8.4.39", + "version": "8.4.40", "funding": [ { "type": "opencollective", @@ -11984,47 +11994,34 @@ } }, "node_modules/restore-cursor": { - "version": "4.0.0", + "version": "5.1.0", "dev": true, "license": "MIT", "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/restore-cursor/node_modules/mimic-fn": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/restore-cursor/node_modules/onetime": { - "version": "5.1.2", + "version": "7.0.0", "dev": true, "license": "MIT", "dependencies": { - "mimic-fn": "^2.1.0" + "mimic-function": "^5.0.0" }, "engines": { - "node": ">=6" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/restore-cursor/node_modules/signal-exit": { - "version": "3.0.7", - "dev": true, - "license": "ISC" - }, "node_modules/retry": { "version": "0.13.1", "license": "MIT", @@ -13380,7 +13377,7 @@ } }, "node_modules/ts-jest": { - "version": "29.2.3", + "version": "29.2.4", "dev": true, "license": "MIT", "dependencies": { @@ -13777,11 +13774,14 @@ "license": "MIT" }, "node_modules/url": { - "version": "0.11.3", + "version": "0.11.4", "license": "MIT", "dependencies": { "punycode": "^1.4.1", - "qs": "^6.11.2" + "qs": "^6.12.3" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/url-join": { diff --git a/package.json b/package.json index 2a0548e8..642447d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stellar-plus", - "version": "0.10.2", + "version": "0.11.0", "description": "beta version of stellar-plus, an all-in-one sdk for the Stellar blockchain", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -61,12 +61,12 @@ "tsc-alias": "^1.8.8", "tsconfig-paths": "^4.2.0", "tslib": "^2.6.2", - "typescript": "^5.3.2" + "typescript": "^5.5.4" }, "dependencies": { "@hyperledger/cactus-test-tooling": "^2.0.0-rc.2", "@stellar/freighter-api": "^1.7.1", - "@stellar/stellar-sdk": "^11.2.2", + "@stellar/stellar-sdk": "^12.2.0", "axios": "^1.6.2", "uuid": "^9.0.1" } diff --git a/src/stellar-plus/asset/classic/types.ts b/src/stellar-plus/asset/classic/types.ts index d7675da2..8b9f4de0 100644 --- a/src/stellar-plus/asset/classic/types.ts +++ b/src/stellar-plus/asset/classic/types.ts @@ -1,4 +1,4 @@ -import { HorizonApi } from '@stellar/stellar-sdk/lib/horizon' +import { Horizon } from '@stellar/stellar-sdk' import { AccountHandler } from 'stellar-plus/account/account-handler/types' import { AssetType, AssetTypes } from 'stellar-plus/asset/types' @@ -32,7 +32,7 @@ export type ClassicTokenInterfaceManagement = { to: string amount: number } & TransactionInvocation - ) => Promise + ) => Promise } export type ClassicTokenInterfaceUser = { @@ -47,5 +47,5 @@ export type ClassicTokenInterfaceUser = { export type ClassicUtils = { addTrustlineAndMint: ( args: { to: string; amount: number } & TransactionInvocation - ) => Promise + ) => Promise } diff --git a/src/stellar-plus/asset/soroban-token/constants.ts b/src/stellar-plus/asset/soroban-token/constants.ts index 08f45d0f..3932a281 100644 --- a/src/stellar-plus/asset/soroban-token/constants.ts +++ b/src/stellar-plus/asset/soroban-token/constants.ts @@ -1,6 +1,6 @@ -import { ContractSpec } from '@stellar/stellar-sdk' +import { Spec } from '@stellar/stellar-sdk/contract' -export const spec = new ContractSpec([ +export const spec = new Spec([ 'AAAAAAAAAAAAAAAKaW5pdGlhbGl6ZQAAAAAABAAAAAAAAAAFYWRtaW4AAAAAAAATAAAAAAAAAAdkZWNpbWFsAAAAAAQAAAAAAAAABG5hbWUAAAAQAAAAAAAAAAZzeW1ib2wAAAAAABAAAAAA', 'AAAAAAAAAAAAAAAEbWludAAAAAIAAAAAAAAAAnRvAAAAAAATAAAAAAAAAAZhbW91bnQAAAAAAAsAAAAA', 'AAAAAAAAAAAAAAAJc2V0X2FkbWluAAAAAAAAAQAAAAAAAAAJbmV3X2FkbWluAAAAAAAAEwAAAAA=', diff --git a/src/stellar-plus/asset/soroban-token/index.ts b/src/stellar-plus/asset/soroban-token/index.ts index 10dbbdbf..33f3e969 100644 --- a/src/stellar-plus/asset/soroban-token/index.ts +++ b/src/stellar-plus/asset/soroban-token/index.ts @@ -1,4 +1,5 @@ -import { Address, ContractSpec } from '@stellar/stellar-sdk' +import { Address } from '@stellar/stellar-sdk' +import { Spec } from '@stellar/stellar-sdk/contract' import { spec as defaultSpec, methods } from 'stellar-plus/asset/soroban-token/constants' import { SorobanTokenHandlerConstructorArgs, SorobanTokenInterface } from 'stellar-plus/asset/soroban-token/types' @@ -16,7 +17,7 @@ export class SorobanTokenHandler extends ContractEngine implements SorobanTokenI * @args args * @param {NetworkConfig} args.networkConfig - Network to connect to * @param args.contractParameters - Contract parameters - * @param {ContractSpec=} args.contractParameters.spec - Contract specification + * @param {Spec=} args.contractParameters.spec - Contract specification * @param {string=} args.contractParameters.contractId - Contract ID * @param {Buffer=} args.wasm - Contract WASM file as Buffer * @param {string=} args.wasmHash - Contract WASM hash identifier @@ -34,7 +35,7 @@ export class SorobanTokenHandler extends ContractEngine implements SorobanTokenI ...args, contractParameters: { ...args.contractParameters, - spec: args.contractParameters?.spec || (defaultSpec as ContractSpec), + spec: args.contractParameters?.spec || (defaultSpec as Spec), }, }) } diff --git a/src/stellar-plus/asset/soroban-token/index.unit.test.ts b/src/stellar-plus/asset/soroban-token/index.unit.test.ts index 726de623..86b51a68 100644 --- a/src/stellar-plus/asset/soroban-token/index.unit.test.ts +++ b/src/stellar-plus/asset/soroban-token/index.unit.test.ts @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { Address, ContractSpec } from '@stellar/stellar-sdk' +import { Address } from '@stellar/stellar-sdk' +import { Spec } from '@stellar/stellar-sdk/contract' import { SorobanTokenHandler } from 'stellar-plus/asset/soroban-token' import { spec as DEFAULT_SPEC, methods } from 'stellar-plus/asset/soroban-token/constants' @@ -44,7 +45,7 @@ describe('SorobanToken', () => { }) it('should initialize with a custom spec', () => { - const mockedSpec = new ContractSpec(['AAAAAAAAAAAAAAAEbmFtZQAAAAAAAAABAAAAEA==']) + const mockedSpec = new Spec(['AAAAAAAAAAAAAAAEbmFtZQAAAAAAAAABAAAAEA==']) const token = new SorobanTokenHandler({ networkConfig: NETWORK_CONFIG, contractParameters: { diff --git a/src/stellar-plus/asset/soroban-token/types.ts b/src/stellar-plus/asset/soroban-token/types.ts index f16c2ed5..a5147276 100644 --- a/src/stellar-plus/asset/soroban-token/types.ts +++ b/src/stellar-plus/asset/soroban-token/types.ts @@ -1,4 +1,4 @@ -import { ContractSpec } from '@stellar/stellar-sdk' +import { Spec } from '@stellar/stellar-sdk/contract' import { AssetType } from 'stellar-plus/asset/types' import { Options } from 'stellar-plus/core/contract-engine/types' @@ -9,7 +9,7 @@ import { NetworkConfig, i128, u32 } from 'stellar-plus/types' export type SorobanTokenHandlerConstructorArgs = { networkConfig: NetworkConfig contractParameters?: { - spec?: ContractSpec + spec?: Spec contractId?: string wasm?: Buffer wasmHash?: string diff --git a/src/stellar-plus/asset/stellar-asset-contract/index.ts b/src/stellar-plus/asset/stellar-asset-contract/index.ts index 238683a0..09d73374 100644 --- a/src/stellar-plus/asset/stellar-asset-contract/index.ts +++ b/src/stellar-plus/asset/stellar-asset-contract/index.ts @@ -6,7 +6,6 @@ import { SorobanTokenHandler } from 'stellar-plus/asset/soroban-token' import { SorobanTokenHandlerConstructorArgs } from 'stellar-plus/asset/soroban-token/types' import { SACConstructorArgs, SACHandler as SACHandlerType } from 'stellar-plus/asset/stellar-asset-contract/types' import { AssetTypes } from 'stellar-plus/asset/types' - import { TransactionInvocation } from 'stellar-plus/core/types' export class SACHandler implements SACHandlerType { @@ -23,7 +22,7 @@ export class SACHandler implements SACHandlerType { * @param {string} args.code - The asset code. * @param {string | AccountHandler} args.issuerAccount - The issuer account. Can be a public key or an account handler. If it's an account handler, it will enable management functions. * @param contractParameters - The contract parameters. - * @param {ContractSpec=} contractParameters.spec - The contract specification object. + * @param {Spec=} contractParameters.spec - The contract specification object. * @param {Buffer=} contractParameters.wasm - The contract wasm file as a buffer. * @param {string=} contractParameters.wasmHash - The contract wasm hash id. * @param {string=} contractParameters.contractId - The contract id. diff --git a/src/stellar-plus/asset/stellar-asset-contract/types.ts b/src/stellar-plus/asset/stellar-asset-contract/types.ts index 874fabbb..675a0969 100644 --- a/src/stellar-plus/asset/stellar-asset-contract/types.ts +++ b/src/stellar-plus/asset/stellar-asset-contract/types.ts @@ -1,4 +1,4 @@ -import { ContractSpec } from '@stellar/stellar-sdk' +import { Spec } from '@stellar/stellar-sdk/contract' import { ClassicAssetHandler } from 'stellar-plus/asset/classic' import { ClassicAssetHandlerConstructorArgs } from 'stellar-plus/asset/classic/types' @@ -15,7 +15,7 @@ export type SACHandler = AssetType & { export type SACConstructorArgs = ClassicAssetHandlerConstructorArgs & { networkConfig: NetworkConfig contractParameters?: { - spec?: ContractSpec + spec?: Spec contractId?: string wasm?: Buffer wasmHash?: string diff --git a/src/stellar-plus/core/contract-engine/index.ts b/src/stellar-plus/core/contract-engine/index.ts index ea5555ca..9a8a6b1b 100644 --- a/src/stellar-plus/core/contract-engine/index.ts +++ b/src/stellar-plus/core/contract-engine/index.ts @@ -3,13 +3,13 @@ import { Buffer } from 'buffer' import { Address, Contract, - ContractSpec, Operation, OperationOptions, SorobanDataBuilder, SorobanRpc as SorobanRpcNamespace, xdr, } from '@stellar/stellar-sdk' +import { Spec } from '@stellar/stellar-sdk/contract' import { CEError } from 'stellar-plus/core/contract-engine/errors' import { @@ -44,7 +44,7 @@ import { ExtractInvocationOutputPlugin } from 'stellar-plus/utils/pipeline/plugi import { ExtractWasmHashPlugin } from 'stellar-plus/utils/pipeline/plugins/soroban-get-transaction/extract-wasm-hash' export class ContractEngine { - private spec?: ContractSpec + private spec?: Spec private contractId?: string private wasm?: Buffer private wasmHash?: string @@ -59,7 +59,7 @@ export class ContractEngine { * * @param {NetworkConfig} networkConfig - The network to use. * @param contractParameters - The contract parameters. - * @param {ContractSpec} contractParameters.spec - The contract specification object. + * @param {Spec} contractParameters.spec - The contract specification object. * @param {string=} contractParameters.contractId - The contract id. * @param {Buffer=} contractParameters.wasm - The contract wasm file as a buffer. * @param {string=} contractParameters.wasmHash - The contract wasm hash id. @@ -370,6 +370,7 @@ export class ContractEngine { } } finally { if (!isAssetAlreadyWrapped) { + // eslint-disable-next-line no-unsafe-finally throw CEError.failedToWrapAsset(error as StellarPlusError) } } diff --git a/src/stellar-plus/core/contract-engine/types.ts b/src/stellar-plus/core/contract-engine/types.ts index de2e26e4..6c8399db 100644 --- a/src/stellar-plus/core/contract-engine/types.ts +++ b/src/stellar-plus/core/contract-engine/types.ts @@ -1,4 +1,5 @@ -import { ContractSpec, SorobanDataBuilder, Asset as StellarAsset, xdr } from '@stellar/stellar-sdk' +import { SorobanDataBuilder, Asset as StellarAsset, xdr } from '@stellar/stellar-sdk' +import { Spec } from '@stellar/stellar-sdk/contract' import { AccountHandler } from 'stellar-plus/account' import { @@ -10,7 +11,7 @@ import { EnvelopeHeader, FeeBumpHeader, NetworkConfig, TransactionInvocation } f export type ContractEngineConstructorArgs = { networkConfig: NetworkConfig contractParameters: { - spec?: ContractSpec + spec?: Spec contractId?: string wasm?: Buffer wasmHash?: string diff --git a/src/stellar-plus/core/index.ts b/src/stellar-plus/core/index.ts index ee67c311..a69436a4 100644 --- a/src/stellar-plus/core/index.ts +++ b/src/stellar-plus/core/index.ts @@ -1,4 +1,4 @@ -import { ContractSpec } from '@stellar/stellar-sdk' +import { Spec } from '@stellar/stellar-sdk/contract' import { ContractEngine } from './contract-engine' import { BuildTransactionPipeline } from './pipelines/build-transaction' @@ -24,5 +24,6 @@ export const Core = { SubmitTransaction: SubmitTransactionPipeline, }, ContractEngine: ContractEngine, - ContractSpec, + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + Spec, } diff --git a/src/stellar-plus/core/pipelines/build-transaction/index.unit.test.ts b/src/stellar-plus/core/pipelines/build-transaction/index.unit.test.ts index 5b6e5b6a..b646b8b8 100644 --- a/src/stellar-plus/core/pipelines/build-transaction/index.unit.test.ts +++ b/src/stellar-plus/core/pipelines/build-transaction/index.unit.test.ts @@ -1,6 +1,5 @@ import { Asset, Operation } from '@stellar/stellar-base' import { Horizon, TransactionBuilder } from '@stellar/stellar-sdk' -import { AccountResponse } from '@stellar/stellar-sdk/lib/horizon' import { BuildTransactionPipelineInput as BTInput, @@ -32,7 +31,7 @@ jest.mock('@stellar/stellar-sdk', () => ({ export function createMockedHorizonHandler(): jest.Mocked { return { - loadAccount: jest.fn().mockResolvedValue({} as AccountResponse), + loadAccount: jest.fn().mockResolvedValue({} as Horizon.AccountResponse), server: new Horizon.Server(TestNet().horizonUrl as string), } } diff --git a/src/stellar-plus/core/pipelines/classic-transaction/types.ts b/src/stellar-plus/core/pipelines/classic-transaction/types.ts index a6e14cef..93cd41fb 100644 --- a/src/stellar-plus/core/pipelines/classic-transaction/types.ts +++ b/src/stellar-plus/core/pipelines/classic-transaction/types.ts @@ -1,5 +1,4 @@ -import { xdr } from '@stellar/stellar-sdk' -import { HorizonApi } from '@stellar/stellar-sdk/lib/horizon' +import { Horizon, xdr } from '@stellar/stellar-sdk' import { BuildTransactionPipelineOutput, @@ -38,7 +37,7 @@ export type ClassicTransactionPipelineInput = { export type ClassicTransactionPipelineOutput = | ClassicTransactionPipelineOutputSimple | ClassicTransactionPipelineOutputVerbose -export type ClassicTransactionPipelineOutputSimple = { response: HorizonApi.SubmitTransactionResponse } +export type ClassicTransactionPipelineOutputSimple = { response: Horizon.HorizonApi.SubmitTransactionResponse } export type ClassicTransactionPipelineOutputVerbose = (VerboseOutput | undefined) & { classicTransactionOutput: ClassicTransactionPipelineOutputSimple hash?: string diff --git a/src/stellar-plus/core/pipelines/soroban-auth/errors.ts b/src/stellar-plus/core/pipelines/soroban-auth/errors.ts index 59a60774..4e95e0f5 100644 --- a/src/stellar-plus/core/pipelines/soroban-auth/errors.ts +++ b/src/stellar-plus/core/pipelines/soroban-auth/errors.ts @@ -89,9 +89,25 @@ const couldntSimulateAuthorizedTransaction = ( }) } +const contractAuthNotSupported = ( + contractId: string, + conveyorBeltErrorMeta: ConveyorBeltErrorMeta +): StellarPlusError => { + return new StellarPlusError({ + code: ErrorCodesPipelineSorobanAuth.PSA004, + message: 'Contract authorization not supported!', + source: 'PipelineSorobanAuth', + details: `Contract authorization is not supported in the current version of Stellar Plus. This contract function is verifying against a specific contract authorization from (${contractId}) which is likely expected to be accessed as a sub-invocation instead of root invocation.`, + meta: { + conveyorBeltErrorMeta, + }, + }) +} + export const PSAError = { signerNotFound, noSignersProvided, couldntUpdateTransaction, couldntSimulateAuthorizedTransaction, + contractAuthNotSupported, } diff --git a/src/stellar-plus/core/pipelines/soroban-auth/index.ts b/src/stellar-plus/core/pipelines/soroban-auth/index.ts index 86b41e45..5a08de4f 100644 --- a/src/stellar-plus/core/pipelines/soroban-auth/index.ts +++ b/src/stellar-plus/core/pipelines/soroban-auth/index.ts @@ -58,9 +58,7 @@ export class SorobanAuthPipeline extends ConveyorBelt< ? [...additionalSignedSorobanAuth] : [] for (const authEntry of authEntriesToSign) { - const requiredSigner = Address.account( - authEntry.credentials().address().address().accountId().ed25519() - ).toString() + const requiredSigner = this.getRequiredSigner(authEntry, item, itemId) const signer = signers.find((s) => s.getPublicKey() === requiredSigner) as AccountHandler @@ -198,4 +196,19 @@ export class SorobanAuthPipeline extends ConveyorBelt< }) : [] } + + protected getRequiredSigner( + authEntry: xdr.SorobanAuthorizationEntry, + item: SorobanAuthPipelineInput, + itemId: string + ): string { + if (authEntry.credentials().address().address().switch().name === 'scAddressTypeContract') { + throw PSAError.contractAuthNotSupported( + Address.contract(authEntry.credentials().address().address().contractId()).toString(), + extractConveyorBeltErrorMeta(item, this.getMeta(itemId)) + ) + } + + return Address.account(authEntry.credentials().address().address().accountId().ed25519()).toString() + } } diff --git a/src/stellar-plus/core/pipelines/submit-transaction/errors.ts b/src/stellar-plus/core/pipelines/submit-transaction/errors.ts index bd56fba4..13fef8b2 100644 --- a/src/stellar-plus/core/pipelines/submit-transaction/errors.ts +++ b/src/stellar-plus/core/pipelines/submit-transaction/errors.ts @@ -1,4 +1,4 @@ -import { HorizonApi } from '@stellar/stellar-sdk/lib/horizon' +import { Horizon } from '@stellar/stellar-sdk' import { StellarPlusError } from 'stellar-plus/error' import { ConveyorBeltErrorMeta } from 'stellar-plus/error/helpers/conveyor-belt' @@ -54,7 +54,7 @@ const horizonSubmissionFailed = ( }) } const transactionSubmittedThroughHorizonFailed = ( - response: HorizonApi.SubmitTransactionResponse, + response: Horizon.HorizonApi.SubmitTransactionResponse, conveyorBeltErrorMeta: ConveyorBeltErrorMeta, transaction: Transaction | FeeBumpTransaction ): StellarPlusError => { diff --git a/src/stellar-plus/core/pipelines/submit-transaction/index.ts b/src/stellar-plus/core/pipelines/submit-transaction/index.ts index 1c6bde70..f11c6caa 100644 --- a/src/stellar-plus/core/pipelines/submit-transaction/index.ts +++ b/src/stellar-plus/core/pipelines/submit-transaction/index.ts @@ -1,5 +1,4 @@ -import { FeeBumpTransaction, SorobanRpc, Transaction } from '@stellar/stellar-sdk' -import { HorizonApi } from '@stellar/stellar-sdk/lib/horizon' +import { FeeBumpTransaction, Horizon, SorobanRpc, Transaction } from '@stellar/stellar-sdk' import { SubmitTransactionPipelineInput, @@ -38,7 +37,7 @@ export class SubmitTransactionPipeline extends ConveyorBelt< // =================== // if (networkHandler instanceof HorizonHandlerClient) { - let response: HorizonApi.SubmitTransactionResponse + let response: Horizon.HorizonApi.SubmitTransactionResponse try { response = await this.submitTransactionThroughHorizon(transaction, networkHandler) } catch (error) { @@ -87,10 +86,10 @@ export class SubmitTransactionPipeline extends ConveyorBelt< private async submitTransactionThroughHorizon( transaction: Transaction | FeeBumpTransaction, horizonHandler: HorizonHandlerClient - ): Promise { + ): Promise { const response = (await horizonHandler.server.submitTransaction(transaction, { skipMemoRequiredCheck: true, // Not skipping memo required check causes an error when submitting fee bump transactions - })) as HorizonApi.SubmitTransactionResponse + })) as Horizon.HorizonApi.SubmitTransactionResponse return response } diff --git a/src/stellar-plus/core/pipelines/submit-transaction/types.ts b/src/stellar-plus/core/pipelines/submit-transaction/types.ts index 1f07f420..9e6e5352 100644 --- a/src/stellar-plus/core/pipelines/submit-transaction/types.ts +++ b/src/stellar-plus/core/pipelines/submit-transaction/types.ts @@ -1,5 +1,4 @@ -import { FeeBumpTransaction, SorobanRpc, Transaction } from '@stellar/stellar-sdk' -import { HorizonApi } from '@stellar/stellar-sdk/lib/horizon' +import { FeeBumpTransaction, Horizon, SorobanRpc, Transaction } from '@stellar/stellar-sdk' import { HorizonHandler } from 'stellar-plus' import { RpcHandler } from 'stellar-plus/rpc/types' @@ -11,7 +10,7 @@ export type SubmitTransactionPipelineInput = { } export type SubmitTransactionPipelineOutput = { - response: HorizonApi.SubmitTransactionResponse | SorobanRpc.Api.SendTransactionResponse + response: Horizon.HorizonApi.SubmitTransactionResponse | SorobanRpc.Api.SendTransactionResponse } export enum SubmitTransactionPipelineType { diff --git a/src/stellar-plus/core/spec.ts b/src/stellar-plus/core/spec.ts new file mode 100644 index 00000000..60cd3504 --- /dev/null +++ b/src/stellar-plus/core/spec.ts @@ -0,0 +1,7 @@ +// import { contract } from '@stellar/stellar-sdk' + +// const SpecClass = [contract.Spec] +// export type Spec = (typeof SpecClass)[0] + +// // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment +// export default { SpecClass: SpecClass[0] } diff --git a/src/stellar-plus/error/helpers/horizon.ts b/src/stellar-plus/error/helpers/horizon.ts index 53889940..1a41d4bd 100644 --- a/src/stellar-plus/error/helpers/horizon.ts +++ b/src/stellar-plus/error/helpers/horizon.ts @@ -1,5 +1,4 @@ -import { FeeBumpTransaction, Transaction } from '@stellar/stellar-sdk' -import { HorizonApi } from '@stellar/stellar-sdk/lib/horizon' +import { FeeBumpTransaction, Horizon, Transaction } from '@stellar/stellar-sdk' import { AxiosError } from 'axios' import { extractAxiosErrorInfo } from './axios' @@ -7,7 +6,7 @@ import { operationErrorMessages, operationSpecificErrorMessages, transactionErro import { OperationData, extractOperationsData, extractTransactionData } from './transaction' import { Meta } from '../types' export const extractDataFromSubmitTransactionError = ( - response: HorizonApi.SubmitTransactionResponse + response: Horizon.HorizonApi.SubmitTransactionResponse ): SubmitTransactionMetaInfo => { return { ...response, @@ -39,10 +38,10 @@ export const diagnoseSubmitError = ( const axiosError = extractAxiosErrorInfo(error) if (axiosError.data && isHorizonErrorResponseData(axiosError.data)) { - const horizonError = axiosError.data as HorizonApi.ErrorResponseData + const horizonError = axiosError.data as Horizon.HorizonApi.ErrorResponseData const diagnostic = horizonError.status === 400 // Failed transaction, contains error codes - ? reviewTransactionError(horizonError as HorizonApi.ErrorResponseData.TransactionFailed, tx) + ? reviewTransactionError(horizonError as Horizon.HorizonApi.ErrorResponseData.TransactionFailed, tx) : undefined return { @@ -50,7 +49,7 @@ export const diagnoseSubmitError = ( diagnostic, meta: { transactionData, - data: axiosError.data as HorizonApi.ErrorResponseData, + data: axiosError.data as Horizon.HorizonApi.ErrorResponseData, }, } as HorizonDiagnostics } @@ -60,7 +59,7 @@ export const diagnoseSubmitError = ( meta: { message: axiosError.message, transactionData, - data: axiosError.data as HorizonApi.ErrorResponseData, + data: axiosError.data as Horizon.HorizonApi.ErrorResponseData, }, } } @@ -72,7 +71,7 @@ export const diagnoseSubmitError = ( const isHorizonErrorResponseData = (data: unknown): boolean => { if (typeof data === 'object' && data !== null) { - const potentialError = data as HorizonApi.ErrorResponseData.Base // Type assertion + const potentialError = data as Horizon.HorizonApi.ErrorResponseData.Base // Type assertion return ( 'status' in potentialError && 'title' in potentialError && 'type' in potentialError && 'detail' in potentialError ) @@ -93,7 +92,7 @@ export type DiagnosticEntry = { } const reviewTransactionError = ( - errorData: HorizonApi.ErrorResponseData.TransactionFailed, + errorData: Horizon.HorizonApi.ErrorResponseData.TransactionFailed, tx?: Transaction | FeeBumpTransaction ): TransactionDiagnostic => { const diagnostic: TransactionDiagnostic = {} diff --git a/src/stellar-plus/soroban/contracts/certificate-of-deposit/constants.ts b/src/stellar-plus/soroban/contracts/certificate-of-deposit/constants.ts index 055d2550..0d2e5d7f 100644 --- a/src/stellar-plus/soroban/contracts/certificate-of-deposit/constants.ts +++ b/src/stellar-plus/soroban/contracts/certificate-of-deposit/constants.ts @@ -1,4 +1,5 @@ -import { ContractSpec } from '@stellar/stellar-sdk' +import { Spec } from '@stellar/stellar-sdk/contract' + export enum Methods { deposit = 'deposit', withdraw = 'withdraw', @@ -10,7 +11,7 @@ export enum Methods { initialize = 'initialize', } -export const spec = new ContractSpec([ +export const spec = new Spec([ 'AAAAAAAAAAAAAAAKaW5pdGlhbGl6ZQAAAAAACAAAAAAAAAAFYWRtaW4AAAAAAAATAAAAAAAAAAVhc3NldAAAAAAAABMAAAAAAAAABHRlcm0AAAAGAAAAAAAAAA1jb21wb3VuZF9zdGVwAAAAAAAABgAAAAAAAAAKeWllbGRfcmF0ZQAAAAAABgAAAAAAAAALbWluX2RlcG9zaXQAAAAACwAAAAAAAAAMcGVuYWx0eV9yYXRlAAAABgAAAAAAAAAQYWxsb3dhbmNlX3BlcmlvZAAAAAQAAAAA', 'AAAAAAAAAAAAAAAHZGVwb3NpdAAAAAACAAAAAAAAAAZhbW91bnQAAAAAAAsAAAAAAAAAB2FkZHJlc3MAAAAAEwAAAAA=', 'AAAAAAAAAAAAAAAId2l0aGRyYXcAAAACAAAAAAAAAAdhZGRyZXNzAAAAABMAAAAAAAAAGWFjY2VwdF9wcmVtYXR1cmVfd2l0aGRyYXcAAAAAAAABAAAAAA==', diff --git a/src/stellar-plus/soroban/contracts/certificate-of-deposit/index.ts b/src/stellar-plus/soroban/contracts/certificate-of-deposit/index.ts index d04de527..a31558e3 100644 --- a/src/stellar-plus/soroban/contracts/certificate-of-deposit/index.ts +++ b/src/stellar-plus/soroban/contracts/certificate-of-deposit/index.ts @@ -1,4 +1,5 @@ -import { Address, ContractSpec } from '@stellar/stellar-sdk' +import { Address } from '@stellar/stellar-sdk' +import { Spec } from '@stellar/stellar-sdk/contract' import { ContractEngine } from 'stellar-plus/core/contract-engine' import { ContractEngineConstructorArgs } from 'stellar-plus/core/contract-engine/types' @@ -30,7 +31,7 @@ export class CertificateOfDepositClient extends ContractEngine implements Certif * */ constructor(args: CertificateOfDepositContractConstructorArgs) { - const contractSpec = args.contractParameters.spec || (spec as ContractSpec) + const contractSpec = args.contractParameters.spec || (spec as Spec) const contractParameters = { ...args.contractParameters, spec: contractSpec, diff --git a/src/stellar-plus/soroban/contracts/certificate-of-deposit/types.ts b/src/stellar-plus/soroban/contracts/certificate-of-deposit/types.ts index 43a9b5f0..0f25ea5b 100644 --- a/src/stellar-plus/soroban/contracts/certificate-of-deposit/types.ts +++ b/src/stellar-plus/soroban/contracts/certificate-of-deposit/types.ts @@ -1,4 +1,4 @@ -import { ContractSpec } from '@stellar/stellar-sdk' +import { Spec } from '@stellar/stellar-sdk/contract' import { Options } from 'stellar-plus/core/contract-engine/types' import { TransactionInvocation } from 'stellar-plus/core/types' @@ -21,7 +21,7 @@ export type CertificateOfDepositContract = { export type CertificateOfDepositContractConstructorArgs = { networkConfig: NetworkConfig contractParameters: { - spec?: ContractSpec + spec?: Spec contractId?: string wasm?: Buffer wasmHash?: string diff --git a/src/stellar-plus/types.ts b/src/stellar-plus/types.ts index e39d6375..e4122e83 100644 --- a/src/stellar-plus/types.ts +++ b/src/stellar-plus/types.ts @@ -1,9 +1,9 @@ import { Address as StellarAddress, - ContractSpec as _ContractSpec, FeeBumpTransaction as _FeeBumpTransaction, Transaction as _Transaction, } from '@stellar/stellar-sdk' +import { Spec as _Spec } from '@stellar/stellar-sdk/contract' import { EnvelopeHeader as _EnvelopeHeader, @@ -37,6 +37,6 @@ export type Address = StellarAddress | string export type TransactionInvocation = _TransactionInvocation export type EnvelopeHeader = _EnvelopeHeader export type FeeBumpHeader = _FeeBumpHeader -export type ContractSpec = _ContractSpec +export type Spec = _Spec export * as Errors from 'stellar-plus/error/types' diff --git a/src/stellar-plus/utils/pipeline/plugins/simulate-transaction/extract-invocation-output/index.ts b/src/stellar-plus/utils/pipeline/plugins/simulate-transaction/extract-invocation-output/index.ts index c2dd7c04..6a69c3b2 100644 --- a/src/stellar-plus/utils/pipeline/plugins/simulate-transaction/extract-invocation-output/index.ts +++ b/src/stellar-plus/utils/pipeline/plugins/simulate-transaction/extract-invocation-output/index.ts @@ -1,4 +1,4 @@ -import { ContractSpec } from '@stellar/stellar-sdk' +import { Spec } from '@stellar/stellar-sdk/contract' import { SimulateTransactionPipelineInput, @@ -18,10 +18,10 @@ export class ExtractInvocationOutputFromSimulationPlugin { readonly type = SimulateTransactionPipelineType.id readonly name: string = 'ExtractContractIdPlugin' - private spec: ContractSpec + private spec: Spec private method: string - constructor(spec: ContractSpec, method: string) { + constructor(spec: Spec, method: string) { this.spec = spec this.method = method } diff --git a/src/stellar-plus/utils/pipeline/plugins/soroban-get-transaction/extract-invocation-output/index.ts b/src/stellar-plus/utils/pipeline/plugins/soroban-get-transaction/extract-invocation-output/index.ts index 35f051a1..03f68fbc 100644 --- a/src/stellar-plus/utils/pipeline/plugins/soroban-get-transaction/extract-invocation-output/index.ts +++ b/src/stellar-plus/utils/pipeline/plugins/soroban-get-transaction/extract-invocation-output/index.ts @@ -1,4 +1,4 @@ -import { ContractSpec } from '@stellar/stellar-sdk' +import { Spec } from '@stellar/stellar-sdk/contract' import { ContractInvocationOutput, @@ -18,10 +18,10 @@ export class ExtractInvocationOutputPlugin { readonly type = SorobanGetTransactionPipelineType.id readonly name: string = 'ExtractInvocationOutputPlugin' - private spec: ContractSpec + private spec: Spec private method: string - constructor(spec: ContractSpec, method: string) { + constructor(spec: Spec, method: string) { this.spec = spec this.method = method } diff --git a/src/tests/integration/classic-asset-management/index.integration.test.ts b/src/tests/integration/classic-asset-management/index.integration.test.ts index e80e2730..f3b283a7 100644 --- a/src/tests/integration/classic-asset-management/index.integration.test.ts +++ b/src/tests/integration/classic-asset-management/index.integration.test.ts @@ -1,13 +1,7 @@ -import { ContractSpec } from '@stellar/stellar-sdk' -import { sign } from 'crypto' import { DefaultAccountHandler } from 'stellar-plus/account' import { ClassicAssetHandler } from 'stellar-plus/asset' -import { ContractEngine } from 'stellar-plus/core/contract-engine' -import { SignatureThreshold } from 'stellar-plus/core/types' - import { CustomNet, NetworkConfig } from 'stellar-plus/network' import { StellarTestLedger, TestLedgerNetwork } from 'stellar-plus/test/stellar-test-ledger' -import { TransactionInvocation } from 'stellar-plus/types' import { simpleTxInvocation } from 'tests/utils' describe('Classic Asset Management Use Case: ', () => { diff --git a/src/tests/integration/classic-asset-wrapping/index.integration.test.ts b/src/tests/integration/classic-asset-wrapping/index.integration.test.ts index 0d1978b7..9b9f6eee 100644 --- a/src/tests/integration/classic-asset-wrapping/index.integration.test.ts +++ b/src/tests/integration/classic-asset-wrapping/index.integration.test.ts @@ -1,15 +1,7 @@ -import { ContractSpec } from '@stellar/stellar-sdk' -import exp from 'constants' -import { sign } from 'crypto' import { DefaultAccountHandler } from 'stellar-plus/account' -import { ClassicAssetHandler, SACHandler } from 'stellar-plus/asset' -import { SACAssetHandler } from 'stellar-plus/asset/types' -import { ContractEngine } from 'stellar-plus/core/contract-engine' -import { SignatureThreshold } from 'stellar-plus/core/types' - +import { SACHandler } from 'stellar-plus/asset' import { CustomNet, NetworkConfig } from 'stellar-plus/network' import { StellarTestLedger, TestLedgerNetwork } from 'stellar-plus/test/stellar-test-ledger' -import { TransactionInvocation } from 'stellar-plus/types' import { contractIdRegex } from 'stellar-plus/utils/regex' import { simpleTxInvocation } from 'tests/utils' diff --git a/src/tests/integration/hello-world-contract/index.integration.test.ts b/src/tests/integration/hello-world-contract/index.integration.test.ts index a4de8b25..d3af4edb 100644 --- a/src/tests/integration/hello-world-contract/index.integration.test.ts +++ b/src/tests/integration/hello-world-contract/index.integration.test.ts @@ -1,7 +1,7 @@ -import { ContractSpec } from '@stellar/stellar-sdk' +import { Spec } from '@stellar/stellar-sdk/contract' + import { DefaultAccountHandler } from 'stellar-plus/account' import { ContractEngine } from 'stellar-plus/core/contract-engine' - import { CustomNet, NetworkConfig } from 'stellar-plus/network' import { StellarTestLedger, TestLedgerNetwork } from 'stellar-plus/test/stellar-test-ledger' import { TransactionInvocation } from 'stellar-plus/types' @@ -16,7 +16,7 @@ describe('Hello World Contract Use Case: ', () => { network: TestLedgerNetwork.LOCAL, }) - let helloWorldSpec: ContractSpec + let helloWorldSpec: Spec let networkConfig: NetworkConfig let wasmBuffer: Buffer beforeAll(async () => { @@ -33,7 +33,7 @@ describe('Hello World Contract Use Case: ', () => { wasmBuffer = await loadWasmFile('./src/tests/contracts/hello-world/hello_world.wasm') expect(wasmBuffer).toBeDefined() - helloWorldSpec = new ContractSpec(spec) + helloWorldSpec = new Spec(spec) }) afterAll(async () => { diff --git a/src/tests/integration/profiler-plugin/index.integration.test.ts b/src/tests/integration/profiler-plugin/index.integration.test.ts index ced4bc36..6cd79833 100644 --- a/src/tests/integration/profiler-plugin/index.integration.test.ts +++ b/src/tests/integration/profiler-plugin/index.integration.test.ts @@ -1,20 +1,10 @@ -import { ContractSpec } from '@stellar/stellar-sdk' import { DefaultAccountHandler } from 'stellar-plus/account' -import { ClassicAssetHandler, SACHandler } from 'stellar-plus/asset' -import { SACAssetHandler } from 'stellar-plus/asset/types' -import { ContractEngine } from 'stellar-plus/core/contract-engine' -import { SorobanTransactionPipelinePlugin } from 'stellar-plus/core/pipelines/soroban-transaction/types' - +import { SACHandler } from 'stellar-plus/asset' import { CustomNet, NetworkConfig } from 'stellar-plus/network' import { StellarTestLedger, TestLedgerNetwork } from 'stellar-plus/test/stellar-test-ledger' -import { TransactionInvocation } from 'stellar-plus/types' -import { GenericPlugin } from 'stellar-plus/utils/pipeline/conveyor-belts/types' -import { DebugPlugin } from 'stellar-plus/utils/pipeline/plugins/generic' import { ProfilerPlugin } from 'stellar-plus/utils/pipeline/plugins/soroban-transaction' import { LogEntry } from 'stellar-plus/utils/profiler/profiling-handler/types' -import { contractIdRegex, wasmHashRegex } from 'stellar-plus/utils/regex' -import { GetNameArgs, GetNameResponse, methods, spec } from 'tests/contracts/hello-world/spec' -import { loadWasmFile, simpleTxInvocation } from 'tests/utils' +import { simpleTxInvocation } from 'tests/utils' describe('Profiler Plugin Use Case: ', () => { const logLevel = 'TRACE' diff --git a/tsconfig.json b/tsconfig.json index 72a7dd7a..3f6c7972 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,9 +2,9 @@ "compilerOptions": { "target": "es2016", "lib": ["es6"], - "module": "commonjs", + "module": "Node16", "rootDir": "./src", - "moduleResolution": "node10", + "moduleResolution": "Node16", "baseUrl": "./src", "resolveJsonModule": true, "allowJs": true, @@ -15,10 +15,14 @@ "importHelpers": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, + "allowSyntheticDefaultImports": true, "strict": true, "noImplicitAny": true, "skipLibCheck": true }, "exclude": ["commitlint.config.js"], - "include": ["./src"] + "include": ["./src"], + "paths": { + "@stellar/stellar-sdk/contract": ["node_modules/@stellar/stellar-sdk/lib/contract/index"] + } }