Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variable sessionTime for sessionTokenData #129

Merged
merged 5 commits into from
Jan 30, 2024

Conversation

lwin-kyaw
Copy link
Contributor

@lwin-kyaw lwin-kyaw commented Jan 30, 2024

  • included session_token_exp_second in jrpc request to sss service to override default session token duration
  • updated unittests
  • update http-helpers module to v6

@lwin-kyaw
Copy link
Contributor Author

The purpose of this PR is for mpcCoreKit to provide custom sessionTime based on clients' subscribed plans.
Ideal usage flow

  • call TorusUtils static method, setSessionTime to provide custom sessionTime
  • the above will override the default sessionTime (24hr) with the custom sessionTime provided
  • include that sessionTime value in the request params of sss-service requests
  • sss-service will accept the sessionTime to set the duration (expiry) of the SESSION TOKEN (https://github.com/torusresearch/sss-service/pull/88)

src/torus.ts Outdated Show resolved Hide resolved
Copy link
Member

@himanshuchawla009 himanshuchawla009 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@himanshuchawla009 himanshuchawla009 merged commit 271733d into master Jan 30, 2024
1 check passed
@himanshuchawla009 himanshuchawla009 deleted the feat/variable-session-time branch January 30, 2024 15:45
github-merge-queue bot referenced this pull request in valora-inc/wallet Mar 31, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@toruslabs/torus.js](https://togithub.com/torusresearch/torus.js) |
[`^12.1.1` ->
`^12.2.0`](https://renovatebot.com/diffs/npm/@toruslabs%2ftorus.js/12.1.1/12.2.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@toruslabs%2ftorus.js/12.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@toruslabs%2ftorus.js/12.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@toruslabs%2ftorus.js/12.1.1/12.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@toruslabs%2ftorus.js/12.1.1/12.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>torusresearch/torus.js (@&#8203;toruslabs/torus.js)</summary>

###
[`v12.2.0`](https://togithub.com/torusresearch/torus.js/releases/tag/v12.2.0)

[Compare
Source](https://togithub.com/torusresearch/torus.js/compare/v12.1.1...v12.2.0)

#### What's Changed

- fix mainnet test, as nonce is no more sent in public apis by
[@&#8203;himanshuchawla009](https://togithub.com/himanshuchawla009) in
[https://github.com/torusresearch/torus.js/pull/131](https://togithub.com/torusresearch/torus.js/pull/131)
- variable sessionTime for sessionTokenData by
[@&#8203;lwin-kyaw](https://togithub.com/lwin-kyaw) in
[https://github.com/torusresearch/torus.js/pull/129](https://togithub.com/torusresearch/torus.js/pull/129)
- Cleanup logs by [@&#8203;lwin-kyaw](https://togithub.com/lwin-kyaw) in
[https://github.com/torusresearch/torus.js/pull/130](https://togithub.com/torusresearch/torus.js/pull/130)
- feat: default server time offset by
[@&#8203;guru-web3](https://togithub.com/guru-web3) in
[https://github.com/torusresearch/torus.js/pull/135](https://togithub.com/torusresearch/torus.js/pull/135)
- use median to calculate final server offset by
[@&#8203;himanshuchawla009](https://togithub.com/himanshuchawla009) in
[https://github.com/torusresearch/torus.js/pull/136](https://togithub.com/torusresearch/torus.js/pull/136)
- update deps by
[@&#8203;chaitanyapotti](https://togithub.com/chaitanyapotti) in
[https://github.com/torusresearch/torus.js/pull/137](https://togithub.com/torusresearch/torus.js/pull/137)

#### New Contributors

- [@&#8203;lwin-kyaw](https://togithub.com/lwin-kyaw) made their first
contribution in
[https://github.com/torusresearch/torus.js/pull/129](https://togithub.com/torusresearch/torus.js/pull/129)
- [@&#8203;guru-web3](https://togithub.com/guru-web3) made their first
contribution in
[https://github.com/torusresearch/torus.js/pull/135](https://togithub.com/torusresearch/torus.js/pull/135)

**Full Changelog**:
torusresearch/torus.js@v12.1.1...v12.2.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
shottah referenced this pull request in zed-io/kolektivo May 15, 2024
…nc#5193)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@toruslabs/torus.js](https://togithub.com/torusresearch/torus.js) |
[`^12.1.1` ->
`^12.2.0`](https://renovatebot.com/diffs/npm/@toruslabs%2ftorus.js/12.1.1/12.2.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@toruslabs%2ftorus.js/12.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@toruslabs%2ftorus.js/12.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@toruslabs%2ftorus.js/12.1.1/12.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@toruslabs%2ftorus.js/12.1.1/12.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>torusresearch/torus.js (@&#8203;toruslabs/torus.js)</summary>

###
[`v12.2.0`](https://togithub.com/torusresearch/torus.js/releases/tag/v12.2.0)

[Compare
Source](https://togithub.com/torusresearch/torus.js/compare/v12.1.1...v12.2.0)

#### What's Changed

- fix mainnet test, as nonce is no more sent in public apis by
[@&#8203;himanshuchawla009](https://togithub.com/himanshuchawla009) in
[https://github.com/torusresearch/torus.js/pull/131](https://togithub.com/torusresearch/torus.js/pull/131)
- variable sessionTime for sessionTokenData by
[@&#8203;lwin-kyaw](https://togithub.com/lwin-kyaw) in
[https://github.com/torusresearch/torus.js/pull/129](https://togithub.com/torusresearch/torus.js/pull/129)
- Cleanup logs by [@&#8203;lwin-kyaw](https://togithub.com/lwin-kyaw) in
[https://github.com/torusresearch/torus.js/pull/130](https://togithub.com/torusresearch/torus.js/pull/130)
- feat: default server time offset by
[@&#8203;guru-web3](https://togithub.com/guru-web3) in
[https://github.com/torusresearch/torus.js/pull/135](https://togithub.com/torusresearch/torus.js/pull/135)
- use median to calculate final server offset by
[@&#8203;himanshuchawla009](https://togithub.com/himanshuchawla009) in
[https://github.com/torusresearch/torus.js/pull/136](https://togithub.com/torusresearch/torus.js/pull/136)
- update deps by
[@&#8203;chaitanyapotti](https://togithub.com/chaitanyapotti) in
[https://github.com/torusresearch/torus.js/pull/137](https://togithub.com/torusresearch/torus.js/pull/137)

#### New Contributors

- [@&#8203;lwin-kyaw](https://togithub.com/lwin-kyaw) made their first
contribution in
[https://github.com/torusresearch/torus.js/pull/129](https://togithub.com/torusresearch/torus.js/pull/129)
- [@&#8203;guru-web3](https://togithub.com/guru-web3) made their first
contribution in
[https://github.com/torusresearch/torus.js/pull/135](https://togithub.com/torusresearch/torus.js/pull/135)

**Full Changelog**:
torusresearch/torus.js@v12.1.1...v12.2.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants