{"id":25246316,"url":"https://github.com/al366io/solana-transactions-wrapper","last_synced_at":"2025-10-26T22:30:43.394Z","repository":{"id":218582607,"uuid":"746787913","full_name":"Al366io/solana-transactions-wrapper","owner":"Al366io","description":"Handy tool to execute buy/sell transactions on the SOLANA chain ","archived":false,"fork":false,"pushed_at":"2024-06-27T07:26:27.000Z","size":61,"stargazers_count":59,"open_issues_count":1,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-03T14:45:27.104Z","etag":null,"topics":["blockchain","jupiter","library","solana","swap","wrapper"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/solana-transactions-wrapper","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Al366io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-22T17:14:51.000Z","updated_at":"2025-01-31T20:12:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6fd3608-ab44-4c23-b9d9-d95dcce041a2","html_url":"https://github.com/Al366io/solana-transactions-wrapper","commit_stats":null,"previous_names":["al366io/solana-transactions-wrapper"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Al366io%2Fsolana-transactions-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Al366io%2Fsolana-transactions-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Al366io%2Fsolana-transactions-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Al366io%2Fsolana-transactions-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Al366io","download_url":"https://codeload.github.com/Al366io/solana-transactions-wrapper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238401879,"owners_count":19465881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","jupiter","library","solana","swap","wrapper"],"created_at":"2025-02-12T02:33:38.839Z","updated_at":"2025-10-26T22:30:43.051Z","avatar_url":"https://github.com/Al366io.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003esolana-transactions-wrapper\u003c/h1\u003e\n\n\u003cp\u003eHandy tool to execute buy/sell transactions on the SOLANA chain.\u003c/p\u003e\n\n\u003ch2\u003eInstallation\u003c/h2\u003e\n\n\u003cp\u003eInstall the package with npm:\u003c/p\u003e\n\n\u003cpre\u003e\u003ccode\u003enpm install solana-transactions-wrapper\u003c/code\u003e\u003c/pre\u003e\n\n\u003ch2\u003eUsage\u003c/h2\u003e\n\n\u003ch3\u003eImporting the package\u003c/h3\u003e\n\n\u003cpre\u003e\u003ccode\u003eimport { buy_token, sell_token, get_tokens_balances, get_token_balance } from 'solana-transactions-wrapper';\u003c/code\u003e\u003c/pre\u003e\n\u003chr\u003e\n\u003ch2\u003eBuying a token\u003c/h2\u003e\n\u003ch4\u003e Parameters: \u003c/h4\u003e\n\u003cul\u003e\n  \u003cstrong\u003econfig:\u003c/strong\u003e The buy function accepts a config object, as per buyConfig object type.\n  \u003cp\u003eThe buyConfig object type is defined as follows:\u003c/p\u003e\n  \u003cpre\u003e\u003ccode\u003etype buyConfig = {\n    RPC_ENDPOINT: string;\n    WALLET_PRIVATE_KEY: string;\n    ADDRESS_OF_TOKEN_TO_BUY: string;\n    AMOUNT_OF_SOLANA_TO_SPEND: number;\n    SLIPPAGE: number;\n  }\u003c/code\u003e\u003c/pre\u003e\n\u003c/ul\u003e\n\u003ch4\u003e Usage: \u003c/h4\u003e\n\u003cpre\u003e\u003ccode\u003eawait buy_token(config: buyConfig)\u003c/code\u003e\u003c/pre\u003e\n\u003ch4\u003e Logs Example: \u003c/h4\u003e\n\u003cpre\u003eConnection established 🚀\nWallet fetched ✅\nTrying to buy token using \"amount\" SOL...\nTransaction sent with txid: \"transaction_id\"\nWaiting for confirmation... 🕒\nTransaction confirmed ✅\u003c/pre\u003e\n\u003chr\u003e\n\u003ch2\u003eSelling a token\u003c/h2\u003e\n\u003ch4\u003e Parameters: \u003c/h4\u003e\n\u003cul\u003e\n  \u003cstrong\u003econfig:\u003c/strong\u003e The sell function accepts a config object, as per sellConfig object type.\n  \u003cp\u003eThe sellConfig object type is defined as follows:\u003c/p\u003e\n  \u003cpre\u003e\u003ccode\u003etype sellConfig = {\n    SELL_ALL: boolean;\n    RPC_ENDPOINT: string;\n    WALLET_PRIVATE_KEY: string;\n    ADDRESS_OF_TOKEN_TO_SELL: string;\n    AMOUNT_OF_TOKEN_TO_SELL?: number;\n    SLIPPAGE: number;\n  }\u003c/code\u003e\u003c/pre\u003e\n\u003c/ul\u003e\n\u003ch4\u003e Usage: \u003c/h4\u003e\n\u003cpre\u003e\u003ccode\u003eawait sell_token(config: sellConfig)\u003c/code\u003e\u003c/pre\u003e\n\u003ch4\u003e Logs Example: \u003c/h4\u003e\n\u003cpre\u003eConnection established 🚀\nWallet fetched ✅\nSelling \"amount\" of \"token_address\"...\nTransaction sent with txid: \"transaction_id\"\nWaiting for confirmation... 🕒\nTransaction confirmed ✅\u003c/pre\u003e\n\n\u003chr\u003e\n\u003ch2\u003eGetting Account Tokens Balances\u003c/h2\u003e\n\n\u003cpre\u003e\u003ccode\u003econst tokens_balances = await get_tokens_balances(\n  RPC_ENDPOINT,\n  WALLET_PRIVATE_KEY\n);\u003c/code\u003e\u003c/pre\u003e\n\n\u003cul\u003e\n  \u003cli\u003e\u003cstrong\u003eRPC_ENDPOINT:\u003c/strong\u003e Your RPC endpoint to connect to.\u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eWALLET_PRIVATE_KEY:\u003c/strong\u003e The private key of the wallet you want to get the tokens from.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eThis function returns a promise that resolves to an object mapping token addresses to their balance and symbol.\u003c/p\u003e\n\n\u003chr\u003e\n\u003ch2\u003eGetting Token Balance\u003c/h2\u003e\n\n\u003cpre\u003e\u003ccode\u003econst token_balance = await get_token_balance(\n  RPC_ENDPOINT,\n  WALLET_PRIVATE_KEY,\n  TOKEN_ADDRESS\n);\u003c/code\u003e\u003c/pre\u003e\n\n\u003cul\u003e\n  \u003cli\u003e\u003cstrong\u003eRPC_ENDPOINT:\u003c/strong\u003e Your RPC endpoint to connect to.\u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eWALLET_PRIVATE_KEY:\u003c/strong\u003e The private key of the wallet you want to get the tokens from.\u003c/li\u003e\n  \u003cli\u003e\u003cstrong\u003eTOKEN_ADDRESS:\u003c/strong\u003e The address of the token you want to get the balance from.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eThis function returns a promise that resolves to the balance of the token.\u003c/p\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal366io%2Fsolana-transactions-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fal366io%2Fsolana-transactions-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal366io%2Fsolana-transactions-wrapper/lists"}