{"_id":"@2waychain/2wayjs","_rev":"8-7c44edd60bf4ff27e632eff997fc48b7","name":"@2waychain/2wayjs","dist-tags":{"latest":"1.0.7"},"versions":{"1.0.1":{"name":"@2waychain/2wayjs","version":"1.0.1","keywords":["AIBlock","2 Way Chain","SDK","API Module","TypeScript"],"author":{"name":"Byron Houwens","email":"byron.houwens@a-block.ch"},"license":"MIT","_id":"@2waychain/2wayjs@1.0.1","maintainers":[{"name":"rp122","email":"robin.plojoux@a-block.net"},{"name":"bhouwens","email":"zhion360@gmail.com"}],"homepage":"https://github.com/AIBlockOfficial/2Way.js#readme","bugs":{"url":"https://github.com/AIBlockOfficial/2Way.js/issues"},"dist":{"shasum":"58ee910ea09cfc3676102ed9cd098181f7a9d9e0","tarball":"https://registry.npmjs.org/@2waychain/2wayjs/-/2wayjs-1.0.1.tgz","fileCount":31,"integrity":"sha512-vBbG/QwIgOiqpI7SIqWc4MPvgxnUM84RZLhvSuFjnmpoLu7n2RgEQ3wn3qSZF99p8JZ+g2D07c0YUSmJtAyEzg==","signatures":[{"sig":"MEYCIQDMMBmIY0osdISphZGaobK9GXXxJXicKjXkB3Cff6osCAIhAN/rQmgRPj8H+yGl02TYRBSbIVOmhkhTHVGFo4LmnM1W","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1121991},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/index.es.js","source":"src/index.ts","browser":"lib/index.js","gitHead":"0be65ed019a70b5fb08242687f8d652a080be1ae","scripts":{"lint":"npm run es:lint && npm run check:types && npm run format","test":"jest --no-cache --config jest.config.js","build":"rimraf lib && microbundle","format":"prettier --check \"src/**/*.(js|ts)\"","es:lint":"eslint src --ext .js,.ts","prepare":"npm run build","test-tx":"jest --no-cache --config jest.config.js ./tests/__tests__/tx.mgmt.test.ts","version":"npm run format && git add -A src","lint:fix":"npm run es:lint:fix && npm run format:fix","test-key":"jest --no-cache --config jest.config.js ./tests/__tests__/key.mgmt.test.ts","test-item":"jest --no-cache --config jest.config.js ./tests/__tests__/item.mgmt.test.ts","format:fix":"prettier --write \"src/**/*.(js|ts)\"","preversion":"npm run lint","test-utils":"jest --no-cache --config jest.config.js ./tests/__tests__/utils.test.ts","check:types":"tsc --noemit","es:lint:fix":"eslint src --fix --ext .js,.ts","postversion":"git push && git push --tags","test-service":"jest --no-cache --config jest.config.js ./tests/__tests__/wallet.service.test.ts","generate:docs":"typedoc src --tsconfig tsconfig.json --out docs","prepublishOnly":"npm test && npm run lint"},"_npmUser":{"name":"rp122","email":"robin.plojoux@a-block.net"},"repository":{"url":"git+https://github.com/AIBlockOfficial/2Way.js.git","type":"git"},"_npmVersion":"10.1.0","description":"API wrapper to access the AIBlock 2 Way Chain","directories":{},"_nodeVersion":"20.9.0","dependencies":{"uuid":"^8.3.2","axios":"1.6.2","js-sha3":"^0.8.0","tweetnacl":"^1.0.3","neverthrow":"^4.3.1","bitcore-lib":"^8.25.25","byte-base64":"^1.1.0","bitcore-mnemonic":"^8.25.25"},"_hasShrinkwrap":false,"devDependencies":{"jest":"27.5.1","tslib":"^2.3.1","assert":"^2.0.0","buffer":"^6.0.3","eslint":"7.5.0","rimraf":"^3.0.2","ts-jest":"27.1.3","typedoc":"^0.23.10","prettier":"2.5.1","typescript":"^4.5.0","@types/jest":"27.4.1","microbundle":"^0.14.2","@types/bitcore-lib":"^0.15.3","eslint-plugin-jest":"26.1.1","eslint-config-prettier":"^8.4.0","eslint-plugin-typesafe":"^0.5.2","eslint-plugin-neverthrow":"^1.1.4","@typescript-eslint/parser":"^5.13.0","@typescript-eslint/eslint-plugin":"^5.13.0"},"_npmOperationalInternal":{"tmp":"tmp/2wayjs_1.0.1_1710925458074_0.8370301364742714","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@2waychain/2wayjs","version":"1.0.3","keywords":["AIBlock","2 Way Chain","SDK","API Module","TypeScript"],"author":{"name":"Byron Houwens","email":"byron.houwens@a-block.ch"},"license":"MIT","_id":"@2waychain/2wayjs@1.0.3","maintainers":[{"name":"rp122","email":"robin.plojoux@a-block.net"},{"name":"bhouwens","email":"zhion360@gmail.com"}],"homepage":"https://github.com/AIBlockOfficial/2Way.js#readme","bugs":{"url":"https://github.com/AIBlockOfficial/2Way.js/issues"},"dist":{"shasum":"0850990e0a5d15d198a9b60375a998c647387f16","tarball":"https://registry.npmjs.org/@2waychain/2wayjs/-/2wayjs-1.0.3.tgz","fileCount":32,"integrity":"sha512-3jBoQU+1TjT0gYn/kBSARvtbL8NcsMtPj6sSCTYGXk4GwbR573Af8HUa9XL5Jw4H5avs5Wq86fH2I0ZNaW/Mng==","signatures":[{"sig":"MEUCIFGbIw30KP5HsGpnqJvOzH3xN8XO/bdvC9VH718+ymNsAiEAkxr9UufsCmbiXmpE9x4mqKfhCyBOsabTkoD2OOEP0GU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1163552},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/index.es.js","source":"src/index.ts","browser":"lib/index.js","gitHead":"534ed81b10af3ea5284d2fe9fd1cb811b14b4376","scripts":{"lint":"npm run es:lint && npm run check:types && npm run format","test":"jest --no-cache --config jest.config.js","build":"rimraf lib && microbundle","format":"prettier --check \"src/**/*.(js|ts)\"","es:lint":"eslint src --ext .js,.ts","prepare":"npm run build","test-tx":"jest --no-cache --config jest.config.js ./tests/__tests__/tx.mgmt.test.ts","version":"npm run format && git add -A src","lint:fix":"npm run es:lint:fix && npm run format:fix","test-key":"jest --no-cache --config jest.config.js ./tests/__tests__/key.mgmt.test.ts","test-item":"jest --no-cache --config jest.config.js ./tests/__tests__/item.mgmt.test.ts","format:fix":"prettier --write \"src/**/*.(js|ts)\"","preversion":"npm run lint","test-utils":"jest --no-cache --config jest.config.js ./tests/__tests__/utils.test.ts","check:types":"tsc --noemit","es:lint:fix":"eslint src --fix --ext .js,.ts","postversion":"git push && git push --tags","test-service":"jest --no-cache --config jest.config.js ./tests/__tests__/wallet.service.test.ts","generate:docs":"typedoc src --tsconfig tsconfig.json --out docs","prepublishOnly":"npm test && npm run lint"},"_npmUser":{"name":"rp122","email":"robin.plojoux@a-block.net"},"repository":{"url":"git+https://github.com/AIBlockOfficial/2Way.js.git","type":"git"},"_npmVersion":"10.1.0","description":"API wrapper to access the AIBlock 2 Way Chain","directories":{},"_nodeVersion":"20.9.0","dependencies":{"joi":"^17.12.3","uuid":"^8.3.2","axios":"1.6.2","js-sha3":"^0.8.0","tweetnacl":"^1.0.3","neverthrow":"^4.3.1","bitcore-lib":"^8.25.25","byte-base64":"^1.1.0","bitcore-mnemonic":"^8.25.25"},"_hasShrinkwrap":false,"devDependencies":{"jest":"27.5.1","tslib":"^2.3.1","assert":"^2.0.0","buffer":"^6.0.3","eslint":"7.5.0","rimraf":"^3.0.2","ts-jest":"27.1.3","typedoc":"^0.23.10","prettier":"2.5.1","typescript":"^4.5.0","@types/jest":"27.4.1","microbundle":"^0.14.2","@types/bitcore-lib":"^0.15.3","eslint-plugin-jest":"26.1.1","eslint-config-prettier":"^8.4.0","eslint-plugin-typesafe":"^0.5.2","eslint-plugin-neverthrow":"^1.1.4","@typescript-eslint/parser":"^5.13.0","@typescript-eslint/eslint-plugin":"^5.13.0"},"_npmOperationalInternal":{"tmp":"tmp/2wayjs_1.0.3_1712760501779_0.34776291244531565","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@2waychain/2wayjs","version":"1.0.4","keywords":["AIBlock","2 Way Chain","SDK","API Module","TypeScript"],"author":{"name":"Byron Houwens","email":"byron.houwens@a-block.ch"},"license":"MIT","_id":"@2waychain/2wayjs@1.0.4","maintainers":[{"name":"rp122","email":"robin.plojoux@a-block.net"},{"name":"bhouwens","email":"zhion360@gmail.com"}],"homepage":"https://github.com/AIBlockOfficial/2Way.js#readme","bugs":{"url":"https://github.com/AIBlockOfficial/2Way.js/issues"},"dist":{"shasum":"0544e851c0c922eff5358e44f72777e5069ec87a","tarball":"https://registry.npmjs.org/@2waychain/2wayjs/-/2wayjs-1.0.4.tgz","fileCount":32,"integrity":"sha512-NrzfbvfE/Kx9yFdS2fugU7mkv2FBlbjyY3dkqNiDngIn4y7gwvtmv8t4qcKOLZ+hT9BaR1v8hTIcoF0mRcgzmA==","signatures":[{"sig":"MEUCIQCjnyo1lQWzZ6hRwIxiyTWfAyfcQQXbX9pDQh36wPB2tAIgLjVgX6MRu9oIrn8rKBRrHCXffqSQ5erpGsf6WSreVOw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1164038},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/index.es.js","source":"src/index.ts","browser":"lib/index.js","gitHead":"2482eb82fda48e2989d9d78c6de99f7c883bd434","scripts":{"lint":"npm run es:lint && npm run check:types && npm run format","test":"jest --no-cache --config jest.config.js","build":"rimraf lib && microbundle","format":"prettier --check \"src/**/*.(js|ts)\"","es:lint":"eslint src --ext .js,.ts","prepare":"npm run build","test-tx":"jest --no-cache --config jest.config.js ./tests/__tests__/tx.mgmt.test.ts","version":"npm run format && git add -A src","lint:fix":"npm run es:lint:fix && npm run format:fix","test-key":"jest --no-cache --config jest.config.js ./tests/__tests__/key.mgmt.test.ts","test-item":"jest --no-cache --config jest.config.js ./tests/__tests__/item.mgmt.test.ts","format:fix":"prettier --write \"src/**/*.(js|ts)\"","preversion":"npm run lint","test-utils":"jest --no-cache --config jest.config.js ./tests/__tests__/utils.test.ts","check:types":"tsc --noemit","es:lint:fix":"eslint src --fix --ext .js,.ts","postversion":"git push && git push --tags","test-service":"jest --no-cache --config jest.config.js ./tests/__tests__/wallet.service.test.ts","generate:docs":"typedoc src --tsconfig tsconfig.json --out docs","prepublishOnly":"npm test && npm run lint"},"_npmUser":{"name":"bhouwens","email":"zhion360@gmail.com"},"repository":{"url":"git+https://github.com/AIBlockOfficial/2Way.js.git","type":"git"},"_npmVersion":"10.1.0","description":"API wrapper to access the AIBlock 2 Way Chain","directories":{},"_nodeVersion":"20.9.0","dependencies":{"joi":"^17.12.3","uuid":"^8.3.2","axios":"1.6.2","js-sha3":"^0.8.0","tweetnacl":"^1.0.3","neverthrow":"^4.3.1","bitcore-lib":"^8.25.25","byte-base64":"^1.1.0","bitcore-mnemonic":"^8.25.25"},"_hasShrinkwrap":false,"devDependencies":{"jest":"27.5.1","tslib":"^2.3.1","assert":"^2.0.0","buffer":"^6.0.3","eslint":"7.5.0","rimraf":"^3.0.2","ts-jest":"27.1.3","typedoc":"^0.23.10","prettier":"2.5.1","typescript":"^4.5.0","@types/jest":"27.4.1","microbundle":"^0.14.2","@types/bitcore-lib":"^0.15.3","eslint-plugin-jest":"26.1.1","eslint-config-prettier":"^8.4.0","eslint-plugin-typesafe":"^0.5.2","eslint-plugin-neverthrow":"^1.1.4","@typescript-eslint/parser":"^5.13.0","@typescript-eslint/eslint-plugin":"^5.13.0"},"_npmOperationalInternal":{"tmp":"tmp/2wayjs_1.0.4_1712825764645_0.8082222168159907","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@2waychain/2wayjs","version":"1.0.5","keywords":["AIBlock","2 Way Chain","SDK","API Module","TypeScript"],"author":{"name":"Byron Houwens","email":"byron.houwens@a-block.ch"},"license":"MIT","_id":"@2waychain/2wayjs@1.0.5","maintainers":[{"name":"rp122","email":"robin.plojoux@a-block.net"},{"name":"bhouwens","email":"zhion360@gmail.com"}],"homepage":"https://github.com/AIBlockOfficial/2Way.js#readme","bugs":{"url":"https://github.com/AIBlockOfficial/2Way.js/issues"},"dist":{"shasum":"2efa6154231ae6607cc3fb28a14904422d6cfb38","tarball":"https://registry.npmjs.org/@2waychain/2wayjs/-/2wayjs-1.0.5.tgz","fileCount":32,"integrity":"sha512-wwQb7gZf7ikapSjLXRhNY4ZGWy7twji4+RTAfYlrC4LVOE99+QlqQ08Ysoj3Rf6C2kYLKYBFwNkqKmvL7k2xyw==","signatures":[{"sig":"MEUCIQDXhIl+qfd1QKlkRVQvDQNSWLOjB2W4Qdx2Sv6Rt1lc1QIgB7bHxNIE1vsyt95LTW2Z76zybBxrDxXqX/hV7srnEu0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1165783},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/index.es.js","source":"src/index.ts","browser":"lib/index.js","gitHead":"fa985ec7858b752a7ab12f648368ef47aeb89320","scripts":{"lint":"npm run es:lint && npm run check:types && npm run format","test":"jest --no-cache --config jest.config.js","build":"rimraf lib && microbundle","format":"prettier --check \"src/**/*.(js|ts)\"","es:lint":"eslint src --ext .js,.ts","prepare":"npm run build","test-tx":"jest --no-cache --config jest.config.js ./tests/__tests__/tx.mgmt.test.ts","version":"npm run format && git add -A src","lint:fix":"npm run es:lint:fix && npm run format:fix","test-key":"jest --no-cache --config jest.config.js ./tests/__tests__/key.mgmt.test.ts","test-item":"jest --no-cache --config jest.config.js ./tests/__tests__/item.mgmt.test.ts","format:fix":"prettier --write \"src/**/*.(js|ts)\"","preversion":"npm run lint","test-utils":"jest --no-cache --config jest.config.js ./tests/__tests__/utils.test.ts","check:types":"tsc --noemit","es:lint:fix":"eslint src --fix --ext .js,.ts","postversion":"git push && git push --tags","test-service":"jest --no-cache --config jest.config.js ./tests/__tests__/wallet.service.test.ts","generate:docs":"typedoc src --tsconfig tsconfig.json --out docs","prepublishOnly":"npm test && npm run lint"},"_npmUser":{"name":"bhouwens","email":"zhion360@gmail.com"},"repository":{"url":"git+https://github.com/AIBlockOfficial/2Way.js.git","type":"git"},"_npmVersion":"10.1.0","description":"API wrapper to access the AIBlock 2 Way Chain","directories":{},"_nodeVersion":"20.9.0","dependencies":{"joi":"^17.12.3","uuid":"^8.3.2","axios":"1.6.2","js-sha3":"^0.8.0","tweetnacl":"^1.0.3","neverthrow":"^4.3.1","bitcore-lib":"^8.25.25","byte-base64":"^1.1.0","bitcore-mnemonic":"^8.25.25"},"_hasShrinkwrap":false,"devDependencies":{"jest":"27.5.1","tslib":"^2.3.1","assert":"^2.0.0","buffer":"^6.0.3","eslint":"7.5.0","rimraf":"^3.0.2","ts-jest":"27.1.3","typedoc":"^0.23.10","prettier":"2.5.1","typescript":"^4.5.0","@types/jest":"27.4.1","microbundle":"^0.14.2","@types/bitcore-lib":"^0.15.3","eslint-plugin-jest":"26.1.1","eslint-config-prettier":"^8.4.0","eslint-plugin-typesafe":"^0.5.2","eslint-plugin-neverthrow":"^1.1.4","@typescript-eslint/parser":"^5.13.0","@typescript-eslint/eslint-plugin":"^5.13.0"},"_npmOperationalInternal":{"tmp":"tmp/2wayjs_1.0.5_1712913564068_0.19493121586438922","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"@2waychain/2wayjs","version":"1.0.6","keywords":["AIBlock","2 Way Chain","SDK","API Module","TypeScript"],"author":{"name":"Byron Houwens","email":"byron.houwens@a-block.ch"},"license":"MIT","_id":"@2waychain/2wayjs@1.0.6","maintainers":[{"name":"bhouwens","email":"zhion360@gmail.com"},{"name":"rp122","email":"robin.plojoux@a-block.net"}],"homepage":"https://github.com/AIBlockOfficial/2Way.js#readme","bugs":{"url":"https://github.com/AIBlockOfficial/2Way.js/issues"},"dist":{"shasum":"c86c0271a656c78a7ba6fd8982945a7bc51965a8","tarball":"https://registry.npmjs.org/@2waychain/2wayjs/-/2wayjs-1.0.6.tgz","fileCount":32,"integrity":"sha512-TYKYL72+j8bg46KxYVA0iCzabwEEdJYKrfbIpyy3XH/ReZ9bx6HqiommyPn56GlHnEJLshkqjBpu9ue5Mi7dfw==","signatures":[{"sig":"MEQCIE0ZrAsferI21aqJxNjxaKzrJlOIsh//xNjDrtqGmpkoAiAHZiBw9k5Ujrl7/c1P0PX/V7NqAEeEZiADm32jMgl3qw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1774008},"main":"lib/index.js","types":"lib/index.d.ts","module":"lib/index.es.js","source":"src/index.ts","browser":"lib/index.js","gitHead":"57e8552851765c4917e6d4dbf643b9c9095616d1","scripts":{"lint":"npm run es:lint && npm run check:types && npm run format","test":"jest --no-cache --config jest.config.js --forceExit","build":"rimraf lib && microbundle","format":"prettier --check \"src/**/*.(js|ts)\"","es:lint":"eslint src --ext .js,.ts","prepare":"npm run build","test-tx":"jest --no-cache --config jest.config.js ./tests/__tests__/tx.mgmt.test.ts","version":"npm run format && git add -A src","lint:fix":"npm run es:lint:fix && npm run format:fix","test-key":"jest --no-cache --config jest.config.js ./tests/__tests__/key.mgmt.test.ts","test-item":"jest --no-cache --config jest.config.js ./tests/__tests__/item.mgmt.test.ts","format:fix":"prettier --write \"src/**/*.(js|ts)\"","preversion":"npm run lint","test-utils":"jest --no-cache --config jest.config.js ./tests/__tests__/utils.test.ts","check:types":"tsc --noemit","es:lint:fix":"eslint src --fix --ext .js,.ts","postversion":"git push && git push --tags","test-service":"jest --no-cache --config jest.config.js ./tests/__tests__/wallet.service.test.ts","test-valence":"jest --no-cache --config jest.config.js ./tests/__tests__/valence.test.ts","generate:docs":"typedoc src --tsconfig tsconfig.json --out docs"},"_npmUser":{"name":"bhouwens","email":"zhion360@gmail.com"},"repository":{"url":"git+https://github.com/AIBlockOfficial/2Way.js.git","type":"git"},"_npmVersion":"10.9.2","description":"API wrapper to access the AIBlock 2 Way Chain","directories":{},"_nodeVersion":"23.9.0","dependencies":{"joi":"^17.12.3","uuid":"^8.3.2","axios":"1.6.2","js-sha3":"^0.8.0","tweetnacl":"^1.0.3","neverthrow":"^4.3.1","bitcore-lib":"^8.25.25","byte-base64":"^1.1.0","bitcore-mnemonic":"^8.25.25"},"_hasShrinkwrap":false,"devDependencies":{"jest":"27.5.1","tslib":"^2.3.1","assert":"^2.0.0","buffer":"^6.0.3","eslint":"7.5.0","rimraf":"^3.0.2","ts-jest":"27.1.3","typedoc":"^0.23.10","prettier":"2.5.1","typescript":"^4.5.0","@types/jest":"27.4.1","microbundle":"^0.14.2","@types/bitcore-lib":"^0.15.3","eslint-plugin-jest":"26.1.1","eslint-config-prettier":"^8.4.0","eslint-plugin-typesafe":"^0.5.2","eslint-plugin-neverthrow":"^1.1.4","@typescript-eslint/parser":"^5.13.0","@typescript-eslint/eslint-plugin":"^5.13.0"},"_npmOperationalInternal":{"tmp":"tmp/2wayjs_1.0.6_1744635249138_0.20480906151152323","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@2waychain/2wayjs","version":"1.0.7","description":"API wrapper to access the AIBlock 2 Way Chain","main":"lib/index.js","types":"lib/index.d.ts","module":"lib/index.es.js","browser":"lib/index.js","source":"src/index.ts","scripts":{"build":"rimraf lib && microbundle","lint":"npm run es:lint && npm run check:types && npm run format","lint:fix":"npm run es:lint:fix && npm run format:fix","generate:docs":"typedoc src --tsconfig tsconfig.json --out docs","format:fix":"prettier --write \"src/**/*.(js|ts)\"","format":"prettier --check \"src/**/*.(js|ts)\"","check:types":"tsc --noemit","es:lint":"eslint src --ext .js,.ts","es:lint:fix":"eslint src --fix --ext .js,.ts","test":"jest --no-cache --config jest.config.js --forceExit","test-service":"jest --no-cache --config jest.config.js ./tests/__tests__/wallet.service.test.ts","test-item":"jest --no-cache --config jest.config.js ./tests/__tests__/item.mgmt.test.ts","test-key":"jest --no-cache --config jest.config.js ./tests/__tests__/key.mgmt.test.ts","test-tx":"jest --no-cache --config jest.config.js ./tests/__tests__/tx.mgmt.test.ts","test-utils":"jest --no-cache --config jest.config.js ./tests/__tests__/utils.test.ts","test-valence":"jest --no-cache --config jest.config.js ./tests/__tests__/valence.test.ts","prepare":"npm run build","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"keywords":["AIBlock","2 Way Chain","SDK","API Module","TypeScript"],"author":{"name":"Byron Houwens","email":"byron.houwens@a-block.ch"},"license":"MIT","devDependencies":{"@types/bitcore-lib":"^0.15.3","@types/jest":"27.4.1","@typescript-eslint/eslint-plugin":"^5.13.0","@typescript-eslint/parser":"^5.13.0","assert":"^2.0.0","buffer":"^6.0.3","eslint":"7.5.0","eslint-config-prettier":"^8.4.0","eslint-plugin-jest":"26.1.1","eslint-plugin-neverthrow":"^1.1.4","eslint-plugin-typesafe":"^0.5.2","jest":"27.5.1","microbundle":"^0.14.2","prettier":"2.5.1","rimraf":"^3.0.2","ts-jest":"27.1.3","tslib":"^2.3.1","typedoc":"^0.23.10","typescript":"^4.5.0"},"dependencies":{"axios":"1.6.2","bitcore-lib":"^8.25.25","bitcore-mnemonic":"^8.25.25","byte-base64":"^1.1.0","joi":"^17.12.3","js-sha3":"^0.8.0","neverthrow":"^4.3.1","tweetnacl":"^1.0.3","uuid":"^8.3.2"},"repository":{"type":"git","url":"git+https://github.com/AIBlockOfficial/2Way.js.git"},"bugs":{"url":"https://github.com/AIBlockOfficial/2Way.js/issues"},"homepage":"https://github.com/AIBlockOfficial/2Way.js#readme","_id":"@2waychain/2wayjs@1.0.7","gitHead":"3b043d33381e55a6ba032bcbe9f070cefcf65eb0","_nodeVersion":"23.9.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-1WIVEYgDbhizoovLyKoquRlNTLNkN8vY12HDTkBJyHxFwEdjEXxQhIgPxd60mgwAG9biMs2clAUYkz5kU/pLmw==","shasum":"aab88af54588c106d7494ca098ad5de7f13edd12","tarball":"https://registry.npmjs.org/@2waychain/2wayjs/-/2wayjs-1.0.7.tgz","fileCount":32,"unpackedSize":1783157,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD9A43WQALirycaBn5XELccQrpEiXaEXc3ngxy3baFPlwIhAItM3xzxtOaitAElxolaInj4Tt19gcqZ5PuSSUdt4rTC"}]},"_npmUser":{"name":"bhouwens","email":"zhion360@gmail.com"},"directories":{},"maintainers":[{"name":"bhouwens","email":"zhion360@gmail.com"},{"name":"rp122","email":"robin.plojoux@a-block.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/2wayjs_1.0.7_1745581753332_0.7252607121617003"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-20T09:04:17.924Z","modified":"2025-04-25T11:49:13.748Z","1.0.0":"2024-03-20T08:38:38.698Z","1.0.1":"2024-03-20T09:04:18.273Z","1.0.3":"2024-04-10T14:48:21.984Z","1.0.4":"2024-04-11T08:56:04.807Z","1.0.5":"2024-04-12T09:19:24.314Z","1.0.6":"2025-04-14T12:54:09.335Z","1.0.7":"2025-04-25T11:49:13.543Z"},"bugs":{"url":"https://github.com/AIBlockOfficial/2Way.js/issues"},"author":{"name":"Byron Houwens","email":"byron.houwens@a-block.ch"},"license":"MIT","homepage":"https://github.com/AIBlockOfficial/2Way.js#readme","keywords":["AIBlock","2 Way Chain","SDK","API Module","TypeScript"],"repository":{"type":"git","url":"git+https://github.com/AIBlockOfficial/2Way.js.git"},"description":"API wrapper to access the AIBlock 2 Way Chain","maintainers":[{"name":"bhouwens","email":"zhion360@gmail.com"},{"name":"rp122","email":"robin.plojoux@a-block.net"}],"readme":"<div id=\"top\"></div>\n\n<!-- PROJECT LOGO -->\n<br />\n\n<div align=\"center\">\n  <a>\n    <img src=\"https://github.com/AIBlockOfficial/2Way.js/blob/main/assets/hero.svg\" alt=\"Logo\" style=\"width: 150px\">\n  </a>\n\n  <h3 align=\"center\">2Way.js</h3>\n\n  <div>\n  <img src=\"https://img.shields.io/github/actions/workflow/status/AIBlockOfficial/2Way.js/.github/workflows/codeql.yml?branch=main\" alt=\"Pipeline Status\" style=\"display:inline-block\"/>\n  <img src=\"https://img.shields.io/npm/v/@2waychain/2wayjs\" alt=\"Pipeline Status\" style=\"display:inline-block\"/>\n  </div>\n\n  <p align=\"center\">\n    JavaScript/TypeScript API wrapper to help interact with the 2 Way Chain blockchain network.\n    <br />\n    <br />\n    <a href=\"https://aiblock.dev\"><strong>Official documentation »</strong></a>\n    <br />\n    <br />\n  </p>\n</div>\n\n<!-- TABLE OF CONTENTS -->\n<details>\n  <summary>Table of Contents</summary>\n  <ol>\n    <li>\n      <a href=\"#about-the-project\">About The Project</a>\n    </li>\n    <li>\n      <a href=\"#installation\">Installation</a>\n    </li>\n    <li>\n      <a href=\"#getting-started\">Getting Started</a>\n    </li>\n     <li>\n      <a href=\"#usage\">Usage</a>\n      <ul>\n        <li><a href=\"#generating-and-testing-seed-phrases\">Generating and Testing Seed Phrases</a></li>\n        <li><a href=\"#generating-key-pairs\">Generating Key-pairs</a></li>\n        <li><a href=\"#updating-the-balance\">Updating the Balance</a></li>\n        <li><a href=\"#creating-item-assets\">Creating Item Assets</a></li>\n        <li><a href=\"#spending-tokens\">Spending Tokens</a></li>\n        <li><a href=\"#spending-items\">Spending Items</a></li>\n        <li><a href=\"#making-2-way-payments\">Make 2-Way Payments</a></li>\n        <li><a href=\"#fetching-pending-2-way-payments\">Fetching Pending 2-Way Payments</a></li>\n        <li><a href=\"#responding-to-pending-2-way-payments\">Responding to Pending 2-Way Payments</a></li>\n      </ul>\n    </li>\n    <li>\n      <a href=\"#client-response-type\">Client Response Type</a>\n    </li>\n  </ol>\n</details>\n\n<!-- ABOUT THE PROJECT -->\n\n## About The Project\n\nThis module aims to ease the development of wallet applications that interact with the 2 Way Chain network.\n\nSpecific areas of focus include:\n\n-   Key-pair generation through the use of BIP39 mnemonic implementation.\n-   Encryption and decryption of key-pairs during operations safely.\n-   Transactions and other complex network interactions simplified.\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n<!-- GETTING STARTED -->\n\n## Installation\n\nInstall the module to your project:\n\n-   npm\n\n    ```sh\n    npm install @2waychain/2wayjs\n    ```\n\n-   yarn\n\n    ```sh\n    yarn add @2waychain/2wayjs\n    ```\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n## Getting Started\n\n-   `initNew`\n\n```typescript\nimport { Wallet } from '@2waychain/2wayjs';\n\nconst CONFIG = {\n  mempoolHost: 'example.mempool.host.com',\n  passphrase: 'a secure passphrase',\n/* Optional, subject to certain requests not being usable.\n  storageHost: example.storage.host.com;\n  intercomHost: example.intercom.host.com;\n*/\n};\n\n// Create the wallet object\nconst wallet = new Wallet();\n// Initialize the wallet with the needed configuration\n// NOTE: This is an async call\nwallet\n    .initNew(CONFIG)\n    .then((res) => {\n        // Display the seed phrase to the user for safe keeping\n        display(res.content.initNewResponse.seedphrase);\n        // Store the encrypted master key safely\n        saveMasterKey(res.content.initNewResponse.masterKey);\n    });\n```\n\nWhen the wallet is initialized without a pre-generated seed phrase or existing master key, the `initNew` function is used to initialize the wallet. This type of initialization will in return provide a generated seed phrase as well as its corresponding master key in an encrypted format. It is then up to the developer to store this master key somewhere safe, and to display the seed phrase at least once to the user for safe-keeping. This seed phrase can be used to re-construct lost key-pairs if the need should arise.\n\nSome arguments during the initialization are optional, such as the `initOffline`- which is used to initialize the wallet in an offline state.\n\nThe `mempoolHost` and `intercomHost` interface elements are used to determine the API endpoints for the Mempool node, and Intercom server the wallet is supposed to connect to, respectively.\n\nA user-defined `passPhrase` needs to be supplied to the wallet during initialization, as this passphrase will be used to encrypt/decrypt data during operations.\n\n-   `fromMasterKey`\n\n```typescript\n// Initialize the wallet with the needed configuration\nwallet.fromMasterKey(masterKey, CONFIG);\n```\n\nWhen an existing master key exists, this type of initialization **should** be used. This typically occurs when the wallet has been initialized previously using `initNew` and the encrypted master key has been stored safely. Using an existing master key will ensure that BIP39 key-pair derivation is consistent. This type of initialization does not have a return value.\n\n-   `fromSeed`\n\n```typescript\nconst sp = 'existing seed phrase';\n// Initialize the wallet with the needed configuration\nwallet.fromSeed(sp, CONFIG).then((res) => {\n  // Store the encrypted master key safely\n  saveMasterKey(initResult.content.fromSeedResponse);\n});\n```\n\nInitialization of the wallet through the use of an existing seed phrase may happen for one of two reasons:\n\n<ol>\n<li>\nThe user has lost their key-pairs and re-generation is needed by providing the seed phrase.\n</li>\n<li>\nA valid seed phrase has been pre-generated due to specific UX design constraints and needs to be used to initialize the wallet.\n</li>\n</ol>\n\nThis type of initialization will return the corresponding master key (in an encrypted format) which was created using the provided seed phrase. This master key needs to be stored safely in the same manner as initialization using `initNew`.\n\n<details>\n<summary>Offline Initialization</summary>\n<br/>\n\n```typescript\nimport { Wallet } from '@2waychain/2wayjs';\n\n// Create the wallet object\nconst wallet = new Wallet();\n\n// Initialize the wallet with the needed configuration\nconst initResult = wallet.initNew({passphrase: 'a secure passphrase'}, true).then((initResult) => {\n    const [seedPhrase, masterKeyEncrypted] = initResult.content.initNewResponse;\n\n    // Display the seed phrase to the user for safe keeping\n    display(seedPhrase);\n\n    // Store the encrypted master key safely\n    saveMasterKey(masterKeyEncrypted);\n});\n\n// Configuration\nconst config = {\n  mempoolHost: 'example.mempool.host.com',\n  storageHost: 'example.storage.host.com';\n  intercomHost: 'example.intercom.host.com';\n};\n\n// Initialize network configuration when required\nconst initNetworkResult = wallet.initNetwork(config);\n```\n\nIn some cases, it might be desirable to initialize the wallet without a network connection. This will allow the wallet to be used offline, but will inadvertently prevent the wallet from being able to perform any operations that require interaction with the 2 Way Chain network. The following functions are available with an offline configuration:\n\n-   `regenAddresses` - Re-generate lost key-pairs from a list of given addresses.\n-   `getNewKeypair` - Generate a new key-pair.\n-   `getSeedPhrase` - Get the existing seed phrase from memory (requires initialization from seed phrase).\n-   `getMasterKey` - Get the existing master key from memory.\n\n</details>\n\n<details>\n<summary>User-defined Methods</summary>\n<br/>\n\n```typescript\n  function saveMasterKey(masterKeyEncrypter: IMasterKeyEncrypted): void {\n    // Write your I/O operations here to safely store the encrypted master key\n    ...\n  }\n\n  function getMasterKey(): IMasterKeyEncrypted {\n    // Write your I/O operations here to safely retrieve\n    // the encrypted master key\n    ...\n  }\n\n  function saveKeypair(keyPair: IKeyPairEncrypted): void {\n    // Write your I/O operations here to safely store the key pair\n    ...\n  }\n\n  function getKeypairs(): IKeyPairEncrypted[] {\n    // Write your I/O operations here to safely retrieve\n    // the encrypted key pairs\n    ...\n  }\n\n  function getAllEncryptedTxs(): ICreateTransactionEncrypted[] {\n    // Write your I/O operations here to get all encrypted\n    // transactions\n    ...\n  }\n\n  function saveEncryptedTx(druid: string, encryptedTx: ICreateTransactionEncrypted): void {\n    // Write your I/O operations here to save the encrypted transaction\n    // with its corresponding DRUID value in a key-value format\n    ...\n  }\n\n```\n\nMany methods will either **require** or **return** different types of data depending on the operation. It is entirely up to the developer to store and retrieve data safely.\n\n</details>\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n## Usage\n\nAfter the wallet has been correctly initialized, the methods provided by the wallet will allow the developer to interact with the 2 Way Chain blockchain network.\n\n### Generating and Testing Seed Phrases\n\n-   `generateSeedPhrase`\n\n    ```typescript\n    import { generateSeedPhrase } from '@2waychain/2wayjs';\n\n    const seedPhrase = generateSeedPhrase();\n    ```\n\n-   `testSeedPhrase`\n\n    ```typescript\n    import { testSeedPhrase } from '@2waychain/2wayjs';\n\n    const seedPhrase = 'a seed phrase provided by the user that looks like a bunch of random words';\n\n    const testResult = testSeedPhrase(seedPhrase);\n    ```\n\nAs seen previously, depending on the scenario, the wallet can be initialized in a number of different ways. If the wallet is initialized using `initNew`, a new seed phrase will be generated automatically. However, in some cases the wallet needs to be initialized using a pre-generated or provided seed phrase.\n\nThe `generateSeedPhrase` method is provided by the module to generate valid new seed phrases on the fly. This is especially useful in cases where UX design constraints require a valid seed phrase to be generated and displayed to the user before the wallet is initialized.\n\nSince a seed phrase can be used to reconstruct lost/missing key-pairs, it is customary for the user to be able to provide their own seed phrase should the need arise. To test if the seed phrase is capable of constructing a valid master key, the `testSeedPhrase` method should be used.\n\n### Generating Key-pairs\n\n-   `getNewKeypair`\n\n    ```typescript\n    import { Wallet } from '@2waychain/2wayjs';\n\n    const wallet = new Wallet();\n\n    // Initialize the wallet correctly\n    ...\n\n    // The array argument can contain existing keypairs to be used\n    const newKeypairResult = wallet.getNewKeypair([]);\n\n    const newKeypair: IKeypairEncrypted = newKeypairResult.content.newKeypairResponse;\n\n    // Save the key-pair safely\n    saveKeypair(newKeypair);\n\n    // Get the associated address\n    const address = newKeypair.address;\n    ```\n\n### Updating the Balance\n\n-   `fetchBalance`\n\n    ```typescript\n    import { Wallet } from '@2waychain/2wayjs';\n\n    const wallet = new Wallet();\n\n    // Initialize the wallet correctly\n    ...\n\n    const allKeypairs = getKeyPairs();\n\n    // We only need the 'address' field of the key-pairs\n    const addressList = allKeypairs.map(keypair => keypair.address);\n\n    const balanceResult = await wallet.fetchBalance(addressList);\n\n    const balance: IFetchBalanceResponse = balanceResult.content.fetchBalanceResponse;\n    ```\n\n    <details>\n    <summary>Response Content</summary>\n    <br/>\n\n    ```json\n    {\n        \"total\": {\n            \"tokens\": 0,\n            \"items\": {\n                \"default_genesis_hash\": 1000,\n                \"g7d07...6704b\": 1000\n            }\n        },\n        \"address_list\": {\n            \"a0b08...c02e5\": [\n                {\n                    \"out_point\": {\n                        \"t_hash\": \"g3b13...3353f\",\n                        \"n\": 0\n                    },\n                    \"value\": {\n                        \"Item\": {\n                            \"amount\": 1000,\n                            \"genesis_hash\": \"default_genesis_hash\"\n                        }\n                    }\n                },\n                {\n                    \"out_point\": {\n                        \"t_hash\": \"g7d07...6704b\",\n                        \"n\": 0\n                    },\n                    \"value\": {\n                        \"Item\": {\n                            \"amount\": 1000,\n                            \"genesis_hash\": \"g7d07...6704b\"\n                        }\n                    }\n                },\n                {\n                    \"out_point\": {\n                        \"t_hash\": \"ga070...4df62\",\n                        \"n\": 0\n                    },\n                    \"value\": {\n                        \"Token\": 60000\n                    }\n                }\n            ]\n        }\n    }\n    ```\n\n    -   `total`: The total balance of all addresses provided\n    -   `address_list`: A list of addresses and their previous out-points along with their associated assets\n\n    </details>\n\n### Creating Item Assets\n\nItems are the NFTs of the 2 Way blockchain, but unlike NFTs don't require you to write any Smart Contracts\nor complex logic to create.\n\n-   `createItems`\n\n| **Argument**     | **Type**            | **Default** | **Required** | **Description**                                                                                                                                                                            |\n| ---------------- | ------------------- | ----------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| address          | `IKeypairEncrypted` |             | yes          | The keypair to generate the address that the Item assets will be sent to once generated                                                                                                 |\n| defaultGenesisHash | `boolean`           | true        | no           | Setting this to `true` will create generic Items, while setting it to `false` will generate a genesis transaction hash unique to these Items. Use `false` if you want to create NFTs |\n| amount           | `number`            | 1000        | no           | The number of Item assets to mint                                                                                                                                                       |\n| metadata         | `string`            | null        | no           | Optional metadata that you can attach to the asset                                                                                                                                         |\n\n```typescript\nimport { Wallet } from '@2waychain/2wayjs';\n\nconst wallet = new Wallet();\n\n// Initialize the wallet correctly\n...\n\n// Address / key-pair to assign the `Item` assets to\nconst keyPair = getKeypairs()[0];\n\n// Create `Item` assets that have the default genesis tx hash identifier\nconst createItemResponse = await wallet.createItems(keyPair).content.createItemResponse;\n\n<!-- --------------------------------- OR ---------------------------------- -->\n\n// Create `Item` assets that have a unique genesis tx hash identifier\nconst createItemResponse = await wallet.createItems(keyPair, false).content.createItemResponse;\n\n<!-- --------------------------------- ALL ARGUMENTS VERSION ---------------------------------- -->\n\nconst createItemResponse = await wallet.createItems(\n  keyPair,\n  false,\n  10000,\n  \"{ 'imageURL': '...', 'description': '...' }\"\n).content\n.createItemResponse;\n\n```\n\n`Item` assets can either be assigned to the default genesis tx hash or a unique genesis tx hash. When assets have different genesis tx hash identifiers they are **not** mutually interchangeable with each other.\n\n  <details>\n  <summary>Response Content</summary>\n  <br/>\n\n```json\n{\n    \"asset\": {\n        \"asset\": {\n            \"Item\": {\n                \"amount\": 1000,\n                \"genesis_hash\": \"g7d07...6704b\"\n            }\n        },\n        \"metadata\": null\n    },\n    \"to_address\": \"a0b08...c02e5\",\n    \"tx_hash\": \"g7d07...6704b\"\n}\n```\n\n-   `genesis_hash`: The genesis hash identifier associated with the created `Item` assets.\n\n</details>\n\n### Spending Tokens\n\n-   `makeTokenPayment`\n\n| **Argument**   | **Type**               | **Default** | **Required** | **Description**                                                                                                                 |\n| -------------- | ---------------------- | ----------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------- |\n| paymentAddress | `string`               |             | yes          | Address to make the token payment to                                                                                            |\n| paymentAmount  | `number`               |             | yes          | Amount of tokens to pay                                                                                                         |\n| allKeypairs    | `IKeypairEncrypted []` |             | yes          | Keypairs to use to make the payment. Must have token balance associated with these keypairs in order to process the transaction |\n| excessKeypair  | `IKeypairEncrypted`    |             | yes          | Excess keypair to send any remaining balance to                                                                                 |\n\n```typescript\nimport { Wallet } from '@2waychain/2wayjs';\n\nconst wallet = new Wallet();\n\n// Initialize the wallet correctly\n...\n\n// All key-pairs\nconst allKeypairs = getKeyPairs();\n\n// Change/excess key-pair\nconst changeKeyPair = allKeypairs[0];\n\nawait makeTokenPayment(\n      \"d0e72...85b46\", // Payment address\n      10,              // Payment amount\n      allKeypairs,     // All key-pairs\n      changeKeyPair,   // Excess/change address\n  );\n\n```\n\n**_NB_**: _The `makeTokenPayment` method will not check validity of the payment address. It is therefore crucial to ensure a valid payment address is used before the payment gets made._\n\n### Spending Items\n\n-   `makeItemPayment`\n\n| **Argument**   | **Type**               | **Default** | **Required** | **Description**                                                                                                                 |\n| -------------- | ---------------------- | ----------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------- |\n| paymentAddress | `string`               |             | yes          | Address to make the token payment to                                                                                            |\n| paymentAmount  | `number`               |             | yes          | Amount of tokens to pay                                                                                                         |\n| genesisHash      | `string`               |             | yes          | The genesis transaction hash of the Item asset to spend. This is the unique identifier of the Item asset                  |\n| allKeypairs    | `IKeypairEncrypted []` |             | yes          | Keypairs to use to make the payment. Must have token balance associated with these keypairs in order to process the transaction |\n| excessKeypair  | `IKeypairEncrypted`    |             | yes          | Excess keypair to send any remaining balance to                                                                                 |\n\n```typescript\nimport { Wallet } from '@2waychain/2wayjs';\n\nconst wallet = new Wallet();\n\n// Initialize the wallet correctly\n...\n\n// All key-pairs\nconst keyPairs = getKeypairs();\n\n// Change/excess key-pair\nconst changeKeyPair = keyPairs[0];\n\n// Genesis transaction identifier (the default genesis tx hash identifier or a unique genesis tx hash identifier)\nconst genesisHash = \"default_genesis_hash\";\n\nawait makeItemPayment(\n        \"d0e72...85b46\", // Payment address\n        10,              // Payment amount\n        genesisHash,     // Genesis tx hash identifier\n        allKeypairs,     // All key-pairs\n        changeKeyPair,   // Excess/change address\n    );\n\n```\n\n**_NB_**: _The `makeItemPayment` method is similar to the `makeTokenPayment` in many regards, one of which being the fact that this method will send `Item` assets to a payment address in a unidirectional fashion and does not expect any assets in return. It should not be confused with **2-way** payments!_\n\n### Making 2-Way Payments\n\n-   `make2WayPayment`\n\n| **Argument**   | **Type**                       | **Default** | **Required** | **Description**                              |\n| -------------- | ------------------------------ | ----------- | ------------ | -------------------------------------------- |\n| paymentAddress | `string`                       |             | yes          | Address to make the token payment to         |\n| sendingAsset   | `IAssetItem \\| IAssetToken` |             | yes          | The asset to pay                             |\n| receivingAsset | `IAssetItem \\| IAssetToken` |             | yes          | The asset to receive                         |\n| allKeypairs    | `IKeypairEncrypted[]`          |             | yes          | A list of all existing key-pairs (encrypted) |\n| receiveAddress | `IKeypairEncrypted`            |             | yes          | A keypair to assign the \"receiving\" asset to |\n| entryValueId | `String`            |             | yes          | A value id for a specific 2-way transaction entry |\n\n```typescript\nimport { Wallet } from '@2waychain/2wayjs';\n\nconst wallet = new Wallet();\n\n// Initialize the wallet correctly\n...\n\n// All key-pairs\nconst allKeypairs = getKeyPairs();\n\n// Receive address (which is also the excess/change address)\nconst receivingAddress = allKeypairs[0];\n\n// The asset we want to send\nconst sendingAsset = initIAssetToken({\"Token\": 10});\n\n// The asset we want to receive\nconst receivingAsset = initIAssetItem({\n  \"Item\": {\n      \"amount\": 10,\n      \"genesis_hash\": \"default_genesis_hash\"\n  }});\n\nconst paymentResult = await make2WayPayment(\n      \"18f70...caeda\",  // Payment address\n      sendingAsset,     // Payment asset\n      receivingAsset,   // Receiving asset\n      allKeypairs,      // All key-pairs\n      receivingAddress, // Receive address\n      valueId\n  );\n\n  const { druid, encryptedTx } = paymentResult.content.make2WayPaymentResponse;\n\n  // Save the encrypted transaction along\n  // with it's corresponding DRUID value\n  saveEncryptedTx(druid, encryptedTx);\n\n```\n\n**_NB_**: _This type of transaction is a 2 way transaction, and requires all parties to reach common consent before their respective transactions are sent to the mempool node for processing._\n\n### Fetching Pending 2-Way Payments\n\n-   `fetchPending2WayPayments`\n\n    ```typescript\n    import { Wallet } from '@2waychain/2wayjs';\n\n    const wallet = new Wallet();\n\n    // Initialize the wallet correctly\n    ...\n\n    // ALl key-pairs\n    const allKeypairs = getKeyPairs();\n\n    // All encrypted transactions\n    const allEncryptedTxs = getAllEncryptedTxs();\n\n    // Fetch pending item-based payments\n    const pending2WayPaymentsResult = await wallet.fetchPending2WayPayments(\n          allKeypairs,\n          allEncryptedTxs,\n      )\n\n    const pending2WayPayments: IResponseIntercom<IPendingIbTxDetails> = pending2WayPaymentsResult.content.fetchPendingRbResponse;\n\n    ```\n\n    <details>\n    <summary>Response Content</summary>\n    <br/>\n\n    ```json\n    {\n        \"2a646...f8b98\": {\n            \"timestamp\": 1655117144145,\n            \"value\": {\n                \"druid\": \"DRUID0xd0f407436f7f1fc494d7aee22939090e\",\n                \"senderExpectation\": {\n                    \"from\": \"\",\n                    \"to\": \"2a646...f8b98\",\n                    \"asset\": {\n                        \"Item\": {\n                            \"amount\": 1,\n                            \"genesis_hash\": \"default_genesis_hash\"\n                        }\n                    }\n                },\n                \"receiverExpectation\": {\n                    \"from\": \"295b2...8d4fa\",\n                    \"to\": \"18f70...caeda\",\n                    \"asset\": {\n                        \"Token\": 25200\n                    }\n                },\n                \"status\": \"pending\",\n                \"mempoolHost\": \"http://127.0.0.1:3003\"\n            }\n        }\n    }\n    ```\n\n    From this data structure we're able to obtain specific details about the item-based payment, such as the unique identifier `DRUID0xd0f407436f7f1fc494d7aee22939090e`, the status of the transaction `status`, the timestamp of the transaction `timestamp`, as well as the address that made the item-based payment request- `2a646...f8b98`.\n\n    We are also able to see that in this specific request, the sender expects 1 `Item` asset in exchange for 25200 `Token` assets.\n    </details>\n\n### Responding to Pending 2-Way Payments\n\n-   `accept2WayPayment` and `reject2WayPayment`\n\n    ```typescript\n    import { Wallet } from '@2waychain/2wayjs';\n\n    const wallet = new Wallet();\n\n    // Initialize the wallet correctly\n    ...\n\n    // Fetch the pending item-based payments from the network\n    ...\n    const pending2WayPayments: IFetchPendingRbResponse = pending2WayPaymentsResult.content.fetchPendingRbResponse;\n\n    // Fetch all existing key-pairs\n    ...\n    const allKeypairs = getKeyPairs();\n\n    // Accept a item-based payment using its unique `DRUID` identifier\n    await wallet.accept2WayPayment('DRUID0xd0f407436f7f1fc494d7aee22939090e', pending2WayPayments, allKeypairs, valueId);\n\n    <!-- --------------------------------- OR ---------------------------------- -->\n\n    // Reject a item-based payment using its unique `DRUID` identifier\n    await wallet.reject2WayPayment('DRUID0xd0f407436f7f1fc494d7aee22939090e', pending2WayPayments, allKeypairs, valueId);\n    ```\n\n    2-Way transactions are accepted **or** rejected by passing their unique DRUID identifier as an argument to the corresponding methods.\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n\n## Client Response Type\n\nAll methods provided by the wallet have a return value corresponding to the following interface:\n\n```typescript\nexport type IClientResponse = {\n    id?: string;\n    status: 'success' | 'error' | 'pending' | 'unknown';\n    reason?: string;\n    content?: IContentType;\n};\n```\n\n, where each field represents the following:\n\n-   `status`: A general indication of success or failure for the method being used\n\n-   `id`: A unique identifier used for network interactions\n\n-   `reason`: Detailed feedback corresponding to the `status` field\n\n-   `content`: Data structures or values returned from the wallet object\n\n<p align=\"right\">(<a href=\"#top\">back to top</a>)</p>\n","readmeFilename":"README.md"}