@ceramicnetwork/blockchain-utils-linking
Advanced tools
Comparing version 1.4.0 to 1.5.0-rc.0
@@ -6,2 +6,34 @@ # Change Log | ||
# [1.5.0-rc.0](https://github.com/ceramicnetwork/js-ceramic/compare/@ceramicnetwork/blockchain-utils-linking@1.4.0...@ceramicnetwork/blockchain-utils-linking@1.5.0-rc.0) (2021-11-12) | ||
### Bug Fixes | ||
* **blockchain-utils-linking:** pass through opts authProvider for eoaSignAccount ([#1268](https://github.com/ceramicnetwork/js-ceramic/issues/1268)) ([ae33805](https://github.com/ceramicnetwork/js-ceramic/commit/ae3380545d5d8a8dfbd62f7be0f137207769f9cc)) | ||
* **blockchain-utils-linking:** Support eip1193 provider.request ([#1795](https://github.com/ceramicnetwork/js-ceramic/issues/1795)) ([5a79eb5](https://github.com/ceramicnetwork/js-ceramic/commit/5a79eb51e35e38e38ee7eb67200f7109583eb262)) | ||
* Fix tests by using node environment for jest ([#1212](https://github.com/ceramicnetwork/js-ceramic/issues/1212)) ([aff01c6](https://github.com/ceramicnetwork/js-ceramic/commit/aff01c6e3a8476825dd8b27201579b38943e7fca)) | ||
* Fix tests by using node environment for jest ([#1212](https://github.com/ceramicnetwork/js-ceramic/issues/1212)) ([0f04006](https://github.com/ceramicnetwork/js-ceramic/commit/0f04006098f9028c6750c9920c4b3af758b71235)) | ||
* **blockchain-utils-linking:** Pin @ethersproject/providers to previous version ([#1094](https://github.com/ceramicnetwork/js-ceramic/issues/1094)) ([89fcebe](https://github.com/ceramicnetwork/js-ceramic/commit/89fcebe17f72dd7362fb8cad9c88040c177991f6)) | ||
* **blockchain-utils-linking:** Pin version of @glif/local-managed-provider to unbreak test ([#1183](https://github.com/ceramicnetwork/js-ceramic/issues/1183)) ([b5ae20f](https://github.com/ceramicnetwork/js-ceramic/commit/b5ae20f6e1641ae767a7720c448133f22f4a7f0a)) | ||
* **common, logger:** Clean up dependencies ([#1164](https://github.com/ceramicnetwork/js-ceramic/issues/1164)) ([191ad31](https://github.com/ceramicnetwork/js-ceramic/commit/191ad310b87ac9aba97bb84b122908337f35aa11)) | ||
### Features | ||
* add zcap/ocap request capability to ethereum auth provider ([#1761](https://github.com/ceramicnetwork/js-ceramic/issues/1761)) ([6057163](https://github.com/ceramicnetwork/js-ceramic/commit/6057163c1d03e3c757ec8c9c62c99cf85b27c35b)) | ||
* caip10 ethereum+eos integration test ([#1668](https://github.com/ceramicnetwork/js-ceramic/issues/1668)) ([4267d8b](https://github.com/ceramicnetwork/js-ceramic/commit/4267d8b31fca38a163bb009198a49e1de22b2a58)), closes [#1678](https://github.com/ceramicnetwork/js-ceramic/issues/1678) | ||
* Transplant Near support ([#1739](https://github.com/ceramicnetwork/js-ceramic/issues/1739)) ([d82249a](https://github.com/ceramicnetwork/js-ceramic/commit/d82249aa4fb98257fdfe82e7d19c74902c2732cb)) | ||
* **blockchain-utils-linking:** Addition of Avalanche C-Chain Support ([#1157](https://github.com/ceramicnetwork/js-ceramic/issues/1157)) ([eb90f18](https://github.com/ceramicnetwork/js-ceramic/commit/eb90f1845c5f60924636d5c45370f48401647583)) | ||
* **blockchain-utils-linking:** default link sign message ([42a1d7e](https://github.com/ceramicnetwork/js-ceramic/commit/42a1d7e9ed04dc4ce85ea869b25a5303be5d3626)) | ||
* **blockchain-utils-linking:** Export auth providers ([#882](https://github.com/ceramicnetwork/js-ceramic/issues/882)) ([e7e7163](https://github.com/ceramicnetwork/js-ceramic/commit/e7e71638aab512527fa335371a347a4940a9058a)) | ||
* **tezos-blockchain-link:** initial support for linking and validating DIDs to Tezos wallets ([#1555](https://github.com/ceramicnetwork/js-ceramic/issues/1555)) ([baa6c35](https://github.com/ceramicnetwork/js-ceramic/commit/baa6c35a6a72f69380597cd260f14bc227c4fd66)) | ||
* **tezos-blockchain-link:** linking and validating DIDs to Tezos wallets ([#1601](https://github.com/ceramicnetwork/js-ceramic/issues/1601)) ([b40709e](https://github.com/ceramicnetwork/js-ceramic/commit/b40709e465bdbf0c934ff5d51921fb7e5eb8cb18)) | ||
* **tile-doctype:** Update Tile API ([#1180](https://github.com/ceramicnetwork/js-ceramic/issues/1180)) ([90973ee](https://github.com/ceramicnetwork/js-ceramic/commit/90973ee32352e260cb040e687720095b145b4702)) | ||
* support near protocol ([#881](https://github.com/ceramicnetwork/js-ceramic/issues/881)) ([d50f36e](https://github.com/ceramicnetwork/js-ceramic/commit/d50f36e0ecc24d26ae90a7ee4bedbe1ee006f0f7)), closes [#880](https://github.com/ceramicnetwork/js-ceramic/issues/880) | ||
* upgrade 3id did resolver ([#1108](https://github.com/ceramicnetwork/js-ceramic/issues/1108)) ([24ef6d4](https://github.com/ceramicnetwork/js-ceramic/commit/24ef6d45c6ce1dae828447ffdaa9e57f3f5e9b00)) | ||
# [1.4.0](https://github.com/ceramicnetwork/js-ceramic/compare/@ceramicnetwork/blockchain-utils-linking@1.4.0-rc.0...@ceramicnetwork/blockchain-utils-linking@1.4.0) (2021-11-12) | ||
@@ -8,0 +40,0 @@ |
import { AuthProvider } from './auth-provider'; | ||
import { AccountID } from 'caip'; | ||
import { LinkProof } from './util'; | ||
import { Ocap, OcapParams } from './ocap-util'; | ||
declare type EthProviderOpts = { | ||
@@ -16,2 +17,3 @@ eoaSignAccount?: string; | ||
createLink(did: string): Promise<LinkProof>; | ||
requestCapability(params: OcapParams): Promise<Ocap>; | ||
withAddress(address: string): AuthProvider; | ||
@@ -18,0 +20,0 @@ } |
@@ -27,2 +27,3 @@ "use strict"; | ||
const sha256 = __importStar(require("@stablelib/sha256")); | ||
const ocap_util_1 = require("./ocap-util"); | ||
const ADDRESS_TYPES = { | ||
@@ -56,2 +57,20 @@ ethereumEOA: 'ethereum-eoa', | ||
} | ||
async requestCapability(params) { | ||
console.warn('WARN: requestCapability os an experimental API, that is subject to change any time.'); | ||
const account = await this.accountId(); | ||
const requestMessage = ocap_util_1.buildOcapRequestMessage({ | ||
...params, | ||
address: this.address, | ||
chainId: account.chainId.toString(), | ||
type: ocap_util_1.OcapTypes.EIP4361, | ||
}); | ||
const signature = await safeSend(this.provider, 'personal_sign', [ | ||
requestMessage, | ||
account.address, | ||
]); | ||
return { | ||
message: requestMessage, | ||
signature: signature, | ||
}; | ||
} | ||
withAddress(address) { | ||
@@ -58,0 +77,0 @@ return new EthereumAuthProvider(this.provider, address); |
{ | ||
"name": "@ceramicnetwork/blockchain-utils-linking", | ||
"version": "1.4.0", | ||
"version": "1.5.0-rc.0", | ||
"description": "Blockchain utils for linking blockchain accounts to DID", | ||
@@ -34,2 +34,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@ceramicnetwork/streamid": "^1.3.4-rc.0", | ||
"@ethersproject/providers": "^5.4.5", | ||
@@ -55,3 +56,3 @@ "@glif/filecoin-address": "1.1.0", | ||
}, | ||
"gitHead": "684ff4b9966d60de21e6ec4b67a4dc08431833e2" | ||
"gitHead": "97a9cf6d215fac7b1fdfb93f48197b9b8ac2c11b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
98028
47
987
16
1