-

@ dbb19ae0:c3f22d5a
2025-02-23 16:38:41
Derive npub from nsec given as parameter
``` python
import argparse
import asyncio
from nostr_sdk import Keys, init_logger, LogLevel
async def main(nsec):
init_logger(LogLevel.INFO)
keys = Keys.parse(nsec)
public_key = keys.public_key()
print(f"Public key (hex): {public_key.to_hex()}")
print(f"Public key (npub): {public_key.to_bech32()}")
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Fetch all relay from a given nsec')
parser.add_argument('nsec', type=str, help='The nsec of the user')
args = parser.parse_args()
asyncio.run(main(args.nsec))
```
https://docs.rs/nostr_rust/latest/nostr_rust/keys/fn.get_public_key_from_secret.html
https://github.com/ev3rst/nostr_sdk_examples/blob/main/ns-derive-npub.py
-

@ 2779f3d9:1a7f98d1
2025-02-23 15:20:19
# NOSTR SDK FOR APPLE PLATFORMS
## Progress Report # 2: Nov 2024 - Jan 2025
[Nostr SDK for Apple Platforms](https://github.com/nostr-sdk/nostr-sdk-ios) continued to make progress this quarter. I am still the sole part-time active developer and maintainer of Nostr SDK for Apple Platforms.
Implementations for a few NIPs were added or updated. The CI build pipeline was broken due to deprecated dependencies, which have since been fixed.
I pushed out a (controversial) [proposal](https://github.com/nostr-protocol/nips/pull/1770) to gracefully deprecate stringified JSON in favor of tags on user metadata kind 0 events to the NIPs repo as a pull request to improve consistency and reduce the complexity of reading and writing this commonly used kind. The SDK has become the first to [implement](https://github.com/nostr-sdk/nostr-sdk-ios/pull/212) with the hopes that others will follow.
We have had new external interest in the SDK from developers working on various Nostr clients:
- Damus has [copied the NIP-44 encryption implementation from the SDK](https://github.com/damus-io/damus/pull/2850/files#diff-5eb31bd8e6dc73d21bb3caef975a7f3508765e7f3ab01ecec545635ccb89d17c) for their use in [NIP-37 Draft Events](https://github.com/nostr-protocol/nips/blob/7cc120ecb01963e37f9adcd3b57b8efc1dd9e828/37.md), swapping out their previous usage of rust-nostr due to large binary size issues.
- [Fabian](nostr:npub1n0sturny6w9zn2wwexju3m6asu7zh7jnv2jt2kx6tlmfhs7thq0qnflahe) from Nostur contributed a [NIP-44 encrypt/decrypt example](https://github.com/nostr-sdk/nostr-sdk-ios/pull/204) to the SDK demo project to help him understand how it works and is [currently being used](https://github.com/nostur-com/nostr-essentials/blob/05e5452bb05c4c2e94ec9a78bb0c80d5123919a7/Sources/NostrEssentials/NIP-44/NIP44v2Encrypting.swift) by Nostur
- A new livestreaming Nostr client called [Swae](https://github.com/suhailsaqan/swae) has adopted the SDK, using Comingle as a reference client implementation.
Progress on the SDK this quarter has been slower than the previous quarter due to a shift in emerging priorities in Nostr. This quarter, I focused on building a native iOS Nostr event signer, as none exist today. The problem is that some iOS users do not fully trust pasting their private key into Nostr clients, which they fear could be buggy or malicious in accessing and signing bad data with their private key. A native signer on Android called Amber already exists, and there has been an increase in demand from users for an equivalent solution on iOS. The iOS signer app is called [Yeti](https://github.com/tyiu/Yeti) (credit to [Karnage](nostr:npub1r0rs5q2gk0e3dk3nlc7gnu378ec6cnlenqp8a3cjhyzu6f8k5sgs4sq9ac) for the name and Figma designs) and I'm using Nostr SDK for Apple Platforms and its demo app as a [test bed](https://github.com/nostr-sdk/nostr-sdk-ios/tree/tyiu/signer-demo) for this experimental cross-app communication protocol that will eventually be proposed as a NIP. I hope iOS clients adopting the SDK will get built-in standardized event signing protocol capabilities, tightening up this attack vector.
This report marks the end of the six-month grant period, as agreed with OpenSats. I thank OpenSats for supporting Nostr SDK for Apple Platforms, other Nostr projects, and the developer community. I will re-apply for a grant at OpenSats for the SDK, Yeti, or other impactful Nostr projects.
## 1) How did you spend your time?
Below is a broken-down summarized bulletpointed list of completed tasks.
### Development of Nostr SDK for Apple Platforms
#### Added
- [NIP-37 Draft Events](https://github.com/nostr-protocol/nips/blob/master/37.md)
- [NIP-44 encrypt/decrypt example to demo project](https://github.com/nostr-sdk/nostr-sdk-ios/pull/204)
### Updated
- [Updated NIP-11 Relay Information Document implementation](https://github.com/nostr-sdk/nostr-sdk-ios/pull/201) to support all the newly added fields
- [Renamed ParameterizedReplaceableEvent to AddressableEvent and NonParameterizedReplaceableEvent to NormalReplaceableEvent](https://github.com/nostr-sdk/nostr-sdk-ios/pull/205) to conform to the [new terminology](https://github.com/nostr-protocol/nips/pull/1418) in the NIPs repo
- Gracefully deprecated stringified JSON in favor of tags on user metadata kind 0 events, being the first to implement the [not-yet-merged proposal](https://github.com/nostr-protocol/nips/pull/1770) to NIP-01/NIP-24
### Fixed
- Fixed broken CI build pipeline
- [Fix GitHub workflow for running build and test](https://github.com/nostr-sdk/nostr-sdk-ios/pull/202)
- [Upgrade upload-pages-artifact from deprecated version to v3 to fix build](https://github.com/nostr-sdk/nostr-sdk-ios/pull/207)
- [Upgrade deploy pages action to v4 to fix build](https://github.com/nostr-sdk/nostr-sdk-ios/pull/208)
#### In Progress
- Native iOS event signing protocol, using the [SDK as a test bed](https://github.com/nostr-sdk/nostr-sdk-ios/tree/tyiu/signer-demo)
## 2) What do you plan to work on next quarter?
The top priorities will be developing the native iOS event signing protocol, building out Yeti, and integrating the iOS signing protocol into the SDK.
I will continue maintaining and developing the SDK, albeit at a slower pace:
- Deprecate EventCreating protocol in favor of NostrEventBuilding protocol for the remaining event kinds
- Add or update implementations for various NIPs where critical or needed
- Support clients as they integrate with parts of the SDK by answering questions, fixing any issues they have, adding requested features, and reviewing pull requests
## 3) How did you make use of the money?
Living expenses.
-

@ 8d34bd24:414be32b
2025-02-23 12:49:20
I recently wrote a post “[What? Do Not Pray For ...](https://trustjesus.substack.com/p/what-do-not-pray-for)” where I shared a passage telling us not to pray for the nation of Israel (at a particular point in time). Before reading this post, I strongly encourage you to read that post first.
The verse in question was:
> “As for you, **do not pray for this people, and do not lift up cry or prayer for them, and do not intercede with Me; for I do not hear you**. Do you not see what they are doing in the cities of Judah and in the streets of Jerusalem? The children gather wood, and the fathers kindle the fire, and the women knead dough to make cakes for the queen of heaven; and *they* pour out drink offerings to other gods in order to spite Me. Do they spite Me?” declares the Lord. “Is it not themselves *they spite,* to their own shame?” (Jeremiah 7:16-19) {emphasis mine}
Jeremiah was told not to pray blessings on Israel because Israel had turned away from God and were serving other Gods.
I was just listening to a “Renewing Your Mind” podcast and the speaker made the statement, “We all want to say, ‘God bless America,’ but we don’t want to hear, ‘God curse America.’” That made me contemplate, “Should we ask God to bless America?”
Over the past decade or more (probably several decades), America has been using its military and economic might to push actions around the globe that are abhorrent to God. We give aid to countries if they legalize and fund abortions, if they promote gay marriage, and if they encourage transgender surgeries and chemical castration. They encourage people and nations to murder unborn children, to redefine marriage as different than what God created it to be, and to sterilize young people confused about their gender, breaking both God’s good creation of male and female and \
His command to be fruitful and multiply. You could make the argument that the US has been the largest purveyor of evil in the world. (It breaks my heart to say this.)
It is true that with the past election, America has turned away from many of these evil actions, but have Americans truly repented and turned back to God? I am convinced that neither our leaders nor most of our people have turned back to God in any significant way. It is like famous atheist, Richard Dawkins, saying he misses Christian culture but continuing to reject God and make fun of actual Christians. We can’t have it both ways. We can’t have God’s blessings without God.
Now I am not saying that we shouldn’t pray for America. It is totally appropriate to pray for revival in America. It is good to pray for Americans to repent of their sins and to trust in Jesus. It is great to pray for God to help us to share the gospel and to produce fruit. The issue is that we shouldn’t pray for America’s blessing while she has turned her back on God.
Obviously there are a decent number of Christians in America. That and the fact that America was founded on Christian principles actually means that America will be punished harsher than those nations where people have had little knowledge of the Bible and Jesus. Those who have been shown the gospel and still rejected God will be held to a higher standard and will be punished harsher than those who have never heard the gospel.
I ask you to pray that God would bring revival to America, that He would turn hearts and minds to Himself, and that He would draw our leaders to submit in full trust and obedience to Him. I also pray that God would help all of believers to be faithful stewards with all of the blessings with which He has already showered us and to use us to shine the light of the gospel with America and the rest of the world. I pray that He would help us to live lives fully devoted to Him and will help us to stand out from the crowd of pseudo-Christians and normal people, so we can be used to draw America back to God.
Unfortunately, we may be in a situation, like Jeremiah and Israel, where the nation has turned so far from God that we will be rejected in the same way they reject Jesus. We may have to look upon the nation we love and let go because our citizenship is in heaven. We need to always be more devoted to God and His kingdom than we are to our earthly citizenship.
> “Son of man, if a country sins against Me by committing unfaithfulness, and I stretch out My hand against it, destroy its supply of bread, send famine against it and cut off from it both man and beast, even though these three men, Noah, Daniel and Job were in its midst, by their own righteousness they could only deliver themselves,” declares the Lord God. (Ezekiel 14:13-14)
May God guide you in your prayers, your actions, and your faith so that you will be a light in the darkness and never forget where your allegiance lies. I pledge allegiance to my God, my Lord, and my Creator, and to Him alone does my allegiance belong.
Trust Jesus
-

@ 95cb4330:96db706c
2025-02-23 12:38:57
Embracing asynchronous work can significantly enhance productivity and reduce burnout by allowing individuals to work according to their own schedules without the pressure of immediate responses. This approach fosters deep, focused work and minimizes unnecessary interruptions.
---
## Understanding Asynchronous Work
- **Definition:**
Asynchronous work refers to a work style where employees complete tasks and communicate on their own time, without the expectation of immediate feedback. This contrasts with synchronous work, which requires real-time interaction.
---
## Benefits of Asynchronous Work
- **Enhanced Productivity:**
By reducing the need for constant real-time communication, employees can focus on tasks without frequent interruptions, leading to improved efficiency.
- **Flexibility:**
Employees can work during their most productive hours, accommodating personal schedules and time zones, which promotes a healthier work-life balance.
- **Reduced Burnout:**
The autonomy to manage one's workload and schedule can decrease stress and prevent burnout.
---
## Implementing Asynchronous Work
1. **Limit Meetings:**
Reduce the number of real-time meetings. When meetings are necessary, keep them concise and focused.
2. **Utilize Asynchronous Communication Tools:**
Employ platforms like email, project management software, and collaborative documents that allow team members to contribute on their own schedules.
3. **Set Clear Expectations:**
Establish guidelines for response times and project deadlines to ensure alignment and accountability.
4. **Encourage Deep Work:**
Promote periods of uninterrupted work to allow employees to engage deeply with complex tasks.
---
## Jeff Bezos's Approach to Time Management
Jeff Bezos, founder of Amazon, is known for his strategic approach to time management, which aligns with asynchronous principles:
- **Morning Routine:**
Bezos avoids early morning meetings, preferring to start his day with personal time that includes having coffee and reading the newspaper.
- **"Two-Pizza Rule":**
He limits meetings to a size that can be fed with two pizzas, ensuring they remain small and focused.
- **Intentional "Do Nothing" Time:**
Bezos schedules periods with no planned activities, allowing for reflection and spontaneous thought, which can lead to innovative ideas.
---
## Action Step
Evaluate your current work processes to identify areas where asynchronous methods can be applied. Start by reducing unnecessary meetings and implementing tools that facilitate communication without requiring immediate responses. This shift can lead to increased productivity, flexibility, and overall job satisfaction.
By adopting asynchronous work practices, you empower yourself and your team to work more efficiently and harmoniously, aligning work schedules with personal productivity peaks and reducing the risk of burnout.