{"id":22646399,"url":"https://github.com/fireblocks/fireblocks_matic_near_staking_sdk","last_synced_at":"2025-09-15T20:42:15.699Z","repository":{"id":98889893,"uuid":"591932714","full_name":"fireblocks/fireblocks_matic_near_staking_sdk","owner":"fireblocks","description":"Matic and Near staking SDKs","archived":false,"fork":false,"pushed_at":"2025-06-24T17:39:48.000Z","size":1036,"stargazers_count":2,"open_issues_count":12,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-24T18:43:21.563Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/fireblocks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2023-01-22T11:54:18.000Z","updated_at":"2025-06-21T16:27:06.000Z","dependencies_parsed_at":"2024-12-09T06:10:31.562Z","dependency_job_id":"63d18ff5-9a27-49cc-afd4-2c6055bcbb65","html_url":"https://github.com/fireblocks/fireblocks_matic_near_staking_sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fireblocks/fireblocks_matic_near_staking_sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireblocks%2Ffireblocks_matic_near_staking_sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireblocks%2Ffireblocks_matic_near_staking_sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireblocks%2Ffireblocks_matic_near_staking_sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireblocks%2Ffireblocks_matic_near_staking_sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fireblocks","download_url":"https://codeload.github.com/fireblocks/fireblocks_matic_near_staking_sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireblocks%2Ffireblocks_matic_near_staking_sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275319534,"owners_count":25443826,"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","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-09T06:10:25.384Z","updated_at":"2025-09-15T20:42:15.217Z","avatar_url":"https://github.com/fireblocks.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Fireblocks Staking SDK\n\n### About\nThis repository contains a Javascript \\ Typescript implementation of Fireblocks Staking SDK.\nCurrently supported Blockchains as part of this SDK:\n- MATIC - https://polygon.technology/\n- NEAR - https://near.org/\n\n\n## Usage\n### Prerequisites\n- Credentials for Fireblocks API Services. Otherwise, please contact Fireblocks support for further instructions on how to obtain your API credentials.\n\n### CLI Usage\nFor ease of use we provide a CLI client that can be used with the same functionality as the SDK itself.\u003cbr\u003e\nThe work done by the CLI is the same as done by creating and running stakers manually.\u003cbr\u003e\n\n#### Storing data\nYou can use a .ENV file to store some of the below values to make initializing the client a quicker process;\n| Variable Name            | What it is used for                                            | Type of input or available values                    |\n|--------------------------|----------------------------------------------------------------|------------------------------------------------------|\n| STAKING_API_FILE_PATH    | The path to the API Key file that is used to sign API Requests | Absolute path (/path/to/file/...) in the file system |\n| STAKING_API_UUID         | The API Key, can be obtained from the console                  | UUID                                                 |\n| STAKING_TARGET_CHAIN     | The chain on which the staking should be performed             | One of (case sensetive): MATIC         |\n| STAKING_VAULT_ACCOUNT_ID | The vault account Id from which the staking will occur         | A non-negative integer                               |\n\n#### Using the CLI\nTo run the CLI run the following command from the location of the CLI:\u003cbr\u003e\n`npx ts-node CLI.ts`\n\nAnd then simply follow the on-screen instructions.\n\n### Staker usage\nEach staker contains the same fundimental functionality with several functions that are callable, note each staker implementation might have slightly different implementation on this base template.\n\nConstructor:\u003cbr\u003e\nEach Staker has the same base constructor, but can expand on it:\n- fbks            - The FireblocksSDK instance to use.\n- vaultAccountId  - The ID of the vault account to use.\n- assetId         - Dictated by the staker (not part of instantiation by the user).\n- web3            - A web3 instance for the blockchain if needed.\n\nCore Functions:\n1. stake(number)        - stake the given amount.\n2. restake()            - restake the accomulated rewards.\n3. unstake(number)      - unstake the given amount.\n4. withdraw(number)     - withdraw the specified amount (if applicable). \n5. claimRewards()       - claims all accumulated rewards (if applicable).\n6. getBalances(bool)    - returns the balances you have staked in the blockchain (bool determines if it's the smallest denominator).\n\nMisc Functions:\n1. setup()              - Validates user input and collects needed information for the staker to work properly. This should be run right after instantiating the staker.\n2. runSetupIfNeeded()   - Runs the setup function if needed (each staker has different criteria to when to run the setup function).\n\nMisc Capabilities:\n1. This SDK contains logging functionality which will print information to the screen which can be helpful with understanding what's happening, or other important information. This can be turned off using:\n\n    `Staker.logging = false;`\n\nEach staker will have its own documentation elaborating its usage in the examples folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffireblocks%2Ffireblocks_matic_near_staking_sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffireblocks%2Ffireblocks_matic_near_staking_sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffireblocks%2Ffireblocks_matic_near_staking_sdk/lists"}