New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nimiq/rpc

Package Overview
Dependencies
Maintainers
8
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nimiq/rpc - npm Package Compare versions

Comparing version 0.1.2 to 0.1.4

dist/src/ObjectType.d.ts

2

dist/rpc.common.js

@@ -667,3 +667,3 @@ 'use strict';

}
toRequestUrl(baseUrl = '') {
toRequestUrl(baseUrl) {
return UrlRpcEncoder.prepareRedirectInvocation(baseUrl, this.id, this.returnURL || POSTMESSAGE_RETURN_URL, this.data.command, this.data.args);

@@ -670,0 +670,0 @@ }

@@ -664,3 +664,3 @@ class RandomUtils {

}
toRequestUrl(baseUrl = '') {
toRequestUrl(baseUrl) {
return UrlRpcEncoder.prepareRedirectInvocation(baseUrl, this.id, this.returnURL || POSTMESSAGE_RETURN_URL, this.data.command, this.data.args);

@@ -667,0 +667,0 @@ }

@@ -669,3 +669,3 @@ (function (global, factory) {

}
toRequestUrl(baseUrl = '') {
toRequestUrl(baseUrl) {
return UrlRpcEncoder.prepareRedirectInvocation(baseUrl, this.id, this.returnURL || POSTMESSAGE_RETURN_URL, this.data.command, this.data.args);

@@ -672,0 +672,0 @@ }

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

import { ObjectType } from './ObjectType';
export declare class RequestIdStorage {

@@ -12,4 +13,4 @@ static readonly KEY: string;

getCommand(id: number | string): string | null;
getState(id: number | string): string | null;
add(id: number, command: string, state?: string | null): void;
getState(id: number | string): ObjectType | null;
add(id: number, command: string, state?: ObjectType | null): void;
remove(id: number | string): void;

@@ -16,0 +17,0 @@ clear(): void;

import { ResponseMessage } from './Messages';
import { RequestIdStorage } from './RequestIdStorage';
import { ObjectType } from './ObjectType';
export interface ResponseHandler {
resolve: (result: any, id?: number, state?: string | null) => any;
reject: (error: any, id?: number, state?: string | null) => any;
resolve: (result: any, id?: number, state?: ObjectType | null) => any;
reject: (error: any, id?: number, state?: ObjectType | null) => any;
}

@@ -13,3 +14,3 @@ export declare abstract class RpcClient {

protected constructor(allowedOrigin: string, storeState?: boolean);
onResponse(command: string, resolve: (result: any, id?: number, state?: string | null) => any, reject: (error: any, id?: number, state?: string | null) => any): void;
onResponse(command: string, resolve: (result: any, id?: number, state?: ObjectType | null) => any, reject: (error: any, id?: number, state?: ObjectType | null) => any): void;
abstract init(): Promise<void>;

@@ -50,4 +51,4 @@ abstract close(): void;

call(returnURL: string, command: string, ...args: any[]): void;
callAndSaveLocalState(returnURL: string, state: string | null, command: string, ...args: any[]): void;
callAndSaveLocalState(returnURL: string, state: ObjectType | null, command: string, ...args: any[]): void;
private _rejectOnBack;
}

@@ -24,3 +24,3 @@ import { PostMessage, RedirectRequest, ResponseStatus } from './Messages';

reply(status: ResponseStatus, result: any): void;
toRequestUrl(baseUrl?: string): string;
toRequestUrl(baseUrl: string): string;
}
{
"name": "@nimiq/rpc",
"version": "0.1.2",
"version": "0.1.4",
"description": "RPC Client/Server",

@@ -5,0 +5,0 @@ "repository": {

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