{"_id":"@4everland/upload-pin","_rev":"6-b26f23cd127a8a64bc053a66833d21e5","name":"@4everland/upload-pin","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.1":{"name":"@4everland/upload-pin","version":"1.0.1","keywords":["4everland","S3","upload","ipfs"],"author":{"name":"yepCing"},"license":"ISC","_id":"@4everland/upload-pin@1.0.1","maintainers":[{"name":"yipcing","email":"yepcing@gmail.com"},{"name":"hyongnim","email":"409337645@qq.com"},{"name":"dinn","email":"2274822997@qq.com"},{"name":"indirasieben","email":"indirasiebenenv79@gmail.com"},{"name":"4ever-land","email":"tfspq@protonmail.com"}],"homepage":"https://github.com/yepCing/4everland-sdk","bugs":{"url":"https://github.com/yepCing/4everland-sdk/issues"},"dist":{"shasum":"58bfee5472d26d9a8f56923d1c7faa457f2d6b79","tarball":"https://registry.npmjs.org/@4everland/upload-pin/-/upload-pin-1.0.1.tgz","fileCount":18,"integrity":"sha512-uv6I4sgdvim/oT1i4qD7YyhvbBsaAemYfFPK/iKycVc68wPeEDUiFhrSsFASXAM7dUlZLpJHUSZbZQdSkZDtYw==","signatures":[{"sig":"MEQCIF6OFOZaM3V6wD3Lp9ic0reDqLz+xaef014BGW/JkDfSAiAsnyHGuTX4rrKtOqi4To67aW16cPbuf7Vtm2XvLmFIdg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3094795},"main":"./dist/uploadPin.cjs.js","types":"./dist/types/index.d.ts","module":"./dist/uploadPin.esm.js","browser":"./dist/uploadPin.umd.min.js","gitHead":"3c823031adc4bb21f01b6576ca3e1160da3c7b0b","scripts":{"dev":"rollup -c --w","test":"echo \"Error: no test specified\" && exit 1","build":"rm -rf ./dist && NODE_ENV=production rollup -c","build:dev":"rm -rf ./dist && NODE_ENV=development rollup -c"},"_npmUser":{"name":"yipcing","email":"yepcing@gmail.com"},"repository":{"url":"git+https://github.com/yepCing/4everland-sdk.git","type":"git"},"_npmVersion":"9.6.7","description":"```shell","directories":{},"_nodeVersion":"18.17.0","dependencies":{"axios":"^1.4.0","ts-node":"^10.9.1","@aws-sdk/client-s3":"^3.391.0","@4everland/s3-lib-storage":"^3.427.1","@aws-sdk/signature-v4-crt":"^3.398.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.1","eslint":"^8.47.0","rollup":"^3.28.0","prettier":"^3.0.1","typescript":"^5.1.6","@babel/core":"^7.22.10","@types/node":"^20.5.0","@aws-sdk/types":"^3.391.0","@babel/preset-env":"^7.22.10","@rollup/plugin-json":"^6.0.0","@rollup/plugin-babel":"^6.0.3","@rollup/plugin-terser":"^0.4.3","@rollup/plugin-replace":"^5.0.2","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","@rollup/plugin-commonjs":"^25.0.4","@rollup/plugin-typescript":"^11.1.2","@typescript-eslint/parser":"^6.4.0","@rollup/plugin-node-resolve":"^15.1.0","rollup-plugin-polyfill-node":"^0.12.0","@typescript-eslint/eslint-plugin":"^6.4.0"},"_npmOperationalInternal":{"tmp":"tmp/upload-pin_1.0.1_1697179813177_0.6341785259631874","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@4everland/upload-pin","version":"1.0.2","keywords":["4everland","S3","upload","ipfs"],"author":{"name":"yepCing"},"license":"ISC","_id":"@4everland/upload-pin@1.0.2","maintainers":[{"name":"yipcing","email":"yepcing@gmail.com"},{"name":"hyongnim","email":"409337645@qq.com"},{"name":"dinn","email":"2274822997@qq.com"},{"name":"indirasieben","email":"indirasiebenenv79@gmail.com"},{"name":"4ever-land","email":"tfspq@protonmail.com"}],"homepage":"https://github.com/yepCing/4everland-sdk","bugs":{"url":"https://github.com/yepCing/4everland-sdk/issues"},"dist":{"shasum":"44fc5d27e0f0b9740e74b37ee119550f2ce6374d","tarball":"https://registry.npmjs.org/@4everland/upload-pin/-/upload-pin-1.0.2.tgz","fileCount":19,"integrity":"sha512-xzrYKx9Fv1Zkc/YJPbhVCRvyl8KUDQbdoKzicCmWAEEU8FxJfLO8RfZBq2WOvFDQDmrwPYMRe27jAcSi/69IVA==","signatures":[{"sig":"MEUCIQCHdEiZeBYsl1aqHexrl2KtAkB+gGL9379ZGzu+OAQTKwIgP6qARSmgFM54GWmQQWFI2j0+z8+4/fRyybovy38CuVU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3105888},"main":"./dist/uploadPin.cjs.js","types":"./dist/types/index.d.ts","module":"./dist/uploadPin.esm.js","browser":"./dist/uploadPin.umd.min.js","gitHead":"15a5089148399e16d24716b9bbb428de8f339c19","scripts":{"dev":"rollup -c --w","test":"echo \"Error: no test specified\" && exit 1","build":"rm -rf ./dist && NODE_ENV=production rollup -c","build:dev":"rm -rf ./dist && NODE_ENV=development rollup -c"},"_npmUser":{"name":"yipcing","email":"yepcing@gmail.com"},"repository":{"url":"git+https://github.com/yepCing/4everland-sdk.git","type":"git"},"_npmVersion":"9.6.7","description":"```shell","directories":{},"_nodeVersion":"18.17.0","dependencies":{"axios":"^1.4.0","ts-node":"^10.9.1","@aws-sdk/client-s3":"^3.391.0","@4everland/s3-lib-storage":"^3.427.1","@aws-sdk/signature-v4-crt":"^3.398.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.1","eslint":"^8.47.0","rollup":"^3.28.0","prettier":"^3.0.1","typescript":"^5.1.6","@babel/core":"^7.22.10","@types/node":"^20.5.0","@aws-sdk/types":"^3.391.0","@babel/preset-env":"^7.22.10","@rollup/plugin-json":"^6.0.0","@rollup/plugin-babel":"^6.0.3","@rollup/plugin-terser":"^0.4.3","@rollup/plugin-replace":"^5.0.2","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","@rollup/plugin-commonjs":"^25.0.4","@rollup/plugin-typescript":"^11.1.2","@typescript-eslint/parser":"^6.4.0","@rollup/plugin-node-resolve":"^15.1.0","rollup-plugin-polyfill-node":"^0.12.0","@typescript-eslint/eslint-plugin":"^6.4.0"},"_npmOperationalInternal":{"tmp":"tmp/upload-pin_1.0.2_1697607685381_0.2607853664641757","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@4everland/upload-pin","version":"1.1.1","keywords":["4everland","S3","upload","ipfs"],"author":{"name":"4everland"},"license":"ISC","_id":"@4everland/upload-pin@1.1.1","maintainers":[{"name":"yipcing","email":"yepcing@gmail.com"},{"name":"hyongnim","email":"409337645@qq.com"},{"name":"dinn","email":"2274822997@qq.com"},{"name":"indirasieben","email":"indirasiebenenv79@gmail.com"},{"name":"4ever-land","email":"tfspq@protonmail.com"}],"homepage":"https://github.com/4everland/4everland-sdk","bugs":{"url":"https://github.com/4everland/4everland-sdk/issues"},"dist":{"shasum":"2ba1fd4195ceaf037d9de3bcfdb884c8e598b69f","tarball":"https://registry.npmjs.org/@4everland/upload-pin/-/upload-pin-1.1.1.tgz","fileCount":19,"integrity":"sha512-E2RaybL8vNoTmQsT6Z3TZFLUKVeXkDcbn246/VuwLqYSbhbaiB5YfPAfbL9C2MCm1jJ8P3GyPwH41TujtFtFeQ==","signatures":[{"sig":"MEUCIQCy8uiRuhAtpwUVSAVpcEf+eP0gnAZ+Jrx0pdtDoTQkAQIgBX6FZ3Ty2xUe0MhOuG6kvKPIcrDVqFNQr4+lHFSOrvw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3105968},"main":"./dist/uploadPin.cjs.js","types":"./dist/types/index.d.ts","module":"./dist/uploadPin.esm.js","browser":"./dist/uploadPin.umd.min.js","gitHead":"f9a8a2baf382feafec6f93c1106005df51eca793","scripts":{"dev":"rollup -c --w","test":"echo \"Error: no test specified\" && exit 1","build":"rm -rf ./dist && NODE_ENV=production rollup -c","build:dev":"rm -rf ./dist && NODE_ENV=development rollup -c"},"_npmUser":{"name":"yipcing","email":"yepcing@gmail.com"},"repository":{"url":"git+https://github.com/4everland/4everland-sdk.git","type":"git"},"_npmVersion":"9.6.7","description":"```shell","directories":{},"_nodeVersion":"18.17.0","dependencies":{"axios":"^1.4.0","ts-node":"^10.9.1","@aws-sdk/client-s3":"^3.391.0","@4everland/s3-lib-storage":"^3.427.1","@aws-sdk/signature-v4-crt":"^3.398.0"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.1","eslint":"^8.47.0","rollup":"^3.28.0","prettier":"^3.0.1","typescript":"^5.1.6","@babel/core":"^7.22.10","@types/node":"^20.5.0","@aws-sdk/types":"^3.391.0","@babel/preset-env":"^7.22.10","@rollup/plugin-json":"^6.0.0","@rollup/plugin-babel":"^6.0.3","@rollup/plugin-terser":"^0.4.3","@rollup/plugin-replace":"^5.0.2","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","@rollup/plugin-commonjs":"^25.0.4","@rollup/plugin-typescript":"^11.1.2","@typescript-eslint/parser":"^6.4.0","@rollup/plugin-node-resolve":"^15.1.0","rollup-plugin-polyfill-node":"^0.12.0","@typescript-eslint/eslint-plugin":"^6.4.0"},"_npmOperationalInternal":{"tmp":"tmp/upload-pin_1.1.1_1703648584962_0.00556310219274736","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-10-13T06:50:13.097Z","modified":"2025-02-25T07:05:55.250Z","1.0.0":"2023-10-13T06:30:46.213Z","1.0.1":"2023-10-13T06:50:13.510Z","1.0.2":"2023-10-18T05:41:25.652Z","1.1.1":"2023-12-27T03:43:05.236Z"},"bugs":{"url":"https://github.com/4everland/4everland-sdk/issues"},"author":{"name":"4everland"},"license":"ISC","homepage":"https://github.com/4everland/4everland-sdk","keywords":["4everland","S3","upload","ipfs"],"repository":{"url":"git+https://github.com/4everland/4everland-sdk.git","type":"git"},"description":"```shell","maintainers":[{"email":"indirasiebenenv79@gmail.com","name":"indirasieben"},{"email":"tfspq@protonmail.com","name":"4ever-land"},{"email":"2274822997@qq.com","name":"dinn"},{"email":"yepcing@gmail.com","name":"yipcing"},{"email":"409337645@qq.com","name":"hyongnim"},{"email":"a1504848701@outlook.com","name":"4everland_dev"}],"readme":"# Install\n\n```shell\n\nnpm i @4everland/upload-pin\n\nyarn add @4everland/upload-pin\n\n```\n\n## ESModule\n\n```js\nimport { AuthClient, BucketClient, PinningClient } from '@4everland/upload-pin'\n\n// create Auth Client\nconst authClient = new AuthClient(AUTH_URL)\nlet address = '' // metamask address\n\nconst signMessage = await authClient.getSignText(address)\n// Use signMessage for signing\n// ....\n\n// Verification signature\n// if expiration expired, you need Verification signature again\nconst { accessKeyId, secretAccessKey, sessionToken } = await authClient.verifySign(\n  address,\n  signature\n)\n\n// Create Bucket Client\nconst bucketClient = new BucketClient({\n  accessKeyId,\n  secretAccessKey,\n  sessionToken,\n  endpoint: ENDPOINT_URL\n})\n\n// Create Pinning Client\nconst pinningClient = new PinningClient({\n  baseURL: PINNING_URL,\n  accessToken: authInfo.token\n})\n// Upload File\nconst task = bucketClient.upload({\n  Key: file.name,\n  Body: file,\n  ContentType: file.type\n})\n// Upload Progress\ntask.progress((e) => {\n  // e.loaded , e.total\n})\n\nconst { cid } = await task.done()\n\n// pin cid\nconst { requestid } = await pinningClient.addPin({\n  cid\n})\n// specified pin\nconst result = await pinningClient.getPin(requestid)\n\n// pin list\nconst pinList = await pinningClient.listPin()\n```\n\n## CommonJs\n\n```js\nconst { AuthClient, BucketClient, PinningClient } = require('@4everland/upload-pin')\n```\n\n## Browser\n\n```js\n<script src=\"../dist/uploadPin.umd.min.js\"></script>\n<script>\n  const { AuthClient, BucketClient, PinningClient } = uploadPin\n</script>\n```\n","readmeFilename":"README.md"}