@toruslabs/casper-controllers
Advanced tools
Comparing version 1.6.6 to 1.6.7
@@ -5,2 +5,3 @@ export { default as AccountTrackerController } from "./Account/AccountTrackerController"; | ||
export { default as KeyringController } from "./Keyring/KeyringController"; | ||
export { default as MessageController } from "./Messages/MessageController"; | ||
export * from "./Network/createCasperMiddleware"; | ||
@@ -7,0 +8,0 @@ export * from "./Network/createJsonRpcClient"; |
@@ -14,2 +14,3 @@ import { BaseConfig, BaseKeyringController, IKeyringController, KeyringControllerState } from "@toruslabs/base-controllers"; | ||
signTransaction<T>(deploy: T, address: string): T; | ||
signMessage(message: string, address: string): Uint8Array; | ||
} |
import { InPageWalletProviderState } from "@toruslabs/base-controllers"; | ||
import { JRPCEngineEndCallback, JRPCEngineNextCallback, JRPCMiddleware, JRPCRequest, JRPCResponse } from "@toruslabs/openlogin-jrpc"; | ||
import { GetDeployResult } from "casper-js-sdk"; | ||
import { DeployHashParams, Transaction } from "../utils/interfaces"; | ||
import { DeployHashParams, MessageInput, Transaction } from "../utils/interfaces"; | ||
export interface IProviderHandlers { | ||
@@ -9,2 +9,8 @@ version: string; | ||
getAccounts: (req: JRPCRequest<string[]>) => Promise<string[]>; | ||
signMessage: (msg: MessageInput, req: JRPCRequest<MessageInput> & { | ||
origin: string; | ||
windowId?: string; | ||
}) => Promise<{ | ||
signature: Uint8Array; | ||
}>; | ||
processDeploy: (txParams: Transaction, req: JRPCRequest<Transaction> & { | ||
@@ -21,2 +27,7 @@ origin: string; | ||
} | ||
export declare function createSignMessageMiddleware({ signMessage, }: { | ||
signMessage: IProviderHandlers["signMessage"]; | ||
}): JRPCMiddleware<MessageInput, { | ||
signature: Uint8Array; | ||
}>; | ||
export declare function createProcessDeployMiddleware({ processDeploy, }: { | ||
@@ -23,0 +34,0 @@ processDeploy: IProviderHandlers["processDeploy"]; |
@@ -155,2 +155,31 @@ import { AddressPreferences, BaseBlockTrackerState, NetworkConfig, NetworkState, PopupWhitelabelData, ProviderConfig, TransactionStatus, User } from "@toruslabs/base-controllers"; | ||
} | ||
export declare const MessageStatus: { | ||
UNAPPROVED: string; | ||
SIGNED: string; | ||
REJECTED: string; | ||
FAILED: string; | ||
}; | ||
export declare type MessageStatusType = typeof MessageStatus[keyof typeof MessageStatus]; | ||
export interface MessageInput { | ||
message: string; | ||
from: string; | ||
} | ||
export interface Message { | ||
id: string; | ||
messageString: string; | ||
from: string; | ||
signature?: Uint8Array; | ||
origin?: string; | ||
status: MessageStatusType; | ||
time: number; | ||
error?: Error; | ||
} | ||
export interface MessageChannelEventData { | ||
whitelabelData: PopupWhitelabelData; | ||
msgParams: Message; | ||
origin: string; | ||
} | ||
export declare const MESSAGE_EVENTS: { | ||
UNAPPROVED_MSG: string; | ||
}; | ||
export {}; |
{ | ||
"name": "@toruslabs/casper-controllers", | ||
"version": "1.6.6", | ||
"version": "1.6.7", | ||
"homepage": "https://github.com/torusresearch/controllers#readme", | ||
@@ -15,3 +15,3 @@ "license": "ISC", | ||
"test-debugger": "mocha --config ../../.mocharc.json --inspect-brk test/*.test.ts", | ||
"dev": "rimraf dist/ && cross-env NODE_ENV=development torus-scripts build", | ||
"dev": "rimraf dist/ && cross-env NODE_ENV=development torus-scripts start", | ||
"build": "rimraf dist/ && cross-env NODE_ENV=production torus-scripts build", | ||
@@ -23,3 +23,3 @@ "lint": "eslint --fix 'src/**/*.ts'", | ||
"dependencies": { | ||
"@toruslabs/base-controllers": "^1.6.6", | ||
"@toruslabs/base-controllers": "^1.6.7", | ||
"@toruslabs/openlogin-jrpc": "^1.6.0", | ||
@@ -66,3 +66,3 @@ "async-mutex": "^0.3.2", | ||
}, | ||
"gitHead": "420f0d936ca147c5c2ad56cb414a96d795dba732" | ||
"gitHead": "c412768b4673904042eb1a22d7df7c97280fdbd4" | ||
} |
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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
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
8291473
26
10507