NOTE
- Lite URL:
https://lite-api.jup.ag/send/v1
- Pro URL:
https://api.jup.ag/send/v1
Overview
1
Create invite code.
2
From utils, derive the secret key - a deterministic 64-byte Solana secret key (32 bytes private + 32 bytes public key).
3
Create Solana Keypair instance from the secret key.
4
Post request to get Send transaction.
5
Sign with both sender and recipient keypair, then send transaction and wait for confirmation.
Full Code Snippet
Full Code Snippet
Imports
Create Invite Code
Craft Send
API PARAMS
- The
amount
is in its atomic value before applying decimals, e.g. 1 USDC is 1_000_000. - The
mint
defaults to SOL if not provided, if provided it can be any token mint.
SIGNING AND SENDING
- After getting the transaction, you need to sign with both sender and recipient keypair.
- You can send the transaction to the network via any method.