@astrox/icsnap-adapter
Advanced tools
@@ -10,3 +10,3 @@ import { ICPSnapApi, SnapConfig } from '@astrox/icsnap-types'; | ||
} | ||
export declare type SnapInstallationParamNames = 'version' | string; | ||
export type SnapInstallationParamNames = 'version' | string; | ||
/** | ||
@@ -13,0 +13,0 @@ * Install and enable ICP snap |
@@ -8,2 +8,8 @@ "use strict"; | ||
class MetamaskICPSnap { | ||
async createSnapIdentity() { | ||
const api = await this.getICPSnapApi(); | ||
const publicKey = await api.getRawPublicKey(); | ||
const principal = await api.getPrincipal(); | ||
return new identity_1.SnapIdentity(api, publicKey, principal); | ||
} | ||
constructor(snapOrigin) { | ||
@@ -23,8 +29,2 @@ this.getICPSnapApi = async () => { | ||
} | ||
async createSnapIdentity() { | ||
const api = await this.getICPSnapApi(); | ||
const publicKey = await api.getRawPublicKey(); | ||
const principal = await api.getPrincipal(); | ||
return new identity_1.SnapIdentity(api, publicKey, principal); | ||
} | ||
} | ||
@@ -31,0 +31,0 @@ exports.MetamaskICPSnap = MetamaskICPSnap; |
import './types'; | ||
export declare function hasMetaMask(): boolean; | ||
export declare type GetSnapsResponse = { | ||
export type GetSnapsResponse = { | ||
[k: string]: { | ||
@@ -5,0 +5,0 @@ permissionName?: string; |
{ | ||
"name": "@astrox/icsnap-adapter", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"main": "build/index.js", | ||
@@ -27,3 +27,3 @@ "module": "build/index.js", | ||
"dependencies": { | ||
"@astrox/icsnap-types": "^0.0.13", | ||
"@astrox/icsnap-types": "^0.0.14", | ||
"@dfinity/agent": "^0.11.3", | ||
@@ -33,3 +33,3 @@ "@dfinity/candid": "^0.11.3", | ||
}, | ||
"gitHead": "705f4fa1291bc76ceb0447da0ba630da19848268" | ||
"gitHead": "2066f28f3ab0355795caa4e5ed22e1982bff9b44" | ||
} |
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
71196
1.31%