-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #813 from lens-protocol/release/20240129
Release/20240129
- Loading branch information
Showing
265 changed files
with
26,608 additions
and
6,486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@lens-protocol/client": patch | ||
--- | ||
|
||
**chore**: Relax node version requirements to >18 <21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@lens-protocol/api-bindings": minor | ||
"@lens-protocol/react": minor | ||
"@lens-protocol/react-native": minor | ||
"@lens-protocol/react-web": minor | ||
--- | ||
|
||
**feat:** introduces `params.statsFor` and `params.profile.metadataSource` in `LensConfig` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
"@lens-protocol/blockchain-bindings": patch | ||
"@lens-protocol/gated-content": patch | ||
"@lens-protocol/shared-kernel": patch | ||
"@lens-protocol/react-native": patch | ||
"@lens-protocol/react-web": patch | ||
"@lens-protocol/client": patch | ||
"@lens-protocol/react": patch | ||
"@lens-protocol/wagmi": patch | ||
--- | ||
|
||
**chore:** Removed peer dependency on ethers@5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@lens-protocol/react": patch | ||
"@lens-protocol/react-native": patch | ||
"@lens-protocol/react-web": patch | ||
--- | ||
|
||
**fix:** supports User Rejection error from Wallet that despite returning correct error code are NOT recognized by `ethers` (v5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@lens-protocol/api-bindings": patch | ||
"@lens-protocol/react": patch | ||
"@lens-protocol/react-native": patch | ||
"@lens-protocol/react-web": patch | ||
--- | ||
|
||
**Fixed**: missing export of `findCollectModuleSettings` and `isCollectModuleSettings` helpers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@lens-protocol/shared-kernel": minor | ||
"@lens-protocol/react": minor | ||
"@lens-protocol/react-native": minor | ||
"@lens-protocol/react-web": minor | ||
--- | ||
|
||
**feat:** Introduced `debug` mode. Exported `ConsoleLogger`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@lens-protocol/client": minor | ||
--- | ||
|
||
**feat**: Added `authentication.authenticateWith` method to allow to authenticate LensClient with an existing refresh token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@lens-protocol/api-bindings": patch | ||
"@lens-protocol/react": patch | ||
"@lens-protocol/react-native": patch | ||
"@lens-protocol/react-web": patch | ||
--- | ||
|
||
feat: Expose `erc20Amount` helper to make working with API Amounts easier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
"@lens-protocol/client": minor | ||
--- | ||
|
||
**feat**: added new methods: | ||
|
||
- `feed.latestPaidActions` | ||
- `profile.report` | ||
- `profile.followStatusBulk` | ||
- `nfts.collections` | ||
- `nfts.collectionOwners` | ||
- `nfts.mutualCollections` | ||
- `nfts.popularCollections` | ||
|
||
**breaking**: `nfts.fetch` doesn't require authentication, returns `Promise<PaginatedResult<NftFragment>>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@lens-protocol/react": patch | ||
"@lens-protocol/react-native": patch | ||
"@lens-protocol/react-web": patch | ||
--- | ||
|
||
**fixed:** return type of `useLazyModuleMetadata` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@lens-protocol/react": patch | ||
"@lens-protocol/react-native": patch | ||
"@lens-protocol/react-web": patch | ||
--- | ||
|
||
**fix:** exports missing `AsyncTransactionResult` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@lens-protocol/react": minor | ||
"@lens-protocol/react-native": minor | ||
"@lens-protocol/react-web": minor | ||
"@lens-protocol/blockchain-bindings": patch | ||
"@lens-protocol/api-bindings": patch | ||
"@lens-protocol/client": patch | ||
--- | ||
|
||
**feat:** support Unknown Follow Modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@lens-protocol/react": patch | ||
"@lens-protocol/react-native": patch | ||
"@lens-protocol/react-web": patch | ||
--- | ||
|
||
**fix:** exports missing `ProfileFields` type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
|
@@ -31,7 +31,7 @@ jobs: | |
needs: install | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
|
@@ -57,7 +57,7 @@ jobs: | |
with: | ||
swap-size-gb: 8 | ||
|
||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
|
@@ -86,7 +86,7 @@ jobs: | |
needs: [install, lint, test] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
|
@@ -107,7 +107,7 @@ jobs: | |
needs: [install, lint, test] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/[email protected] | ||
|
@@ -32,7 +32,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup pnpm for docs | ||
uses: pnpm/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { LensClient, development } from '@lens-protocol/client'; | ||
|
||
async function main() { | ||
const client = new LensClient({ | ||
environment: development, | ||
}); | ||
|
||
const token = 'YOUR_VALID_REFRESH_TOKEN_HERE'; | ||
await client.authentication.authenticateWith({ refreshToken: token }); | ||
|
||
console.log(`Is LensClient authenticated? `, await client.authentication.isAuthenticated()); | ||
|
||
const accessTokenResult = await client.authentication.getAccessToken(); | ||
const accessToken = accessTokenResult.unwrap(); | ||
const profileId = await client.authentication.getProfileId(); | ||
|
||
console.log(`Authenticated profileId: `, profileId); | ||
console.log(`Access token: `, accessToken); | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { LensClient, development } from '@lens-protocol/client'; | ||
|
||
import { setupWallet } from '../shared/setupWallet'; | ||
|
||
async function main() { | ||
const client = new LensClient({ | ||
environment: development, | ||
headers: { | ||
origin: 'https://lens-scripts.example', | ||
}, | ||
}); | ||
|
||
const wallet = setupWallet(); | ||
const address = await wallet.getAddress(); | ||
|
||
const managedProfiles = await client.wallet.profilesManaged({ for: wallet.address }); | ||
|
||
if (managedProfiles.items.length === 0) { | ||
throw new Error(`You don't manage any profiles, create one first`); | ||
} | ||
|
||
const { id, text } = await client.authentication.generateChallenge({ | ||
signedBy: address, | ||
for: managedProfiles.items[0].id, | ||
}); | ||
|
||
console.log(`Challenge: `, text); // Notice the origin URL in the challenge message | ||
|
||
const signature = await wallet.signMessage(text); | ||
|
||
await client.authentication.authenticate({ id, signature }); | ||
|
||
console.log(`Is LensClient authenticated? `, await client.authentication.isAuthenticated()); | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { isFollowPaidAction, isOpenActionPaidAction } from '@lens-protocol/client'; | ||
|
||
import { getAuthenticatedClient } from '../shared/getAuthenticatedClient'; | ||
import { setupWallet } from '../shared/setupWallet'; | ||
|
||
async function main() { | ||
const wallet = setupWallet(); | ||
const client = await getAuthenticatedClient(wallet); | ||
|
||
const result = await client.feed.latestPaidActions(); | ||
|
||
result.unwrap().items.map((item) => { | ||
const actingProfileIds = item.latestActed.map((acted) => acted.profile.id).join(', '); | ||
|
||
if (isFollowPaidAction(item)) { | ||
console.log(`Profiles ${actingProfileIds} followed: ${item.followed.id}`); | ||
} | ||
|
||
if (isOpenActionPaidAction(item)) { | ||
console.log( | ||
`Profiles ${actingProfileIds} acted on: ${item.actedOn.__typename} ${item.actedOn.id}`, | ||
); | ||
} | ||
}); | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { LensClient, development } from '@lens-protocol/client'; | ||
|
||
async function main() { | ||
const client = new LensClient({ | ||
environment: development, | ||
}); | ||
|
||
const result = await client.profile.followStatusBulk({ | ||
followInfos: [ | ||
{ | ||
follower: '0x06', // is 0x06 following 0x38? | ||
profileId: '0x38', | ||
}, | ||
{ | ||
follower: '0x38', // is 0x38 following 0x06? | ||
profileId: '0x06', | ||
}, | ||
], | ||
}); | ||
|
||
console.log(`Result: `, result); | ||
} | ||
|
||
main(); |
Oops, something went wrong.