Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Adjust multi-sig transaction format #368

Open
6 tasks
DOBEN opened this issue May 31, 2024 · 0 comments
Open
6 tasks

Adjust multi-sig transaction format #368

DOBEN opened this issue May 31, 2024 · 0 comments
Labels
[Type] Task An additional feature or improvement.

Comments

@DOBEN
Copy link
Member

DOBEN commented May 31, 2024

Task description

The mutli-sig (partially-signed) transaction (as outputted by the desktop wallet) is not compatible with the format in concordium-client. Adjust the desktop wallet format to match the concordium-client format so that the files can be shared/signed across all our Concordium ecosystem.

The main differences

Sub-tasks

  • Include version.
  • Instead of a number for transactionKind use a human-readable transactinType field.
  • Sender field got renamed to Signer field.
  • Remove transaction fee calculations/estimations.
  • Remove typeScript type annotations.
  • Order fields alphabetically.

Current desktopWallet format:

{
  "sender": "3KXN2ZGUDQPSoephMA3RLAHj5EbYjWZxChmJKYoLG9eRdR8qgh",
  "nonce": "3",
  "expiry": {
    "@type": "bigint",
    "value": "1715084794"
  },
  "energyAmount": "601",
  "transactionKind": 3,
  "payload": {
    "toAddress": "4McQDikzr3GXi52Xjgcm2XZbq7E8YF7gzATZScZ5U59eLLkKjg",
    "amount": "200000000"
  },
  "estimatedFee": {
    "numerator": {
      "@type": "bigint",
      "value": "3087974162904346995200"
    },
    "denominator": {
      "@type": "bigint",
      "value": "89445535105000000"
    }
  },
  "signatures": {
    "0": {
      "0": "e056376f89ce09a5521ff621e23ecafc967343f77abb04ef05bd2ad401c65910e5d8520213e0af68b6c3950f443c2e8e154db568e98cd3bd8e144f753c6b7101"
    }
  }
}

Concordium-client format:

  {
      "energy": 5000,
      "expiryTime": 1716995242,
      "nonce": 46,
      "payload": {
         "amount": "1000000",
         "toAddress": "4bbdAUCDK2D6cUvUeprGr4FaSaHXKuYmYVjyCa4bXSCu3NUXzA",
         "transactionType": "transfer"
      },
      "signature": {
         "0": {
            "0": "3099534c5f32daf64dc40b7a0013979b9b74b167d259fc787a363ed2db7f1bcdafdcf06e166b2d915c7f29043186b3015a6064755bf3c3733bca2151b2b19c04"
         }
      },
      "signer": "4jxvYasaPncfmCFCLZCvuL5cZuvR5HAQezCHZH7ZA7AGsRYpix",
      "version": 1
   }

Related PRs:
Concordium/concordium.github.io#1022
Concordium/concordium-client#300

@DOBEN DOBEN added the [Type] Task An additional feature or improvement. label May 31, 2024
@soerenbf soerenbf changed the title Adjast multi-sig transaction format Adjust multi-sig transaction format May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Task An additional feature or improvement.
Projects
None yet
Development

No branches or pull requests

1 participant