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

[feature] add ts package for express middleware around transaction handling #210

Open
ngundotra opened this issue Aug 3, 2023 · 1 comment

Comments

@ngundotra
Copy link

ngundotra commented Aug 3, 2023

It would be awesome if I could do

import { solanaPayMiddleware } from @solana-pay/middleware

async function createBuyTx(...): Transaction {
}

// under the hood this should do 
// on GET: return the Record on the right
// on POST: tx.serialize({ requireAllSignatures: false }).toString("base64")
export default solanaPayMiddleware(createBuyNFT, {
  label: "my label",
  icon: "https://solanapay.com/src/img/branding/Solanapay.com/downloads/gradient.svg",
});

cc @govarun

@DracocardZ
Copy link

import { solanaPayMiddleware } from @solana-pay/middleware

async function createBuyTx(...): Transaction {
}

// under the hood this should do
// on GET: return the Record on the right
// on POST: tx.serialize({ requireAllSignatures: false }).toString("base64")
export default solanaPayMiddleware(createBuyNFT, {
label: "my label",
icon: "https://solanapay.com/src/img/branding/Solanapay.com/downloads/gradient.svg",
});print("draco")

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

No branches or pull requests

2 participants