Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

export signRaw #200

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

export signRaw #200

wants to merge 1 commit into from

Conversation

dound
Copy link

@dound dound commented Nov 5, 2022

Summary

export signRaw

Why the changes

Generating the x-imx-signature header requires following the signature format produced by signRaw. The IMX docs here mention using signRaw, but it does not seem to be exported for use yet.

needed to generate the IMX sig as described in the docs here:
https://docs.x.immutable.com/docs/generate-imx-signature/
@zatlite
Copy link
Contributor

zatlite commented Nov 8, 2022

Quick question, where would you need an x-imx-signature header when using core-sdk v1 beta?
I believe in v1 beta all the api methods that need the x-imx-signature request a Signer or WalletConnection as a param and creates the signature without requiring the user to create this.
I believe the documentation link only applies to version <= 0.7.0

@dound
Copy link
Author

dound commented Nov 8, 2022

The primary use case is Immortal Game's Place Bid API. To bid on their auction requires the output of /v1/signable-transfer-details along with the signatures normally generated from it for /v1/transfers (including x-imx-signature).

The secondary (unrelated) use case is to be able to split up the API calls for /v1/signable-transfer-details and /v1/transfers (maybe this is already possible, but I was just using the transfer() function so far which does both of these API calls). The reason is /v1/transfers has side effects while /v1/signable-transfer-details does not, and so there's some very small benefit to splitting them up (it can reduce the size of the window for an error to occur between when the transfer is started and when the promise resolves and we can record the newly started transfer_id).

@DavoCg
Copy link

DavoCg commented Dec 19, 2022

Hi,
At Immortal Game we are using this for our built in auction mechanism, user need to sign the transfer which is executed server side when the bid is successfully placed. We are currently migrating our codebase to use this new sdk and having signRaw exported would be indeed very useful (we did all our tests with a forked version exporting it to validate the migration and it works well so far)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants