@onekeyfe/onekey-aptos-provider
Advanced tools
Comparing version 2.0.0-alpha.10 to 2.0.0-alpha.11
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k; |
@@ -27,2 +27,6 @@ "use strict"; | ||
class ProviderAptos extends ProviderAptosBase_1.ProviderAptosBase { | ||
get publicKey() { | ||
var _a, _b; | ||
return (_b = (_a = this._account) === null || _a === void 0 ? void 0 : _a.publicKey) !== null && _b !== void 0 ? _b : null; | ||
} | ||
constructor(props) { | ||
@@ -34,6 +38,2 @@ super(Object.assign(Object.assign({}, props), { bridge: props.bridge || (0, extension_bridge_injected_1.getOrCreateExtInjectedJsBridge)({ timeout: props.timeout }) })); | ||
} | ||
get publicKey() { | ||
var _a, _b; | ||
return (_b = (_a = this._account) === null || _a === void 0 ? void 0 : _a.publicKey) !== null && _b !== void 0 ? _b : null; | ||
} | ||
_registerEvents() { | ||
@@ -40,0 +40,0 @@ window.addEventListener('onekey_bridge_disconnect', () => { |
@@ -17,2 +17,6 @@ "use strict"; | ||
class ProviderAptosMartian extends OnekeyAptosProvider_1.ProviderAptos { | ||
get publicKey() { | ||
var _a, _b; | ||
return (_b = (_a = this._account) === null || _a === void 0 ? void 0 : _a.publicKey) !== null && _b !== void 0 ? _b : null; | ||
} | ||
constructor(props) { | ||
@@ -23,6 +27,2 @@ super(Object.assign(Object.assign({}, props), { bridge: props.bridge || (0, extension_bridge_injected_1.getOrCreateExtInjectedJsBridge)({ timeout: props.timeout }) })); | ||
} | ||
get publicKey() { | ||
var _a, _b; | ||
return (_b = (_a = this._account) === null || _a === void 0 ? void 0 : _a.publicKey) !== null && _b !== void 0 ? _b : null; | ||
} | ||
_callMartianBridge(params) { | ||
@@ -29,0 +29,0 @@ params.aptosProviderType = this.aptosProviderType; |
@@ -6,3 +6,3 @@ import { IInpageProviderConfig } from '@onekeyfe/cross-inpage-provider-core'; | ||
import { Types } from 'aptos'; | ||
export declare type AptosProviderType = 'petra' | 'martian'; | ||
export type AptosProviderType = 'petra' | 'martian'; | ||
declare const PROVIDER_EVENTS: { | ||
@@ -15,3 +15,3 @@ readonly connect: "connect"; | ||
}; | ||
declare type AptosProviderEventsMap = { | ||
type AptosProviderEventsMap = { | ||
[PROVIDER_EVENTS.connect]: (account: string) => void; | ||
@@ -23,3 +23,3 @@ [PROVIDER_EVENTS.disconnect]: () => void; | ||
}; | ||
export declare type AptosRequest = { | ||
export type AptosRequest = { | ||
'connect': () => Promise<AptosAccountInfo>; | ||
@@ -34,3 +34,3 @@ 'disconnect': () => Promise<void>; | ||
}; | ||
export declare type PROVIDER_EVENTS_STRINGS = keyof typeof PROVIDER_EVENTS; | ||
export type PROVIDER_EVENTS_STRINGS = keyof typeof PROVIDER_EVENTS; | ||
export interface IProviderAptos extends ProviderAptosBase { | ||
@@ -66,3 +66,3 @@ publicKey: string | null; | ||
} | ||
declare type OneKeyAptosProviderProps = IInpageProviderConfig & { | ||
type OneKeyAptosProviderProps = IInpageProviderConfig & { | ||
timeout?: number; | ||
@@ -69,0 +69,0 @@ }; |
@@ -24,2 +24,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
class ProviderAptos extends ProviderAptosBase { | ||
get publicKey() { | ||
var _a, _b; | ||
return (_b = (_a = this._account) === null || _a === void 0 ? void 0 : _a.publicKey) !== null && _b !== void 0 ? _b : null; | ||
} | ||
constructor(props) { | ||
@@ -31,6 +35,2 @@ super(Object.assign(Object.assign({}, props), { bridge: props.bridge || getOrCreateExtInjectedJsBridge({ timeout: props.timeout }) })); | ||
} | ||
get publicKey() { | ||
var _a, _b; | ||
return (_b = (_a = this._account) === null || _a === void 0 ? void 0 : _a.publicKey) !== null && _b !== void 0 ? _b : null; | ||
} | ||
_registerEvents() { | ||
@@ -37,0 +37,0 @@ window.addEventListener('onekey_bridge_disconnect', () => { |
@@ -5,4 +5,4 @@ import { IInpageProviderConfig } from '@onekeyfe/cross-inpage-provider-core'; | ||
import { ProviderAptos } from './OnekeyAptosProvider'; | ||
declare type AnyNumber = bigint | number; | ||
export declare type AptosRequestMartian = { | ||
type AnyNumber = bigint | number; | ||
export type AptosRequestMartian = { | ||
'martianSignAndSubmitTransaction': (transactions: string) => Promise<string>; | ||
@@ -39,3 +39,3 @@ 'martianSignTransaction': (transactions: string) => Promise<string>; | ||
}; | ||
declare type OneKeyAptosProviderProps = IInpageProviderConfig & { | ||
type OneKeyAptosProviderProps = IInpageProviderConfig & { | ||
timeout?: number; | ||
@@ -42,0 +42,0 @@ }; |
@@ -14,2 +14,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
class ProviderAptosMartian extends ProviderAptos { | ||
get publicKey() { | ||
var _a, _b; | ||
return (_b = (_a = this._account) === null || _a === void 0 ? void 0 : _a.publicKey) !== null && _b !== void 0 ? _b : null; | ||
} | ||
constructor(props) { | ||
@@ -20,6 +24,2 @@ super(Object.assign(Object.assign({}, props), { bridge: props.bridge || getOrCreateExtInjectedJsBridge({ timeout: props.timeout }) })); | ||
} | ||
get publicKey() { | ||
var _a, _b; | ||
return (_b = (_a = this._account) === null || _a === void 0 ? void 0 : _a.publicKey) !== null && _b !== void 0 ? _b : null; | ||
} | ||
_callMartianBridge(params) { | ||
@@ -26,0 +26,0 @@ params.aptosProviderType = this.aptosProviderType; |
@@ -1,4 +0,4 @@ | ||
export declare type WireStringified<T> = T extends Array<infer P> ? Array<WireStringified<P>> : T extends object ? { | ||
export type WireStringified<T> = T extends Array<infer P> ? Array<WireStringified<P>> : T extends object ? { | ||
[K in keyof T]: WireStringified<T[K]>; | ||
} : T; | ||
export declare type ResolvePromise<T> = T extends Promise<infer P> ? P : T; | ||
export type ResolvePromise<T> = T extends Promise<infer P> ? P : T; |
@@ -1,6 +0,6 @@ | ||
export declare type AptosAccountInfo = { | ||
export type AptosAccountInfo = { | ||
publicKey: string; | ||
address: string; | ||
}; | ||
export declare type TxnOptions = { | ||
export type TxnOptions = { | ||
sender?: string; | ||
@@ -13,3 +13,3 @@ sequence_number?: string; | ||
}; | ||
export declare type TxnPayload = { | ||
export type TxnPayload = { | ||
function: string; | ||
@@ -16,0 +16,0 @@ type_arguments: any[]; |
{ | ||
"name": "@onekeyfe/onekey-aptos-provider", | ||
"version": "2.0.0-alpha.10", | ||
"version": "2.0.0-alpha.11", | ||
"keywords": [ | ||
@@ -31,10 +31,10 @@ "cross-inpage-provider" | ||
"dependencies": { | ||
"@onekeyfe/cross-inpage-provider-core": "2.0.0-alpha.10", | ||
"@onekeyfe/cross-inpage-provider-errors": "2.0.0-alpha.10", | ||
"@onekeyfe/cross-inpage-provider-types": "2.0.0-alpha.10", | ||
"@onekeyfe/extension-bridge-injected": "2.0.0-alpha.10", | ||
"@onekeyfe/cross-inpage-provider-core": "2.0.0-alpha.11", | ||
"@onekeyfe/cross-inpage-provider-errors": "2.0.0-alpha.11", | ||
"@onekeyfe/cross-inpage-provider-types": "2.0.0-alpha.11", | ||
"@onekeyfe/extension-bridge-injected": "2.0.0-alpha.11", | ||
"aptos": "^1.3.17", | ||
"eth-rpc-errors": "^4.0.3" | ||
}, | ||
"gitHead": "f760989b7ea7bfca832ba396544808fb99081007" | ||
"gitHead": "db33d14c2a164072b2f5dd4cf94e18886539ab5b" | ||
} |
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
50698
22
1184
+ Added@onekeyfe/cross-inpage-provider-core@2.0.0-alpha.11(transitive)
+ Added@onekeyfe/cross-inpage-provider-errors@2.0.0-alpha.11(transitive)
+ Added@onekeyfe/cross-inpage-provider-events@2.0.0-alpha.11(transitive)
+ Added@onekeyfe/cross-inpage-provider-types@2.0.0-alpha.11(transitive)
+ Added@onekeyfe/extension-bridge-injected@2.0.0-alpha.11(transitive)
- Removed@onekeyfe/cross-inpage-provider-core@2.0.0-alpha.10(transitive)
- Removed@onekeyfe/cross-inpage-provider-errors@2.0.0-alpha.10(transitive)
- Removed@onekeyfe/cross-inpage-provider-events@2.0.0-alpha.10(transitive)
- Removed@onekeyfe/cross-inpage-provider-types@2.0.0-alpha.10(transitive)
- Removed@onekeyfe/extension-bridge-injected@2.0.0-alpha.10(transitive)
Updated@onekeyfe/cross-inpage-provider-errors@2.0.0-alpha.11