tatum-js icon indicating copy to clipboard operation
tatum-js copied to clipboard

[Error] signatureId must be shorter than or equal to 24 characters

Open balmacefa opened this issue 3 years ago • 2 comments

transaction = await deployNFT(useTestNet,
            {
                name,
                chain: "MATIC",
                symbol,
                provenance: true,
                publicMint: false,
                signatureId: 'a4873cd9-...........-7074056db3c4'
            });

Response with error:

signatureId must be shorter than or equal to 24 characters

Using the endpoint API with same payload works ok. signatureId validation should change to 36 characters same as the API.

balmacefa avatar Jan 20 '22 23:01 balmacefa

The same thing is happening for me, needs to be fixed please. Can anyone from the tatum team confirm when this will be fixed?

CodeWithOz avatar May 18 '22 10:05 CodeWithOz

By the way this problem comes directly from the /broadcast endpoint, it's not in the js sdk. In my case I'm using the Harmony.ONE blockchain so it's /one/broadcast, but for the OP it would be /polygon/broadcast.

CodeWithOz avatar May 18 '22 11:05 CodeWithOz

Hi facing the same validation error with SDK func

sendTransferFromCustodialWallet({chain: 'TRON',
  custodialAddress: 'FROM',
  tokenAddress: 'TOKEN_ADDRESS',
  contractType: 0,
  recipient: 'TO',
  amount: '1',
  feeLimit: 100,
  from: 'GASPUMP',
  signatureId: 'SIG_ID',
  index: INDEX
  })

seems to come from the same root issue v3/tron/broadcast

belguith avatar Sep 16 '22 19:09 belguith

Problem here is following - all */broadcast endpoints accept optional singatureId parameter - which should be 24 chars long ID of the transaction, which is signed inside Tatum KMS and should be marked as completed on Tatum side. You should not directly call those endpoints with your own signatureId. I will double check the implementation inside V1 SDK, if there is proper validation present. @belguith

samuelsramko avatar Sep 20 '22 19:09 samuelsramko

this was found and closed.

samuelsramko avatar Sep 20 '22 19:09 samuelsramko

Fixed :D :D may thanks @samuelsramko

belguith avatar Sep 23 '22 13:09 belguith