diff --git a/README.md b/README.md index 2e852bdb..d6e9e3ba 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,12 @@ Added ability to use a Ledger device to add public addresses into AlgoSigner and - Allow for zero Algo pay transactions in UI - Fix stall for `Axfer` in txs list when decimals can't be obtained from the asset +### 1.6.5 Patch +- Fixed duplicate Port on Custom Network calls +- Added support for receiving an array of arrays when using `signTxn()` + - Each inner array should still contain transactions **belonging to a same group** + - Updated error message when providing an incorrect format of transactions to reflect this change + ## New Users - Watch [Getting Started with AlgoSigner](https://youtu.be/tG-xzG8r770) diff --git a/docs/dApp-integration.md b/docs/dApp-integration.md index 675e6d74..fa74fa29 100644 --- a/docs/dApp-integration.md +++ b/docs/dApp-integration.md @@ -181,7 +181,7 @@ AlgoSigner.signTxn([ ]); ``` -**NOTE:** Even though the method accepts an array of transactions, it requires atomic transactions with groupId and will error on non-atomic groups. +**NOTE:** Even though the method accepts an array of transactions, it requires atomic transactions that have a groupId and will error on non-atomic groups. **Response** @@ -221,6 +221,42 @@ let signedTxs = await AlgoSigner.signTxn([ }, ]); ``` +Alternatively, you can provide multiple arrays of transactions at once. Same rules regarding the contents of the groups apply. + +**Request** + +```js +AlgoSigner.signTxn([ + [ + { + txn: 'iqNhbXRko2ZlZc0D6KJmds4A259Go2dlbqx0ZXN0bmV0LXYxLjCiZ2jEIEhjtRiks8hOyBDyLU8QgcsPcfBZp6wg3sYvf3DlCToio2dycMQgdsLAGqgrtwqqQS4UEN7O8CZHjfhPTwLHrB1A2pXwvKGibHbOANujLqNyY3bEIK0TEDcptY0uFvk2V5LDVzRfdz7O4freYHEuZbpI+6hMo3NuZMQglmyhKUPeU2KALzt/Jcs0GQ55k2vsqZ4pGeNlzpnYLbukdHlwZaNwYXk=', + }, + ], + [ + { + txn: 'iaRhZnJ6w6RmYWRkxCCWbKEpQ95TYoAvO38lyzQZDnmTa+ypnikZ42XOmdgtu6RmYWlkzgDITmiiZnbOAQNjIKNnZW6sdGVzdG5ldC12MS4womdoxCBIY7UYpLPITsgQ8i1PEIHLD3HwWaesIN7GL39w5Qk6IqJsds4BA2cIo3NuZMQglmyhKUPeU2KALzt/Jcs0GQ55k2vsqZ4pGeNlzpnYLbukdHlwZaRhZnJ6', + }, + ], +]); +``` +**Response** + +```json +[ + [ + { + "txID": "4F6GE5EBTBJ7DOTWKA3GK4JYARFDCVR5CYEXP6O27FUCE5SGFDYQ", + "blob": "gqNzaWfEQL6mW/7ss2HKAqsuHN/7ePx11wKSAvFocw5QEDvzSvrvJdzWYvT7ua8Lc0SS0zOmUDDaHQC/pGJ0PNqnu7W3qQKjdHhuiaNhbXQGo2ZlZc4AA7U4omZ2zgB+OrujZ2VurHRlc3RuZXQtdjEuMKJnaMQgSGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiKibHbOAH4+o6NyY3bEIHhydylNDQQhpD9QdKWejLCMBgb5UYJTGCfDW3KgLsI+o3NuZMQgZM5ZNuFgR8pz2dHBgDlmHolfGgF96zX/X4x2bnAJ3aqkdHlwZaNwYXk=" + } + ], + [ + { + "txID": "QK4XYJYGN7CLER25SKT3DV4UWNI5DVYXRBJRZEUWYA523EU5ZB7A", + "blob": "gqNzaWfEQC8ZIPYimAypJD2TmEQjuWxEEk8/gJbBegEHdtyKr6TuA78otKIEB9PYQimgMLGn87YOEB6GgRe5vjWRTuWGsAqjdHhuiaRhZnJ6w6RmYWRkxCCWbKEpQ95TYoAvO38lyzQZDnmTa+ypnikZ42XOmdgtu6RmYWlkzgDITmiiZnbOAQNjO6NnZW6sdGVzdG5ldC12MS4womdoxCBIY7UYpLPITsgQ8i1PEIHLD3HwWaesIN7GL39w5Qk6IqJsds4BA2cjo3NuZMQglmyhKUPeU2KALzt/Jcs0GQ55k2vsqZ4pGeNlzpnYLbukdHlwZaRhZnJ6" + } + ] +] +``` The signed transactions can then be sent using the SDK (example below) or using the [AlgoSigner.send()](#algosignersend-ledger-mainnettestnet-txblob-) method. @@ -439,6 +475,7 @@ The dApp may return the following errors in case of users rejecting requests, or InvalidTransactionParams = '[RequestErrors.InvalidTransactionParams] Invalid transaction parameters.', UnsupportedAlgod = '[RequestErrors.UnsupportedAlgod] The provided method is not supported.', UnsupportedLedger = '[RequestErrors.UnsupportedLedger] The provided ledger is not supported.', + InvalidFormat = '[RequestErrors.InvalidFormat] Please provide an array of either valid transaction objects or nested arrays of valid transaction objects.', Undefined = '[RequestErrors.Undefined] An undefined error occurred.', ``` diff --git a/package.json b/package.json index d98d2852..86053789 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "algosigner", - "version": "1.6.4", + "version": "1.6.5", "author": "https://developer.purestake.io", "description": "Sign Algorand transactions in your browser with PureStake.", "repository": "https://github.com/PureStake/algosigner", diff --git a/packages/common/package.json b/packages/common/package.json index 2113e669..13a47411 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@algosigner/common", - "version": "1.6.4", + "version": "1.6.5", "author": "https://developer.purestake.io", "description": "Common library functions for AlgoSigner.", "repository": "https://github.com/PureStake/algosigner", diff --git a/packages/crypto/package.json b/packages/crypto/package.json index d6b8ae7c..e60f99fe 100644 --- a/packages/crypto/package.json +++ b/packages/crypto/package.json @@ -1,6 +1,6 @@ { "name": "algosigner-crypto", - "version": "1.6.4", + "version": "1.6.5", "author": "https://developer.purestake.io", "description": "Cryptographic wrapper for saving and retrieving extention information in Algosigner.", "repository": { diff --git a/packages/dapp/package.json b/packages/dapp/package.json index 713f75ed..54b43e0c 100644 --- a/packages/dapp/package.json +++ b/packages/dapp/package.json @@ -1,6 +1,6 @@ { "name": "@algosigner/dapp", - "version": "1.6.4", + "version": "1.6.5", "author": "https://developer.purestake.io", "repository": "https://github.com/PureStake/algosigner", "license": "MIT", diff --git a/packages/extension/manifest.json b/packages/extension/manifest.json index f37aa1cf..0475e1d1 100644 --- a/packages/extension/manifest.json +++ b/packages/extension/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "AlgoSigner", "author": "https://developer.purestake.io", - "version": "1.6.4", + "version": "1.6.5", "description": "Algorand Wallet Extension | Send & Receive ALGOs | Sign dApp Transactions", "icons": { "48": "icon.png" diff --git a/packages/extension/package.json b/packages/extension/package.json index c82a98eb..0e29883d 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -1,6 +1,6 @@ { "name": "algosigner-extension", - "version": "1.6.4", + "version": "1.6.5", "author": "https://developer.purestake.io", "repository": "https://github.com/PureStake/algosigner", "license": "MIT", diff --git a/packages/storage/package.json b/packages/storage/package.json index 489ecb19..f50bd489 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -1,6 +1,6 @@ { "name": "algosigner-storage", - "version": "1.6.4", + "version": "1.6.5", "author": "https://developer.purestake.io", "repository": "https://github.com/PureStake/algosigner", "license": "MIT", diff --git a/packages/test-project/package.json b/packages/test-project/package.json index 448104a8..7fdf15c0 100644 --- a/packages/test-project/package.json +++ b/packages/test-project/package.json @@ -1,6 +1,6 @@ { "name": "algorand-test-project", - "version": "1.6.4", + "version": "1.6.5", "repository": "https://github.com/PureStake/algosigner", "license": "MIT", "description": "Repository for tests", diff --git a/packages/ui/package.json b/packages/ui/package.json index d183bc0b..fe2f26d6 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "algosigner-ui", - "version": "1.6.4", + "version": "1.6.5", "author": "https://developer.purestake.io", "repository": "https://github.com/PureStake/algosigner", "license": "MIT",