{"_id":"@amerej/ic-stoic-identity","_rev":"1-4fb837bc2c87f554e1dacd370867a953","name":"@amerej/ic-stoic-identity","description":"Stoic Identity is an ICP Identity that works directly with the @dfinity/agent for signing canister messages using your StoicWallet.com account. Stoic Identity allows 3rd party dapps to connect to your wallet using a local-only bridge. Applications must re","dist-tags":{"latest":"2.0.0"},"versions":{"1.5.0":{"name":"@amerej/ic-stoic-identity","version":"1.5.0","author":"","license":"MIT","_id":"@amerej/ic-stoic-identity@1.5.0","dist":{"shasum":"75be8ace92a66f2e89d3380364a1f631357345dd","tarball":"https://registry.npmjs.org/@amerej/ic-stoic-identity/-/ic-stoic-identity-1.5.0.tgz","fileCount":12,"integrity":"sha512-fOvs04Vhi65aIHK/jdEi6zEZIF0EW4uXWK7gtxp2LEIpq/GK76/8kayrD9O/as1ylRPkQ85K2MMficU7e2lbSA==","signatures":[{"sig":"MEQCIATazTYiUoa60WZmbLUiQxZZ02vEJO9z35qmQri+oKV9AiAUiJLw9DKCkFizQcQCdOXo5gsJORtwsP5xrX66gP9riQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1394778},"main":"dist/ic-stoic-identity.js","module":"src/index.js","gitHead":"17ed589f4570fc3a67af2c5ebacaaf323586b159","scripts":{"dev":"webpack --mode development","test":"echo \"Error: no test specified\" && exit 1","build":"webpack --mode production"},"_npmUser":{"name":"amerej","email":"audran.ditsch@outlook.fr"},"_npmVersion":"10.8.1","description":"Stoic Identity is an ICP Identity that works directly with the @dfinity/agent for signing canister messages using your StoicWallet.com account. Stoic Identity allows 3rd party dapps to connect to your wallet using a local-only bridge. Applications must re","directories":{},"_nodeVersion":"20.11.1","dependencies":{"buffer":"^6.0.3","@dfinity/agent":"^0.10.0","@dfinity/identity":"^0.10.0","@dfinity/principal":"^0.10.0"},"_hasShrinkwrap":false,"devDependencies":{"webpack":"^5.45.1","webpack-cli":"^4.7.2","terser-webpack-plugin":"^5.1.4","webpack-node-externals":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ic-stoic-identity_1.5.0_1718924071759_0.1910977757660306","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@amerej/ic-stoic-identity","version":"2.0.0","description":"Stoic Identity is an ICP Identity that works directly with the @dfinity/agent for signing canister messages using your StoicWallet.com account. Stoic Identity allows 3rd party dapps to connect to your wallet using a local-only bridge. Applications must re","main":"dist/ic-stoic-identity.js","module":"src/index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","dev":"webpack --mode development","build":"webpack --mode production"},"author":"","license":"MIT","dependencies":{"@dfinity/agent":"^0.10.0","@dfinity/identity":"^0.10.0","@dfinity/principal":"^0.10.0","buffer":"^6.0.3"},"devDependencies":{"terser-webpack-plugin":"^5.1.4","webpack":"^5.45.1","webpack-cli":"^4.7.2","webpack-node-externals":"^3.0.0"},"_id":"@amerej/ic-stoic-identity@2.0.0","gitHead":"17ed589f4570fc3a67af2c5ebacaaf323586b159","_nodeVersion":"20.11.1","_npmVersion":"10.8.1","dist":{"integrity":"sha512-FtqDbP9vUHMdzURlZjEDzdSlvPvHhM7JofjgQ0I5w1tTV/+A8Izp3C9MATveFqaMp0LNoJyQ1HBd2C5Z8PSbxA==","shasum":"0b7823d05374f8f7d7cfd9ec9d883cd28828fa76","tarball":"https://registry.npmjs.org/@amerej/ic-stoic-identity/-/ic-stoic-identity-2.0.0.tgz","fileCount":12,"unpackedSize":1395188,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH31BvZCqP6m+2CYRqJeP5bnmg9/HUPfAJCZn6pHxEyOAiBvGiJ0nmgAoy9rz181lE8TbPr72IHYDgiteMN0ELayLw=="}]},"_npmUser":{"name":"amerej","email":"audran.ditsch@outlook.fr"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ic-stoic-identity_2.0.0_1718924780597_0.21191383697248822"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-20T22:54:31.650Z","modified":"2024-06-20T23:06:21.024Z","1.5.0":"2024-06-20T22:54:31.976Z","2.0.0":"2024-06-20T23:06:20.857Z"},"maintainers":[{"name":"amerej","email":"audran.ditsch@outlook.fr"}],"license":"MIT","readme":"# Stoic Identity\nStoic Identity is an ICP Identity that works directly with the @dfinity/agent for signing canister messages using your StoicWallet.com account. Stoic Identity allows 3rd party dapps to connect to your wallet using a local-only bridge. Applications must request authorization to connect to your wallet, and can only access your wallet on your local PC with the web-wallet unlocked.\n\n3rd party developers are not granted direct remote access - only local, and you can revoke local access directly from the StoicWallet app. **Your private keys are not exposed, but if you authorize your wallet with an application than that application can sign any canister message on your behalf.**\n\nIn future, we will add **canister scopes** to authorization requests, so applications must define which canister ID's they will use with their application.\n\n![screen-capture (5)](https://user-images.githubusercontent.com/13844325/127801017-c173c688-1871-4b65-b5cb-40ab4db28fbd.gif)\n\n## Installation\n```\nnpm i ic-stoic-identity --save-dev\n```\n\n### In the browser:\n```javascript\nimport {StoicIdentity} from \"ic-stoic-identity\";\n```\nUsage:\n```javascript\nStoicIdentity.load().then(async identity => {\n  if (identity !== false) {\n    //ID is a already connected wallet!\n  } else {\n    //No existing connection, lets make one!\n    identity = await StoicIdentity.connect();\n  }\n  \n  //Lets display the connected principal!\n  console.log(identity.getPrincipal().toText());\n  \n  //Create an actor canister\n  const actor = Actor.createActor(idlFactory, {\n    agent: new HttpAgent({\n      identity,\n    }),\n    canisterId,\n  });\n  \n  //Disconnect after\n  StoicIdentity.disconnect();\n})\n```\n\n### Authorization in StoicWallet:\n\n![image](https://user-images.githubusercontent.com/13844325/127787841-1d7cda5d-f1a7-4cbb-b251-c28dbf4e9068.png)\n\n### Manage Applications in StoicWallet:\n\n![image](https://user-images.githubusercontent.com/13844325/127787891-4c052b21-7844-410f-bb03-ff0caa148f6e.png)\n\n\n","readmeFilename":"README.md"}