@cartridge/controller
Advanced tools
Comparing version 0.1.46 to 0.1.47
import { Account, DeployContractPayload, Abi, Call, EstimateFeeDetails, EstimateFee, DeployContractResponse as StarknetDeployContractResponse, InvocationsDetails, Signature, typedData, InvokeFunctionResponse } from "starknet"; | ||
import Messenger from "./messenger.js"; | ||
import { Scope } from "./types.js"; | ||
import Messenger from "./messenger"; | ||
import { Scope } from "./types"; | ||
declare class CartridgeAccount extends Account { | ||
@@ -5,0 +5,0 @@ address: string; |
@@ -61,3 +61,3 @@ "use strict"; | ||
var query_string_1 = __importDefault(require("query-string")); | ||
var signer_js_1 = require("./signer.js"); | ||
var signer_1 = require("./signer"); | ||
var CartridgeAccount = /** @class */ (function (_super) { | ||
@@ -67,3 +67,3 @@ __extends(CartridgeAccount, _super); | ||
if (scopes === void 0) { scopes = []; } | ||
var _this = _super.call(this, starknet_1.defaultProvider, address, new signer_js_1.Signer(messenger, options)) || this; | ||
var _this = _super.call(this, starknet_1.defaultProvider, address, new signer_1.Signer(messenger, options)) || this; | ||
_this.url = "https://x.cartridge.gg"; | ||
@@ -70,0 +70,0 @@ _this._scopes = []; |
import { AccountInterface } from "starknet"; | ||
import Messenger, { Message } from "./messenger.js"; | ||
import { Scope } from "./types.js"; | ||
import Messenger, { Message } from "./messenger"; | ||
import { Scope } from "./types"; | ||
declare class Controller { | ||
@@ -26,2 +26,2 @@ private selector; | ||
export { Messenger }; | ||
export * from "./types.js"; | ||
export * from "./types"; |
@@ -59,5 +59,5 @@ "use strict"; | ||
var query_string_1 = __importDefault(require("query-string")); | ||
var account_js_1 = __importDefault(require("./account.js")); | ||
var messenger_js_1 = __importDefault(require("./messenger.js")); | ||
exports.Messenger = messenger_js_1.default; | ||
var account_1 = __importDefault(require("./account")); | ||
var messenger_1 = __importDefault(require("./messenger")); | ||
exports.Messenger = messenger_1.default; | ||
var Controller = /** @class */ (function () { | ||
@@ -100,3 +100,3 @@ function Controller(scopes, options) { | ||
if (!this.messenger) { | ||
this.messenger = new messenger_js_1.default(iframe.contentWindow, this.url); | ||
this.messenger = new messenger_1.default(iframe.contentWindow, this.url); | ||
} | ||
@@ -117,3 +117,3 @@ } | ||
document.body.appendChild(iframe); | ||
this.messenger = new messenger_js_1.default(iframe.contentWindow, this.url); | ||
this.messenger = new messenger_1.default(iframe.contentWindow, this.url); | ||
} | ||
@@ -143,3 +143,3 @@ } | ||
if (this.messenger && ((_b = probe === null || probe === void 0 ? void 0 : probe.result) === null || _b === void 0 ? void 0 : _b.address)) { | ||
this.account = new account_js_1.default(probe.result.address, probe.result.scopes, this.messenger, { | ||
this.account = new account_1.default(probe.result.address, probe.result.scopes, this.messenger, { | ||
url: this.url, | ||
@@ -216,3 +216,3 @@ }); | ||
} | ||
this.account = new account_js_1.default(response.result.address, response.result.scopes, this.messenger, { | ||
this.account = new account_1.default(response.result.address, response.result.scopes, this.messenger, { | ||
url: this.url, | ||
@@ -228,3 +228,3 @@ }); | ||
exports.default = Controller; | ||
__exportStar(require("./types.js"), exports); | ||
__exportStar(require("./types"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import { Request, Response } from "./types.js"; | ||
import { Request, Response } from "./types"; | ||
export declare type Message<T = Request | Response> = { | ||
@@ -3,0 +3,0 @@ id?: string; |
import { Abi, Invocation, InvocationsSignerDetails, SignerInterface, Signature, typedData } from "starknet"; | ||
import Messenger from "./messenger.js"; | ||
import Messenger from "./messenger"; | ||
export declare class Signer implements SignerInterface { | ||
@@ -4,0 +4,0 @@ private messenger; |
@@ -1,2 +0,2 @@ | ||
import { Scope } from "./types.js"; | ||
import { Scope } from "./types"; | ||
export declare function diff(a: Scope[], b: Scope[]): Scope[]; |
{ | ||
"name": "@cartridge/controller", | ||
"version": "0.1.46", | ||
"version": "0.1.47", | ||
"description": "Cartridge Controller", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"type": "module", | ||
"scripts": { | ||
@@ -9,0 +8,0 @@ "build": "tsc", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
73517
No