@onekeyfe/onekey-aptos-provider
Advanced tools
Comparing version 1.1.52 to 1.1.53
@@ -165,2 +165,21 @@ "use strict"; | ||
} | ||
getNetwork() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const name = yield this._callBridge({ | ||
method: 'network', | ||
params: undefined, | ||
}); | ||
const url = yield this._callBridge({ | ||
method: 'getNetworkURL', | ||
params: undefined, | ||
}); | ||
// see more chainID https://aptos.dev/nodes/networks | ||
const chainId = name === 'Mainnet' ? 1 : 2; | ||
return { | ||
name, | ||
url, | ||
chainId, | ||
}; | ||
}); | ||
} | ||
getNetworkURL() { | ||
@@ -167,0 +186,0 @@ return this._callBridge({ |
@@ -86,2 +86,7 @@ import { IInpageProviderConfig } from '@onekeyfe/cross-inpage-provider-core'; | ||
network(): Promise<string>; | ||
getNetwork(): Promise<{ | ||
name: string; | ||
url: string; | ||
chainId: number; | ||
}>; | ||
getNetworkURL(): Promise<string>; | ||
@@ -88,0 +93,0 @@ disconnect(): Promise<void>; |
@@ -162,2 +162,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
} | ||
getNetwork() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const name = yield this._callBridge({ | ||
method: 'network', | ||
params: undefined, | ||
}); | ||
const url = yield this._callBridge({ | ||
method: 'getNetworkURL', | ||
params: undefined, | ||
}); | ||
// see more chainID https://aptos.dev/nodes/networks | ||
const chainId = name === 'Mainnet' ? 1 : 2; | ||
return { | ||
name, | ||
url, | ||
chainId, | ||
}; | ||
}); | ||
} | ||
getNetworkURL() { | ||
@@ -164,0 +183,0 @@ return this._callBridge({ |
{ | ||
"name": "@onekeyfe/onekey-aptos-provider", | ||
"version": "1.1.52", | ||
"version": "1.1.53", | ||
"keywords": [ | ||
@@ -31,10 +31,10 @@ "cross-inpage-provider" | ||
"dependencies": { | ||
"@onekeyfe/cross-inpage-provider-core": "1.1.52", | ||
"@onekeyfe/cross-inpage-provider-errors": "1.1.52", | ||
"@onekeyfe/cross-inpage-provider-types": "1.1.52", | ||
"@onekeyfe/extension-bridge-injected": "1.1.52", | ||
"@onekeyfe/cross-inpage-provider-core": "1.1.53", | ||
"@onekeyfe/cross-inpage-provider-errors": "1.1.53", | ||
"@onekeyfe/cross-inpage-provider-types": "1.1.53", | ||
"@onekeyfe/extension-bridge-injected": "1.1.53", | ||
"aptos": "^1.3.17", | ||
"eth-rpc-errors": "^4.0.3" | ||
}, | ||
"gitHead": "795ee2fb501fbd6fc88f1a91d77d8d6b33db3c30" | ||
"gitHead": "33ed7e15f71c3efd6e957765dde80d22085a91a3" | ||
} |
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
58728
1161
+ Added@onekeyfe/cross-inpage-provider-core@1.1.53(transitive)
+ Added@onekeyfe/cross-inpage-provider-errors@1.1.53(transitive)
+ Added@onekeyfe/cross-inpage-provider-events@1.1.53(transitive)
+ Added@onekeyfe/cross-inpage-provider-types@1.1.53(transitive)
+ Added@onekeyfe/extension-bridge-injected@1.1.53(transitive)
- Removed@onekeyfe/cross-inpage-provider-core@1.1.52(transitive)
- Removed@onekeyfe/cross-inpage-provider-errors@1.1.52(transitive)
- Removed@onekeyfe/cross-inpage-provider-events@1.1.52(transitive)
- Removed@onekeyfe/cross-inpage-provider-types@1.1.52(transitive)
- Removed@onekeyfe/extension-bridge-injected@1.1.52(transitive)