Comparing version 1.10.18 to 1.10.19
@@ -0,0 +0,0 @@ export default class Ar { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import Api from "./lib/api"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import Api from "./lib/api"; |
@@ -33,3 +33,3 @@ "use strict"; | ||
} | ||
throw new Error(`Unable to get transaction offset: ${error_1.getError(resp)}`); | ||
throw new Error(`Unable to get transaction offset: ${(0, error_1.getError)(resp)}`); | ||
} | ||
@@ -41,3 +41,3 @@ async getChunk(offset) { | ||
} | ||
throw new Error(`Unable to get chunk: ${error_1.getError(resp)}`); | ||
throw new Error(`Unable to get chunk: ${(0, error_1.getError)(resp)}`); | ||
} | ||
@@ -59,6 +59,21 @@ async getChunkData(offset) { | ||
let byte = 0; | ||
while (startOffset + byte < endOffset) { | ||
const chunkData = await this.getChunkData(startOffset + byte); | ||
data.set(chunkData, byte); | ||
byte += chunkData.length; | ||
while (byte < size) { | ||
if (this.api.config.logging) { | ||
console.log(`[chunk] ${byte}/${size}`); | ||
} | ||
let chunkData; | ||
try { | ||
chunkData = await this.getChunkData(startOffset + byte); | ||
} | ||
catch (error) { | ||
console.error(`[chunk] Failed to fetch chunk at offset ${startOffset + byte}`); | ||
console.error(`[chunk] This could indicate that the chunk wasn't uploaded or hasn't yet seeded properly to a particular gatway/node`); | ||
} | ||
if (chunkData) { | ||
data.set(chunkData, byte); | ||
byte += chunkData.length; | ||
} | ||
else { | ||
throw new Error(`Coudn't complete data download at ${byte}/${size}`); | ||
} | ||
} | ||
@@ -65,0 +80,0 @@ return data; |
@@ -0,0 +0,0 @@ import Ar from "./ar"; |
@@ -0,0 +0,0 @@ "use strict"; |
import Arweave from "./common"; | ||
export = Arweave; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ /// <reference types="node" /> |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { JWKInterface } from "../wallet"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=crypto-interface.js.map |
@@ -0,0 +0,0 @@ /// <reference types="node" /> |
@@ -21,5 +21,8 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const crypto_1 = __importDefault(require("crypto")); | ||
const pem_1 = require("./pem"); | ||
const crypto = __importStar(require("crypto")); | ||
const constants = __importStar(require("constants")); | ||
@@ -34,7 +37,7 @@ class NodeCryptoDriver { | ||
generateJWK() { | ||
if (typeof crypto.generateKeyPair != "function") { | ||
if (typeof crypto_1.default.generateKeyPair != "function") { | ||
throw new Error("Keypair generation not supported in this version of Node, only supported in versions 10+"); | ||
} | ||
return new Promise((resolve, reject) => { | ||
crypto.generateKeyPair("rsa", { | ||
crypto_1.default.generateKeyPair("rsa", { | ||
modulusLength: this.keyLength, | ||
@@ -57,3 +60,3 @@ publicExponent: this.publicExponent, | ||
return new Promise((resolve, reject) => { | ||
resolve(crypto | ||
resolve(crypto_1.default | ||
.createSign(this.hashAlgorithm) | ||
@@ -76,3 +79,3 @@ .update(data) | ||
const pem = this.jwkToPem(publicKey); | ||
resolve(crypto.createVerify(this.hashAlgorithm).update(data).verify({ | ||
resolve(crypto_1.default.createVerify(this.hashAlgorithm).update(data).verify({ | ||
key: pem, | ||
@@ -85,3 +88,3 @@ padding: constants.RSA_PKCS1_PSS_PADDING, | ||
return new Promise((resolve, reject) => { | ||
resolve(crypto | ||
resolve(crypto_1.default | ||
.createHash(this.parseHashAlgorithm(algorithm)) | ||
@@ -106,5 +109,5 @@ .update(data) | ||
// an additional random salt per passphrase. | ||
const derivedKey = crypto.pbkdf2Sync(key, (salt = salt ? salt : "salt"), 100000, 32, this.hashAlgorithm); | ||
const iv = crypto.randomBytes(16); | ||
const cipher = crypto.createCipheriv(this.encryptionAlgorithm, derivedKey, iv); | ||
const derivedKey = crypto_1.default.pbkdf2Sync(key, (salt = salt ? salt : "salt"), 100000, 32, this.hashAlgorithm); | ||
const iv = crypto_1.default.randomBytes(16); | ||
const cipher = crypto_1.default.createCipheriv(this.encryptionAlgorithm, derivedKey, iv); | ||
const encrypted = Buffer.concat([iv, cipher.update(data), cipher.final()]); | ||
@@ -127,6 +130,6 @@ return encrypted; | ||
// an additional random salt per passphrase. | ||
const derivedKey = crypto.pbkdf2Sync(key, (salt = salt ? salt : "salt"), 100000, 32, this.hashAlgorithm); | ||
const derivedKey = crypto_1.default.pbkdf2Sync(key, (salt = salt ? salt : "salt"), 100000, 32, this.hashAlgorithm); | ||
const iv = encrypted.slice(0, 16); | ||
const data = encrypted.slice(16); | ||
const decipher = crypto.createDecipheriv(this.encryptionAlgorithm, derivedKey, iv); | ||
const decipher = crypto_1.default.createDecipheriv(this.encryptionAlgorithm, derivedKey, iv); | ||
const decrypted = Buffer.concat([ | ||
@@ -143,6 +146,6 @@ decipher.update(data), | ||
jwkToPem(jwk) { | ||
return pem_1.jwkTopem(jwk); | ||
return (0, pem_1.jwkTopem)(jwk); | ||
} | ||
pemToJWK(pem) { | ||
let jwk = pem_1.pemTojwk(pem); | ||
let jwk = (0, pem_1.pemTojwk)(pem); | ||
return jwk; | ||
@@ -149,0 +152,0 @@ } |
export declare function pemTojwk(pem: any, extras?: any): any; | ||
export declare function jwkTopem(json: any): any; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ /// <reference types="node" /> |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ declare type DeepHashChunk = Uint8Array | DeepHashChunks; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { AxiosResponse } from "axios"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export interface Chunk { |
@@ -143,3 +143,3 @@ "use strict"; | ||
offset: node.maxByteRange - 1, | ||
proof: utils_1.concatBuffers([ | ||
proof: (0, utils_1.concatBuffers)([ | ||
proof, | ||
@@ -152,3 +152,3 @@ node.dataHash, | ||
if (node.type == "branch") { | ||
const partialProof = utils_1.concatBuffers([ | ||
const partialProof = (0, utils_1.concatBuffers)([ | ||
proof, | ||
@@ -241,3 +241,3 @@ node.leftChild.id, | ||
]); | ||
let result = exports.arrayCompare(id, pathDataHash); | ||
let result = (0, exports.arrayCompare)(id, pathDataHash); | ||
if (result) { | ||
@@ -263,3 +263,3 @@ return { | ||
]); | ||
if (exports.arrayCompare(id, pathHash)) { | ||
if ((0, exports.arrayCompare)(id, pathHash)) { | ||
if (dest < offset) { | ||
@@ -293,3 +293,3 @@ return await validatePath(left, dest, leftBound, Math.min(rightBound, offset), remainder); | ||
]); | ||
const updatedOutput = `${output}\n${util_1.inspect(Buffer.from(left))},${util_1.inspect(Buffer.from(right))},${offset} => ${util_1.inspect(pathHash)}`; | ||
const updatedOutput = `${output}\n${(0, util_1.inspect)(Buffer.from(left))},${(0, util_1.inspect)(Buffer.from(right))},${offset} => ${(0, util_1.inspect)(pathHash)}`; | ||
return debug(remainder, updatedOutput); | ||
@@ -296,0 +296,0 @@ } |
@@ -32,3 +32,3 @@ import Transaction from "./transaction"; | ||
*/ | ||
uploadChunk(): Promise<void>; | ||
uploadChunk(chunkIndex_?: number): Promise<void>; | ||
/** | ||
@@ -35,0 +35,0 @@ * Reconstructs an upload from its serialized state and data. |
@@ -88,3 +88,3 @@ "use strict"; | ||
*/ | ||
async uploadChunk() { | ||
async uploadChunk(chunkIndex_) { | ||
if (this.isComplete) { | ||
@@ -117,4 +117,7 @@ throw new Error(`Upload is already complete`); | ||
} | ||
const chunk = this.transaction.getChunk(this.chunkIndex, this.data); | ||
const chunkOk = await merkle_1.validatePath(this.transaction.chunks.data_root, parseInt(chunk.offset), 0, parseInt(chunk.data_size), ArweaveUtils.b64UrlToBuffer(chunk.data_path)); | ||
if (chunkIndex_) { | ||
this.chunkIndex = chunkIndex_; | ||
} | ||
const chunk = this.transaction.getChunk(chunkIndex_ || this.chunkIndex, this.data); | ||
const chunkOk = await (0, merkle_1.validatePath)(this.transaction.chunks.data_root, parseInt(chunk.offset), 0, parseInt(chunk.data_size), ArweaveUtils.b64UrlToBuffer(chunk.data_path)); | ||
if (!chunkOk) { | ||
@@ -136,3 +139,3 @@ throw new Error(`Unable to validate chunk ${this.chunkIndex}`); | ||
else { | ||
this.lastResponseError = error_1.getError(resp); | ||
this.lastResponseError = (0, error_1.getError)(resp); | ||
if (FATAL_CHUNK_UPLOAD_ERRORS.includes(this.lastResponseError)) { | ||
@@ -228,3 +231,3 @@ throw new Error(`Fatal error uploading chunk ${this.chunkIndex}: ${this.lastResponseError}`); | ||
} | ||
this.lastResponseError = error_1.getError(resp); | ||
this.lastResponseError = (0, error_1.getError)(resp); | ||
throw new Error(`Unable to upload transaction: ${resp.status}, ${this.lastResponseError}`); | ||
@@ -237,3 +240,3 @@ } | ||
if (!(resp.status >= 200 && resp.status < 300)) { | ||
this.lastResponseError = error_1.getError(resp); | ||
this.lastResponseError = (0, error_1.getError)(resp); | ||
throw new Error(`Unable to upload transaction: ${resp.status}, ${this.lastResponseError}`); | ||
@@ -240,0 +243,0 @@ } |
@@ -0,0 +0,0 @@ import { Chunk, Proof } from "./merkle"; |
@@ -130,3 +130,3 @@ "use strict"; | ||
if (!this.chunks && data.byteLength > 0) { | ||
this.chunks = await merkle_1.generateTransactionChunks(data); | ||
this.chunks = await (0, merkle_1.generateTransactionChunks)(data); | ||
this.data_root = ArweaveUtils.bufferTob64Url(this.chunks.data_root); | ||
@@ -180,3 +180,5 @@ } | ||
case 2: | ||
await this.prepareChunks(this.data); | ||
if (!this.data_root) { | ||
await this.prepareChunks(this.data); | ||
} | ||
const tagList = this.tags.map((tag) => [ | ||
@@ -186,3 +188,3 @@ tag.get("name", { decode: true, string: false }), | ||
]); | ||
return await deepHash_1.default([ | ||
return await (0, deepHash_1.default)([ | ||
ArweaveUtils.stringToBuffer(this.format.toString()), | ||
@@ -189,0 +191,0 @@ this.get("owner", { decode: true, string: false }), |
@@ -0,0 +0,0 @@ export declare type Base64UrlString = string; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export interface JWKPublicInterface { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=wallet.js.map |
@@ -0,0 +0,0 @@ import Api from "./lib/api"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import Api from "./lib/api"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ /// <reference types="node" /> |
@@ -37,3 +37,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const error_1 = __importStar(require("./lib/error")); | ||
const error_1 = __importDefault(require("./lib/error")); | ||
const transaction_1 = __importDefault(require("./lib/transaction")); | ||
@@ -138,22 +138,7 @@ const ArweaveUtils = __importStar(require("./lib/utils")); | ||
async getData(id, options) { | ||
// Attempt to download from /txid, fall back to downloading chunks. | ||
const resp = await this.api.get(`${id}`, { responseType: "arraybuffer" }); | ||
let data = undefined; | ||
if (resp.status === 200) { | ||
data = new Uint8Array(resp.data); | ||
} | ||
if (resp.status === 400 && error_1.getError(resp) === "tx_data_too_big") { | ||
data = await this.chunks.downloadChunkedData(id); | ||
} | ||
// If we don't have data, throw an exception. Previously we | ||
// just returned an empty data object. | ||
if (!data) { | ||
if (resp.status == 404) { | ||
throw new error_1.default("TX_NOT_FOUND" /* TX_NOT_FOUND */); | ||
} | ||
if (resp.status == 410) { | ||
throw new error_1.default("TX_FAILED" /* TX_FAILED */); | ||
} | ||
throw new Error(`Unable to get data: ${resp.status} - ${error_1.getError(resp)}`); | ||
} | ||
// Only download from chunks, while /{txid} may work | ||
// it may give false positive about the data being seeded | ||
// if getData is problematic, please consider fetch-ing | ||
// an arweave gateway directly! | ||
const data = await this.chunks.downloadChunkedData(id); | ||
if (options && options.decode && !options.string) { | ||
@@ -160,0 +145,0 @@ return data; |
@@ -0,0 +0,0 @@ import Api from "./lib/api"; |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "arweave", | ||
"version": "1.10.18", | ||
"version": "1.10.19", | ||
"description": "Arweave JS client library", | ||
@@ -24,4 +24,4 @@ "main": "./node/index.js", | ||
"clean": "npm run clean:dist && npm run clean:package && npm run clean:bundle", | ||
"prepare": "npm run clean && npm run build", | ||
"test": "mocha --require ts-node/register test/*.ts && npm run test:web", | ||
"prepublishOnly": "npm run clean && npm run build", | ||
"test": "mocha --require ts-node/register test/*.ts && echo \"NOW RUN => 'npm run test:web' <= \" ", | ||
"test:web": "npm run bundle:web && npx webpack --config-name web-tests && opener test/web/web.html", | ||
@@ -28,0 +28,0 @@ "prettier:check": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\"", |
@@ -108,3 +108,3 @@ # Arweave JS | ||
<script> | ||
const arweave = Arweave.init(); | ||
const arweave = Arweave.init({}); | ||
arweave.network.getInfo().then(console.log); | ||
@@ -111,0 +111,0 @@ </script> |
@@ -0,0 +0,0 @@ export default class Ar { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import Api from "./lib/api"; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const error_1 = require("./lib/error"); | ||
const error_1 = __importDefault(require("./lib/error")); | ||
require("arconnect"); | ||
@@ -5,0 +8,0 @@ class Blocks { |
@@ -0,0 +0,0 @@ import Api from "./lib/api"; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const error_1 = require("./lib/error"); | ||
const ArweaveUtils = require("./lib/utils"); | ||
const ArweaveUtils = __importStar(require("./lib/utils")); | ||
class Chunks { | ||
@@ -14,3 +33,3 @@ constructor(api) { | ||
} | ||
throw new Error(`Unable to get transaction offset: ${error_1.getError(resp)}`); | ||
throw new Error(`Unable to get transaction offset: ${(0, error_1.getError)(resp)}`); | ||
} | ||
@@ -22,3 +41,3 @@ async getChunk(offset) { | ||
} | ||
throw new Error(`Unable to get chunk: ${error_1.getError(resp)}`); | ||
throw new Error(`Unable to get chunk: ${(0, error_1.getError)(resp)}`); | ||
} | ||
@@ -40,6 +59,21 @@ async getChunkData(offset) { | ||
let byte = 0; | ||
while (startOffset + byte < endOffset) { | ||
const chunkData = await this.getChunkData(startOffset + byte); | ||
data.set(chunkData, byte); | ||
byte += chunkData.length; | ||
while (byte < size) { | ||
if (this.api.config.logging) { | ||
console.log(`[chunk] ${byte}/${size}`); | ||
} | ||
let chunkData; | ||
try { | ||
chunkData = await this.getChunkData(startOffset + byte); | ||
} | ||
catch (error) { | ||
console.error(`[chunk] Failed to fetch chunk at offset ${startOffset + byte}`); | ||
console.error(`[chunk] This could indicate that the chunk wasn't uploaded or hasn't yet seeded properly to a particular gatway/node`); | ||
} | ||
if (chunkData) { | ||
data.set(chunkData, byte); | ||
byte += chunkData.length; | ||
} | ||
else { | ||
throw new Error(`Coudn't complete data download at ${byte}/${size}`); | ||
} | ||
} | ||
@@ -46,0 +80,0 @@ return data; |
@@ -0,0 +0,0 @@ import Ar from "./ar"; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const ar_1 = require("./ar"); | ||
const api_1 = require("./lib/api"); | ||
const network_1 = require("./network"); | ||
const transactions_1 = require("./transactions"); | ||
const wallets_1 = require("./wallets"); | ||
const transaction_1 = require("./lib/transaction"); | ||
const ArweaveUtils = require("./lib/utils"); | ||
const silo_1 = require("./silo"); | ||
const chunks_1 = require("./chunks"); | ||
const blocks_1 = require("./blocks"); | ||
const ar_1 = __importDefault(require("./ar")); | ||
const api_1 = __importDefault(require("./lib/api")); | ||
const network_1 = __importDefault(require("./network")); | ||
const transactions_1 = __importDefault(require("./transactions")); | ||
const wallets_1 = __importDefault(require("./wallets")); | ||
const transaction_1 = __importDefault(require("./lib/transaction")); | ||
const ArweaveUtils = __importStar(require("./lib/utils")); | ||
const silo_1 = __importDefault(require("./silo")); | ||
const chunks_1 = __importDefault(require("./chunks")); | ||
const blocks_1 = __importDefault(require("./blocks")); | ||
class Arweave { | ||
@@ -14,0 +36,0 @@ constructor(apiConfig) { |
@@ -0,0 +0,0 @@ import Arweave from "./common"; |
@@ -12,5 +12,8 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const common_1 = require("./common"); | ||
const webcrypto_driver_1 = require("./lib/crypto/webcrypto-driver"); | ||
const common_1 = __importDefault(require("./common")); | ||
const webcrypto_driver_1 = __importDefault(require("./lib/crypto/webcrypto-driver")); | ||
common_1.default.crypto = new webcrypto_driver_1.default(); | ||
@@ -17,0 +20,0 @@ common_1.default.init = function (apiConfig = {}) { |
@@ -0,0 +0,0 @@ /// <reference types="node" /> |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const axios_1 = require("axios"); | ||
const axios_1 = __importDefault(require("axios")); | ||
class Api { | ||
@@ -5,0 +8,0 @@ constructor(config) { |
@@ -0,0 +0,0 @@ import { JWKInterface } from "../wallet"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=crypto-interface.js.map |
@@ -0,0 +0,0 @@ /// <reference types="node" /> |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const crypto_1 = __importDefault(require("crypto")); | ||
const pem_1 = require("./pem"); | ||
const crypto = require("crypto"); | ||
const constants = require("constants"); | ||
const constants = __importStar(require("constants")); | ||
class NodeCryptoDriver { | ||
@@ -14,7 +36,7 @@ constructor() { | ||
generateJWK() { | ||
if (typeof crypto.generateKeyPair != "function") { | ||
if (typeof crypto_1.default.generateKeyPair != "function") { | ||
throw new Error("Keypair generation not supported in this version of Node, only supported in versions 10+"); | ||
} | ||
return new Promise((resolve, reject) => { | ||
crypto.generateKeyPair("rsa", { | ||
crypto_1.default.generateKeyPair("rsa", { | ||
modulusLength: this.keyLength, | ||
@@ -37,3 +59,3 @@ publicExponent: this.publicExponent, | ||
return new Promise((resolve, reject) => { | ||
resolve(crypto | ||
resolve(crypto_1.default | ||
.createSign(this.hashAlgorithm) | ||
@@ -56,3 +78,3 @@ .update(data) | ||
const pem = this.jwkToPem(publicKey); | ||
resolve(crypto.createVerify(this.hashAlgorithm).update(data).verify({ | ||
resolve(crypto_1.default.createVerify(this.hashAlgorithm).update(data).verify({ | ||
key: pem, | ||
@@ -65,3 +87,3 @@ padding: constants.RSA_PKCS1_PSS_PADDING, | ||
return new Promise((resolve, reject) => { | ||
resolve(crypto | ||
resolve(crypto_1.default | ||
.createHash(this.parseHashAlgorithm(algorithm)) | ||
@@ -86,5 +108,5 @@ .update(data) | ||
// an additional random salt per passphrase. | ||
const derivedKey = crypto.pbkdf2Sync(key, (salt = salt ? salt : "salt"), 100000, 32, this.hashAlgorithm); | ||
const iv = crypto.randomBytes(16); | ||
const cipher = crypto.createCipheriv(this.encryptionAlgorithm, derivedKey, iv); | ||
const derivedKey = crypto_1.default.pbkdf2Sync(key, (salt = salt ? salt : "salt"), 100000, 32, this.hashAlgorithm); | ||
const iv = crypto_1.default.randomBytes(16); | ||
const cipher = crypto_1.default.createCipheriv(this.encryptionAlgorithm, derivedKey, iv); | ||
const encrypted = Buffer.concat([iv, cipher.update(data), cipher.final()]); | ||
@@ -107,6 +129,6 @@ return encrypted; | ||
// an additional random salt per passphrase. | ||
const derivedKey = crypto.pbkdf2Sync(key, (salt = salt ? salt : "salt"), 100000, 32, this.hashAlgorithm); | ||
const derivedKey = crypto_1.default.pbkdf2Sync(key, (salt = salt ? salt : "salt"), 100000, 32, this.hashAlgorithm); | ||
const iv = encrypted.slice(0, 16); | ||
const data = encrypted.slice(16); | ||
const decipher = crypto.createDecipheriv(this.encryptionAlgorithm, derivedKey, iv); | ||
const decipher = crypto_1.default.createDecipheriv(this.encryptionAlgorithm, derivedKey, iv); | ||
const decrypted = Buffer.concat([ | ||
@@ -123,6 +145,6 @@ decipher.update(data), | ||
jwkToPem(jwk) { | ||
return pem_1.jwkTopem(jwk); | ||
return (0, pem_1.jwkTopem)(jwk); | ||
} | ||
pemToJWK(pem) { | ||
let jwk = pem_1.pemTojwk(pem); | ||
let jwk = (0, pem_1.pemTojwk)(pem); | ||
return jwk; | ||
@@ -129,0 +151,0 @@ } |
export declare function pemTojwk(pem: any, extras?: any): any; | ||
export declare function jwkTopem(json: any): any; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.jwkTopem = exports.pemTojwk = void 0; | ||
// @ts-ignore | ||
const asn = require("asn1.js"); | ||
const asn = __importStar(require("asn1.js")); | ||
function urlize(base64) { | ||
@@ -7,0 +26,0 @@ return base64.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); |
@@ -0,0 +0,0 @@ /// <reference types="node" /> |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const ArweaveUtils = require("../utils"); | ||
const ArweaveUtils = __importStar(require("../utils")); | ||
class WebCryptoDriver { | ||
@@ -5,0 +24,0 @@ constructor() { |
@@ -0,0 +0,0 @@ declare type DeepHashChunk = Uint8Array | DeepHashChunks; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const common_1 = require("../common"); | ||
const common_1 = __importDefault(require("../common")); | ||
async function deepHash(data) { | ||
@@ -5,0 +8,0 @@ if (Array.isArray(data)) { |
@@ -0,0 +0,0 @@ import { AxiosResponse } from "axios"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export interface Chunk { |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -7,3 +10,3 @@ exports.debug = exports.validatePath = exports.arrayCompare = exports.bufferToInt = exports.intToBuffer = exports.arrayFlatten = exports.generateProofs = exports.buildLayers = exports.generateTransactionChunks = exports.generateTree = exports.computeRootHash = exports.generateLeaves = exports.chunkData = exports.MIN_CHUNK_SIZE = exports.MAX_CHUNK_SIZE = void 0; | ||
*/ | ||
const common_1 = require("../common"); | ||
const common_1 = __importDefault(require("../common")); | ||
const utils_1 = require("./utils"); | ||
@@ -141,3 +144,3 @@ const util_1 = require("util"); | ||
offset: node.maxByteRange - 1, | ||
proof: utils_1.concatBuffers([ | ||
proof: (0, utils_1.concatBuffers)([ | ||
proof, | ||
@@ -150,3 +153,3 @@ node.dataHash, | ||
if (node.type == "branch") { | ||
const partialProof = utils_1.concatBuffers([ | ||
const partialProof = (0, utils_1.concatBuffers)([ | ||
proof, | ||
@@ -239,3 +242,3 @@ node.leftChild.id, | ||
]); | ||
let result = exports.arrayCompare(id, pathDataHash); | ||
let result = (0, exports.arrayCompare)(id, pathDataHash); | ||
if (result) { | ||
@@ -261,3 +264,3 @@ return { | ||
]); | ||
if (exports.arrayCompare(id, pathHash)) { | ||
if ((0, exports.arrayCompare)(id, pathHash)) { | ||
if (dest < offset) { | ||
@@ -291,3 +294,3 @@ return await validatePath(left, dest, leftBound, Math.min(rightBound, offset), remainder); | ||
]); | ||
const updatedOutput = `${output}\n${util_1.inspect(Buffer.from(left))},${util_1.inspect(Buffer.from(right))},${offset} => ${util_1.inspect(pathHash)}`; | ||
const updatedOutput = `${output}\n${(0, util_1.inspect)(Buffer.from(left))},${(0, util_1.inspect)(Buffer.from(right))},${offset} => ${(0, util_1.inspect)(pathHash)}`; | ||
return debug(remainder, updatedOutput); | ||
@@ -294,0 +297,0 @@ } |
@@ -32,3 +32,3 @@ import Transaction from "./transaction"; | ||
*/ | ||
uploadChunk(): Promise<void>; | ||
uploadChunk(chunkIndex_?: number): Promise<void>; | ||
/** | ||
@@ -35,0 +35,0 @@ * Reconstructs an upload from its serialized state and data. |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TransactionUploader = void 0; | ||
const transaction_1 = require("./transaction"); | ||
const ArweaveUtils = require("./utils"); | ||
const transaction_1 = __importDefault(require("./transaction")); | ||
const ArweaveUtils = __importStar(require("./utils")); | ||
const error_1 = require("./error"); | ||
@@ -66,3 +88,3 @@ const merkle_1 = require("./merkle"); | ||
*/ | ||
async uploadChunk() { | ||
async uploadChunk(chunkIndex_) { | ||
if (this.isComplete) { | ||
@@ -95,4 +117,7 @@ throw new Error(`Upload is already complete`); | ||
} | ||
const chunk = this.transaction.getChunk(this.chunkIndex, this.data); | ||
const chunkOk = await merkle_1.validatePath(this.transaction.chunks.data_root, parseInt(chunk.offset), 0, parseInt(chunk.data_size), ArweaveUtils.b64UrlToBuffer(chunk.data_path)); | ||
if (chunkIndex_) { | ||
this.chunkIndex = chunkIndex_; | ||
} | ||
const chunk = this.transaction.getChunk(chunkIndex_ || this.chunkIndex, this.data); | ||
const chunkOk = await (0, merkle_1.validatePath)(this.transaction.chunks.data_root, parseInt(chunk.offset), 0, parseInt(chunk.data_size), ArweaveUtils.b64UrlToBuffer(chunk.data_path)); | ||
if (!chunkOk) { | ||
@@ -114,3 +139,3 @@ throw new Error(`Unable to validate chunk ${this.chunkIndex}`); | ||
else { | ||
this.lastResponseError = error_1.getError(resp); | ||
this.lastResponseError = (0, error_1.getError)(resp); | ||
if (FATAL_CHUNK_UPLOAD_ERRORS.includes(this.lastResponseError)) { | ||
@@ -206,3 +231,3 @@ throw new Error(`Fatal error uploading chunk ${this.chunkIndex}: ${this.lastResponseError}`); | ||
} | ||
this.lastResponseError = error_1.getError(resp); | ||
this.lastResponseError = (0, error_1.getError)(resp); | ||
throw new Error(`Unable to upload transaction: ${resp.status}, ${this.lastResponseError}`); | ||
@@ -215,3 +240,3 @@ } | ||
if (!(resp.status >= 200 && resp.status < 300)) { | ||
this.lastResponseError = error_1.getError(resp); | ||
this.lastResponseError = (0, error_1.getError)(resp); | ||
throw new Error(`Unable to upload transaction: ${resp.status}, ${this.lastResponseError}`); | ||
@@ -218,0 +243,0 @@ } |
@@ -0,0 +0,0 @@ import { Chunk, Proof } from "./merkle"; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Tag = void 0; | ||
const ArweaveUtils = require("./utils"); | ||
const deepHash_1 = require("./deepHash"); | ||
const ArweaveUtils = __importStar(require("./utils")); | ||
const deepHash_1 = __importDefault(require("./deepHash")); | ||
const merkle_1 = require("./merkle"); | ||
@@ -108,3 +130,3 @@ class BaseObject { | ||
if (!this.chunks && data.byteLength > 0) { | ||
this.chunks = await merkle_1.generateTransactionChunks(data); | ||
this.chunks = await (0, merkle_1.generateTransactionChunks)(data); | ||
this.data_root = ArweaveUtils.bufferTob64Url(this.chunks.data_root); | ||
@@ -158,3 +180,5 @@ } | ||
case 2: | ||
await this.prepareChunks(this.data); | ||
if (!this.data_root) { | ||
await this.prepareChunks(this.data); | ||
} | ||
const tagList = this.tags.map((tag) => [ | ||
@@ -164,3 +188,3 @@ tag.get("name", { decode: true, string: false }), | ||
]); | ||
return await deepHash_1.default([ | ||
return await (0, deepHash_1.default)([ | ||
ArweaveUtils.stringToBuffer(this.format.toString()), | ||
@@ -167,0 +191,0 @@ this.get("owner", { decode: true, string: false }), |
@@ -0,0 +0,0 @@ export declare type Base64UrlString = string; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.b64UrlDecode = exports.b64UrlEncode = exports.bufferTob64Url = exports.bufferTob64 = exports.b64UrlToBuffer = exports.stringToB64Url = exports.stringToBuffer = exports.bufferToString = exports.b64UrlToString = exports.concatBuffers = void 0; | ||
const B64js = require("base64-js"); | ||
const B64js = __importStar(require("base64-js")); | ||
function concatBuffers(buffers) { | ||
@@ -6,0 +25,0 @@ let total_length = 0; |
@@ -0,0 +0,0 @@ export interface JWKPublicInterface { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=wallet.js.map |
@@ -0,0 +0,0 @@ import Api from "./lib/api"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import Api from "./lib/api"; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SiloResource = void 0; | ||
const ArweaveUtils = require("./lib/utils"); | ||
const ArweaveUtils = __importStar(require("./lib/utils")); | ||
class Silo { | ||
@@ -6,0 +25,0 @@ constructor(api, crypto, transactions) { |
@@ -0,0 +0,0 @@ /// <reference types="node" /> |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } | ||
@@ -14,6 +33,9 @@ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const error_1 = require("./lib/error"); | ||
const transaction_1 = require("./lib/transaction"); | ||
const ArweaveUtils = require("./lib/utils"); | ||
const error_1 = __importDefault(require("./lib/error")); | ||
const transaction_1 = __importDefault(require("./lib/transaction")); | ||
const ArweaveUtils = __importStar(require("./lib/utils")); | ||
const transaction_uploader_1 = require("./lib/transaction-uploader"); | ||
@@ -116,22 +138,7 @@ require("arconnect"); | ||
async getData(id, options) { | ||
// Attempt to download from /txid, fall back to downloading chunks. | ||
const resp = await this.api.get(`${id}`, { responseType: "arraybuffer" }); | ||
let data = undefined; | ||
if (resp.status === 200) { | ||
data = new Uint8Array(resp.data); | ||
} | ||
if (resp.status === 400 && error_1.getError(resp) === "tx_data_too_big") { | ||
data = await this.chunks.downloadChunkedData(id); | ||
} | ||
// If we don't have data, throw an exception. Previously we | ||
// just returned an empty data object. | ||
if (!data) { | ||
if (resp.status == 404) { | ||
throw new error_1.default("TX_NOT_FOUND" /* TX_NOT_FOUND */); | ||
} | ||
if (resp.status == 410) { | ||
throw new error_1.default("TX_FAILED" /* TX_FAILED */); | ||
} | ||
throw new Error(`Unable to get data: ${resp.status} - ${error_1.getError(resp)}`); | ||
} | ||
// Only download from chunks, while /{txid} may work | ||
// it may give false positive about the data being seeded | ||
// if getData is problematic, please consider fetch-ing | ||
// an arweave gateway directly! | ||
const data = await this.chunks.downloadChunkedData(id); | ||
if (options && options.decode && !options.string) { | ||
@@ -138,0 +145,0 @@ return data; |
@@ -0,0 +0,0 @@ import Api from "./lib/api"; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const ArweaveUtils = require("./lib/utils"); | ||
const ArweaveUtils = __importStar(require("./lib/utils")); | ||
require("arconnect"); | ||
@@ -5,0 +24,0 @@ class Wallets { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1283371
14411
1