Socket
Socket
Sign inDemoInstall

@dfinity/agent

Package Overview
Dependencies
Maintainers
11
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dfinity/agent - npm Package Compare versions

Comparing version 0.20.0-beta.0 to 0.20.0

5

lib/cjs/agent/http/index.js

@@ -54,2 +54,3 @@ "use strict";

const ed25519_1 = require("@noble/curves/ed25519");
const expirableMap_1 = require("../../utils/expirableMap");
const public_key_1 = require("../../public_key");

@@ -142,3 +143,5 @@ __exportStar(require("./transforms"), exports);

_HttpAgent_updatePipeline.set(this, []);
_HttpAgent_subnetKeys.set(this, new Map());
_HttpAgent_subnetKeys.set(this, new expirableMap_1.ExpirableMap({
expirationTime: 60 * 60 * 1000, // 1 hour
}));
_HttpAgent_verifyQuerySignatures.set(this, true);

@@ -145,0 +148,0 @@ /**

1

lib/cjs/agent/http/types.js

@@ -5,3 +5,2 @@ "use strict";

const random_1 = require("../../utils/random");
// tslint:enable:camel-case
// The types of values allowed in the `request_type` field for submit requests.

@@ -8,0 +7,0 @@ var SubmitRequestType;

@@ -6,3 +6,3 @@ "use strict";

*/
/* tslint:disable */
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -9,0 +9,0 @@ exports.default = ({ IDL }) => {

@@ -9,3 +9,2 @@ "use strict";

const asset_idl_1 = __importDefault(require("./asset_idl"));
/* tslint:enable */
/**

@@ -12,0 +11,0 @@ * Create a management canister actor.

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* This file is generated from the candid for asset management.
*/
/* tslint:disable */
Object.defineProperty(exports, "__esModule", { value: true });
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -8,0 +8,0 @@ exports.default = ({ IDL }) => {

"use strict";
/**
* This file is generated from the candid for asset management.
*/
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=management_service.js.map

@@ -267,6 +267,6 @@ "use strict";

};
// Controllers are CBOR-encoded buffers, starting with a Tag we don't need
// Controllers are CBOR-encoded buffers
const decodeControllers = (buf) => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [tag, ...controllersRaw] = decodeCbor(buf);
const controllersRaw = decodeCbor(buf);
return controllersRaw.map((buf) => {

@@ -273,0 +273,0 @@ return principal_1.Principal.fromUint8Array(new Uint8Array(buf));

@@ -30,5 +30,3 @@ "use strict";

exports.decode = exports.encode = exports.CborTag = void 0;
// tslint:disable:max-classes-per-file
// This file is based on:
// tslint:disable-next-line: max-line-length
// https://github.com/dfinity-lab/dfinity/blob/9bca65f8edd65701ea6bdb00e0752f9186bbc893/docs/spec/public/index.adoc#cbor-encoding-of-requests-and-responses

@@ -112,3 +110,2 @@ const borc_1 = __importDefault(require("borc"));

for (let i = 0; i < len; i++) {
// tslint:disable-next-line:no-bitwise
res = res * BigInt(0x100) + BigInt(buf[i]);

@@ -115,0 +112,0 @@ }

@@ -26,5 +26,4 @@ export declare type RequestId = ArrayBuffer & {

* @param map - Any non-nested object
* @param domainSeparator - optional domain separator
* @returns ArrayBuffer
*/
export declare function hashOfMap(map: Record<string, unknown>): ArrayBuffer;

@@ -26,2 +26,3 @@ "use strict";

if (value instanceof borc_1.default.Tagged) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return hashValue(value.value);

@@ -89,3 +90,2 @@ }

* @param map - Any non-nested object
* @param domainSeparator - optional domain separator
* @returns ArrayBuffer

@@ -92,0 +92,0 @@ */

@@ -37,3 +37,2 @@ "use strict";

.reduce((acc, curr, i) => {
// tslint:disable-next-line:no-bitwise
acc[(i / 2) | 0] = (acc[(i / 2) | 0] || '') + curr;

@@ -40,0 +39,0 @@ return acc;

@@ -31,4 +31,2 @@ "use strict";

const wasm_1 = require("./wasm");
/* tslint:disable */
/* eslint-disable */
let wasm;

@@ -35,0 +33,0 @@ const wasmBytes = base64Arraybuffer.decode(wasm_1.wasmBytesBase64);

@@ -25,2 +25,3 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {

import { ed25519 } from '@noble/curves/ed25519';
import { ExpirableMap } from '../../utils/expirableMap';
import { Ed25519PublicKey } from '../../public_key';

@@ -111,3 +112,5 @@ export * from './transforms';

_HttpAgent_updatePipeline.set(this, []);
_HttpAgent_subnetKeys.set(this, new Map());
_HttpAgent_subnetKeys.set(this, new ExpirableMap({
expirationTime: 60 * 60 * 1000, // 1 hour
}));
_HttpAgent_verifyQuerySignatures.set(this, true);

@@ -114,0 +117,0 @@ /**

import { randomNumber } from '../../utils/random';
// tslint:enable:camel-case
// The types of values allowed in the `request_type` field for submit requests.

@@ -4,0 +3,0 @@ export var SubmitRequestType;

/**
* This file is generated from the candid for asset management.
*/
/* tslint:disable */
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -6,0 +6,0 @@ export default ({ IDL }) => {

import { Actor } from '../actor';
import assetCanister from './asset_idl';
/* tslint:enable */
/**

@@ -5,0 +4,0 @@ * Create a management canister actor.

/**
* This file is generated from the candid for asset management.
*/
/* tslint:disable */
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

@@ -6,0 +6,0 @@ export default ({ IDL }) => {

@@ -0,2 +1,5 @@

/**
* This file is generated from the candid for asset management.
*/
export {};
//# sourceMappingURL=management_service.js.map

@@ -238,6 +238,6 @@ /** @module CanisterStatus */

};
// Controllers are CBOR-encoded buffers, starting with a Tag we don't need
// Controllers are CBOR-encoded buffers
const decodeControllers = (buf) => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [tag, ...controllersRaw] = decodeCbor(buf);
const controllersRaw = decodeCbor(buf);
return controllersRaw.map((buf) => {

@@ -244,0 +244,0 @@ return Principal.fromUint8Array(new Uint8Array(buf));

@@ -1,4 +0,2 @@

// tslint:disable:max-classes-per-file
// This file is based on:
// tslint:disable-next-line: max-line-length
// https://github.com/dfinity-lab/dfinity/blob/9bca65f8edd65701ea6bdb00e0752f9186bbc893/docs/spec/public/index.adoc#cbor-encoding-of-requests-and-responses

@@ -81,3 +79,2 @@ import borc from 'borc';

for (let i = 0; i < len; i++) {
// tslint:disable-next-line:no-bitwise
res = res * BigInt(0x100) + BigInt(buf[i]);

@@ -84,0 +81,0 @@ }

@@ -26,5 +26,4 @@ export declare type RequestId = ArrayBuffer & {

* @param map - Any non-nested object
* @param domainSeparator - optional domain separator
* @returns ArrayBuffer
*/
export declare function hashOfMap(map: Record<string, unknown>): ArrayBuffer;

@@ -19,2 +19,3 @@ import { lebEncode } from '@dfinity/candid';

if (value instanceof borc.Tagged) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return hashValue(value.value);

@@ -80,3 +81,2 @@ }

* @param map - Any non-nested object
* @param domainSeparator - optional domain separator
* @returns ArrayBuffer

@@ -83,0 +83,0 @@ */

@@ -32,3 +32,2 @@ /**

.reduce((acc, curr, i) => {
// tslint:disable-next-line:no-bitwise
acc[(i / 2) | 0] = (acc[(i / 2) | 0] || '') + curr;

@@ -35,0 +34,0 @@ return acc;

@@ -5,4 +5,2 @@ import * as base64Arraybuffer from 'base64-arraybuffer';

import { wasmBytesBase64 } from './wasm';
/* tslint:disable */
/* eslint-disable */
let wasm;

@@ -9,0 +7,0 @@ const wasmBytes = base64Arraybuffer.decode(wasmBytesBase64);

{
"name": "@dfinity/agent",
"version": "0.20.0-beta.0",
"version": "0.20.0",
"author": "DFINITY Stiftung <sdk@dfinity.org>",

@@ -46,10 +46,8 @@ "license": "Apache-2.0",

"make:docs/reference": "typedoc src/index.ts --out ../../docs/generated/agent --excludeInternal",
"test": "jest --verbose",
"test:coverage": "jest --verbose --collectCoverage",
"tslint:fix": "npm run lint -- --fix",
"tslint": "tslint --project tsconfig.json --config tslint.json"
"test": "jest",
"test:coverage": "jest --collectCoverage"
},
"peerDependencies": {
"@dfinity/candid": "^0.20.0-beta.0",
"@dfinity/principal": "^0.20.0-beta.0"
"@dfinity/candid": "^0.20.0",
"@dfinity/principal": "^0.20.0"
},

@@ -61,2 +59,3 @@ "dependencies": {

"borc": "^2.1.1",
"buffer": "^6.0.3",
"simple-cbor": "^0.4.1"

@@ -68,3 +67,3 @@ },

"@trust/webcrypto": "^0.9.2",
"@types/jest": "^28.1.4",
"@types/jest": "^29.5.5",
"@typescript-eslint/eslint-plugin": "^5.30.5",

@@ -74,12 +73,8 @@ "@typescript-eslint/parser": "^5.30.5",

"eslint": "^8.19.0",
"eslint-plugin-jsdoc": "^39.3.3",
"isomorphic-fetch": "^3.0.0",
"jest": "^28.1.2",
"jest": "^29.7.0",
"size-limit": "^8.2.6",
"text-encoding": "^0.7.0",
"ts-jest": "^28.0.5",
"ts-node": "^10.8.2",
"tslint": "^5.20.0",
"typedoc": "^0.22.11",
"typescript": "^4.7.4",
"whatwg-fetch": "^3.0.0"

@@ -86,0 +81,0 @@ },

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc