{"id":23165325,"url":"https://github.com/edenwareapps/node-bright-sdk","last_synced_at":"2026-03-14T21:30:15.997Z","repository":{"id":81447959,"uuid":"134333797","full_name":"EdenwareApps/node-bright-sdk","owner":"EdenwareApps","description":"Bright SDK driver for Electron/Node.js/NW.js apps","archived":false,"fork":false,"pushed_at":"2024-04-27T18:19:35.000Z","size":43,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T01:49:40.818Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://bright-sdk.com","language":"JavaScript","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/EdenwareApps.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":"2018-05-21T22:59:56.000Z","updated_at":"2024-04-27T18:19:39.000Z","dependencies_parsed_at":"2024-04-26T22:25:18.876Z","dependency_job_id":"22ba764c-294f-4c08-8baa-89e81051055f","html_url":"https://github.com/EdenwareApps/node-bright-sdk","commit_stats":null,"previous_names":["efoxbr/node-bright-sdk","edenwareapps/node-bright-sdk"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdenwareApps%2Fnode-bright-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdenwareApps%2Fnode-bright-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdenwareApps%2Fnode-bright-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdenwareApps%2Fnode-bright-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EdenwareApps","download_url":"https://codeload.github.com/EdenwareApps/node-bright-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239921842,"owners_count":19718844,"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":[],"created_at":"2024-12-18T01:19:29.490Z","updated_at":"2026-03-14T21:30:15.928Z","avatar_url":"https://github.com/EdenwareApps.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BrightSDK\n\n[![License](https://img.shields.io/github/license/EdenwareApps/node-bright-sdk.svg)](https://opensource.org/licenses/LICENSE)\n\nA module that provides an interface for interacting with the Bright SDK (formerly Luminati SDK) on Node.js/NW.js/Electron applications. Unofficial, feel free to contribute.\n\n\n## Installation\n\n```shell\nnpm install EdenwareApps/node-bright-sdk\n```\n\n## Usage\n\n```javascript\nconst BrightSDK = require('node-bright-sdk')\n\nconst brightSDK = new BrightSDK()\nbrightSDK.init(YOUR_BRIGHT_SDK_ID)\nbrightSDK.on('choice', choice =\u003e {\n    console.log('Choice has changed to '+ choice)\n})\nlet currentChoice = brightSDK.getChoice() // 0=uninitialized, 1=agree, 2=disagree\n// Perform other operations with the BrightSDK\n// Uninitialize the BrightSDK\nbrightSDK.uninit()\n```\n\nUsing promises or ESM:\n\n```javascript\nimport BrightSDK from 'node-bright-sdk'\n\nconst brightSDK = new BrightSDK()\nawait brightSDK.promises.init(YOUR_BRIGHT_SDK_ID)\nbrightSDK.on('choice', choice =\u003e {\n    console.log('Choice has changed to '+ choice)\n})\nlet currentChoice = await brightSDK.promises.getChoice() // 0=uninitialized, 1=agree, 2=disagree\n// Perform other operations with the BrightSDK\n// Uninitialize the BrightSDK\nawait brightSDK.promises.uninit()\n```\n\n\n\n## API\n\n### `new BrightSDK(opts)`\n\nCreates a new instance of the BrightSDK.\n\n- `opts` (optional): An object containing options.\n  - `debug` (boolean): Enable debugging mode (default: `false`).\n  - `dllPath` (string): The path to the DLL file (default: determined based on the platform and architecture).\n  - `dir` (string): The directory to search for the DLL file (default: the directory of the main executable file).\n\n### checkSupported()\n\nChecks if the Bright SDK is supported.\n\n### clearChoice()\n\nClears the current choice made by the user.\n\n### getChoice()\n\nGets the current choice made by the user.\n\n### init(ID)\n\nInitializes the SDK.\n\n### initUI(ID)\n\nInitializes the UI component of the SDK.\n\n### isSupported2()\n\nChecks if the Bright SDK is supported. Returns an integer value.\n\n### isSupported()\n\nChecks if the Bright SDK is supported. Returns an integer value.\n\n### setSkipConsentOnInit(value)\n\nSets whether to skip the consent screen during SDK initialization.\n\n- `value`: A boolean value indicating whether to skip consent on initialization.\n\n### setAppName(name)\n\nSets the name of the application.\n\n- `name`: The name of the application.\n\n### setBgColor(color)\n\nSets the background color of the SDK UI.\n\n- `color`: The background color in string format.\n\n### setBtnColor(color)\n\nSets the button color of the SDK UI.\n\n- `color`: The button color in string format.\n\n### setDlgPos(position)\n\nSets the position of the SDK dialog.\n\n- `position`: The position of the dialog.\n\n### setDlgPosType(positionType)\n\nSets the type of position for the SDK dialog.\n\n- `positionType`: The type of position for the dialog.\n\n### setLogoLink(link)\n\nSets the logo link of the SDK UI.\n\n- `link`: The logo link.\n\n### setNotPeerTxt(txt)\n\nSets the text for non-peer users in the SDK UI.\n\n- `txt`: The text for non-peer users.\n\n### setTosLink(link)\n\nSets the Terms of Service (TOS) link of the SDK UI.\n\n- `link`: The TOS link.\n\n### setTxtColor(color)\n\nSets the text color of the SDK UI.\n\n- `color`: The text color in string format.\n\n### setTxtCulture(culture)\n\nSets the text culture of the SDK UI.\n\n- `culture`: The text culture.\n\n### setBenefitTxt(txt)\n\nSets the benefit text of the SDK UI.\n\n- `txt`: The benefit text.\n\n### uninit()\n\nUninitializes the BrightSDK and frees any allocated resources.\n\n### Events\n\n#### Event: `choice`\n\nEmitted when the choice has changed.\n\n### Constants\n\nThe following constants are available on the BrightSDK instance:\n\n- `CHOICE_NONE` (number): Represents the choice value for none (0).\n- `CHOICE_PEER` (number): Represents the choice value for peer (1).\n- `CHOICE_NOT_PEER` (number): Represents the choice value for not peer (2).\n- `PEER_TXT_NO_ADS` (number): Represents the peer text value for no ads (0).\n- `PEER_TXT_PREMIUM` (number): Represents the peer text value for premium (1).\n- `PEER_TXT_FREE` (number): Represents the peer text value for free (2).\n- `PEER_TXT_DONATE` (number): Represents the peer text value for donate (3).\n- `PEER_TXT_I_AGREE` (number): Represents the peer text value for \"I agree\" (4).\n- `NOT_PEER_TXT_ADS` (number): Represents the not peer text value for ads (0).\n- `NOT_PEER_TXT_LIMITED` (number): Represents the not peer text value for limited (1).\n- `NOT_PEER_TXT_PREMIUM` (number): Represents the not peer text value for premium (2).\n- `NOT_PEER_TXT_NO_DONATE` (number): Represents the not peer text value for no donate (3).\n- `NOT_PEER_TXT_NOT_AGREE` (number): Represents the not peer text value for not agree (4).\n- `NOT_PEER_TXT_I_DISAGREE` (number): Represents the not peer text value for \"I disagree\" (5).\n- `NOT_PEER_TXT_SUBSCRIBE` (number): Represents the not peer text value for subscribe (6).\n- `NOT_PEER_TXT_BUY` (number): Represents the not peer text value for buy (7).\n- `NOT_PEER_TXT_NO_THANK_YOU` (number): Represents the not peer text value for \"No, thank you\" (9).\n- `DLG_POS_TYPE_CENTER_OWNER` (number): Represents the dialog position type as center owner (0).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedenwareapps%2Fnode-bright-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedenwareapps%2Fnode-bright-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedenwareapps%2Fnode-bright-sdk/lists"}