diff --git a/packages/daf-react-native-libsodium/LICENSE b/packages/daf-react-native-libsodium/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/packages/daf-react-native-libsodium/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/daf-react-native-libsodium/README.md b/packages/daf-react-native-libsodium/README.md new file mode 100644 index 000000000..2a00a16eb --- /dev/null +++ b/packages/daf-react-native-libsodium/README.md @@ -0,0 +1 @@ +# DAF react native sodium modules diff --git a/packages/daf-react-native-libsodium/api-extractor.json b/packages/daf-react-native-libsodium/api-extractor.json new file mode 100644 index 000000000..433f2b77c --- /dev/null +++ b/packages/daf-react-native-libsodium/api-extractor.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "extends": "../../api-extractor-base.json", + "mainEntryPointFilePath": "/build/index.d.ts" +} diff --git a/packages/daf-react-native-libsodium/package.json b/packages/daf-react-native-libsodium/package.json new file mode 100644 index 000000000..b14c1bba3 --- /dev/null +++ b/packages/daf-react-native-libsodium/package.json @@ -0,0 +1,39 @@ +{ + "name": "daf-react-native-libsodium", + "description": "DAF KMS plugin using react-native-sodium.", + "version": "7.0.0-beta.20", + "main": "build/index.js", + "types": "build/index.d.ts", + "scripts": { + "build": "tsc" + }, + "dependencies": { + "base-58": "^0.0.1", + "daf-core": "^7.0.0-beta.20", + "daf-key-manager": "^7.0.0-beta.20", + "debug": "^4.1.1", + "did-jwt": "4.5.0", + "elliptic": "^6.5.2", + "ethjs-signer": "^0.1.1" + }, + "peerDependencies": { + "react-native-sodium": "*" + }, + "devDependencies": { + "@types/debug": "^4.1.5", + "@types/ethjs-signer": "^0.1.0", + "react-native-sodium": "0.3.6", + "typescript": "^3.8.3" + }, + "files": [ + "build/**/*", + "src/**/*", + "README.md", + "LICENSE" + ], + "repository": "git@github.com:uport-project/daf.git", + "author": "Simonas Karuzas ", + "license": "Apache-2.0", + "keywords": [], + "gitHead": "63dd12da63b2245d32379b435a7a774a56a1f019" +} diff --git a/packages/daf-react-native-libsodium/src/didcomm.ts b/packages/daf-react-native-libsodium/src/didcomm.ts new file mode 100644 index 000000000..65732a435 --- /dev/null +++ b/packages/daf-react-native-libsodium/src/didcomm.ts @@ -0,0 +1,331 @@ +const Base58 = require('base-58') +import sodium from 'react-native-sodium' + +interface IUnpackedMsg { + message: string + recipientKey: any + senderKey: string + nonRepudiableVerification: boolean +} + +interface JWSUnpacked { + content: string + verkey: string + verified: boolean +} + +export class DIDComm { + public readonly ready: Promise + private sodium: any + + /** + * Creates a new PackUnpack object. The returned object contains a .Ready property: + * a promise that must be resolved before the object can be used. You can + * simply `await` the resolution of the .Ready property. + * + * Example: + * let packUnpack = new PackUnpack + * (async () => { + * await packUnpack.Ready + * }()) + */ + constructor() { + this.ready = new Promise(async (res, rej) => { + try { + await sodium.ready + this.sodium = sodium + res() + } catch (err) { + rej(err) + } + }) + } + + /** + * Uses libsodium to generate a key pair, you may pass these keys into the pack/unpack functions + * @ + */ + public async generateKeyPair(): Promise { + return this.sodium.crypto_sign_keypair() + } + + /** + * Used to encrypt or encrypt and sign a message for one or many recipients so the recipients can authenticate the + * sender in both repudiable and non repudiable formats. By default messages should use repudiable authentication. + * This should be the most common API used. + * @param msg the message to be encrypted or encrypted and signed + * @param recipientKeys the keys which the message will be encrypted for + * @param senderKeys the keys used to encrypted or encrypt and sign a message + * @param nonRepudiable determines whether a message is encrypted only or signed and encrypted + * @returns if nonRepudiable == true returns the msg encrypted and signed as follows JWE(JWS(msg)) + * if nonRepudiable == false returns the msg encrypted as follows JWE(msg) + */ + public async pack_auth_msg_for_recipients( + msg: string, + recipientKeys: Uint8Array[], + senderKeys: sodium.KeyPair, + nonRepudiable: Boolean = false, + ): Promise { + if (nonRepudiable) { + //return JWE(JWS(msg)) + let signedMsg = await this.signContent(msg, senderKeys) + return this.packMessage(signedMsg, recipientKeys, senderKeys) + } else { + // return (JWE(msg)) + return this.packMessage(msg, recipientKeys, senderKeys) + } + } + + /** + * + * @param msg this is the message which will be anonymously encrypted for one or many recipients + * @param recipientKeys a list of the recipients keys + * @returns a JWE with an ephemeral sender key + */ + public async pack_anon_msg_for_recipients(msg: string, recipientKeys: Uint8Array[]): Promise { + return this.packMessage(msg, recipientKeys, null) + } + + /** + * + * @param msg the message to signed with non-repudiation but not encrypted + * @param senderKeys the key used to sign the + * @returns a compact JWS + */ + public async pack_nonrepudiable_msg_for_anyone(msg: string, senderKeys: sodium.KeyPair): Promise { + return this.signContent(msg, senderKeys) + } + + /** + * Unpacks a message + * @param encMsg message to be decrypted + * @param toKeys key pair of party decrypting the message + */ + public async unpackMessage(packedMsg: string, toKeys: sodium.KeyPair): Promise { + try { + return await this.unpackEncrypted(packedMsg, toKeys) + } catch (err) { + let jwsChecked = this.verifyContent(packedMsg) + return { + message: jwsChecked.content, + recipientKey: null, + senderKey: jwsChecked.verkey, + nonRepudiableVerification: jwsChecked.verified, + } + } + } + + /** + * + * Packs a message. + * @param message string message to be encrypted + * @param toKeys public key of the entity encrypting message for + * @param fromKeys keypair of person encrypting message + */ + private async packMessage( + msg: string, + recipientKeys: Uint8Array[], + fromKeys: sodium.KeyPair | null = null, + ): Promise { + let [recipsJson, cek] = this.prepareRecipientKeys(recipientKeys, fromKeys) + let recipsB64 = this.b64url(recipsJson) + + let [ciphertext, tag, iv] = this.encryptPlaintext(msg, recipsB64, cek) + + return JSON.stringify({ + ciphertext: this.b64url(ciphertext), + iv: this.b64url(iv), + protected: recipsB64, + tag: this.b64url(tag), + }) + } + + private async unpackEncrypted(encMsg: string, toKeys: sodium.KeyPair): Promise { + let wrapper + if (typeof encMsg === 'string') { + wrapper = JSON.parse(encMsg) + } else { + wrapper = encMsg + } + if (typeof toKeys.publicKey === 'string') { + toKeys.publicKey = Base58.decode(toKeys.publicKey) + } + if (typeof toKeys.privateKey === 'string') { + toKeys.privateKey = Base58.decode(toKeys.privateKey) + } + let recipsJson = this.strB64dec(wrapper.protected) + let recipsOuter = JSON.parse(recipsJson) + + let alg = recipsOuter.alg + let isAuthcrypt = alg === 'Authcrypt' + if (!isAuthcrypt && alg !== 'Anoncrypt') { + throw new Error('Unsupported pack algorithm: ' + alg) + } + let [cek, senderVk, recipVk] = this.locateRecKey(recipsOuter.recipients, toKeys) + if (!senderVk && isAuthcrypt) { + throw new Error('Sender public key not provided in Authcrypt message') + } + let ciphertext = this.b64dec(wrapper.ciphertext) + let nonce = this.b64dec(wrapper.iv) + let tag = this.b64dec(wrapper.tag) + + let message = this.decryptPlaintext(ciphertext, tag, wrapper.protected, nonce, cek) + try { + let jwsVerified = this.verifyContent(message) + return { + message: jwsVerified.content, + recipientKey: recipVk, + senderKey: senderVk, + nonRepudiableVerification: senderVk === jwsVerified.verkey ? true : false, + } + } catch (err) { + return { + message, + recipientKey: recipVk, + senderKey: senderVk, + nonRepudiableVerification: false, + } + } + } + + private async signContent(msg: string, signerKeyPair: sodium.KeyPair): Promise { + // get public key base58 encoded + let senderVk = Base58.encode(signerKeyPair.publicKey) + + // generate jose header, b64url encode it, and concat to b64url encoded payload + let joseHeader = { + alg: 'EdDSA', + kid: senderVk, + } + let joseString = JSON.stringify(joseHeader) + let b64JoseStr = this.b64url(joseString) + let b64Payload = this.b64url(msg) + let headerAndPayloadConcat = `${b64JoseStr}.${b64Payload}` + + //sign data and return compact JWS + let signature = this.b64url(sodium.crypto_sign(headerAndPayloadConcat, signerKeyPair.privateKey)) + return `${headerAndPayloadConcat}.${signature}` + } + + private verifyContent(jws: string): JWSUnpacked { + let jwsSplit = jws.split('.') + let joseHeader = JSON.parse(this.strB64dec(jwsSplit[0])) + if (joseHeader.alg != 'EdDSA') { + throw 'Cryptographic algorithm unidentifiable' + } + let sigMsg = sodium.crypto_sign_open(this.b64dec(jwsSplit[2]), Base58.decode(joseHeader.kid)) + + return { + content: this.strB64dec(jwsSplit[1]), + verkey: joseHeader.kid, + verified: sodium.to_string(sigMsg) === `${jwsSplit[0]}.${jwsSplit[1]}` ? true : false, + } + } + + b64url(input: any) { + return this.sodium.to_base64(input, this.sodium.base64_variants.URLSAFE) + } + + b64dec(input: any) { + return this.sodium.from_base64(input, this.sodium.base64_variants.URLSAFE) + } + + private strB64dec(input: any) { + return this.sodium.to_string(this.sodium.from_base64(input, this.sodium.base64_variants.URLSAFE)) + } + + private encryptPlaintext(message: any, addData: any, key: any) { + let iv = this.sodium.randombytes_buf(this.sodium.crypto_aead_chacha20poly1305_ietf_NPUBBYTES) + let out = this.sodium.crypto_aead_chacha20poly1305_ietf_encrypt_detached(message, addData, null, iv, key) + return [out.ciphertext, out.mac, iv] + } + + private decryptPlaintext(ciphertext: any, mac: any, recipsBin: any, nonce: any, key: any) { + return this.sodium.to_string( + this.sodium.crypto_aead_chacha20poly1305_ietf_decrypt_detached( + null, // nsec + ciphertext, + mac, + recipsBin, // ad + nonce, // npub + key, + ), + ) + } + + private prepareRecipientKeys(toKeys: any, fromKeys: any = null) { + let cek = this.sodium.crypto_aead_chacha20poly1305_ietf_keygen() + let recips: any[] = [] + + toKeys.forEach((targetVk: any) => { + let encCek = null + let encSender = null + let nonce = null + + let targetPk = this.sodium.crypto_sign_ed25519_pk_to_curve25519(targetVk) + + if (fromKeys) { + let senderVk = Base58.encode(fromKeys.publicKey) + let senderSk = this.sodium.crypto_sign_ed25519_sk_to_curve25519(fromKeys.privateKey) + encSender = this.sodium.crypto_box_seal(senderVk, targetPk) + + nonce = this.sodium.randombytes_buf(this.sodium.crypto_box_NONCEBYTES) + encCek = this.sodium.crypto_box_easy(cek, nonce, targetPk, senderSk) + } else { + encCek = this.sodium.crypto_box_seal(cek, targetPk) + } + + recips.push({ + encrypted_key: this.b64url(encCek), + header: { + iv: nonce ? this.b64url(nonce) : null, + kid: Base58.encode(targetVk), + sender: encSender ? this.b64url(encSender) : null, + }, + }) + }) + + let data = { + alg: fromKeys ? 'Authcrypt' : 'Anoncrypt', + enc: 'chacha20poly1305_ietf', + recipients: recips, + typ: 'JWM/1.0', + } + return [JSON.stringify(data), cek] + } + + private locateRecKey(recipients: any, keys: any) { + let notFound = [] + /* tslint:disable */ + for (let index in recipients) { + let recip = recipients[index] + if (!('header' in recip) || !('encrypted_key' in recip)) { + throw new Error('Invalid recipient header') + } + + let recipVk = Base58.decode(recip.header.kid) + if (!this.sodium.memcmp(recipVk, keys.publicKey)) { + notFound.push(recip.header.kid) + } + let pk = this.sodium.crypto_sign_ed25519_pk_to_curve25519(keys.publicKey) + let sk = this.sodium.crypto_sign_ed25519_sk_to_curve25519(keys.privateKey) + + let encrytpedKey = this.b64dec(recip.encrypted_key) + let nonce = recip.header.iv ? this.b64dec(recip.header.iv) : null + let encSender = recip.header.sender ? this.b64dec(recip.header.sender) : null + + let senderVk = null + let cek = null + if (nonce && encSender) { + senderVk = this.sodium.to_string(this.sodium.crypto_box_seal_open(encSender, pk, sk)) + let senderPk = this.sodium.crypto_sign_ed25519_pk_to_curve25519(Base58.decode(senderVk)) + cek = this.sodium.crypto_box_open_easy(encrytpedKey, nonce, senderPk, sk) + } else { + cek = this.sodium.crypto_box_seal_open(encrytpedKey, pk, sk) + } + return [cek, senderVk, recip.header.kid] + } + + throw new Error('No corresponding recipient key found in recipients') + } +} diff --git a/packages/daf-react-native-libsodium/src/index.ts b/packages/daf-react-native-libsodium/src/index.ts new file mode 100644 index 000000000..780849004 --- /dev/null +++ b/packages/daf-react-native-libsodium/src/index.ts @@ -0,0 +1,7 @@ +/** + * Provides {@link https://github.com/jedisct1/libsodium.js | libsodium} backed {@link daf-libsodium#KeyManagementSystem | key management system } and {@link daf-libsodium#SecretBox | secret box } for the {@link daf-key-manager#KeyManager} + * + * @packageDocumentation + */ +export { KeyManagementSystem } from './key-management-system' +export { SecretBox } from './secret-box' diff --git a/packages/daf-react-native-libsodium/src/key-management-system.ts b/packages/daf-react-native-libsodium/src/key-management-system.ts new file mode 100644 index 000000000..6527a4e5d --- /dev/null +++ b/packages/daf-react-native-libsodium/src/key-management-system.ts @@ -0,0 +1,80 @@ +import { TKeyType, IKey } from 'daf-core' +import { AbstractKeyManagementSystem } from 'daf-key-manager' +import sodium from 'react-native-sodium' +import { SimpleSigner } from 'did-jwt' +const EC = require('elliptic').ec +const secp256k1 = new EC('secp256k1') +import { DIDComm } from './didcomm' +const didcomm = new DIDComm() +import { sign } from 'ethjs-signer' +import Debug from 'debug' +const debug = Debug('daf:react-native-libsodium:kms') + +export class KeyManagementSystem extends AbstractKeyManagementSystem { + async createKey({ type }: { type: TKeyType }): Promise> { + let key: Omit + + switch (type) { + case 'Ed25519': + await sodium.ready + const keyPairEd25519 = sodium.crypto_sign_keypair() + key = { + type, + kid: Buffer.from(keyPairEd25519.publicKey).toString('hex'), + publicKeyHex: Buffer.from(keyPairEd25519.publicKey).toString('hex'), + privateKeyHex: Buffer.from(keyPairEd25519.privateKey).toString('hex'), + } + break + case 'Secp256k1': + const keyPairSecp256k1 = secp256k1.genKeyPair() + key = { + type, + kid: keyPairSecp256k1.getPublic('hex'), + publicKeyHex: keyPairSecp256k1.getPublic('hex'), + privateKeyHex: keyPairSecp256k1.getPrivate('hex'), + } + break + default: + throw Error('Key type not supported: ' + type) + } + + debug('Created key', type, key.publicKeyHex) + + return key + } + + async deleteKey(args: { kid: string }) { + // this kms doesn't need to delete keys + return true + } + + async encryptJWE({ key, to, data }: { key: IKey; to: IKey; data: string }): Promise { + await didcomm.ready + return await didcomm.pack_anon_msg_for_recipients(data, [ + Uint8Array.from(Buffer.from(to.publicKeyHex, 'hex')), + ]) + } + + async decryptJWE({ key, data }: { key: IKey; data: string }): Promise { + if (!key.privateKeyHex) throw Error('No private key') + + await didcomm.ready + const unpackMessage = await didcomm.unpackMessage(data, { + keyType: 'ed25519', + publicKey: Uint8Array.from(Buffer.from(key.publicKeyHex, 'hex')), + privateKey: Uint8Array.from(Buffer.from(key.privateKeyHex, 'hex')), + }) + + return unpackMessage.message + } + + async signEthTX({ key, transaction }: { key: IKey; transaction: object }): Promise { + return sign(transaction, '0x' + key.privateKeyHex) + } + + async signJWT({ key, data }: { key: IKey; data: string }): Promise { + if (!key.privateKeyHex) throw Error('No private key for kid: ' + key.kid) + const signer = SimpleSigner(key.privateKeyHex) + return (signer(data) as any) as string + } +} diff --git a/packages/daf-react-native-libsodium/src/secret-box.ts b/packages/daf-react-native-libsodium/src/secret-box.ts new file mode 100644 index 000000000..4939f5875 --- /dev/null +++ b/packages/daf-react-native-libsodium/src/secret-box.ts @@ -0,0 +1,35 @@ +import { AbstractSecretBox } from 'daf-key-manager' +import sodium from 'react-native-sodium' + +export class SecretBox extends AbstractSecretBox { + constructor(private secretKey: string) { + super() + if (!secretKey) { + throw Error('Secret key is required') + } + } + + static async createSecretKey(): Promise { + await sodium.ready + const boxKeyPair = sodium.crypto_box_keypair() + const secretKey = sodium.to_hex(boxKeyPair.privateKey) + return secretKey + } + + async encrypt(message: string): Promise { + await sodium.ready + const nonce = sodium.randombytes_buf(sodium.crypto_secretbox_NONCEBYTES) + const cipherText = sodium.crypto_secretbox_easy(message, nonce, sodium.from_hex(this.secretKey)) + return sodium.to_hex(new Uint8Array([...nonce, ...cipherText])) + } + + async decrypt(encryptedMessageHex: string): Promise { + await sodium.ready + const cipherTextWithNonce = sodium.from_hex(encryptedMessageHex) + const nonce = cipherTextWithNonce.slice(0, sodium.crypto_secretbox_NONCEBYTES) + const cipherText = cipherTextWithNonce.slice(sodium.crypto_secretbox_NONCEBYTES) + return sodium.to_string( + sodium.crypto_secretbox_open_easy(cipherText, nonce, sodium.from_hex(this.secretKey)), + ) + } +} diff --git a/packages/daf-react-native-libsodium/tsconfig.json b/packages/daf-react-native-libsodium/tsconfig.json new file mode 100644 index 000000000..7f7d7cee7 --- /dev/null +++ b/packages/daf-react-native-libsodium/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../tsconfig.settings.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build", + "declarationDir": "build" + }, + "references": [{ "path": "../daf-core" }, { "path": "../daf-key-manager" }] +} diff --git a/packages/daf-react-native-libsodium/types/react-native-sodium/index.d.ts b/packages/daf-react-native-libsodium/types/react-native-sodium/index.d.ts new file mode 100644 index 000000000..f56268437 --- /dev/null +++ b/packages/daf-react-native-libsodium/types/react-native-sodium/index.d.ts @@ -0,0 +1,934 @@ +// Type definitions for libsodium-wrappers 0.7 +// Project: https://github.com/jedisct1/libsodium.js +// Definitions by: Florian Keller +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +declare module 'react-native-sodium' { + export type Uint8ArrayOutputFormat = 'uint8array' + + export type StringOutputFormat = 'text' | 'hex' | 'base64' + + export type KeyType = 'curve25519' | 'ed25519' | 'x25519' + + export enum base64_variants { + ORIGINAL, + ORIGINAL_NO_PADDING, + URLSAFE, + URLSAFE_NO_PADDING, + } + + export interface CryptoBox { + ciphertext: Uint8Array + mac: Uint8Array + } + + export interface StringCryptoBox { + ciphertext: string + mac: string + } + + export interface CryptoKX { + sharedRx: Uint8Array + sharedTx: Uint8Array + } + + export interface StringCryptoKX { + sharedRx: string + sharedTx: string + } + + export interface KeyPair { + keyType: KeyType + privateKey: Uint8Array + publicKey: Uint8Array + } + + export interface StringKeyPair { + keyType: KeyType + privateKey: string + publicKey: string + } + + export interface SecretBox { + cipher: Uint8Array + mac: Uint8Array + } + + export interface StringSecretBox { + cipher: string + mac: string + } + + export interface StateAddress { + name: string + } + + export interface MessageTag { + message: Uint8Array + tag: number + } + + export interface StringMessageTag { + message: string + tag: number + } + + export const crypto_aead_chacha20poly1305_ABYTES: number + export const crypto_aead_chacha20poly1305_ietf_ABYTES: number + export const crypto_aead_chacha20poly1305_ietf_KEYBYTES: number + export const crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX: number + export const crypto_aead_chacha20poly1305_ietf_NPUBBYTES: number + export const crypto_aead_chacha20poly1305_ietf_NSECBYTES: number + export const crypto_aead_chacha20poly1305_KEYBYTES: number + export const crypto_aead_chacha20poly1305_MESSAGEBYTES_MAX: number + export const crypto_aead_chacha20poly1305_NPUBBYTES: number + export const crypto_aead_chacha20poly1305_NSECBYTES: number + export const crypto_aead_xchacha20poly1305_ietf_ABYTES: number + export const crypto_aead_xchacha20poly1305_ietf_KEYBYTES: number + export const crypto_aead_xchacha20poly1305_ietf_MESSAGEBYTES_MAX: number + export const crypto_aead_xchacha20poly1305_ietf_NPUBBYTES: number + export const crypto_aead_xchacha20poly1305_ietf_NSECBYTES: number + export const crypto_auth_BYTES: number + export const crypto_auth_KEYBYTES: number + export const crypto_box_BEFORENMBYTES: number + export const crypto_box_MACBYTES: number + export const crypto_box_MESSAGEBYTES_MAX: number + export const crypto_box_NONCEBYTES: number + export const crypto_box_PUBLICKEYBYTES: number + export const crypto_box_SEALBYTES: number + export const crypto_box_SECRETKEYBYTES: number + export const crypto_box_SEEDBYTES: number + export const crypto_generichash_BYTES_MAX: number + export const crypto_generichash_BYTES_MIN: number + export const crypto_generichash_BYTES: number + export const crypto_generichash_KEYBYTES_MAX: number + export const crypto_generichash_KEYBYTES_MIN: number + export const crypto_generichash_KEYBYTES: number + export const crypto_hash_BYTES: number + export const crypto_kdf_BYTES_MAX: number + export const crypto_kdf_BYTES_MIN: number + export const crypto_kdf_CONTEXTBYTES: number + export const crypto_kdf_KEYBYTES: number + export const crypto_kx_PUBLICKEYBYTES: number + export const crypto_kx_SECRETKEYBYTES: number + export const crypto_kx_SEEDBYTES: number + export const crypto_kx_SESSIONKEYBYTES: number + export const crypto_pwhash_ALG_ARGON2I13: number + export const crypto_pwhash_ALG_ARGON2ID13: number + export const crypto_pwhash_ALG_DEFAULT: number + export const crypto_pwhash_BYTES_MAX: number + export const crypto_pwhash_BYTES_MIN: number + export const crypto_pwhash_MEMLIMIT_INTERACTIVE: number + export const crypto_pwhash_MEMLIMIT_MAX: number + export const crypto_pwhash_MEMLIMIT_MIN: number + export const crypto_pwhash_MEMLIMIT_MODERATE: number + export const crypto_pwhash_MEMLIMIT_SENSITIVE: number + export const crypto_pwhash_OPSLIMIT_INTERACTIVE: number + export const crypto_pwhash_OPSLIMIT_MAX: number + export const crypto_pwhash_OPSLIMIT_MIN: number + export const crypto_pwhash_OPSLIMIT_MODERATE: number + export const crypto_pwhash_OPSLIMIT_SENSITIVE: number + export const crypto_pwhash_PASSWD_MAX: number + export const crypto_pwhash_PASSWD_MIN: number + export const crypto_pwhash_SALTBYTES: number + export const crypto_pwhash_STR_VERIFY: number + export const crypto_pwhash_STRBYTES: number + export const crypto_pwhash_STRPREFIX: string + export const crypto_scalarmult_BYTES: number + export const crypto_scalarmult_SCALARBYTES: number + export const crypto_secretbox_KEYBYTES: number + export const crypto_secretbox_MACBYTES: number + export const crypto_secretbox_MESSAGEBYTES_MAX: number + export const crypto_secretbox_NONCEBYTES: number + export const crypto_secretstream_xchacha20poly1305_ABYTES: number + export const crypto_secretstream_xchacha20poly1305_HEADERBYTES: number + export const crypto_secretstream_xchacha20poly1305_KEYBYTES: number + export const crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX: number + export const crypto_secretstream_xchacha20poly1305_TAG_FINAL: number + export const crypto_secretstream_xchacha20poly1305_TAG_MESSAGE: number + export const crypto_secretstream_xchacha20poly1305_TAG_PUSH: number + export const crypto_secretstream_xchacha20poly1305_TAG_REKEY: number + export const crypto_shorthash_BYTES: number + export const crypto_shorthash_KEYBYTES: number + export const crypto_sign_BYTES: number + export const crypto_sign_MESSAGEBYTES_MAX: number + export const crypto_sign_PUBLICKEYBYTES: number + export const crypto_sign_SECRETKEYBYTES: number + export const crypto_sign_SEEDBYTES: number + export const randombytes_SEEDBYTES: number + export const SODIUM_LIBRARY_VERSION_MAJOR: number + export const SODIUM_LIBRARY_VERSION_MINOR: number + export const SODIUM_VERSION_STRING: string + + export const ready: Promise + + export function add(a: Uint8Array, b: Uint8Array): void + + export function compare(b1: Uint8Array, b2: Uint8Array): number + + export function crypto_aead_chacha20poly1305_decrypt( + secret_nonce: string | Uint8Array | null, + ciphertext: string | Uint8Array, + additional_data: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_aead_chacha20poly1305_decrypt( + secret_nonce: string | Uint8Array | null, + ciphertext: string | Uint8Array, + additional_data: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_aead_chacha20poly1305_decrypt_detached( + secret_nonce: string | Uint8Array | null, + ciphertext: string | Uint8Array, + mac: Uint8Array, + additional_data: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_aead_chacha20poly1305_decrypt_detached( + secret_nonce: string | Uint8Array | null, + ciphertext: string | Uint8Array, + mac: Uint8Array, + additional_data: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_aead_chacha20poly1305_encrypt( + message: string | Uint8Array, + additional_data: string | Uint8Array | null, + secret_nonce: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_aead_chacha20poly1305_encrypt( + message: string | Uint8Array, + additional_data: string | Uint8Array | null, + secret_nonce: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_aead_chacha20poly1305_encrypt_detached( + message: string | Uint8Array, + additional_data: string | Uint8Array | null, + secret_nonce: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): CryptoBox + export function crypto_aead_chacha20poly1305_encrypt_detached( + message: string | Uint8Array, + additional_data: string | Uint8Array | null, + secret_nonce: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): StringCryptoBox + + export function crypto_aead_chacha20poly1305_ietf_decrypt( + secret_nonce: string | Uint8Array | null, + ciphertext: string | Uint8Array, + additional_data: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_aead_chacha20poly1305_ietf_decrypt( + secret_nonce: string | Uint8Array | null, + ciphertext: string | Uint8Array, + additional_data: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_aead_chacha20poly1305_ietf_decrypt_detached( + secret_nonce: string | Uint8Array | null, + ciphertext: string | Uint8Array, + mac: Uint8Array, + additional_data: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_aead_chacha20poly1305_ietf_decrypt_detached( + secret_nonce: string | Uint8Array | null, + ciphertext: string | Uint8Array, + mac: Uint8Array, + additional_data: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_aead_chacha20poly1305_ietf_encrypt( + message: string | Uint8Array, + additional_data: string | Uint8Array | null, + secret_nonce: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_aead_chacha20poly1305_ietf_encrypt( + message: string | Uint8Array, + additional_data: string | Uint8Array | null, + secret_nonce: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_aead_chacha20poly1305_ietf_encrypt_detached( + message: string | Uint8Array, + additional_data: string | Uint8Array | null, + secret_nonce: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): CryptoBox + export function crypto_aead_chacha20poly1305_ietf_encrypt_detached( + message: string | Uint8Array, + additional_data: string | Uint8Array | null, + secret_nonce: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): StringCryptoBox + + export function crypto_aead_chacha20poly1305_ietf_keygen( + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_aead_chacha20poly1305_ietf_keygen(outputFormat: StringOutputFormat): string + + export function crypto_aead_chacha20poly1305_keygen( + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_aead_chacha20poly1305_keygen(outputFormat: StringOutputFormat): string + + export function crypto_aead_xchacha20poly1305_ietf_decrypt( + secret_nonce: string | Uint8Array | null, + ciphertext: string | Uint8Array, + additional_data: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_aead_xchacha20poly1305_ietf_decrypt( + secret_nonce: string | Uint8Array | null, + ciphertext: string | Uint8Array, + additional_data: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_aead_xchacha20poly1305_ietf_decrypt_detached( + secret_nonce: string | Uint8Array | null, + ciphertext: string | Uint8Array, + mac: Uint8Array, + additional_data: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_aead_xchacha20poly1305_ietf_decrypt_detached( + secret_nonce: string | Uint8Array | null, + ciphertext: string | Uint8Array, + mac: Uint8Array, + additional_data: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_aead_xchacha20poly1305_ietf_encrypt( + message: string | Uint8Array, + additional_data: string | Uint8Array | null, + secret_nonce: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_aead_xchacha20poly1305_ietf_encrypt( + message: string | Uint8Array, + additional_data: string | Uint8Array | null, + secret_nonce: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_aead_xchacha20poly1305_ietf_encrypt_detached( + message: string | Uint8Array, + additional_data: string | Uint8Array | null, + secret_nonce: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): CryptoBox + export function crypto_aead_xchacha20poly1305_ietf_encrypt_detached( + message: string | Uint8Array, + additional_data: string | Uint8Array | null, + secret_nonce: string | Uint8Array | null, + public_nonce: Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): StringCryptoBox + + export function crypto_aead_xchacha20poly1305_ietf_keygen( + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_aead_xchacha20poly1305_ietf_keygen(outputFormat: StringOutputFormat): string + + export function crypto_auth( + message: string | Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_auth( + message: string | Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_auth_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array + export function crypto_auth_keygen(outputFormat: StringOutputFormat): string + + export function crypto_auth_verify(tag: Uint8Array, message: string | Uint8Array, key: Uint8Array): boolean + + export function crypto_box_beforenm( + publicKey: Uint8Array, + privateKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_box_beforenm( + publicKey: Uint8Array, + privateKey: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_box_detached( + message: string | Uint8Array, + nonce: Uint8Array, + publicKey: Uint8Array, + privateKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): CryptoBox + export function crypto_box_detached( + message: string | Uint8Array, + nonce: Uint8Array, + publicKey: Uint8Array, + privateKey: Uint8Array, + outputFormat: StringOutputFormat, + ): StringCryptoBox + + export function crypto_box_easy( + message: string | Uint8Array, + nonce: Uint8Array, + publicKey: Uint8Array, + privateKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_box_easy( + message: string | Uint8Array, + nonce: Uint8Array, + publicKey: Uint8Array, + privateKey: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_box_easy_afternm( + message: string | Uint8Array, + nonce: Uint8Array, + sharedKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_box_easy_afternm( + message: string | Uint8Array, + nonce: Uint8Array, + sharedKey: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_box_keypair(outputFormat?: Uint8ArrayOutputFormat | null): KeyPair + export function crypto_box_keypair(outputFormat: StringOutputFormat): StringKeyPair + + export function crypto_box_open_detached( + ciphertext: string | Uint8Array, + mac: Uint8Array, + nonce: Uint8Array, + publicKey: Uint8Array, + privateKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_box_open_detached( + ciphertext: string | Uint8Array, + mac: Uint8Array, + nonce: Uint8Array, + publicKey: Uint8Array, + privateKey: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_box_open_easy( + ciphertext: string | Uint8Array, + nonce: Uint8Array, + publicKey: Uint8Array, + privateKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_box_open_easy( + ciphertext: string | Uint8Array, + nonce: Uint8Array, + publicKey: Uint8Array, + privateKey: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_box_open_easy_afternm( + ciphertext: string | Uint8Array, + nonce: Uint8Array, + sharedKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_box_open_easy_afternm( + ciphertext: string | Uint8Array, + nonce: Uint8Array, + sharedKey: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_box_seal( + message: string | Uint8Array, + publicKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_box_seal( + message: string | Uint8Array, + publicKey: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_box_seal_open( + ciphertext: string | Uint8Array, + publicKey: Uint8Array, + privateKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_box_seal_open( + ciphertext: string | Uint8Array, + publicKey: Uint8Array, + privateKey: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_box_seed_keypair( + seed: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): KeyPair + export function crypto_box_seed_keypair(seed: Uint8Array, outputFormat: StringOutputFormat): StringKeyPair + + export function crypto_generichash( + hash_length: number, + message: string | Uint8Array, + key?: string | Uint8Array | null, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_generichash( + hash_length: number, + message: string | Uint8Array, + key: string | Uint8Array | null, + outputFormat: StringOutputFormat, + ): string + + export function crypto_generichash_final( + state_address: StateAddress, + hash_length: number, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_generichash_final( + state_address: StateAddress, + hash_length: number, + outputFormat: StringOutputFormat, + ): string + + export function crypto_generichash_init(key: string | Uint8Array | null, hash_length: number): StateAddress + + export function crypto_generichash_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array + export function crypto_generichash_keygen(outputFormat: StringOutputFormat): string + + export function crypto_generichash_update( + state_address: StateAddress, + message_chunk: string | Uint8Array, + ): void + + export function crypto_hash( + message: string | Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_hash(message: string | Uint8Array, outputFormat: StringOutputFormat): string + + export function crypto_kdf_derive_from_key( + subkey_len: number, + subkey_id: number, + ctx: string, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_kdf_derive_from_key( + subkey_len: number, + subkey_id: number, + ctx: string, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_kdf_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array + export function crypto_kdf_keygen(outputFormat: StringOutputFormat): string + + export function crypto_kx_client_session_keys( + clientPublicKey: Uint8Array, + clientSecretKey: Uint8Array, + serverPublicKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): CryptoKX + export function crypto_kx_client_session_keys( + clientPublicKey: Uint8Array, + clientSecretKey: Uint8Array, + serverPublicKey: Uint8Array, + outputFormat: StringOutputFormat, + ): StringCryptoKX + + export function crypto_kx_keypair(outputFormat?: Uint8ArrayOutputFormat | null): KeyPair + export function crypto_kx_keypair(outputFormat: StringOutputFormat): StringKeyPair + + export function crypto_kx_seed_keypair( + seed: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): KeyPair + export function crypto_kx_seed_keypair(seed: Uint8Array, outputFormat: StringOutputFormat): StringKeyPair + + export function crypto_kx_server_session_keys( + serverPublicKey: Uint8Array, + serverSecretKey: Uint8Array, + clientPublicKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): CryptoKX + export function crypto_kx_server_session_keys( + serverPublicKey: Uint8Array, + serverSecretKey: Uint8Array, + clientPublicKey: Uint8Array, + outputFormat: StringOutputFormat, + ): StringCryptoKX + + export function crypto_pwhash( + keyLength: number, + password: string | Uint8Array, + salt: Uint8Array, + opsLimit: number, + memLimit: number, + algorithm: number, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_pwhash( + keyLength: number, + password: string | Uint8Array, + salt: Uint8Array, + opsLimit: number, + memLimit: number, + algorithm: number, + outputFormat: StringOutputFormat, + ): string + + export function crypto_pwhash_str(password: string | Uint8Array, opsLimit: number, memLimit: number): string + + export function crypto_pwhash_str_verify(hashed_password: string, password: string | Uint8Array): boolean + + export function crypto_scalarmult( + privateKey: Uint8Array, + publicKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_scalarmult( + privateKey: Uint8Array, + publicKey: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_scalarmult_base( + privateKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_scalarmult_base(privateKey: Uint8Array, outputFormat: StringOutputFormat): string + + export function crypto_secretbox_detached( + message: string | Uint8Array, + nonce: Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): SecretBox + export function crypto_secretbox_detached( + message: string | Uint8Array, + nonce: Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): StringSecretBox + + export function crypto_secretbox_easy( + message: string | Uint8Array, + nonce: Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_secretbox_easy( + message: string | Uint8Array, + nonce: Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_secretbox_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array + export function crypto_secretbox_keygen(outputFormat: StringOutputFormat): string + + export function crypto_secretbox_open_detached( + ciphertext: string | Uint8Array, + mac: Uint8Array, + nonce: Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_secretbox_open_detached( + ciphertext: string | Uint8Array, + mac: Uint8Array, + nonce: Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_secretbox_open_easy( + ciphertext: string | Uint8Array, + nonce: Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_secretbox_open_easy( + ciphertext: string | Uint8Array, + nonce: Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_secretstream_xchacha20poly1305_init_pull( + header: Uint8Array, + key: Uint8Array, + ): StateAddress + + export function crypto_secretstream_xchacha20poly1305_init_push( + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): { state: StateAddress; header: Uint8Array } + export function crypto_secretstream_xchacha20poly1305_init_push( + key: Uint8Array, + outputFormat: StringOutputFormat, + ): { state: StateAddress; header: string } + + export function crypto_secretstream_xchacha20poly1305_keygen( + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_secretstream_xchacha20poly1305_keygen(outputFormat: StringOutputFormat): string + + export function crypto_secretstream_xchacha20poly1305_pull( + state_address: StateAddress, + cipher: string | Uint8Array, + ad?: string | Uint8Array | null, + outputFormat?: Uint8ArrayOutputFormat | null, + ): MessageTag + export function crypto_secretstream_xchacha20poly1305_pull( + state_address: StateAddress, + cipher: string | Uint8Array, + ad: string | Uint8Array | null, + outputFormat: StringOutputFormat, + ): StringMessageTag + + export function crypto_secretstream_xchacha20poly1305_push( + state_address: StateAddress, + message_chunk: string | Uint8Array, + ad: string | Uint8Array | null, + tag: number, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_secretstream_xchacha20poly1305_push( + state_address: StateAddress, + message_chunk: string | Uint8Array, + ad: string | Uint8Array | null, + tag: number, + outputFormat: StringOutputFormat, + ): string + + export function crypto_secretstream_xchacha20poly1305_rekey(state_address: StateAddress): true + + export function crypto_shorthash( + message: string | Uint8Array, + key: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_shorthash( + message: string | Uint8Array, + key: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_shorthash_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array + export function crypto_shorthash_keygen(outputFormat: StringOutputFormat): string + + export function crypto_sign( + message: string | Uint8Array, + privateKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_sign( + message: string | Uint8Array, + privateKey: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_sign_detached( + message: string | Uint8Array, + privateKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_sign_detached( + message: string | Uint8Array, + privateKey: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_sign_ed25519_pk_to_curve25519( + edPk: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_sign_ed25519_pk_to_curve25519( + edPk: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_sign_ed25519_sk_to_curve25519( + edSk: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_sign_ed25519_sk_to_curve25519( + edSk: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_sign_final_create( + state_address: StateAddress, + privateKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_sign_final_create( + state_address: StateAddress, + privateKey: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_sign_final_verify( + state_address: StateAddress, + signature: Uint8Array, + publicKey: Uint8Array, + ): boolean + + export function crypto_sign_init(): StateAddress + + export function crypto_sign_keypair(outputFormat?: Uint8ArrayOutputFormat | null): KeyPair + export function crypto_sign_keypair(outputFormat: StringOutputFormat): StringKeyPair + + export function crypto_sign_open( + signedMessage: string | Uint8Array, + publicKey: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function crypto_sign_open( + signedMessage: string | Uint8Array, + publicKey: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function crypto_sign_seed_keypair( + seed: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): KeyPair + export function crypto_sign_seed_keypair(seed: Uint8Array, outputFormat: StringOutputFormat): StringKeyPair + + export function crypto_sign_update(state_address: StateAddress, message_chunk: string | Uint8Array): void + + export function crypto_sign_verify_detached( + signature: Uint8Array, + message: string | Uint8Array, + publicKey: Uint8Array, + ): boolean + + export function from_base64(input: string, variant?: base64_variants): Uint8Array + + export function from_hex(input: string): Uint8Array + + export function from_string(str: string): Uint8Array + + export function increment(bytes: Uint8Array): void + + export function is_zero(bytes: Uint8Array): boolean + + export function memcmp(b1: Uint8Array, b2: Uint8Array): boolean + + export function memzero(bytes: Uint8Array): void + + export function output_formats(): Array + + export function pad(buf: Uint8Array, blocksize: number): Uint8Array + + export function randombytes_buf(length: number, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array + export function randombytes_buf(length: number, outputFormat: StringOutputFormat): string + + export function randombytes_buf_deterministic( + length: number, + seed: Uint8Array, + outputFormat?: Uint8ArrayOutputFormat | null, + ): Uint8Array + export function randombytes_buf_deterministic( + length: number, + seed: Uint8Array, + outputFormat: StringOutputFormat, + ): string + + export function randombytes_close(): void + + export function randombytes_random(): number + + export function randombytes_stir(): void + + export function randombytes_uniform(upper_bound: number): number + + export function sodium_version_string(): string + + export function symbols(): string[] + + export function to_base64(input: string | Uint8Array, variant?: base64_variants): string + + export function to_hex(input: string | Uint8Array): string + + export function to_string(bytes: Uint8Array): string + + export function unpad(buf: Uint8Array, blocksize: number): Uint8Array +} diff --git a/yarn.lock b/yarn.lock index b1262596c..08cd1010f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2062,9 +2062,9 @@ rimraf "^2.5.2" "@microsoft/api-documenter@^7.8.19": - version "7.8.48" - resolved "https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.8.48.tgz#dd55a674ff23813f5a718d5d0aa3ff02ad82840b" - integrity sha512-QlUzAQCzjzIgy28CIglEVONJuUNiTdnaNTbMKjNDPmF8gUD2T3AkDnTFu843VV91BuF/mgWp6dq220bkRbX2cw== + version "7.8.49" + resolved "https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.8.49.tgz#6031d88813e0ed746bd9f40bb34b83c1431b8a93" + integrity sha512-HK2JCPMKsXLSl+/ajGeaZRnqhe9W0GXzTiX3I0m7c9h1X87ol6hoXRB35De5UwoA/l+Bri5styVkqk505W6eiQ== dependencies: "@microsoft/api-extractor-model" "7.9.0" "@microsoft/tsdoc" "0.12.19" @@ -2650,10 +2650,10 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== -"@transmute/did-key-cipher@^0.2.1-unstable.18": - version "0.2.1-unstable.18" - resolved "https://registry.yarnpkg.com/@transmute/did-key-cipher/-/did-key-cipher-0.2.1-unstable.18.tgz#c8cd5ebd4673c196fb7e8ec244ca769871dc8089" - integrity sha512-r3YdsQJ3QPT3WgmCPO6I/BJIgf9GvOBlvMh6GYPGNRup3noRCG40snmIbYj1c2J7VoavGJXKUybtDHa4waSZgw== +"@transmute/did-key-cipher@^0.2.1-unstable.20": + version "0.2.1-unstable.20" + resolved "https://registry.yarnpkg.com/@transmute/did-key-cipher/-/did-key-cipher-0.2.1-unstable.20.tgz#edd7bfca3fbca13905b1ef46d30e15c544ff1e02" + integrity sha512-psNKKbJftwEWno33+qp2cu5f1MnD26e20KoJIC5MNTIxtaKo8qjeMgi+WkivoqbSfTnDRb+h5e3qdakKqHjDZA== dependencies: "@stablelib/aes-kw" "^1.0.0" "@stablelib/xchacha20poly1305" "^1.0.0" @@ -2661,13 +2661,13 @@ web-streams-polyfill "^3.0.0" "@transmute/did-key-x25519@^0.2.1-unstable.3": - version "0.2.1-unstable.18" - resolved "https://registry.yarnpkg.com/@transmute/did-key-x25519/-/did-key-x25519-0.2.1-unstable.18.tgz#5318633d48cd0fb97d54d8c7b6e9fe75cb78e0d5" - integrity sha512-27GtWLJFwyC6XlhQC5HxpmauHszZPPLLgmrcuO6YWdCJwrif4tOMlFdXqz9sd0jdIpPWR7QWlwCeW1lUNooHgQ== + version "0.2.1-unstable.20" + resolved "https://registry.yarnpkg.com/@transmute/did-key-x25519/-/did-key-x25519-0.2.1-unstable.20.tgz#3062ce9eacfa3d9026b1132befdeb0d0d5398310" + integrity sha512-BMfoocAu0nsAI0AmFvX649mAOWNgOgR2S75PqvC19pDi6vKMDP0sVN+aQsD2U/rBct7wS6ydib36WbEmn0g/KQ== dependencies: "@stablelib/ed25519" "^1.0.1" "@stablelib/x25519" "^1.0.0" - "@transmute/did-key-cipher" "^0.2.1-unstable.18" + "@transmute/did-key-cipher" "^0.2.1-unstable.20" "@trust/keyto" "^1.0.1" base64url "^3.0.1" bs58 "^4.0.1" @@ -3230,9 +3230,9 @@ form-data "^3.0.0" "@types/node@*", "@types/node@>= 8": - version "14.10.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.10.1.tgz#cc323bad8e8a533d4822f45ce4e5326f36e42177" - integrity sha512-aYNbO+FZ/3KGeQCEkNhHFRIzBOUgc7QvcVNKXbfnhDkSfwUv91JsQQa10rDgKSTSLkXZ1UIyPe4FJJNVgw1xWQ== + version "14.10.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.10.3.tgz#5ae1f119c96643fc9b19b2d1a83bfa2ec3dbb7ea" + integrity sha512-zdN0hor7TLkjAdKTnYW+Y22oIhUUpil5ZD1V1OFq0CR0CLKw+NdR6dkziTfkWRLo6sKzisayoj/GNpNbe4LY9Q== "@types/node@10.17.13": version "10.17.13" @@ -3240,19 +3240,19 @@ integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg== "@types/node@^10.1.0", "@types/node@^10.3.2": - version "10.17.32" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.32.tgz#4ef6ff8b842ea0eb3fcbc4331489f4ae64036fa8" - integrity sha512-EUq+cjH/3KCzQHikGnNbWAGe548IFLSm93Vl8xA7EuYEEATiyOVDyEVuGkowL7c9V69FF/RiZSAOCFPApMs/ig== + version "10.17.35" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.35.tgz#58058f29b870e6ae57b20e4f6e928f02b7129f56" + integrity sha512-gXx7jAWpMddu0f7a+L+txMplp3FnHl53OhQIF9puXKq3hDGY/GjH+MF04oWnV/adPSCrbtHumDCFwzq2VhltWA== "@types/node@^12.12.6": - version "12.12.58" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.58.tgz#46dae9b2b9ee5992818c8f7cee01ff4ce03ab44c" - integrity sha512-Be46CNIHWAagEfINOjmriSxuv7IVcqbGe+sDSg2SYCEz/0CRBy7LRASGfRbD8KZkqoePU73Wsx3UvOSFcq/9hA== + version "12.12.61" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.61.tgz#f9115df7cef34d76afa0a333d1c7e6aab051870a" + integrity sha512-+/KPk6uV9qGfVX0y2uUj3y8O0Z6KZWUy3XTS0uQGYYF+iXGtepm9GPETdcRq+hGmErkLOr5QJDX8vuymkwu4sA== "@types/node@^8.10.50": - version "8.10.63" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.63.tgz#f86775d576bc07a2992da244f41c23d3ba66d402" - integrity sha512-g+nSkeHFDd2WOQChfmy9SAXLywT47WZBrGS/NC5ym5PJ8c8RC6l4pbGaUW/X0+eZJnXw6/AVNEouXWhV4iz72Q== + version "8.10.64" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.64.tgz#0dddc4c53ca4819a32b7478232d8b446ca90e1c6" + integrity sha512-/EwBIb+imu8Qi/A3NF9sJ9iuKo7yV+pryqjmeRqaU0C4wBAOhas5mdvoYeJ5PCKrh6thRSJHdoasFqh3BQGILA== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -3314,9 +3314,9 @@ integrity sha512-CgQAm7pjyeF3Gnv78ty4RBVIfluB+Td+2DR8iPaU0prF18pkzptHHP+DoKPfpsJYknKsVZyVsJEu5AuGgAqQ5w== "@types/qs@*": - version "6.9.4" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.4.tgz#a59e851c1ba16c0513ea123830dd639a0a15cb6a" - integrity sha512-+wYo+L6ZF6BMoEjtf8zB2esQsqdV6WsjRK/GP9WOgLPrq87PbNWgIxS76dS5uvl/QXtHGakZmwTznIfcPXcKlQ== + version "6.9.5" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.5.tgz#434711bdd49eb5ee69d90c1d67c354a9a8ecb18b" + integrity sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ== "@types/range-parser@*": version "1.2.3" @@ -6105,9 +6105,9 @@ console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control- integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= console-table-printer@^2.0.0: - version "2.4.3" - resolved "https://registry.yarnpkg.com/console-table-printer/-/console-table-printer-2.4.3.tgz#53c92a9677c28427edea6392d879af3d0eb0ab1b" - integrity sha512-YT2et2Tm2cZZmyb8FClvjWpXKfxbhy5GJjqm3+9p4joGPgunZvVKLmxcUdzm+R/vuxODwp+VvCnhsFoDxQJHCw== + version "2.4.5" + resolved "https://registry.yarnpkg.com/console-table-printer/-/console-table-printer-2.4.5.tgz#c4885ceec44925c4a90a7af337aaf984fbd53ef6" + integrity sha512-YIMj8LHizoRNDD6raC/kXwgS6+nbWfmQIZcZ34VdpjL+iCDabDgzVTo2aMACZdf74KGIpyZIhHPC01i3fJDJog== content-disposition@0.5.3: version "0.5.3" @@ -7175,9 +7175,9 @@ ee-first@1.1.1: integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.3.47: - version "1.3.568" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.568.tgz#0fa28cd3e5cbd9e8c66f72309eef0646f65a5b66" - integrity sha512-j9MlEwgTHVW/lq93Hw8yhzA886oLjDm3Hz7eDkWP2v4fzLVuqOWhpNluziSnmR/tBqgoYldagbLknrdg+B7Tlw== + version "1.3.570" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.570.tgz#3f5141cc39b4e3892a276b4889980dabf1d29c7f" + integrity sha512-Y6OCoVQgFQBP5py6A/06+yWxUZHDlNr/gNDGatjH8AZqXl8X0tE4LfjLJsXGz/JmWJz8a6K7bR1k+QzZ+k//fg== elliptic@6.3.2: version "6.3.2" @@ -7717,7 +7717,15 @@ ethereum-protocol@^1.0.1: resolved "https://registry.yarnpkg.com/ethereum-protocol/-/ethereum-protocol-1.0.1.tgz#b7d68142f4105e0ae7b5e178cf42f8d4dc4b93cf" integrity sha512-3KLX1mHuEsBW0dKG+c6EOJS1NBNqdCICvZW9sInmZTt5aY0oxmHVggYRE0lJu1tcnMD1K+AKHdLi6U43Awm1Vg== -ethereumjs-abi@^0.6.8, "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": +ethereumjs-abi@^0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" + integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +"ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": version "0.6.8" resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#1ce6a1d64235fabe2aaf827fd606def55693508f" dependencies: @@ -13855,6 +13863,13 @@ oboe@2.1.4: dependencies: http-https "^1.0.0" +oboe@2.1.5: + version "2.1.5" + resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.5.tgz#5554284c543a2266d7a38f17e073821fbde393cd" + integrity sha1-VVQoTFQ6ImbXo48X4HOCH73jk80= + dependencies: + http-https "^1.0.0" + octokit-pagination-methods@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz#cf472edc9d551055f9ef73f6e42b4dbb4c80bea4" @@ -15431,6 +15446,11 @@ react-is@^16.12.0, react-is@^16.7.0, react-is@^16.8.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-native-sodium@0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/react-native-sodium/-/react-native-sodium-0.3.6.tgz#c1c0058becc866ae0d60257aa53cb81a9fd4a8fc" + integrity sha512-1lZBpIF9mvYlgGH1tlHCNBnhMeNwFmWkok55p5Lu1Td5bYya2iUbLyfQyDcMk8RXnab2V6c/o76hmxt0tqmuWg== + read-cmd-shim@^1.0.1, read-cmd-shim@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz#87e43eba50098ba5a32d0ceb583ab8e43b961c16" @@ -16703,9 +16723,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.5" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" - integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== + version "3.0.6" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz#c80757383c28abf7296744998cbc106ae8b854ce" + integrity sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw== split-on-first@^1.0.0: version "1.1.0" @@ -16961,13 +16981,12 @@ string-width@^4.1.0, string-width@^4.2.0: strip-ansi "^6.0.0" string.prototype.trim@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.1.tgz#141233dff32c82bfad80684d7e5f0869ee0fb782" - integrity sha512-MjGFEeqixw47dAMFMtgUro/I0+wNqZB5GKXGt1fFr24u3TzDXCPu7J9Buppzoe3r/LqkSDLDDJzE15RGWDGAVw== + version "1.2.2" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.2.tgz#f538d0bacd98fc4297f0bef645226d5aaebf59f3" + integrity sha512-b5yrbl3BXIjHau9Prk7U0RRYcUYdN4wGSVaqoBQS50CCE3KBuYU0TYRNPFCP7aVoNMX87HKThdMRVIP3giclKg== dependencies: define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - function-bind "^1.1.1" + es-abstract "^1.18.0-next.0" string.prototype.trimend@^1.0.1: version "1.0.1" @@ -18271,10 +18290,10 @@ web3-bzz@1.2.1: swarm-js "0.1.39" underscore "1.9.1" -web3-bzz@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.11.tgz#41bc19a77444bd5365744596d778b811880f707f" - integrity sha512-XGpWUEElGypBjeFyUhTkiPXFbDVD6Nr/S5jznE3t8cWUA0FxRf1n3n/NuIZeb0H9RkN2Ctd/jNma/k8XGa3YKg== +web3-bzz@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.3.0.tgz#83dfd77fa8a64bbb660462dffd0fee2a02ef1051" + integrity sha512-ibYAnKab+sgTo/UdfbrvYfWblXjjgSMgyy9/FHa6WXS14n/HVB+HfWqGz2EM3fok8Wy5XoKGMvdqvERQ/mzq1w== dependencies: "@types/node" "^12.12.6" got "9.6.0" @@ -18290,14 +18309,14 @@ web3-core-helpers@1.2.1: web3-eth-iban "1.2.1" web3-utils "1.2.1" -web3-core-helpers@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.11.tgz#84c681ed0b942c0203f3b324a245a127e8c67a99" - integrity sha512-PEPoAoZd5ME7UfbnCZBdzIerpe74GEvlwT4AjOmHeCVZoIFk7EqvOZDejJHt+feJA6kMVTdd0xzRNN295UhC1A== +web3-core-helpers@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.3.0.tgz#697cc3246a7eaaaac64ea506828d861c981c3f31" + integrity sha512-+MFb1kZCrRctf7UYE7NCG4rGhSXaQJ/KF07di9GVK1pxy1K0+rFi61ZobuV1ky9uQp+uhhSPts4Zp55kRDB5sw== dependencies: underscore "1.9.1" - web3-eth-iban "1.2.11" - web3-utils "1.2.11" + web3-eth-iban "1.3.0" + web3-utils "1.3.0" web3-core-method@1.2.1: version "1.2.1" @@ -18310,17 +18329,17 @@ web3-core-method@1.2.1: web3-core-subscriptions "1.2.1" web3-utils "1.2.1" -web3-core-method@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.11.tgz#f880137d1507a0124912bf052534f168b8d8fbb6" - integrity sha512-ff0q76Cde94HAxLDZ6DbdmKniYCQVtvuaYh+rtOUMB6kssa5FX0q3vPmixi7NPooFnbKmmZCM6NvXg4IreTPIw== +web3-core-method@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.3.0.tgz#a71387af842aec7dbad5dbbd1130c14cc6c8beb3" + integrity sha512-h0yFDrYVzy5WkLxC/C3q+hiMnzxdWm9p1T1rslnuHgOp6nYfqzu/6mUIXrsS4h/OWiGJt+BZ0xVZmtC31HDWtg== dependencies: "@ethersproject/transactions" "^5.0.0-beta.135" underscore "1.9.1" - web3-core-helpers "1.2.11" - web3-core-promievent "1.2.11" - web3-core-subscriptions "1.2.11" - web3-utils "1.2.11" + web3-core-helpers "1.3.0" + web3-core-promievent "1.3.0" + web3-core-subscriptions "1.3.0" + web3-utils "1.3.0" web3-core-promievent@1.2.1: version "1.2.1" @@ -18330,10 +18349,10 @@ web3-core-promievent@1.2.1: any-promise "1.3.0" eventemitter3 "3.1.2" -web3-core-promievent@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.11.tgz#51fe97ca0ddec2f99bf8c3306a7a8e4b094ea3cf" - integrity sha512-il4McoDa/Ox9Agh4kyfQ8Ak/9ABYpnF8poBLL33R/EnxLsJOGQG2nZhkJa3I067hocrPSjEdlPt/0bHXsln4qA== +web3-core-promievent@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.3.0.tgz#e0442dd0a8989b6bdce09293976cee6d9237a484" + integrity sha512-blv69wrXw447TP3iPvYJpllkhW6B18nfuEbrfcr3n2Y0v1Jx8VJacNZFDFsFIcgXcgUIVCtOpimU7w9v4+rtaw== dependencies: eventemitter3 "4.0.4" @@ -18348,16 +18367,16 @@ web3-core-requestmanager@1.2.1: web3-providers-ipc "1.2.1" web3-providers-ws "1.2.1" -web3-core-requestmanager@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.11.tgz#fe6eb603fbaee18530293a91f8cf26d8ae28c45a" - integrity sha512-oFhBtLfOiIbmfl6T6gYjjj9igOvtyxJ+fjS+byRxiwFJyJ5BQOz4/9/17gWR1Cq74paTlI7vDGxYfuvfE/mKvA== +web3-core-requestmanager@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.3.0.tgz#c5b9a0304504c0e6cce6c90bc1a3bff82732aa1f" + integrity sha512-3yMbuGcomtzlmvTVqNRydxsx7oPlw3ioRL6ReF9PeNYDkUsZaUib+6Dp5eBt7UXh5X+SIn/xa1smhDHz5/HpAw== dependencies: underscore "1.9.1" - web3-core-helpers "1.2.11" - web3-providers-http "1.2.11" - web3-providers-ipc "1.2.11" - web3-providers-ws "1.2.11" + web3-core-helpers "1.3.0" + web3-providers-http "1.3.0" + web3-providers-ipc "1.3.0" + web3-providers-ws "1.3.0" web3-core-subscriptions@1.2.1: version "1.2.1" @@ -18368,14 +18387,14 @@ web3-core-subscriptions@1.2.1: underscore "1.9.1" web3-core-helpers "1.2.1" -web3-core-subscriptions@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.11.tgz#beca908fbfcb050c16f45f3f0f4c205e8505accd" - integrity sha512-qEF/OVqkCvQ7MPs1JylIZCZkin0aKK9lDxpAtQ1F8niEDGFqn7DT8E/vzbIa0GsOjL2fZjDhWJsaW+BSoAW1gg== +web3-core-subscriptions@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.3.0.tgz#c2622ccd2b84f4687475398ff966b579dba0847e" + integrity sha512-MUUQUAhJDb+Nz3S97ExVWveH4utoUnsbPWP+q1HJH437hEGb4vunIb9KvN3hFHLB+aHJfPeStM/4yYTz5PeuyQ== dependencies: eventemitter3 "4.0.4" underscore "1.9.1" - web3-core-helpers "1.2.11" + web3-core-helpers "1.3.0" web3-core@1.2.1: version "1.2.1" @@ -18387,18 +18406,18 @@ web3-core@1.2.1: web3-core-requestmanager "1.2.1" web3-utils "1.2.1" -web3-core@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.11.tgz#1043cacc1becb80638453cc5b2a14be9050288a7" - integrity sha512-CN7MEYOY5ryo5iVleIWRE3a3cZqVaLlIbIzDPsvQRUfzYnvzZQRZBm9Mq+ttDi2STOOzc1MKylspz/o3yq/LjQ== +web3-core@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.3.0.tgz#b818903738461c1cca0163339e1d6d3fa51242cf" + integrity sha512-BwWvAaKJf4KFG9QsKRi3MNoNgzjI6szyUlgme1qNPxUdCkaS3Rdpa0VKYNHP7M/YTk82/59kNE66mH5vmoaXjA== dependencies: "@types/bn.js" "^4.11.5" "@types/node" "^12.12.6" bignumber.js "^9.0.0" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-core-requestmanager "1.2.11" - web3-utils "1.2.11" + web3-core-helpers "1.3.0" + web3-core-method "1.3.0" + web3-core-requestmanager "1.3.0" + web3-utils "1.3.0" web3-eth-abi@1.2.1: version "1.2.1" @@ -18409,14 +18428,14 @@ web3-eth-abi@1.2.1: underscore "1.9.1" web3-utils "1.2.1" -web3-eth-abi@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.11.tgz#a887494e5d447c2926d557a3834edd66e17af9b0" - integrity sha512-PkRYc0+MjuLSgg03QVWqWlQivJqRwKItKtEpRUaxUAeLE7i/uU39gmzm2keHGcQXo3POXAbOnMqkDvOep89Crg== +web3-eth-abi@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.3.0.tgz#387b7ea9b38be69ad8856bc7b4e9a6a69bb4d22b" + integrity sha512-1OrZ9+KGrBeBRd3lO8upkpNua9+7cBsQAgor9wbA25UrcUYSyL8teV66JNRu9gFxaTbkpdrGqM7J/LXpraXWrg== dependencies: "@ethersproject/abi" "5.0.0-beta.153" underscore "1.9.1" - web3-utils "1.2.11" + web3-utils "1.3.0" web3-eth-accounts@1.2.1: version "1.2.1" @@ -18435,10 +18454,10 @@ web3-eth-accounts@1.2.1: web3-core-method "1.2.1" web3-utils "1.2.1" -web3-eth-accounts@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.11.tgz#a9e3044da442d31903a7ce035a86d8fa33f90520" - integrity sha512-6FwPqEpCfKIh3nSSGeo3uBm2iFSnFJDfwL3oS9pyegRBXNsGRVpgiW63yhNzL0796StsvjHWwQnQHsZNxWAkGw== +web3-eth-accounts@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.3.0.tgz#010acf389b2bee6d5e1aecb2fe78bfa5c8f26c7a" + integrity sha512-/Q7EVW4L2wWUbNRtOTwAIrYvJid/5UnKMw67x/JpvRMwYC+e+744P536Ja6SG4X3MnzFvd3E/jruV4qa6k+zIw== dependencies: crypto-browserify "3.12.0" eth-lib "0.2.8" @@ -18447,10 +18466,10 @@ web3-eth-accounts@1.2.11: scrypt-js "^3.0.1" underscore "1.9.1" uuid "3.3.2" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-utils "1.2.11" + web3-core "1.3.0" + web3-core-helpers "1.3.0" + web3-core-method "1.3.0" + web3-utils "1.3.0" web3-eth-contract@1.2.1: version "1.2.1" @@ -18466,20 +18485,20 @@ web3-eth-contract@1.2.1: web3-eth-abi "1.2.1" web3-utils "1.2.1" -web3-eth-contract@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.11.tgz#917065902bc27ce89da9a1da26e62ef663663b90" - integrity sha512-MzYuI/Rq2o6gn7vCGcnQgco63isPNK5lMAan2E51AJLknjSLnOxwNY3gM8BcKoy4Z+v5Dv00a03Xuk78JowFow== +web3-eth-contract@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.3.0.tgz#c758340ac800788e29fa29edc8b0c0ac957b741c" + integrity sha512-3SCge4SRNCnzLxf0R+sXk6vyTOl05g80Z5+9/B5pERwtPpPWaQGw8w01vqYqsYBKC7zH+dxhMaUgVzU2Dgf7bQ== dependencies: "@types/bn.js" "^4.11.5" underscore "1.9.1" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-core-promievent "1.2.11" - web3-core-subscriptions "1.2.11" - web3-eth-abi "1.2.11" - web3-utils "1.2.11" + web3-core "1.3.0" + web3-core-helpers "1.3.0" + web3-core-method "1.3.0" + web3-core-promievent "1.3.0" + web3-core-subscriptions "1.3.0" + web3-eth-abi "1.3.0" + web3-utils "1.3.0" web3-eth-ens@1.2.1: version "1.2.1" @@ -18495,20 +18514,20 @@ web3-eth-ens@1.2.1: web3-eth-contract "1.2.1" web3-utils "1.2.1" -web3-eth-ens@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.11.tgz#26d4d7f16d6cbcfff918e39832b939edc3162532" - integrity sha512-dbW7dXP6HqT1EAPvnniZVnmw6TmQEKF6/1KgAxbo8iBBYrVTMDGFQUUnZ+C4VETGrwwaqtX4L9d/FrQhZ6SUiA== +web3-eth-ens@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.3.0.tgz#0887ba38473c104cf5fb8a715828b3b354fa02a2" + integrity sha512-WnOru+EcuM5dteiVYJcHXo/I7Wq+ei8RrlS2nir49M0QpYvUPGbCGgTbifcjJQTWamgORtWdljSA1s2Asdb74w== dependencies: content-hash "^2.5.2" eth-ens-namehash "2.0.8" underscore "1.9.1" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-promievent "1.2.11" - web3-eth-abi "1.2.11" - web3-eth-contract "1.2.11" - web3-utils "1.2.11" + web3-core "1.3.0" + web3-core-helpers "1.3.0" + web3-core-promievent "1.3.0" + web3-eth-abi "1.3.0" + web3-eth-contract "1.3.0" + web3-utils "1.3.0" web3-eth-iban@1.2.1: version "1.2.1" @@ -18518,13 +18537,13 @@ web3-eth-iban@1.2.1: bn.js "4.11.8" web3-utils "1.2.1" -web3-eth-iban@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.11.tgz#f5f73298305bc7392e2f188bf38a7362b42144ef" - integrity sha512-ozuVlZ5jwFC2hJY4+fH9pIcuH1xP0HEFhtWsR69u9uDIANHLPQQtWYmdj7xQ3p2YT4bQLq/axKhZi7EZVetmxQ== +web3-eth-iban@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.3.0.tgz#15b782dfaf273ebc4e3f389f1367f4e88ddce4a5" + integrity sha512-v9mZWhR4fPF17/KhHLiWir4YHWLe09O3B/NTdhWqw3fdAMJNztzMHGzgHxA/4fU+rhrs/FhDzc4yt32zMEXBZw== dependencies: bn.js "^4.11.9" - web3-utils "1.2.11" + web3-utils "1.3.0" web3-eth-personal@1.2.1: version "1.2.1" @@ -18537,17 +18556,17 @@ web3-eth-personal@1.2.1: web3-net "1.2.1" web3-utils "1.2.1" -web3-eth-personal@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.11.tgz#a38b3942a1d87a62070ce0622a941553c3d5aa70" - integrity sha512-42IzUtKq9iHZ8K9VN0vAI50iSU9tOA1V7XU2BhF/tb7We2iKBVdkley2fg26TxlOcKNEHm7o6HRtiiFsVK4Ifw== +web3-eth-personal@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.3.0.tgz#d376e03dc737d961ff1f8d1aca866efad8477135" + integrity sha512-2czUhElsJdLpuNfun9GeLiClo5O6Xw+bLSjl3f4bNG5X2V4wcIjX2ygep/nfstLLtkz8jSkgl/bV7esANJyeRA== dependencies: "@types/node" "^12.12.6" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-net "1.2.11" - web3-utils "1.2.11" + web3-core "1.3.0" + web3-core-helpers "1.3.0" + web3-core-method "1.3.0" + web3-net "1.3.0" + web3-utils "1.3.0" web3-eth@1.2.1: version "1.2.1" @@ -18568,24 +18587,24 @@ web3-eth@1.2.1: web3-net "1.2.1" web3-utils "1.2.1" -web3-eth@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.11.tgz#4c81fcb6285b8caf544058fba3ae802968fdc793" - integrity sha512-REvxW1wJ58AgHPcXPJOL49d1K/dPmuw4LjPLBPStOVkQjzDTVmJEIsiLwn2YeuNDd4pfakBwT8L3bz1G1/wVsQ== +web3-eth@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.3.0.tgz#898e5f5a8827f9bc6844e267a52eb388916a6771" + integrity sha512-/bzJcxXPM9EM18JM5kO2JjZ3nEqVo3HxqU93aWAEgJNqaP/Lltmufl2GpvIB2Hvj+FXAjAXquxUdQ2/xP7BzHQ== dependencies: underscore "1.9.1" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-core-subscriptions "1.2.11" - web3-eth-abi "1.2.11" - web3-eth-accounts "1.2.11" - web3-eth-contract "1.2.11" - web3-eth-ens "1.2.11" - web3-eth-iban "1.2.11" - web3-eth-personal "1.2.11" - web3-net "1.2.11" - web3-utils "1.2.11" + web3-core "1.3.0" + web3-core-helpers "1.3.0" + web3-core-method "1.3.0" + web3-core-subscriptions "1.3.0" + web3-eth-abi "1.3.0" + web3-eth-accounts "1.3.0" + web3-eth-contract "1.3.0" + web3-eth-ens "1.3.0" + web3-eth-iban "1.3.0" + web3-eth-personal "1.3.0" + web3-net "1.3.0" + web3-utils "1.3.0" web3-net@1.2.1: version "1.2.1" @@ -18596,14 +18615,14 @@ web3-net@1.2.1: web3-core-method "1.2.1" web3-utils "1.2.1" -web3-net@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.11.tgz#eda68ef25e5cdb64c96c39085cdb74669aabbe1b" - integrity sha512-sjrSDj0pTfZouR5BSTItCuZ5K/oZPVdVciPQ6981PPPIwJJkCMeVjD7I4zO3qDPCnBjBSbWvVnLdwqUBPtHxyg== +web3-net@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.3.0.tgz#b69068cccffab58911c2f08ca4abfbefb0f948c6" + integrity sha512-Xz02KylOyrB2YZzCkysEDrY7RbKxb7LADzx3Zlovfvuby7HBwtXVexXKtoGqksa+ns1lvjQLLQGb+OeLi7Sr7w== dependencies: - web3-core "1.2.11" - web3-core-method "1.2.11" - web3-utils "1.2.11" + web3-core "1.3.0" + web3-core-method "1.3.0" + web3-utils "1.3.0" web3-providers-http@1.2.1: version "1.2.1" @@ -18613,12 +18632,12 @@ web3-providers-http@1.2.1: web3-core-helpers "1.2.1" xhr2-cookies "1.1.0" -web3-providers-http@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.11.tgz#1cd03442c61670572d40e4dcdf1faff8bd91e7c6" - integrity sha512-psh4hYGb1+ijWywfwpB2cvvOIMISlR44F/rJtYkRmQ5jMvG4FOCPlQJPiHQZo+2cc3HbktvvSJzIhkWQJdmvrA== +web3-providers-http@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.3.0.tgz#88227f64c88b32abed4359383c2663616e0dc531" + integrity sha512-cMKhUI6PqlY/EC+ZDacAxajySBu8AzW8jOjt1Pe/mbRQgS0rcZyvLePGTTuoyaA8C21F8UW+EE5jj7YsNgOuqA== dependencies: - web3-core-helpers "1.2.11" + web3-core-helpers "1.3.0" xhr2-cookies "1.1.0" web3-providers-ipc@1.2.1: @@ -18630,14 +18649,14 @@ web3-providers-ipc@1.2.1: underscore "1.9.1" web3-core-helpers "1.2.1" -web3-providers-ipc@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.11.tgz#d16d6c9be1be6e0b4f4536c4acc16b0f4f27ef21" - integrity sha512-yhc7Y/k8hBV/KlELxynWjJDzmgDEDjIjBzXK+e0rHBsYEhdCNdIH5Psa456c+l0qTEU2YzycF8VAjYpWfPnBpQ== +web3-providers-ipc@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.3.0.tgz#d7c2b203733b46f7b4e7b15633d891648cf9a293" + integrity sha512-0CrLuRofR+1J38nEj4WsId/oolwQEM6Yl1sOt41S/6bNI7htdkwgVhSloFIMJMDFHtRw229QIJ6wIaKQz0X1Og== dependencies: - oboe "2.1.4" + oboe "2.1.5" underscore "1.9.1" - web3-core-helpers "1.2.11" + web3-core-helpers "1.3.0" web3-providers-ws@1.2.1: version "1.2.1" @@ -18648,15 +18667,15 @@ web3-providers-ws@1.2.1: web3-core-helpers "1.2.1" websocket "github:web3-js/WebSocket-Node#polyfill/globalThis" -web3-providers-ws@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.11.tgz#a1dfd6d9778d840561d9ec13dd453046451a96bb" - integrity sha512-ZxnjIY1Er8Ty+cE4migzr43zA/+72AF1myzsLaU5eVgdsfV7Jqx7Dix1hbevNZDKFlSoEyq/3j/jYalh3So1Zg== +web3-providers-ws@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.3.0.tgz#84adeff65acd4624d7f5bb43c5b2b22d8f0f63a4" + integrity sha512-Im5MthhJnJst8nSoq0TgbyOdaiFQFa5r6sHPOVllhgIgViDqzbnlAFW9sNzQ0Q8VXPNfPIQKi9cOrHlSRNPjRw== dependencies: eventemitter3 "4.0.4" underscore "1.9.1" - web3-core-helpers "1.2.11" - websocket "^1.0.31" + web3-core-helpers "1.3.0" + websocket "^1.0.32" web3-shh@1.2.1: version "1.2.1" @@ -18668,15 +18687,15 @@ web3-shh@1.2.1: web3-core-subscriptions "1.2.1" web3-net "1.2.1" -web3-shh@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.11.tgz#f5d086f9621c9a47e98d438010385b5f059fd88f" - integrity sha512-B3OrO3oG1L+bv3E1sTwCx66injW1A8hhwpknDUbV+sw3fehFazA06z9SGXUefuFI1kVs4q2vRi0n4oCcI4dZDg== +web3-shh@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.3.0.tgz#62d15297da8fb5f733dd1b98f9ade300590f4d49" + integrity sha512-IZTojA4VCwVq+7eEIHuL1tJXtU+LJDhO8Y2QmuwetEWW1iBgWCGPHZasipWP+7kDpSm/5lo5GRxL72FF/Os/tA== dependencies: - web3-core "1.2.11" - web3-core-method "1.2.11" - web3-core-subscriptions "1.2.11" - web3-net "1.2.11" + web3-core "1.3.0" + web3-core-method "1.3.0" + web3-core-subscriptions "1.3.0" + web3-net "1.3.0" web3-utils@1.2.1: version "1.2.1" @@ -18691,10 +18710,10 @@ web3-utils@1.2.1: underscore "1.9.1" utf8 "3.0.0" -web3-utils@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.11.tgz#af1942aead3fb166ae851a985bed8ef2c2d95a82" - integrity sha512-3Tq09izhD+ThqHEaWYX4VOT7dNPdZiO+c/1QMA0s5X2lDFKK/xHJb7cyTRRVzN2LvlHbR7baS1tmQhSua51TcQ== +web3-utils@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.3.0.tgz#5bac16e5e0ec9fe7bdcfadb621655e8aa3cf14e1" + integrity sha512-2mS5axFCbkhicmoDRuJeuo0TVGQDgC2sPi/5dblfVC+PMtX0efrb8Xlttv/eGkq7X4E83Pds34FH98TP2WOUZA== dependencies: bn.js "^4.11.9" eth-lib "0.2.8" @@ -18719,17 +18738,17 @@ web3@1.2.1: web3-utils "1.2.1" web3@^1.0.0-beta.34, web3@^1.2.2: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.11.tgz#50f458b2e8b11aa37302071c170ed61cff332975" - integrity sha512-mjQ8HeU41G6hgOYm1pmeH0mRAeNKJGnJEUzDMoerkpw7QUQT4exVREgF1MYPvL/z6vAshOXei25LE/t/Bxl8yQ== - dependencies: - web3-bzz "1.2.11" - web3-core "1.2.11" - web3-eth "1.2.11" - web3-eth-personal "1.2.11" - web3-net "1.2.11" - web3-shh "1.2.11" - web3-utils "1.2.11" + version "1.3.0" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.3.0.tgz#8fe4cd6e2a21c91904f343ba75717ee4c76bb349" + integrity sha512-4q9dna0RecnrlgD/bD1C5S+81Untbd6Z/TBD7rb+D5Bvvc0Wxjr4OP70x+LlnwuRDjDtzBwJbNUblh2grlVArw== + dependencies: + web3-bzz "1.3.0" + web3-core "1.3.0" + web3-eth "1.3.0" + web3-eth-personal "1.3.0" + web3-net "1.3.0" + web3-shh "1.3.0" + web3-utils "1.3.0" webcrypto-core@^1.1.6: version "1.1.8" @@ -18751,7 +18770,7 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -websocket@1.0.32, websocket@^1.0.31: +websocket@1.0.32, websocket@^1.0.32: version "1.0.32" resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.32.tgz#1f16ddab3a21a2d929dec1687ab21cfdc6d3dbb1" integrity sha512-i4yhcllSP4wrpoPMU2N0TQ/q0O94LRG/eUQjEAamRltjQ1oT1PFFKOG4i877OlJgCG8rw6LrrowJp+TYCEWF7Q==