{"_id":"@alleslabs/legacy-bcs","_rev":"2-e5cb28b0ded9b9593e2919486c4f807a","name":"@alleslabs/legacy-bcs","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@alleslabs/legacy-bcs","version":"0.0.1","keywords":["cryptocurrency","blockchain","smart-contracts","altcoin","altcoins","wallet","move"],"author":{"name":"Initia Foundation"},"license":"MIT","_id":"@alleslabs/legacy-bcs@0.0.1","maintainers":[{"name":"alles-engineering","email":"engineering@alleslabs.com"},{"name":"songwongtp","email":"songwong@alleslabs.com"},{"name":"alles-ci","email":"ci@alleslabs.com"}],"homepage":"https://github.com/alleslabs/legacy-bcs#readme","bugs":{"url":"https://github.com/alleslabs/legacy-bcs/issues"},"dist":{"shasum":"7474b99b4f3be8d26ebacf50ab245cbe0cf1751e","tarball":"https://registry.npmjs.org/@alleslabs/legacy-bcs/-/legacy-bcs-0.0.1.tgz","fileCount":26,"integrity":"sha512-FM4oeQ6e1Gyi8D6/P83GaLFxCQk8JB3N1950beiW1i+fGw+bjrjvbOWbGzbLE1Zrm0NrBIFSR7qQ4vcCNr9cEg==","signatures":[{"sig":"MEQCIC2njLORLZcIK7HSRIVcD/DJEY43zuW0gbz0CDm/iLlnAiA1vhSjRHqLxTQhzk/uscPzTmYDrXJvM5/lKW8a/UTd9A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":889405},"main":"dist/index.js","_from":"file:alleslabs-legacy-bcs-0.0.1.tgz","husky":{"hooks":{"pre-commit":"lint-staged","post-checkout":"npm i"}},"engines":{"node":">=14"},"scripts":{"doc":"typedoc","lint":"eslint src --ext .js,.ts","test":"jest","build":"tsc --module commonjs && webpack --mode production","format":"prettier --check \"./src/**/*.ts\"","lint:fix":"eslint src --ext .js,.ts --fix","format:fix":"prettier --write \"./src/**/*.ts\"","create-hook":"husky add .husky/pre-commit"},"typings":"dist/index.d.ts","_npmUser":{"name":"alles-ci","email":"ci@alleslabs.com"},"prettier":{"semi":true,"arrowParens":"avoid","singleQuote":true,"trailingComma":"es5"},"_resolved":"/private/var/folders/j0/jck8c04n6hv5rx5w28fgp00h0000gn/T/88d62d10b58a09e1c07574385b783ed1/alleslabs-legacy-bcs-0.0.1.tgz","_integrity":"sha512-FM4oeQ6e1Gyi8D6/P83GaLFxCQk8JB3N1950beiW1i+fGw+bjrjvbOWbGzbLE1Zrm0NrBIFSR7qQ4vcCNr9cEg==","repository":{"url":"git+https://github.com/alleslabs/legacy-bcs.git","type":"git"},"_npmVersion":"10.2.4","description":"The Legacy BCS for Initia","directories":{},"lint-staged":{"./src/**/*.ts":["npm run lint:fix","npm run format:fix"]},"_nodeVersion":"20.11.1","dependencies":{"ws":"^7.5.9","tmp":"^0.2.1","long":"^5.2.0","axios":"^1.6.5","bip32":"^2.0.6","bip39":"^3.0.4","bech32":"^2.0.0","jscrypto":"^1.0.3","keccak256":"^1.0.6","ripemd160":"^2.0.2","secp256k1":"^5.0.0","@mysten/bcs":"^0.10.1","bignumber.js":"^9.1.0","@initia/initia.proto":"^0.2.1","@initia/opinit.proto":"^0.0.8","@ledgerhq/hw-transport":"^6.27.12","@ledgerhq/hw-transport-webhid":"^6.27.12","@ledgerhq/hw-transport-webusb":"^6.27.12"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","husky":"^6.0.0","buffer":"^6.0.3","eslint":"^8.23.1","process":"^0.11.10","ts-jest":"^29.0.1","ts-node":"^10.9.1","typedoc":"^0.25.2","webpack":"^5.74.0","prettier":"^2.7.1","@types/ws":"^7.4.7","ts-loader":"^9.4.1","@types/tmp":"^0.2.3","typescript":"^5.1.6","@types/jest":"^29.0.3","@types/node":"^18.7.18","lint-staged":"^13.0.3","webpack-cli":"^4.10.0","@types/bn.js":"^5.1.1","@types/ripemd160":"^2.0.0","@types/secp256k1":"^4.0.6","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0","@initia/builder.js":"^0.1.6","webpack-bundle-analyzer":"^4.6.1","@typescript-eslint/parser":"^6.9.1","tsconfig-paths-webpack-plugin":"^4.0.0","@typescript-eslint/eslint-plugin":"^6.9.1"},"_npmOperationalInternal":{"tmp":"tmp/legacy-bcs_0.0.1_1736349556348_0.139461488181704","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@alleslabs/legacy-bcs","version":"0.0.2","keywords":["cryptocurrency","blockchain","smart-contracts","altcoin","altcoins","wallet","move"],"author":{"name":"Initia Foundation"},"license":"MIT","_id":"@alleslabs/legacy-bcs@0.0.2","maintainers":[{"name":"alles-engineering","email":"engineering@alleslabs.com"},{"name":"songwongtp","email":"songwong@alleslabs.com"},{"name":"alles-ci","email":"ci@alleslabs.com"}],"homepage":"https://github.com/alleslabs/legacy-bcs#readme","bugs":{"url":"https://github.com/alleslabs/legacy-bcs/issues"},"dist":{"shasum":"7bcabd1354cf37725562361d0d00372874b19048","tarball":"https://registry.npmjs.org/@alleslabs/legacy-bcs/-/legacy-bcs-0.0.2.tgz","fileCount":26,"integrity":"sha512-BbsvJA1ucj2Y5URdKWPJLQb9ypyhbaesBI8W1tKVl+GwUp1Zo3NIwzUhsmzr/X0t7zAFUUQ6j2C5kVC2Rc/mEw==","signatures":[{"sig":"MEYCIQD0cV/fbjWtaZbD9VwkvhOLG/oc69EoYFmbNQG/9xhpiAIhAP2gVQKOtLKEHyiTkJZpYvWDCAxGKq72oHkeX7i82OQ/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":882663},"main":"dist/index.js","_from":"file:alleslabs-legacy-bcs-0.0.2.tgz","husky":{"hooks":{"pre-commit":"lint-staged","post-checkout":"npm i"}},"engines":{"node":">=14"},"scripts":{"doc":"typedoc","lint":"eslint src --ext .js,.ts","test":"jest","build":"tsc --module commonjs && webpack --mode production","format":"prettier --check \"./src/**/*.ts\"","lint:fix":"eslint src --ext .js,.ts --fix","format:fix":"prettier --write \"./src/**/*.ts\"","create-hook":"husky add .husky/pre-commit"},"typings":"dist/index.d.ts","_npmUser":{"name":"alles-ci","email":"ci@alleslabs.com"},"prettier":{"semi":true,"arrowParens":"avoid","singleQuote":true,"trailingComma":"es5"},"_resolved":"/private/var/folders/j0/jck8c04n6hv5rx5w28fgp00h0000gn/T/0cc8ee96f2332047aeb601fc95eccefd/alleslabs-legacy-bcs-0.0.2.tgz","_integrity":"sha512-BbsvJA1ucj2Y5URdKWPJLQb9ypyhbaesBI8W1tKVl+GwUp1Zo3NIwzUhsmzr/X0t7zAFUUQ6j2C5kVC2Rc/mEw==","repository":{"url":"git+https://github.com/alleslabs/legacy-bcs.git","type":"git"},"_npmVersion":"10.2.4","description":"The Legacy BCS for Initia","directories":{},"lint-staged":{"./src/**/*.ts":["npm run lint:fix","npm run format:fix"]},"_nodeVersion":"20.11.1","dependencies":{"ws":"^7.5.9","tmp":"^0.2.1","long":"^5.2.0","axios":"^1.6.5","bip32":"^2.0.6","bip39":"^3.0.4","bech32":"^2.0.0","jscrypto":"^1.0.3","keccak256":"^1.0.6","ripemd160":"^2.0.2","secp256k1":"^5.0.0","@mysten/bcs":"^0.10.1","bignumber.js":"^9.1.0","@initia/initia.proto":"^0.2.1","@initia/opinit.proto":"^0.0.8","@ledgerhq/hw-transport":"^6.27.12","@ledgerhq/hw-transport-webhid":"^6.27.12","@ledgerhq/hw-transport-webusb":"^6.27.12"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","husky":"^6.0.0","buffer":"^6.0.3","eslint":"^8.23.1","process":"^0.11.10","ts-jest":"^29.0.1","ts-node":"^10.9.1","typedoc":"^0.25.2","webpack":"^5.74.0","prettier":"^2.7.1","@types/ws":"^7.4.7","ts-loader":"^9.4.1","@types/tmp":"^0.2.3","typescript":"^5.1.6","@types/jest":"^29.0.3","@types/node":"^18.7.18","lint-staged":"^13.0.3","webpack-cli":"^4.10.0","@types/bn.js":"^5.1.1","@types/ripemd160":"^2.0.0","@types/secp256k1":"^4.0.6","crypto-browserify":"^3.12.0","stream-browserify":"^3.0.0","@initia/builder.js":"^0.1.6","webpack-bundle-analyzer":"^4.6.1","@typescript-eslint/parser":"^6.9.1","tsconfig-paths-webpack-plugin":"^4.0.0","@typescript-eslint/eslint-plugin":"^6.9.1"},"_npmOperationalInternal":{"tmp":"tmp/legacy-bcs_0.0.2_1736349876774_0.7606584218906955","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@alleslabs/legacy-bcs","version":"0.0.3","description":"The Legacy BCS for Initia","license":"MIT","author":{"name":"Initia Foundation"},"keywords":["cryptocurrency","blockchain","smart-contracts","altcoin","altcoins","wallet","move"],"repository":{"type":"git","url":"git+https://github.com/alleslabs/legacy-bcs.git"},"main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=14"},"lint-staged":{"./src/**/*.ts":["npm run lint:fix","npm run format:fix"]},"husky":{"hooks":{"pre-commit":"lint-staged","post-checkout":"npm i"}},"prettier":{"semi":true,"singleQuote":true,"trailingComma":"es5","arrowParens":"avoid"},"devDependencies":{"@initia/builder.js":"^0.1.6","@types/bn.js":"^5.1.1","@types/jest":"^29.0.3","@types/node":"^18.7.18","@types/ripemd160":"^2.0.0","@types/secp256k1":"^4.0.6","@types/tmp":"^0.2.3","@types/ws":"^7.4.7","@typescript-eslint/eslint-plugin":"^6.9.1","@typescript-eslint/parser":"^6.9.1","buffer":"^6.0.3","crypto-browserify":"^3.12.0","eslint":"^8.23.1","husky":"^6.0.0","jest":"^29.0.3","lint-staged":"^13.0.3","prettier":"^2.7.1","process":"^0.11.10","stream-browserify":"^3.0.0","ts-jest":"^29.0.1","ts-loader":"^9.4.1","ts-node":"^10.9.1","tsconfig-paths-webpack-plugin":"^4.0.0","typedoc":"^0.25.2","typescript":"^5.1.6","webpack":"^5.74.0","webpack-bundle-analyzer":"^4.6.1","webpack-cli":"^4.10.0"},"dependencies":{"@initia/initia.proto":"^0.2.1","@initia/opinit.proto":"^0.0.8","@ledgerhq/hw-transport":"^6.27.12","@ledgerhq/hw-transport-webhid":"^6.27.12","@ledgerhq/hw-transport-webusb":"^6.27.12","@mysten/bcs":"^0.10.1","axios":"^1.6.5","bech32":"^2.0.0","bignumber.js":"^9.1.0","bip32":"^2.0.6","bip39":"^3.0.4","jscrypto":"^1.0.3","keccak256":"^1.0.6","long":"^5.2.0","ripemd160":"^2.0.2","secp256k1":"^5.0.0","tmp":"^0.2.1","ws":"^7.5.9"},"scripts":{"build":"tsc --module commonjs && webpack --mode production","create-hook":"husky add .husky/pre-commit","test":"jest","format":"prettier --check \"./src/**/*.ts\"","format:fix":"prettier --write \"./src/**/*.ts\"","lint":"eslint src --ext .js,.ts","lint:fix":"eslint src --ext .js,.ts --fix","doc":"typedoc"},"bugs":{"url":"https://github.com/alleslabs/legacy-bcs/issues"},"homepage":"https://github.com/alleslabs/legacy-bcs#readme","_id":"@alleslabs/legacy-bcs@0.0.3","_integrity":"sha512-93dSIOMsviBYqGP3sXO04vbTwLR8LOlb40fy24f851Ii8Bwi/W7fnIie9GAyo2F1JzRcUd5oo9YequhcA7LejQ==","_resolved":"/private/var/folders/j0/jck8c04n6hv5rx5w28fgp00h0000gn/T/4ae798c62a2e14179ba3b719b29f9f79/alleslabs-legacy-bcs-0.0.3.tgz","_from":"file:alleslabs-legacy-bcs-0.0.3.tgz","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-93dSIOMsviBYqGP3sXO04vbTwLR8LOlb40fy24f851Ii8Bwi/W7fnIie9GAyo2F1JzRcUd5oo9YequhcA7LejQ==","shasum":"35bdd9200463cf710b761363fe16f065840e004a","tarball":"https://registry.npmjs.org/@alleslabs/legacy-bcs/-/legacy-bcs-0.0.3.tgz","fileCount":26,"unpackedSize":883811,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGCkD74mPECnQXDXp+EaGesEmJ2F7bfshhvrslkTmR8QIhAJ9Nyh9QccI7vtSLUoAx/VTL0Mz7FoNm12jsAPEq1AgL"}]},"_npmUser":{"name":"alles-ci","email":"ci@alleslabs.com"},"directories":{},"maintainers":[{"name":"alles-engineering","email":"engineering@alleslabs.com"},{"name":"songwongtp","email":"songwong@alleslabs.com"},{"name":"alles-ci","email":"ci@alleslabs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/legacy-bcs_0.0.3_1736393695188_0.1445273235949891"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-08T15:19:16.245Z","modified":"2025-01-09T03:34:55.630Z","0.0.1":"2025-01-08T15:19:16.620Z","0.0.2":"2025-01-08T15:24:37.085Z","0.0.3":"2025-01-09T03:34:55.408Z"},"bugs":{"url":"https://github.com/alleslabs/legacy-bcs/issues"},"author":{"name":"Initia Foundation"},"license":"MIT","homepage":"https://github.com/alleslabs/legacy-bcs#readme","keywords":["cryptocurrency","blockchain","smart-contracts","altcoin","altcoins","wallet","move"],"repository":{"type":"git","url":"git+https://github.com/alleslabs/legacy-bcs.git"},"description":"The Legacy BCS for Initia","maintainers":[{"name":"alles-engineering","email":"engineering@alleslabs.com"},{"name":"songwongtp","email":"songwong@alleslabs.com"},{"name":"alles-ci","email":"ci@alleslabs.com"}],"readme":"# Legacy BCS\n\nInitia.js is a TypeScript-written JavaScript SDK tailored for the Initia blockchain, enhancing the development experience with user-friendly TypeScript definitions and integration with Initia's core data structures.\n\nForked from: https://github.com/initia-labs/initia.js/tree/v0.2.8\n\n## Installation\n\nBefore installation, check the latest version of [npm](https://www.npmjs.com/package/@alleslabs/legacy-bcs):&#x20;\n\n```bash\nnpm install @alleslabs/legacy-bcs\n```\n\n## Usage\n\nThe usage section of this document provides detailed explanations and code examples of the legacy BCS class.\n\n### BCS\n\n**BCS**(Binary Canonical Serialization) is the binary encoding for Move resources and other non-module values published on-chain. &#x20;\n\n```typescript\nimport { BCS } from '@alleslabs/legacy-bcs';\n\nconst bcs = BCS.getInstance();\n\n// serialize, serialize value to BCS and encode it to base64\nconst serializedU64 = bcs.serialize('u64' /*type*/, 1234 /*value*/);\n\n// deserialize\nconst deserializedU64 = bcs.deserialize(\n  'u64', //type\n  serializedU64 // base64 encoded and BCS serialize value\n);\n\n// vector\nconst serializedVector = bcs.serialize('vector<u64>', [123, 456, 678]);\n\n// option\nconst serializedSome = bcs.serialize('option<u64>', 123); // some\nconst serializedNone = bcs.serialize('option<u64>', null); // none\n```\n\n**Support types for BCS**\n\n> \\`u8\\`, \\`u16\\`, \\`u32\\`, \\`u64\\`, \\`u128\\`, \\`u256\\`, \\`bool\\`, \\`vector\\`, \\`address\\`, \\`string\\`, \\`option\\`, \\`object\\`, \\`fixed_point32\\`, \\`fixed_point64\\`, \\`decimal128\\`, \\`decimal256\\`\n","readmeFilename":"README.md"}