-
![](/static/nostr-icon-purple-64x64.png)
@ a012dc82:6458a70d
2025-02-06 02:34:44
In an unexpected turn of events that has sent ripples through the cryptocurrency world, Changpeng Zhao, the CEO of Binance, has extended his stay in the United States. This development is particularly striking against the backdrop of Binance's ongoing legal challenges and the intense scrutiny it faces from regulators worldwide. Zhao's decision to remain in the U.S. longer than anticipated is not just a personal choice but a strategic move that could have far-reaching implications for Binance's global operations and the cryptocurrency industry at large. It raises questions about Binance's future strategies and its efforts to navigate the complex web of international regulations.
**Table Of Content**
- Background: Binance's Regulatory Challenges
- Changpeng Zhao's Role and Influence
- The Unexpected U.S. Stay
- Legal Considerations
- Future of Binance and Crypto Regulation
- Conclusion
- FAQs
**Background: Binance's Regulatory Challenges**
Binance has emerged as a dominant force in the cryptocurrency exchange market, known for its vast selection of digital assets and high trading volumes. However, this success has not come without its share of challenges. The platform has been under the microscope of regulators across the globe, facing scrutiny over its compliance with stringent anti-money laundering (AML) standards and consumer protection laws. These regulatory hurdles have manifested in various forms, including formal warnings from financial watchdogs, in-depth investigations by regulatory authorities, and outright bans in certain jurisdictions. These challenges highlight the precarious position Binance occupies in the global financial landscape and underscore the delicate balance it must maintain between innovation and regulatory compliance.
**Changpeng Zhao's Role and Influence**
Changpeng Zhao, affectionately known as "CZ" in the crypto community, is more than just the CEO of Binance; he is a visionary and a key influencer in the cryptocurrency sector. Since founding Binance in 2017, Zhao has steered the company through exponential growth, navigating the volatile waters of the crypto market with a blend of technological innovation and strategic foresight. However, this journey has been fraught with controversies, particularly around issues of regulatory compliance and operational transparency. As the face and voice of Binance, Zhao's decisions, public statements, and even his personal movements are closely watched and analyzed for insights into Binance's future direction and its stance on regulatory matters.
**The Unexpected U.S. Stay**
The news of Zhao's extended stay in the U.S. has sparked a flurry of speculation and analysis within the financial and cryptocurrency sectors. This move is particularly intriguing given the current regulatory climate in the U.S., which is known for its stringent financial oversight and tough stance on cryptocurrency regulation. The extended stay raises several questions: Is Zhao seeking to engage in high-level negotiations with U.S. regulators? Is Binance planning a strategic pivot or expansion in the U.S. market? Or is this a proactive measure to address some of the legal challenges facing the company? Whatever the reason, Zhao's presence in the U.S. is a clear indication that significant developments are underway for Binance in one of the world's most important financial markets.
**Implications for Binance**
Zhao's decision to extend his stay in the U.S. could be interpreted as a strategic move to align Binance more closely with U.S. regulatory frameworks. This could involve enhancing the company's compliance systems, engaging in more transparent dialogue with regulatory bodies, or even restructuring some of Binance's business practices to conform to U.S. standards. Such changes could be crucial for Binance's continued operation and growth in the U.S. market, potentially opening doors to new partnerships, investment opportunities, and a broader customer base. Moreover, a stronger foothold in the U.S. could enhance Binance's reputation globally, signaling its commitment to regulatory compliance and financial stability.
**Industry Reactions**
The cryptocurrency industry and financial markets are abuzz with discussions about Zhao's extended stay in the U.S. Analysts, investors, and other industry players are keenly observing this development, understanding that Zhao's actions could signal a new chapter for Binance and possibly the entire cryptocurrency sector. His stay is being interpreted as a sign of Binance's willingness to engage more proactively with regulatory bodies, a move that could have significant implications for how cryptocurrency businesses operate globally. Additionally, Zhao's presence in the U.S. could influence other cryptocurrency exchanges and startups, setting a precedent for how they might approach regulatory challenges and market expansion.
**Legal Considerations**
Zhao's prolonged presence in the U.S. coincides with a critical period for Binance as it navigates complex legal waters. His decision to stay could be instrumental in facilitating more direct and effective engagement with U.S. legal authorities and regulatory bodies. This proximity to the heart of U.S. financial regulation might enable more constructive dialogues, potentially leading to resolutions or progress in the various legal cases and investigations Binance is currently involved in. Zhao's hands-on involvement in these legal matters could be a game-changer, offering opportunities for negotiation, compliance, and possibly even reconciliation with regulatory authorities.
**Potential Outcomes**
The involvement of Zhao in legal and regulatory discussions in the U.S. could lead to a spectrum of outcomes for Binance. These might range from reaching amicable settlements and forming robust compliance agreements to facing more stringent regulatory actions or operational restrictions, depending on the nature of the negotiations and the willingness of both parties to find common ground. The outcomes of these engagements are likely to have a significant impact on Binance's operational framework, its global reputation, and its ability to compete in the international market. They could also set important precedents for how major cryptocurrency exchanges interact with regulatory bodies and navigate legal challenges.
**Future of Binance and Crypto Regulation**
Zhao's decision to extend his stay in the U.S. is a pivotal moment in the evolving narrative of cryptocurrency regulation. It underscores the increasing importance of regulatory compliance for major players in the crypto space and suggests a potential shift towards more collaborative and proactive approaches between industry leaders and regulatory bodies. This development could be a harbinger of a new era in cryptocurrency regulation, where open dialogue, transparency, and compliance play central roles in shaping the industry's future.
**Strategic Shifts for Binance**
Depending on the outcomes of Zhao's engagements in the U.S., Binance may undergo significant strategic shifts, particularly in its approach to regulatory compliance, operational transparency, and market strategy. These shifts could have far-reaching implications, not only for Binance but for the entire cryptocurrency exchange industry. They could set new standards for regulatory compliance, influence the development of new financial products and services, and shape the future landscape of the global cryptocurrency market.
**Conclusion**
Changpeng Zhao's unexpected extended stay in the United States represents a critical and potentially transformative moment in Binance's ongoing legal and regulatory saga. It reflects the complex and dynamic nature of cryptocurrency regulation and the necessity for industry leaders to adeptly navigate these challenges. As the crypto community and financial markets watch closely, the decisions and actions taken by Zhao in the coming days and weeks could have far-reaching implications for Binance's future, its position in the global market, and the broader trajectory of the cryptocurrency industry.
**FAQs**
**What challenges is Binance currently facing?**
Binance is grappling with regulatory scrutiny worldwide, particularly concerning anti-money laundering standards and consumer protection laws. This has led to investigations, warnings, and bans in several countries.
**How might Zhao's stay in the U.S. impact Binance?**
Zhao's extended stay could signal a move towards greater regulatory compliance and cooperation in the U.S., potentially leading to operational changes and enhanced market access for Binance.
**What are the potential outcomes of Zhao's U.S. engagements?**
Outcomes could range from amicable settlements and compliance agreements to more stringent regulatory actions, depending on the nature of Zhao's discussions with U.S. authorities.
**How could this development affect the broader cryptocurrency industry?**
Zhao's actions could set a precedent for cryptocurrency exchanges in terms of regulatory compliance and engagement, influencing the global cryptocurrency regulatory landscape.
**That's all for today**
**If you want more, be sure to follow us on:**
**NOSTR: croxroad@getalby.com**
**X: [@croxroadnews.co](https://x.com/croxroadnewsco)**
**Instagram: [@croxroadnews.co](https://www.instagram.com/croxroadnews.co/)**
**Youtube: [@croxroadnews](https://www.youtube.com/@croxroadnews)**
**Store: https://croxroad.store**
**Subscribe to CROX ROAD Bitcoin Only Daily Newsletter**
**https://www.croxroad.co/subscribe**
***DISCLAIMER: None of this is financial advice. This newsletter is strictly educational and is not investment advice or a solicitation to buy or sell any assets or to make any financial decisions. Please be careful and do your own research.***
-
![](/static/nostr-icon-purple-64x64.png)
@ ec42c765:328c0600
2025-02-05 23:45:09
test
test
-
![](/static/nostr-icon-purple-64x64.png)
@ ec42c765:328c0600
2025-02-05 23:43:35
test
-
![](/static/nostr-icon-purple-64x64.png)
@ ec42c765:328c0600
2025-02-05 23:38:12
# カスタム絵文字とは
任意のオリジナル画像を絵文字のように文中に挿入できる機能です。
また、リアクション(Twitterの いいね のような機能)にもカスタム絵文字を使えます。
![image](https://nostrcheck.me/media/lokuyow/b350b17b9176c59ec8c5e8251189a6610d09f2d7d2746f40476c5214e5827d37.webp)
# カスタム絵文字の対応状況(2025/02/06)
![image](https://cdn.nostrcheck.me/ec42c765418b3db9c85abff3a88f4a3bbe57535eebbdc54522041fa5328c0600/e815d627b374aba2467952ac2206b04684912bf4a65e39603e090f0de65b7d6a.webp)
カスタム絵文字を使うためにはカスタム絵文字に対応した[クライアント](https://welcome.nostr-jp.org/tutorial/explore-client.html)を使う必要があります。
※表は一例です。クライアントは他にもたくさんあります。
使っているクライアントが対応していない場合は、クライアントを変更する、対応するまで待つ、開発者に要望を送る(または自分で実装する)などしましょう。
#### 対応クライアント
- [Amethyst](https://play.google.com/store/apps/details?id=com.vitorpamplona.amethyst)
- [FreeFrom](https://freefrom.space/)
- [nostter](https://nostter.app/)
- [Rabbit](https://rabbit.syusui.net/)
- [Lumilumi](https://lumilumi.app/)
- [Nos Haiku](https://nos-haiku.vercel.app/)
- [Snort](https://snort.social/)
- [noStrudel](https://nostrudel.ninja/)
ここではnostterを使って説明していきます。
# 準備
カスタム絵文字を使うための準備です。
- Nostrエクステンション(NIP-07)を導入する
- 使いたいカスタム絵文字をリストに登録する
## Nostrエクステンション(NIP-07)を導入する
Nostrエクステンションは使いたいカスタム絵文字を登録する時に必要になります。
また、環境(パソコン、iPhone、androidなど)によって導入方法が違います。
Nostrエクステンションを導入する端末は、実際にNostrを閲覧する端末と違っても構いません(リスト登録はPC、Nostr閲覧はiPhoneなど)。
Nostrエクステンション(NIP-07)の導入方法は以下のページを参照してください。
[ログイン拡張機能 (NIP-07)を使ってみよう | Welcome to Nostr! ~ Nostrをはじめよう! ~ ](https://welcome.nostr-jp.org/tutorial/nip-07.html)
少し面倒ですが、これを導入しておくとNostr上の様々な場面で役立つのでより快適になります。
## 使いたいカスタム絵文字をリストに登録する
以下のサイトで行います。
[emojito](https://emojito.meme/)
右上の**Get started**からNostrエクステンションでログインしてください。
例として以下のカスタム絵文字を導入してみます。
実際より絵文字が少なく表示されることがありますが、古い状態のデータを取得してしまっているためです。その場合はブラウザの更新ボタンを押してください。
[generalJP | カスタム絵文字](https://emojito.meme/a/naddr1qqykwetwv4exzmz22qqsuamnwvaz7tmev9382tndv5hsyg8vgtrk2svt8kuusk4l7w5g7j3mhet4xhhthhz52gsyr7jn9rqxqqpsgqqqw48qud6u3s)
![image](https://nostrcheck.me/media/lokuyow/a154cf1d4218cc17291ec845d7706a8a4de9db92759881b69c4f2bf766f8a409.webp)
- 右側の**Options**から**Bookmark**を選択
![image](https://nostrcheck.me/media/lokuyow/ad932fe7118d3059e245c3ab410724495a7ccc72fbaec5ed43fef398d20361d1.webp)
これでカスタム絵文字を使用するためのリストに登録できます。
# カスタム絵文字を使用する
例としてブラウザから使えるクライアント nostter から使用してみます。
[nostter](https://nostter.app/)
nostterにNostrエクステンションでログイン、もしくは秘密鍵を入れてログインしてください。
## 文章中に使用
1. **投稿**ボタンを押して投稿ウィンドウを表示
2. **顔😀**のボタンを押し、絵文字ウィンドウを表示
3. ***タブ**を押し、カスタム絵文字一覧を表示
4. カスタム絵文字を選択
5. : 記号に挟まれたアルファベットのショートコードとして挿入される
![image](https://nostrcheck.me/media/lokuyow/2f469e7bd4a8d0ed1d778934c60a36ed077010181361e50f8d31cdb24ae828b1.webp)
この状態で投稿するとカスタム絵文字として表示されます。
カスタム絵文字対応クライアントを使っている他ユーザーにもカスタム絵文字として表示されます。
対応していないクライアントの場合、ショートコードのまま表示されます。
![image](https://nostrcheck.me/media/lokuyow/0701671fdc2352a9181fac49bca23fb59b61ffacf33090d16d14b6243ed9f877.webp)
ショートコードを直接入力することでカスタム絵文字の候補が表示されるのでそこから選択することもできます。
![image](https://nostrcheck.me/media/lokuyow/bc6b142ea9ac3643fa2bf9360c774fc5b2914ff5b2c2210cb75e6846581fd77f.webp)
## リアクションに使用
1. 任意の投稿の**顔😀**のボタンを押し、絵文字ウィンドウを表示
2. ***タブ**を押し、カスタム絵文字一覧を表示
3. カスタム絵文字を選択
![image](https://nostrcheck.me/media/lokuyow/203ffeba4fe9f3754ef394d6b4c8875db54d03c7d7b30b5eb4ac6d290c985639.webp)
カスタム絵文字リアクションを送ることができます。
![image](https://nostrcheck.me/media/lokuyow/729c3a016b7054433a56b093ee4cc6f3431248ace9e2eaa89bacdeececc0e58d.webp)
# カスタム絵文字を探す
先述した[emojito](https://emojito.meme/)からカスタム絵文字を探せます。
例えば任意のユーザーのページ [emojito ロクヨウ](https://emojito.meme/p/npub1a3pvwe2p3v7mnjz6hle63r628wl9w567aw7u23fzqs062v5vqcqqu3sgh3) から探したり、 [emojito Browse all](https://emojito.meme/browse) からnostr全体で最近作成、更新された絵文字を見たりできます。
また、以下のリンクは日本語圏ユーザーが作ったカスタム絵文字を集めたリストです(2025/02/06)
※漏れがあるかもしれません
[日本ユーザー作 カスタム絵文字](https://nostviewstr.vercel.app/npub17hczqvxtfv3w69wr6lxrttnpdekwdwel55mld60fr24zwjuu6utqtj8mjx/10030)
各絵文字セットにある**Open in emojito**のリンクからemojitoに飛び、使用リストに追加できます。
-----------
以上です。
次:Nostrのカスタム絵文字の**作り方**
Yakihonneリンク [Nostrのカスタム絵文字の作り方](https://yakihonne.com/article/_@lokuyow.github.io/1707912490439)
Nostrリンク nostr:naddr1qqxnzdesxuunzv358ycrgveeqgswcsk8v4qck0deepdtluag3a9rh0jh2d0wh0w9g53qg8a9x2xqvqqrqsqqqa28r5psx3
-----------
# 仕様
[NIP-30 Custom Emoji](https://github.com/nostr-protocol/nips/blob/master/30.md)
[NIP-30 カスタム絵文字(和訳)](https://github.com/nostr-jp/nips-ja/blob/main/30.md)
-
![](/static/nostr-icon-purple-64x64.png)
@ ec42c765:328c0600
2025-02-05 23:16:35
てすと
nostr:nevent1qqst3uqlls4yr9vys4dza2sgjle3ly37trck7jgdmtr23uuz52usjrqqqnjgr
nostr:nevent1qqsdvchy5d27zt3z05rr3q6vvmzgslslxwu0p4dfkvxwhmvxldn9djguvagp2
test
てs
-
![](/static/nostr-icon-purple-64x64.png)
@ ec42c765:328c0600
2025-02-05 22:05:55
# カスタム絵文字とは
任意のオリジナル画像を絵文字のように文中に挿入できる機能です。
また、リアクション(Twitterの いいね のような機能)にもカスタム絵文字を使えます。
![image](https://nostrcheck.me/media/lokuyow/b350b17b9176c59ec8c5e8251189a6610d09f2d7d2746f40476c5214e5827d37.webp)
# カスタム絵文字の対応状況(2025/02/06)
![image](https://cdn.nostrcheck.me/ec42c765418b3db9c85abff3a88f4a3bbe57535eebbdc54522041fa5328c0600/e815d627b374aba2467952ac2206b04684912bf4a65e39603e090f0de65b7d6a.webp)
カスタム絵文字を使うためにはカスタム絵文字に対応した[クライアント](https://welcome.nostr-jp.org/tutorial/explore-client.html)を使う必要があります。
※表は一例です。クライアントは他にもたくさんあります。
使っているクライアントが対応していない場合は、クライアントを変更する、対応するまで待つ、開発者に要望を送る(または自分で実装する)などしましょう。
#### 対応クライアント
- [Amethyst](https://play.google.com/store/apps/details?id=com.vitorpamplona.amethyst)
- [FreeFrom](https://freefrom.space/)
- [nostter](https://nostter.app/)
- [Rabbit](https://rabbit.syusui.net/)
- [Lumilumi](https://lumilumi.app/)
- [Nos Haiku](https://nos-haiku.vercel.app/)
- [Snort](https://snort.social/)
- [noStrudel](https://nostrudel.ninja/)
ここではnostterを使って説明していきます。
# 準備
カスタム絵文字を使うための準備です。
- Nostrエクステンション(NIP-07)を導入する
- 使いたいカスタム絵文字をリストに登録する
## Nostrエクステンション(NIP-07)を導入する
Nostrエクステンションは使いたいカスタム絵文字を登録する時に必要になります。
また、環境(パソコン、iPhone、androidなど)によって導入方法が違います。
Nostrエクステンションを導入する端末は、実際にNostrを閲覧する端末と違っても構いません(リスト登録はPC、Nostr閲覧はiPhoneなど)。
Nostrエクステンション(NIP-07)の導入方法は以下のページを参照してください。
[ログイン拡張機能 (NIP-07)を使ってみよう | Welcome to Nostr! ~ Nostrをはじめよう! ~ ](https://welcome.nostr-jp.org/tutorial/nip-07.html)
少し面倒ですが、これを導入しておくとNostr上の様々な場面で役立つのでより快適になります。
## 使いたいカスタム絵文字をリストに登録する
以下のサイトで行います。
[emojito](https://emojito.meme/)
右上の**Get started**からNostrエクステンションでログインしてください。
例として以下のカスタム絵文字を導入してみます。
実際より絵文字が少なく表示されることがありますが、古い状態のデータを取得してしまっているためです。その場合はブラウザの更新ボタンを押してください。
[generalJP | カスタム絵文字](https://emojito.meme/a/naddr1qqykwetwv4exzmz22qq3uamnwvaz7tmwdaehgun2vykkkctjdyhxset8w4ex7tnrdakj7q3qa3pvwe2p3v7mnjz6hle63r628wl9w567aw7u23fzqs062v5vqcqqxpqqqp65uhjtrk6)
![image](https://nostrcheck.me/media/lokuyow/a154cf1d4218cc17291ec845d7706a8a4de9db92759881b69c4f2bf766f8a409.webp)
- 右側の**Options**から**Bookmark**を選択
![image](https://nostrcheck.me/media/lokuyow/ad932fe7118d3059e245c3ab410724495a7ccc72fbaec5ed43fef398d20361d1.webp)
これでカスタム絵文字を使用するためのリストに登録できます。
# カスタム絵文字を使用する
例としてブラウザから使えるクライアント nostter から使用してみます。
[nostter](https://nostter.app/)
nostterにNostrエクステンションでログイン、もしくは秘密鍵を入れてログインしてください。
## 文章中に使用
1. **投稿**ボタンを押して投稿ウィンドウを表示
2. **顔😀**のボタンを押し、絵文字ウィンドウを表示
3. ***タブ**を押し、カスタム絵文字一覧を表示
4. カスタム絵文字を選択
5. : 記号に挟まれたアルファベットのショートコードとして挿入される
![image](https://nostrcheck.me/media/lokuyow/2f469e7bd4a8d0ed1d778934c60a36ed077010181361e50f8d31cdb24ae828b1.webp)
この状態で投稿するとカスタム絵文字として表示されます。
カスタム絵文字対応クライアントを使っている他ユーザーにもカスタム絵文字として表示されます。
対応していないクライアントの場合、ショートコードのまま表示されます。
![image](https://nostrcheck.me/media/lokuyow/0701671fdc2352a9181fac49bca23fb59b61ffacf33090d16d14b6243ed9f877.webp)
ショートコードを直接入力することでカスタム絵文字の候補が表示されるのでそこから選択することもできます。
![image](https://nostrcheck.me/media/lokuyow/bc6b142ea9ac3643fa2bf9360c774fc5b2914ff5b2c2210cb75e6846581fd77f.webp)
## リアクションに使用
1. 任意の投稿の**顔😀**のボタンを押し、絵文字ウィンドウを表示
2. ***タブ**を押し、カスタム絵文字一覧を表示
3. カスタム絵文字を選択
![image](https://nostrcheck.me/media/lokuyow/203ffeba4fe9f3754ef394d6b4c8875db54d03c7d7b30b5eb4ac6d290c985639.webp)
カスタム絵文字リアクションを送ることができます。
![image](https://nostrcheck.me/media/lokuyow/729c3a016b7054433a56b093ee4cc6f3431248ace9e2eaa89bacdeececc0e58d.webp)
# カスタム絵文字を探す
先述した[emojito](https://emojito.meme/)からカスタム絵文字を探せます。
例えば任意のユーザーのページ [emojito ロクヨウ](https://emojito.meme/p/npub1a3pvwe2p3v7mnjz6hle63r628wl9w567aw7u23fzqs062v5vqcqqu3sgh3) から探したり、 [emojito Browse all](https://emojito.meme/browse) からnostr全体で最近作成、更新された絵文字を見たりできます。
また、以下のリンクは日本語圏ユーザーが作ったカスタム絵文字を集めたリストです(2025/02/06)
※漏れがあるかもしれません
[日本ユーザー作 カスタム絵文字](https://nostviewstr.vercel.app/npub17hczqvxtfv3w69wr6lxrttnpdekwdwel55mld60fr24zwjuu6utqtj8mjx/10030)
各絵文字セットにある**Open in emojito**のリンクからemojitoに飛び、使用リストに追加できます。
-----------
以上です。
次:Nostrのカスタム絵文字の**作り方**
Yakihonneリンク [Nostrのカスタム絵文字の作り方](https://yakihonne.com/article/_@lokuyow.github.io/1707912490439)
Nostrリンク nostr:naddr1qqxnzdesxuunzv358ycrgveeqgswcsk8v4qck0deepdtluag3a9rh0jh2d0wh0w9g53qg8a9x2xqvqqrqsqqqa28r5psx3
-----------
# 仕様
[NIP-30 Custom Emoji](https://github.com/nostr-protocol/nips/blob/master/30.md)
[NIP-30 カスタム絵文字(和訳)](https://github.com/nostr-jp/nips-ja/blob/main/30.md)
-
![](/static/nostr-icon-purple-64x64.png)
@ ec42c765:328c0600
2025-02-05 20:30:46
# カスタム絵文字とは
任意のオリジナル画像を絵文字のように文中に挿入できる機能です。
また、リアクション(Twitterの いいね のような機能)にもカスタム絵文字を使えます。
![image](https://nostrcheck.me/media/lokuyow/b350b17b9176c59ec8c5e8251189a6610d09f2d7d2746f40476c5214e5827d37.webp)
# カスタム絵文字の対応状況(2024/02/05)
![image](https://cdn.nostrcheck.me/ec42c765418b3db9c85abff3a88f4a3bbe57535eebbdc54522041fa5328c0600/e815d627b374aba2467952ac2206b04684912bf4a65e39603e090f0de65b7d6a.webp)
カスタム絵文字を使うためにはカスタム絵文字に対応した[クライアント](https://welcome.nostr-jp.org/tutorial/explore-client.html)を使う必要があります。
※表は一例です。クライアントは他にもたくさんあります。
使っているクライアントが対応していない場合は、クライアントを変更する、対応するまで待つ、開発者に要望を送る(または自分で実装する)などしましょう。
#### 対応クライアント
- [Amethyst](https://play.google.com/store/apps/details?id=com.vitorpamplona.amethyst)
- [FreeFrom](https://freefrom.space/)
- [nostter](https://nostter.app/)
- [Rabbit](https://rabbit.syusui.net/)
- [Snort](https://snort.social/)
- [noStrudel](https://nostrudel.ninja/)
ここではnostterを使って説明していきます。
# 準備
カスタム絵文字を使うための準備です。
- Nostrエクステンション(NIP-07)を導入する
- 使いたいカスタム絵文字をリストに登録する
## Nostrエクステンション(NIP-07)を導入する
Nostrエクステンションは使いたいカスタム絵文字を登録する時に必要になります。
また、環境(パソコン、iPhone、androidなど)によって導入方法が違います。
Nostrエクステンションを導入する端末は、実際にNostrを閲覧する端末と違っても構いません(リスト登録はPC、Nostr閲覧はiPhoneなど)。
Nostrエクステンション(NIP-07)の導入方法は以下のページを参照してください。
[ログイン拡張機能 (NIP-07)を使ってみよう | Welcome to Nostr! ~ Nostrをはじめよう! ~ ](https://welcome.nostr-jp.org/tutorial/nip-07.html)
少し面倒ですが、これを導入しておくとNostr上の様々な場面で役立つのでより快適になります。
## 使いたいカスタム絵文字をリストに登録する
以下のサイトで行います。
[emojito](https://emojito.meme/)
右上の**Get started**からNostrエクステンションでログインしてください。
例として以下のカスタム絵文字を導入してみます。
実際より絵文字が少なく表示されることがありますが、古い状態のデータを取得してしまっているためです。その場合はブラウザの更新ボタンを押してください。
[generalJP | カスタム絵文字](https://emojito.meme/a/naddr1qqykwetwv4exzmz22qq3uamnwvaz7tmwdaehgun2vykkkctjdyhxset8w4ex7tnrdakj7q3qa3pvwe2p3v7mnjz6hle63r628wl9w567aw7u23fzqs062v5vqcqqxpqqqp65uhjtrk6)
![image](https://nostrcheck.me/media/lokuyow/a154cf1d4218cc17291ec845d7706a8a4de9db92759881b69c4f2bf766f8a409.webp)
- 右側の**Options**から**Bookmark**を選択
![image](https://nostrcheck.me/media/lokuyow/ad932fe7118d3059e245c3ab410724495a7ccc72fbaec5ed43fef398d20361d1.webp)
これでカスタム絵文字を使用するためのリストに登録できます。
# カスタム絵文字を使用する
例としてブラウザから使えるクライアント nostter から使用してみます。
[nostter](https://nostter.app/)
nostterにNostrエクステンションでログイン、もしくは秘密鍵を入れてログインしてください。
## 文章中に使用
1. **投稿**ボタンを押して投稿ウィンドウを表示
2. **顔😀**のボタンを押し、絵文字ウィンドウを表示
3. ***タブ**を押し、カスタム絵文字一覧を表示
4. カスタム絵文字を選択
5. : 記号に挟まれたアルファベットのショートコードとして挿入される
![image](https://nostrcheck.me/media/lokuyow/2f469e7bd4a8d0ed1d778934c60a36ed077010181361e50f8d31cdb24ae828b1.webp)
この状態で投稿するとカスタム絵文字として表示されます。
カスタム絵文字対応クライアントを使っている他ユーザーにもカスタム絵文字として表示されます。
対応していないクライアントの場合、ショートコードのまま表示されます。
![image](https://nostrcheck.me/media/lokuyow/0701671fdc2352a9181fac49bca23fb59b61ffacf33090d16d14b6243ed9f877.webp)
ショートコードを直接入力することでカスタム絵文字の候補が表示されるのでそこから選択することもできます。
![image](https://nostrcheck.me/media/lokuyow/bc6b142ea9ac3643fa2bf9360c774fc5b2914ff5b2c2210cb75e6846581fd77f.webp)
## リアクションに使用
1. 任意の投稿の**顔😀**のボタンを押し、絵文字ウィンドウを表示
2. ***タブ**を押し、カスタム絵文字一覧を表示
3. カスタム絵文字を選択
![image](https://nostrcheck.me/media/lokuyow/203ffeba4fe9f3754ef394d6b4c8875db54d03c7d7b30b5eb4ac6d290c985639.webp)
カスタム絵文字リアクションを送ることができます。
![image](https://nostrcheck.me/media/lokuyow/729c3a016b7054433a56b093ee4cc6f3431248ace9e2eaa89bacdeececc0e58d.webp)
# カスタム絵文字を探す
先述した[emojito](https://emojito.meme/)からカスタム絵文字を探せます。
例えば任意のユーザーのページ [emojito ロクヨウ](https://emojito.meme/p/npub1a3pvwe2p3v7mnjz6hle63r628wl9w567aw7u23fzqs062v5vqcqqu3sgh3) から探したり、 [emojito Browse all](https://emojito.meme/browse) からnostr全体で最近作成、更新された絵文字を見たりできます。
また、以下のリンクは日本語圏ユーザーが作ったカスタム絵文字を集めたリストです(2024/06/30)
※漏れがあるかもしれません
[日本ユーザー作 カスタム絵文字](https://nostviewstr.vercel.app/npub17hczqvxtfv3w69wr6lxrttnpdekwdwel55mld60fr24zwjuu6utqtj8mjx/10030)
各絵文字セットにある**Open in emojito**のリンクからemojitoに飛び、使用リストに追加できます。
-----------
以上です。
次:Nostrのカスタム絵文字の**作り方**
Yakihonneリンク [Nostrのカスタム絵文字の作り方](https://yakihonne.com/article/_@lokuyow.github.io/1707912490439)
Nostrリンク nostr:naddr1qqxnzdesxuunzv358ycrgveeqgswcsk8v4qck0deepdtluag3a9rh0jh2d0wh0w9g53qg8a9x2xqvqqrqsqqqa28r5psx3
-----------
# 仕様
[NIP-30 Custom Emoji](https://github.com/nostr-protocol/nips/blob/master/30.md)
[NIP-30 カスタム絵文字(和訳)](https://github.com/nostr-jp/nips-ja/blob/main/30.md)
-
![](/static/nostr-icon-purple-64x64.png)
@ e3ba5e1a:5e433365
2025-02-05 17:47:16
I got into a [friendly discussion](https://x.com/snoyberg/status/1887007888117252142) on X regarding health insurance. The specific question was how to deal with health insurance companies (presumably unfairly) denying claims? My answer, as usual: get government out of it!
The US healthcare system is essentially the worst of both worlds:
* Unlike full single payer, individuals incur high costs
* Unlike a true free market, regulation causes increases in costs and decreases competition among insurers
I'm firmly on the side of moving towards the free market. (And I say that as someone living under a single payer system now.) Here's what I would do:
* Get rid of tax incentives that make health insurance tied to your employer, giving individuals back proper freedom of choice.
* Reduce regulations significantly.
* In the short term, some people will still get rejected claims and other obnoxious behavior from insurance companies. We address that in two ways:
1. Due to reduced regulations, new insurance companies will be able to enter the market offering more reliable coverage and better rates, and people will flock to them because they have the freedom to make their own choices.
2. Sue the asses off of companies that reject claims unfairly. And ideally, as one of the few legitimate roles of government in all this, institute new laws that limit the ability of fine print to allow insurers to escape their responsibilities. (I'm hesitant that the latter will happen due to the incestuous relationship between Congress/regulators and insurers, but I can hope.)
Will this magically fix everything overnight like politicians normally promise? No. But it will allow the market to return to a healthy state. And I don't think it will take long (order of magnitude: 5-10 years) for it to come together, but that's just speculation.
And since there's a high correlation between those who believe government can fix problems by taking more control and demanding that only credentialed experts weigh in on a topic (both points I strongly disagree with BTW): I'm a trained actuary and worked in the insurance industry, and have directly seen how government regulation reduces competition, raises prices, and harms consumers.
And my final point: I don't think any prior art would be a good comparison for deregulation in the US, it's such a different market than any other country in the world for so many reasons that lessons wouldn't really translate. Nonetheless, I asked Grok for some empirical data on this, and at best the results of deregulation could be called "mixed," but likely more accurately "uncertain, confused, and subject to whatever interpretation anyone wants to apply."
https://x.com/i/grok/share/Zc8yOdrN8lS275hXJ92uwq98M
-
![](/static/nostr-icon-purple-64x64.png)
@ a012dc82:6458a70d
2025-02-05 14:29:47
The cryptocurrency market is a dynamic and often unpredictable space. With Bitcoin's impressive surge in value, many investors are looking beyond the pioneer cryptocurrency to diversify their portfolios. This article explores various cryptocurrency options, weighing the potential of holding (HODLing) or selling them in the current market.
**Table Of Content**
- Bitcoin's Stellar Performance
- Ether (ETH)
- Solana (SOL)
- Binance Coin (BNB)
- BLUR
- Conclusion
- FAQs
**Bitcoin's Stellar Performance**
Bitcoin, the first and most well-known cryptocurrency, has seen a remarkable increase in value, rising by 120% in 2023. This surge sets a benchmark for evaluating other cryptocurrencies. Bitcoin's growth is influenced by several factors, including the anticipation of a Bitcoin ETF and its upcoming fourth halving. These developments could further drive its demand and value.
The potential introduction of a Bitcoin ETF is particularly significant. It would allow a broader range of investors to gain exposure to Bitcoin without the complexities of direct cryptocurrency ownership. This development could lead to increased institutional investment and potentially stabilize Bitcoin's historically volatile price. Furthermore, the halving event, expected to occur in April, is a fundamental aspect of Bitcoin's design. It reduces the reward for mining new blocks, effectively limiting the supply of new bitcoins. This scarcity is a key driver of Bitcoin's value and has historically led to significant price increases.
However, Bitcoin's dominance and performance also raise questions about market saturation and the potential for continued growth. While Bitcoin remains a safe haven for many investors, its large market capitalization means that it may not offer the same growth potential as some smaller, emerging cryptocurrencies. Investors looking for high-growth opportunities may find these in altcoins, which, while riskier, offer the potential for higher returns.
**Ether (ETH)**
Ether, the native token of the Ethereum blockchain, has a different appeal compared to Bitcoin. While Bitcoin excels as a payment network, Ethereum's strength lies in its versatility as a platform for decentralized applications. Ether's growth has been modest compared to Bitcoin, with a 65% increase this year.
Ethereum's broader utility stems from its ability to support smart contracts and decentralized applications (dApps). These features have made it the backbone of various sectors, including decentralized finance (DeFi) and non-fungible tokens (NFTs). The recent upgrade to Ethereum 2.0, transitioning to a proof-of-stake consensus mechanism, aims to address scalability and energy efficiency issues, potentially increasing its attractiveness to both developers and investors.
Despite these advancements, Ether's price has not seen the same explosive growth as Bitcoin. This could be due to the market's maturation and the increasing competition from other blockchain platforms. However, Ethereum's established position and ongoing development make it a strong contender for long-term growth. Investors may consider holding Ether as a bet on the continued expansion and innovation in the DeFi and NFT spaces, where Ethereum plays a central role.
**Solana (SOL)**
Solana, a blockchain platform seen as a competitor to Ethereum, has recovered remarkably from the impacts of the FTX collapse, with its value increasing by 313% this year. This growth is a testament to the resilience and potential of Solana as an investment.
Solana's key selling point is its high throughput and low transaction costs, making it an attractive platform for both developers and users. Its ability to process thousands of transactions per second outpaces Ethereum significantly, which has been a bottleneck for the latter. This technical superiority has led to increased adoption of Solana for various applications, including decentralized exchanges, gaming, and NFTs.
The rapid recovery of Solana's value post-FTX collapse indicates strong investor confidence and market support for the platform. It suggests that Solana has managed to dissociate itself from the negative sentiment surrounding FTX and is being recognized for its inherent technological strengths. For investors, Solana presents an opportunity to diversify into a high-potential blockchain platform that could capture significant market share in the future.
**Binance Coin (BNB)**
BNB, the native token of the Binance exchange, has faced significant challenges following legal issues with Binance’s CEO. These developments have led to a decrease in BNB's value, prompting considerations for selling the asset.
The legal troubles surrounding Binance and its CEO have raised concerns about the exchange's future and, by extension, the value of BNB. Binance Coin's utility is closely tied to the Binance ecosystem, being used for transaction fee discounts and participation in token sales. If regulatory actions lead to a decrease in Binance's user base or a change in its operational model, BNB could see a further decline in value.
However, it's also important to consider Binance's position as one of the largest and most influential cryptocurrency exchanges globally. The platform has a substantial user base and a wide array of services, including trading, staking, and a native blockchain, Binance Smart Chain. If Binance navigates through its legal challenges successfully, BNB could recover and potentially grow in value. Investors need to weigh the risks of regulatory impacts against the potential for Binance to continue playing a major role in the crypto ecosystem.
**BLUR**
BLUR, associated with the NFT marketplace Blur, has maintained a significant market capitalization despite a downturn in NFT trading. As the NFT market shows signs of a potential rebound, holding BLUR could be a strategic move for investors interested in the digital art and collectibles space.
The NFT market has experienced a significant cooldown from its peak in 2021, but it remains a sector with potential for innovation and growth. BLUR's association with the Blur marketplace positions it well within this niche. The marketplace has gained traction among NFT traders for its user-friendly interface and unique features, such as rewarding users with BLUR tokens based on their trading volume.
BLUR's utility within the Blur ecosystem could drive its value as the NFT market evolves. The token's use in governance and transaction fee payments on the platform aligns it closely with the marketplace's success. As new artists and collectors continue to enter the NFT space, platforms like Blur that offer a streamlined and rewarding experience could see increased usage, potentially boosting BLUR's value.
Investors considering BLUR should monitor the broader NFT market trends and Blur's position within it. While the NFT market is known for its volatility, it also offers unique opportunities for growth, especially in niches that are innovating and capturing user interest.
**Conclusion**
The cryptocurrency market is diverse and constantly evolving. While Bitcoin continues to be a strong performer, other cryptocurrencies offer varied investment opportunities. Investors should consider their risk tolerance, market trends, and the unique attributes of each cryptocurrency when making decisions. Whether to HODL or sell depends on individual investment goals and the ever-changing landscape of the crypto world. Diversification and staying informed are key to navigating this dynamic market successfully.
**FAQs**
**Is it better to invest in Bitcoin or other cryptocurrencies?**
It depends on your investment goals and risk tolerance. Bitcoin is more established but may offer lower growth potential compared to some emerging altcoins. Diversifying your portfolio with a mix of Bitcoin and other cryptocurrencies might be a balanced approach.
**What makes Ether a good investment option?**
Ether is the native token of the Ethereum blockchain, known for its versatility in supporting smart contracts and decentralized applications. Its ongoing development and central role in the DeFi and NFT sectors make it a strong contender for long-term growth.
**Why is Solana considered a rising competitor in the crypto market?**
Solana offers high transaction speeds and low costs, making it an attractive platform for developers and users. Its rapid recovery post-FTX collapse indicates strong market support and potential for significant market share in the future.
**What are the risks associated with investing in Binance Coin (BNB)?**
BNB faces risks due to legal issues surrounding Binance and its CEO. Its value is closely tied to the Binance ecosystem, so any negative impact on the exchange could affect BNB's value.
**Is investing in BLUR a good strategy?**
Investing in BLUR could be a strategic move if you're interested in the NFT market. As the native token of the Blur NFT marketplace, its value may grow with the platform's success in the evolving NFT space.
**How important is diversification in cryptocurrency investment?**
Diversification is crucial in managing risk in the volatile cryptocurrency market. It involves spreading your investment across different assets to reduce the impact of any single asset's performance on your overall portfolio.
**That's all for today**
**If you want more, be sure to follow us on:**
**NOSTR: croxroad@getalby.com**
**X: [@croxroadnews.co](https://x.com/croxroadnewsco)**
**Instagram: [@croxroadnews.co](https://www.instagram.com/croxroadnews.co/)**
**Youtube: [@croxroadnews](https://www.youtube.com/@croxroadnews)**
**Store: https://croxroad.store**
**Subscribe to CROX ROAD Bitcoin Only Daily Newsletter**
**https://www.croxroad.co/subscribe**
***DISCLAIMER: None of this is financial advice. This newsletter is strictly educational and is not investment advice or a solicitation to buy or sell any assets or to make any financial decisions. Please be careful and do your own research.***
-
![](/static/nostr-icon-purple-64x64.png)
@ 91bea5cd:1df4451c
2025-02-04 17:24:50
### Definição de ULID:
Timestamp 48 bits, Aleatoriedade 80 bits
Sendo Timestamp 48 bits inteiro, tempo UNIX em milissegundos, Não ficará sem espaço até o ano 10889 d.C.
e Aleatoriedade 80 bits, Fonte criptograficamente segura de aleatoriedade, se possível.
#### Gerar ULID
```sql
CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE FUNCTION generate_ulid()
RETURNS TEXT
AS $$
DECLARE
-- Crockford's Base32
encoding BYTEA = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';
timestamp BYTEA = E'\\000\\000\\000\\000\\000\\000';
output TEXT = '';
unix_time BIGINT;
ulid BYTEA;
BEGIN
-- 6 timestamp bytes
unix_time = (EXTRACT(EPOCH FROM CLOCK_TIMESTAMP()) * 1000)::BIGINT;
timestamp = SET_BYTE(timestamp, 0, (unix_time >> 40)::BIT(8)::INTEGER);
timestamp = SET_BYTE(timestamp, 1, (unix_time >> 32)::BIT(8)::INTEGER);
timestamp = SET_BYTE(timestamp, 2, (unix_time >> 24)::BIT(8)::INTEGER);
timestamp = SET_BYTE(timestamp, 3, (unix_time >> 16)::BIT(8)::INTEGER);
timestamp = SET_BYTE(timestamp, 4, (unix_time >> 8)::BIT(8)::INTEGER);
timestamp = SET_BYTE(timestamp, 5, unix_time::BIT(8)::INTEGER);
-- 10 entropy bytes
ulid = timestamp || gen_random_bytes(10);
-- Encode the timestamp
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 0) & 224) >> 5));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 0) & 31)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 1) & 248) >> 3));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 1) & 7) << 2) | ((GET_BYTE(ulid, 2) & 192) >> 6)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 2) & 62) >> 1));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 2) & 1) << 4) | ((GET_BYTE(ulid, 3) & 240) >> 4)));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 3) & 15) << 1) | ((GET_BYTE(ulid, 4) & 128) >> 7)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 4) & 124) >> 2));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 4) & 3) << 3) | ((GET_BYTE(ulid, 5) & 224) >> 5)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 5) & 31)));
-- Encode the entropy
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 6) & 248) >> 3));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 6) & 7) << 2) | ((GET_BYTE(ulid, 7) & 192) >> 6)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 7) & 62) >> 1));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 7) & 1) << 4) | ((GET_BYTE(ulid, 8) & 240) >> 4)));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 8) & 15) << 1) | ((GET_BYTE(ulid, 9) & 128) >> 7)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 9) & 124) >> 2));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 9) & 3) << 3) | ((GET_BYTE(ulid, 10) & 224) >> 5)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 10) & 31)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 11) & 248) >> 3));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 11) & 7) << 2) | ((GET_BYTE(ulid, 12) & 192) >> 6)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 12) & 62) >> 1));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 12) & 1) << 4) | ((GET_BYTE(ulid, 13) & 240) >> 4)));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 13) & 15) << 1) | ((GET_BYTE(ulid, 14) & 128) >> 7)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 14) & 124) >> 2));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 14) & 3) << 3) | ((GET_BYTE(ulid, 15) & 224) >> 5)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 15) & 31)));
RETURN output;
END
$$
LANGUAGE plpgsql
VOLATILE;
```
#### ULID TO UUID
```sql
CREATE OR REPLACE FUNCTION parse_ulid(ulid text) RETURNS bytea AS $$
DECLARE
-- 16byte
bytes bytea = E'\\x00000000 00000000 00000000 00000000';
v char[];
-- Allow for O(1) lookup of index values
dec integer[] = ARRAY[
255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 0, 1, 2,
3, 4, 5, 6, 7, 8, 9, 255, 255, 255,
255, 255, 255, 255, 10, 11, 12, 13, 14, 15,
16, 17, 1, 18, 19, 1, 20, 21, 0, 22,
23, 24, 25, 26, 255, 27, 28, 29, 30, 31,
255, 255, 255, 255, 255, 255, 10, 11, 12, 13,
14, 15, 16, 17, 1, 18, 19, 1, 20, 21,
0, 22, 23, 24, 25, 26, 255, 27, 28, 29,
30, 31
];
BEGIN
IF NOT ulid ~* '^[0-7][0-9ABCDEFGHJKMNPQRSTVWXYZ]{25}$' THEN
RAISE EXCEPTION 'Invalid ULID: %', ulid;
END IF;
v = regexp_split_to_array(ulid, '');
-- 6 bytes timestamp (48 bits)
bytes = SET_BYTE(bytes, 0, (dec[ASCII(v[1])] << 5) | dec[ASCII(v[2])]);
bytes = SET_BYTE(bytes, 1, (dec[ASCII(v[3])] << 3) | (dec[ASCII(v[4])] >> 2));
bytes = SET_BYTE(bytes, 2, (dec[ASCII(v[4])] << 6) | (dec[ASCII(v[5])] << 1) | (dec[ASCII(v[6])] >> 4));
bytes = SET_BYTE(bytes, 3, (dec[ASCII(v[6])] << 4) | (dec[ASCII(v[7])] >> 1));
bytes = SET_BYTE(bytes, 4, (dec[ASCII(v[7])] << 7) | (dec[ASCII(v[8])] << 2) | (dec[ASCII(v[9])] >> 3));
bytes = SET_BYTE(bytes, 5, (dec[ASCII(v[9])] << 5) | dec[ASCII(v[10])]);
-- 10 bytes of entropy (80 bits);
bytes = SET_BYTE(bytes, 6, (dec[ASCII(v[11])] << 3) | (dec[ASCII(v[12])] >> 2));
bytes = SET_BYTE(bytes, 7, (dec[ASCII(v[12])] << 6) | (dec[ASCII(v[13])] << 1) | (dec[ASCII(v[14])] >> 4));
bytes = SET_BYTE(bytes, 8, (dec[ASCII(v[14])] << 4) | (dec[ASCII(v[15])] >> 1));
bytes = SET_BYTE(bytes, 9, (dec[ASCII(v[15])] << 7) | (dec[ASCII(v[16])] << 2) | (dec[ASCII(v[17])] >> 3));
bytes = SET_BYTE(bytes, 10, (dec[ASCII(v[17])] << 5) | dec[ASCII(v[18])]);
bytes = SET_BYTE(bytes, 11, (dec[ASCII(v[19])] << 3) | (dec[ASCII(v[20])] >> 2));
bytes = SET_BYTE(bytes, 12, (dec[ASCII(v[20])] << 6) | (dec[ASCII(v[21])] << 1) | (dec[ASCII(v[22])] >> 4));
bytes = SET_BYTE(bytes, 13, (dec[ASCII(v[22])] << 4) | (dec[ASCII(v[23])] >> 1));
bytes = SET_BYTE(bytes, 14, (dec[ASCII(v[23])] << 7) | (dec[ASCII(v[24])] << 2) | (dec[ASCII(v[25])] >> 3));
bytes = SET_BYTE(bytes, 15, (dec[ASCII(v[25])] << 5) | dec[ASCII(v[26])]);
RETURN bytes;
END
$$
LANGUAGE plpgsql
IMMUTABLE;
CREATE OR REPLACE FUNCTION ulid_to_uuid(ulid text) RETURNS uuid AS $$
BEGIN
RETURN encode(parse_ulid(ulid), 'hex')::uuid;
END
$$
LANGUAGE plpgsql
IMMUTABLE;
```
#### UUID to ULID
```sql
CREATE OR REPLACE FUNCTION uuid_to_ulid(id uuid) RETURNS text AS $$
DECLARE
encoding bytea = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';
output text = '';
uuid_bytes bytea = uuid_send(id);
BEGIN
-- Encode the timestamp
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 0) & 224) >> 5));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 0) & 31)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 1) & 248) >> 3));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 1) & 7) << 2) | ((GET_BYTE(uuid_bytes, 2) & 192) >> 6)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 2) & 62) >> 1));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 2) & 1) << 4) | ((GET_BYTE(uuid_bytes, 3) & 240) >> 4)));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 3) & 15) << 1) | ((GET_BYTE(uuid_bytes, 4) & 128) >> 7)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 4) & 124) >> 2));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 4) & 3) << 3) | ((GET_BYTE(uuid_bytes, 5) & 224) >> 5)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 5) & 31)));
-- Encode the entropy
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 6) & 248) >> 3));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 6) & 7) << 2) | ((GET_BYTE(uuid_bytes, 7) & 192) >> 6)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 7) & 62) >> 1));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 7) & 1) << 4) | ((GET_BYTE(uuid_bytes, 8) & 240) >> 4)));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 8) & 15) << 1) | ((GET_BYTE(uuid_bytes, 9) & 128) >> 7)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 9) & 124) >> 2));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 9) & 3) << 3) | ((GET_BYTE(uuid_bytes, 10) & 224) >> 5)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 10) & 31)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 11) & 248) >> 3));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 11) & 7) << 2) | ((GET_BYTE(uuid_bytes, 12) & 192) >> 6)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 12) & 62) >> 1));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 12) & 1) << 4) | ((GET_BYTE(uuid_bytes, 13) & 240) >> 4)));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 13) & 15) << 1) | ((GET_BYTE(uuid_bytes, 14) & 128) >> 7)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 14) & 124) >> 2));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 14) & 3) << 3) | ((GET_BYTE(uuid_bytes, 15) & 224) >> 5)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 15) & 31)));
RETURN output;
END
$$
LANGUAGE plpgsql
IMMUTABLE;
```
#### Gera 11 Digitos aleatórios: YBKXG0CKTH4
```sql
-- Cria a extensão pgcrypto para gerar uuid
CREATE EXTENSION IF NOT EXISTS pgcrypto;
-- Cria a função para gerar ULID
CREATE OR REPLACE FUNCTION gen_lrandom()
RETURNS TEXT AS $$
DECLARE
ts_millis BIGINT;
ts_chars TEXT;
random_bytes BYTEA;
random_chars TEXT;
base32_chars TEXT := '0123456789ABCDEFGHJKMNPQRSTVWXYZ';
i INT;
BEGIN
-- Pega o timestamp em milissegundos
ts_millis := FLOOR(EXTRACT(EPOCH FROM clock_timestamp()) * 1000)::BIGINT;
-- Converte o timestamp para base32
ts_chars := '';
FOR i IN REVERSE 0..11 LOOP
ts_chars := ts_chars || substr(base32_chars, ((ts_millis >> (5 * i)) & 31) + 1, 1);
END LOOP;
-- Gera 10 bytes aleatórios e converte para base32
random_bytes := gen_random_bytes(10);
random_chars := '';
FOR i IN 0..9 LOOP
random_chars := random_chars || substr(base32_chars, ((get_byte(random_bytes, i) >> 3) & 31) + 1, 1);
IF i < 9 THEN
random_chars := random_chars || substr(base32_chars, (((get_byte(random_bytes, i) & 7) << 2) | (get_byte(random_bytes, i + 1) >> 6)) & 31 + 1, 1);
ELSE
random_chars := random_chars || substr(base32_chars, ((get_byte(random_bytes, i) & 7) << 2) + 1, 1);
END IF;
END LOOP;
-- Concatena o timestamp e os caracteres aleatórios
RETURN ts_chars || random_chars;
END;
$$ LANGUAGE plpgsql;
```
#### Exemplo de USO
```sql
-- Criação da extensão caso não exista
CREATE EXTENSION
IF
NOT EXISTS pgcrypto;
-- Criação da tabela pessoas
CREATE TABLE pessoas ( ID UUID DEFAULT gen_random_uuid ( ) PRIMARY KEY, nome TEXT NOT NULL );
-- Busca Pessoa na tabela
SELECT
*
FROM
"pessoas"
WHERE
uuid_to_ulid ( ID ) = '252FAC9F3V8EF80SSDK8PXW02F';
```
### Fontes
- https://github.com/scoville/pgsql-ulid
- https://github.com/geckoboard/pgulid
-
![](/static/nostr-icon-purple-64x64.png)
@ 91bea5cd:1df4451c
2025-02-04 17:15:57
### Definição de ULID:
Timestamp 48 bits, Aleatoriedade 80 bits
Sendo Timestamp 48 bits inteiro, tempo UNIX em milissegundos, Não ficará sem espaço até o ano 10889 d.C.
e Aleatoriedade 80 bits, Fonte criptograficamente segura de aleatoriedade, se possível.
#### Gerar ULID
```sql
CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE FUNCTION generate_ulid()
RETURNS TEXT
AS $$
DECLARE
-- Crockford's Base32
encoding BYTEA = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';
timestamp BYTEA = E'\\000\\000\\000\\000\\000\\000';
output TEXT = '';
unix_time BIGINT;
ulid BYTEA;
BEGIN
-- 6 timestamp bytes
unix_time = (EXTRACT(EPOCH FROM CLOCK_TIMESTAMP()) * 1000)::BIGINT;
timestamp = SET_BYTE(timestamp, 0, (unix_time >> 40)::BIT(8)::INTEGER);
timestamp = SET_BYTE(timestamp, 1, (unix_time >> 32)::BIT(8)::INTEGER);
timestamp = SET_BYTE(timestamp, 2, (unix_time >> 24)::BIT(8)::INTEGER);
timestamp = SET_BYTE(timestamp, 3, (unix_time >> 16)::BIT(8)::INTEGER);
timestamp = SET_BYTE(timestamp, 4, (unix_time >> 8)::BIT(8)::INTEGER);
timestamp = SET_BYTE(timestamp, 5, unix_time::BIT(8)::INTEGER);
-- 10 entropy bytes
ulid = timestamp || gen_random_bytes(10);
-- Encode the timestamp
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 0) & 224) >> 5));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 0) & 31)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 1) & 248) >> 3));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 1) & 7) << 2) | ((GET_BYTE(ulid, 2) & 192) >> 6)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 2) & 62) >> 1));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 2) & 1) << 4) | ((GET_BYTE(ulid, 3) & 240) >> 4)));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 3) & 15) << 1) | ((GET_BYTE(ulid, 4) & 128) >> 7)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 4) & 124) >> 2));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 4) & 3) << 3) | ((GET_BYTE(ulid, 5) & 224) >> 5)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 5) & 31)));
-- Encode the entropy
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 6) & 248) >> 3));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 6) & 7) << 2) | ((GET_BYTE(ulid, 7) & 192) >> 6)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 7) & 62) >> 1));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 7) & 1) << 4) | ((GET_BYTE(ulid, 8) & 240) >> 4)));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 8) & 15) << 1) | ((GET_BYTE(ulid, 9) & 128) >> 7)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 9) & 124) >> 2));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 9) & 3) << 3) | ((GET_BYTE(ulid, 10) & 224) >> 5)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 10) & 31)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 11) & 248) >> 3));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 11) & 7) << 2) | ((GET_BYTE(ulid, 12) & 192) >> 6)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 12) & 62) >> 1));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 12) & 1) << 4) | ((GET_BYTE(ulid, 13) & 240) >> 4)));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 13) & 15) << 1) | ((GET_BYTE(ulid, 14) & 128) >> 7)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 14) & 124) >> 2));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(ulid, 14) & 3) << 3) | ((GET_BYTE(ulid, 15) & 224) >> 5)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(ulid, 15) & 31)));
RETURN output;
END
$$
LANGUAGE plpgsql
VOLATILE;
```
#### ULID TO UUID
```sql
CREATE OR REPLACE FUNCTION parse_ulid(ulid text) RETURNS bytea AS $$
DECLARE
-- 16byte
bytes bytea = E'\\x00000000 00000000 00000000 00000000';
v char[];
-- Allow for O(1) lookup of index values
dec integer[] = ARRAY[
255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 0, 1, 2,
3, 4, 5, 6, 7, 8, 9, 255, 255, 255,
255, 255, 255, 255, 10, 11, 12, 13, 14, 15,
16, 17, 1, 18, 19, 1, 20, 21, 0, 22,
23, 24, 25, 26, 255, 27, 28, 29, 30, 31,
255, 255, 255, 255, 255, 255, 10, 11, 12, 13,
14, 15, 16, 17, 1, 18, 19, 1, 20, 21,
0, 22, 23, 24, 25, 26, 255, 27, 28, 29,
30, 31
];
BEGIN
IF NOT ulid ~* '^[0-7][0-9ABCDEFGHJKMNPQRSTVWXYZ]{25}$' THEN
RAISE EXCEPTION 'Invalid ULID: %', ulid;
END IF;
v = regexp_split_to_array(ulid, '');
-- 6 bytes timestamp (48 bits)
bytes = SET_BYTE(bytes, 0, (dec[ASCII(v[1])] << 5) | dec[ASCII(v[2])]);
bytes = SET_BYTE(bytes, 1, (dec[ASCII(v[3])] << 3) | (dec[ASCII(v[4])] >> 2));
bytes = SET_BYTE(bytes, 2, (dec[ASCII(v[4])] << 6) | (dec[ASCII(v[5])] << 1) | (dec[ASCII(v[6])] >> 4));
bytes = SET_BYTE(bytes, 3, (dec[ASCII(v[6])] << 4) | (dec[ASCII(v[7])] >> 1));
bytes = SET_BYTE(bytes, 4, (dec[ASCII(v[7])] << 7) | (dec[ASCII(v[8])] << 2) | (dec[ASCII(v[9])] >> 3));
bytes = SET_BYTE(bytes, 5, (dec[ASCII(v[9])] << 5) | dec[ASCII(v[10])]);
-- 10 bytes of entropy (80 bits);
bytes = SET_BYTE(bytes, 6, (dec[ASCII(v[11])] << 3) | (dec[ASCII(v[12])] >> 2));
bytes = SET_BYTE(bytes, 7, (dec[ASCII(v[12])] << 6) | (dec[ASCII(v[13])] << 1) | (dec[ASCII(v[14])] >> 4));
bytes = SET_BYTE(bytes, 8, (dec[ASCII(v[14])] << 4) | (dec[ASCII(v[15])] >> 1));
bytes = SET_BYTE(bytes, 9, (dec[ASCII(v[15])] << 7) | (dec[ASCII(v[16])] << 2) | (dec[ASCII(v[17])] >> 3));
bytes = SET_BYTE(bytes, 10, (dec[ASCII(v[17])] << 5) | dec[ASCII(v[18])]);
bytes = SET_BYTE(bytes, 11, (dec[ASCII(v[19])] << 3) | (dec[ASCII(v[20])] >> 2));
bytes = SET_BYTE(bytes, 12, (dec[ASCII(v[20])] << 6) | (dec[ASCII(v[21])] << 1) | (dec[ASCII(v[22])] >> 4));
bytes = SET_BYTE(bytes, 13, (dec[ASCII(v[22])] << 4) | (dec[ASCII(v[23])] >> 1));
bytes = SET_BYTE(bytes, 14, (dec[ASCII(v[23])] << 7) | (dec[ASCII(v[24])] << 2) | (dec[ASCII(v[25])] >> 3));
bytes = SET_BYTE(bytes, 15, (dec[ASCII(v[25])] << 5) | dec[ASCII(v[26])]);
RETURN bytes;
END
$$
LANGUAGE plpgsql
IMMUTABLE;
CREATE OR REPLACE FUNCTION ulid_to_uuid(ulid text) RETURNS uuid AS $$
BEGIN
RETURN encode(parse_ulid(ulid), 'hex')::uuid;
END
$$
LANGUAGE plpgsql
IMMUTABLE;
```
#### UUID to ULID
```sql
CREATE OR REPLACE FUNCTION uuid_to_ulid(id uuid) RETURNS text AS $$
DECLARE
encoding bytea = '0123456789ABCDEFGHJKMNPQRSTVWXYZ';
output text = '';
uuid_bytes bytea = uuid_send(id);
BEGIN
-- Encode the timestamp
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 0) & 224) >> 5));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 0) & 31)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 1) & 248) >> 3));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 1) & 7) << 2) | ((GET_BYTE(uuid_bytes, 2) & 192) >> 6)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 2) & 62) >> 1));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 2) & 1) << 4) | ((GET_BYTE(uuid_bytes, 3) & 240) >> 4)));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 3) & 15) << 1) | ((GET_BYTE(uuid_bytes, 4) & 128) >> 7)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 4) & 124) >> 2));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 4) & 3) << 3) | ((GET_BYTE(uuid_bytes, 5) & 224) >> 5)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 5) & 31)));
-- Encode the entropy
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 6) & 248) >> 3));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 6) & 7) << 2) | ((GET_BYTE(uuid_bytes, 7) & 192) >> 6)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 7) & 62) >> 1));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 7) & 1) << 4) | ((GET_BYTE(uuid_bytes, 8) & 240) >> 4)));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 8) & 15) << 1) | ((GET_BYTE(uuid_bytes, 9) & 128) >> 7)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 9) & 124) >> 2));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 9) & 3) << 3) | ((GET_BYTE(uuid_bytes, 10) & 224) >> 5)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 10) & 31)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 11) & 248) >> 3));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 11) & 7) << 2) | ((GET_BYTE(uuid_bytes, 12) & 192) >> 6)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 12) & 62) >> 1));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 12) & 1) << 4) | ((GET_BYTE(uuid_bytes, 13) & 240) >> 4)));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 13) & 15) << 1) | ((GET_BYTE(uuid_bytes, 14) & 128) >> 7)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 14) & 124) >> 2));
output = output || CHR(GET_BYTE(encoding, ((GET_BYTE(uuid_bytes, 14) & 3) << 3) | ((GET_BYTE(uuid_bytes, 15) & 224) >> 5)));
output = output || CHR(GET_BYTE(encoding, (GET_BYTE(uuid_bytes, 15) & 31)));
RETURN output;
END
$$
LANGUAGE plpgsql
IMMUTABLE;
```
#### Gera 11 Digitos aleatórios: YBKXG0CKTH4
```sql
-- Cria a extensão pgcrypto para gerar uuid
CREATE EXTENSION IF NOT EXISTS pgcrypto;
-- Cria a função para gerar ULID
CREATE OR REPLACE FUNCTION gen_lrandom()
RETURNS TEXT AS $$
DECLARE
ts_millis BIGINT;
ts_chars TEXT;
random_bytes BYTEA;
random_chars TEXT;
base32_chars TEXT := '0123456789ABCDEFGHJKMNPQRSTVWXYZ';
i INT;
BEGIN
-- Pega o timestamp em milissegundos
ts_millis := FLOOR(EXTRACT(EPOCH FROM clock_timestamp()) * 1000)::BIGINT;
-- Converte o timestamp para base32
ts_chars := '';
FOR i IN REVERSE 0..11 LOOP
ts_chars := ts_chars || substr(base32_chars, ((ts_millis >> (5 * i)) & 31) + 1, 1);
END LOOP;
-- Gera 10 bytes aleatórios e converte para base32
random_bytes := gen_random_bytes(10);
random_chars := '';
FOR i IN 0..9 LOOP
random_chars := random_chars || substr(base32_chars, ((get_byte(random_bytes, i) >> 3) & 31) + 1, 1);
IF i < 9 THEN
random_chars := random_chars || substr(base32_chars, (((get_byte(random_bytes, i) & 7) << 2) | (get_byte(random_bytes, i + 1) >> 6)) & 31 + 1, 1);
ELSE
random_chars := random_chars || substr(base32_chars, ((get_byte(random_bytes, i) & 7) << 2) + 1, 1);
END IF;
END LOOP;
-- Concatena o timestamp e os caracteres aleatórios
RETURN ts_chars || random_chars;
END;
$$ LANGUAGE plpgsql;
```
#### Exemplo de USO
```sql
-- Criação da extensão caso não exista
CREATE EXTENSION
IF
NOT EXISTS pgcrypto;
-- Criação da tabela pessoas
CREATE TABLE pessoas ( ID UUID DEFAULT gen_random_uuid ( ) PRIMARY KEY, nome TEXT NOT NULL );
-- Busca Pessoa na tabela
SELECT
*
FROM
"pessoas"
WHERE
uuid_to_ulid ( ID ) = '252FAC9F3V8EF80SSDK8PXW02F';
```
### Fontes
- https://github.com/scoville/pgsql-ulid
- https://github.com/geckoboard/pgulid
-
![](/static/nostr-icon-purple-64x64.png)
@ a012dc82:6458a70d
2025-02-04 15:49:10
Bitcoin halving is a cornerstone event in the cryptocurrency landscape, occurring approximately every four years, or after every 210,000 blocks are mined. This event is significant because it marks a reduction in the reward that miners receive for adding new blocks to the Bitcoin blockchain, effectively halving the rate at which new bitcoins are generated. The concept of halving is embedded in Bitcoin's protocol by Satoshi Nakamoto, its mysterious creator, as a measure to mimic the scarcity and deflationary characteristics of precious metals like gold. This mechanism is crucial in controlling the supply of Bitcoin, ensuring that it remains finite and valuable. As the next halving event draws near, it's not just miners who are impacted; the entire cryptocurrency market, including investors and enthusiasts, keenly anticipates the potential outcomes. Historically, halving events have been associated with increased market activity, price volatility, and heightened public interest in Bitcoin. The event is seen as a moment of transformation for Bitcoin, where the dynamics of supply and demand are altered, potentially leading to significant shifts in its market value.
**Table Of Content**
- Understanding the Hash Rate Surge
- Implications of the Rising Hash Rate
- The Halving Event: What to Expect
- Preparing for the Halving
- Conclusion
- FAQs
**Understanding the Hash Rate Surge**
**What is Hash Rate?**
The hash rate, in the context of Bitcoin, refers to the total computational power being used to mine and process transactions on the blockchain. It's a vital metric that reflects the health and security of the network. A higher hash rate means that more computational resources are being dedicated to maintaining the network, making it more robust against potential attacks. The hash rate is measured in hashes per second (H/s), and with advancements in mining technology, the network has seen this rate reach exahash levels (1 EH/s = 1 quintillion hashes per second). This metric is crucial for miners, as it affects their chances of solving the mathematical puzzles required to mine new blocks and earn rewards. It also indicates the level of competition among miners, as a higher hash rate suggests more participants or more powerful mining equipment in the network.
**Record-Breaking Levels**
The Bitcoin network's hash rate has recently hit an all-time high, reaching a staggering 491 exahashes per second (EH/s). This surge is indicative of the growing strength and security of the network. Such a high hash rate means that the network is more resilient than ever to potential attacks, such as the 51% attack, where a single entity could potentially gain control over the majority of the network's mining power. This level of security is crucial, especially as Bitcoin continues to gain mainstream acceptance and attract significant institutional investment. The record-breaking hash rate also reflects the increasing global interest in Bitcoin mining. It suggests that despite the high costs associated with mining - including specialized hardware and significant electricity consumption - miners are still heavily investing in this activity. This investment is not just in terms of money but also in research and development of more efficient mining technologies, which could further drive up the hash rate.
**Implications of the Rising Hash Rate**
**Enhanced Network Security**
The surge in Bitcoin's hash rate is a positive development for the network's security. A higher hash rate means that it becomes exponentially more difficult for a malicious actor to orchestrate an attack on the network. This security is paramount for a system that handles billions of dollars worth of transactions. The decentralized nature of Bitcoin relies heavily on the integrity of its blockchain, which is maintained by this collective computational effort. As the hash rate increases, the confidence in the network's security also grows, which is crucial for both individual users and institutional investors. This enhanced security is particularly important in the context of the upcoming halving event, as it ensures the stability and reliability of the network during a period of significant change.
**Increased Mining Difficulty**
With the rise in hash rate comes an increase in the difficulty of mining Bitcoin. The Bitcoin network is designed to adjust the difficulty of mining new blocks approximately every two weeks to ensure that the time between blocks remains around 10 minutes. As more computational power joins the network, the difficulty increases, making it harder for individual miners to solve the cryptographic puzzles required to mine new blocks. This increase in difficulty can have several implications for miners. Smaller miners or those with less efficient equipment may find it increasingly difficult to compete with larger mining operations that have access to more powerful and efficient technology. This could lead to a consolidation in the mining industry, where only the most efficient operations can survive. Additionally, as the difficulty increases, the profitability of mining can decrease, especially if the price of Bitcoin does not increase proportionally. Miners must constantly evaluate their operations' efficiency and electricity costs to ensure continued profitability.
**Energy Consumption Concerns**
The rising hash rate of the Bitcoin network has brought renewed attention to the issue of energy consumption in Bitcoin mining. The process of mining Bitcoin is energy-intensive, as it requires a significant amount of computational power. As the hash rate increases, so does the total energy consumption of the network. This has led to concerns about the environmental impact of Bitcoin mining, especially in regions where electricity is generated from fossil fuels. The debate around Bitcoin's energy consumption is complex. On one hand, proponents argue that much of the energy used for Bitcoin mining comes from renewable sources, and the industry drives innovation in energy efficiency. On the other hand, critics point out that the overall energy consumption is still substantial and could be directed towards other, more productive uses. This debate is likely to continue as the network grows and the hash rate increases, especially in the context of global concerns about climate change and sustainable energy practices.
**The Halving Event: What to Expect**
**Reward Reduction**
The upcoming Bitcoin halving event is a scheduled reduction in the rewards that miners receive for verifying and adding new transactions to the blockchain. This halving reduces the number of new bitcoins created and earned by miners with each new block from 6.25 bitcoins to 3.125 bitcoins. This event occurs every 210,000 blocks, or approximately every four years, and is a fundamental part of Bitcoin's economic model. The halving is designed to mimic the extraction of precious resources, becoming progressively harder and less rewarding over time. This mechanism ensures that the total supply of Bitcoin will never exceed 21 million coins, making Bitcoin a deflationary asset. The halving event is significant because it affects the economics of Bitcoin mining. With the reward halving, the revenue for miners is effectively cut in half overnight. This can lead to a shakeout in the mining industry, as less efficient miners may no longer be profitable and could be forced to shut down their operations.
**Market Impact**
Historically, Bitcoin halving events have been followed by significant price increases. This pattern has led to a common perception that halving events are bullish for Bitcoin's price. The rationale behind this is simple: as the rate of new supply of Bitcoin decreases, and if demand remains constant or increases, the price should theoretically go up. However, it's important to note that financial markets are influenced by a myriad of factors, and the impact of the halving may already be priced in by the time it occurs. Additionally, each halving event occurs in a different macroeconomic environment, and past performance is not indicative of future results. Investors and traders closely watch these events, as they can lead to increased volatility in the market. Some see the halving as an opportunity for long-term investment, while others may speculate on short-term price movements.
**Preparing for the Halving**
**Miner Adaptations**
In anticipation of the halving and its impact on profitability, miners are taking various steps to adapt. One key strategy is the investment in more efficient mining hardware. Newer models of mining rigs offer greater hash power with lower energy consumption, which can help maintain profitability even with reduced rewards. Miners are also exploring alternative sources of revenue, such as transaction fee income, which could become a more significant part of their earnings post-halving. Additionally, miners are looking at geographical relocation to regions with cheaper electricity and favorable regulatory environments to reduce operational costs. Another consideration for miners is the potential consolidation of mining operations. Larger mining pools might have a better chance of surviving the reduced rewards, leading to a more centralized mining landscape. This potential centralization raises concerns within the Bitcoin community, as it could impact the decentralized nature of the network.
**Investor Strategies**
Investors are also preparing for the halving event in various ways. Many are closely analyzing historical data to understand potential market movements, although it's widely acknowledged that past trends may not necessarily predict future outcomes. Some investors view the halving as a key event that could drive long-term value growth in Bitcoin and are adjusting their portfolios accordingly. Others are more cautious, considering the potential for increased volatility around the event. There is also a focus on diversification, with investors looking at other cryptocurrencies and blockchain projects that might benefit from increased interest in the crypto space around the halving. Additionally, institutional investors, who have increasingly entered the cryptocurrency market, are likely to play a significant role in how the market reacts to the halving. Their strategies, which may include hedging and derivative trading, could influence Bitcoin's price dynamics in ways that were not seen in previous halving events.
**Conclusion**
The countdown to the Bitcoin halving is a period of significant anticipation and activity within the cryptocurrency community. The record-breaking hash rate ahead of the event is a testament to the network's strength and the commitment of its participants to maintain and secure the blockchain. As the halving approaches, the crypto world watches with keen interest, eager to see how this pivotal event will shape the future of Bitcoin. Whether it leads to a surge in price, increased adoption, or new challenges for miners, the halving is a reminder of the unique and dynamic nature of cryptocurrency and its underlying technology. As with any major event in the crypto space, the halving presents both opportunities and risks, and how it plays out could have lasting implications for the entire blockchain ecosystem.
**FAQs**
**What is Bitcoin Halving?**
Bitcoin halving is an event that occurs approximately every four years, reducing the reward for mining new Bitcoin blocks by half. This mechanism controls the supply of new bitcoins and is a fundamental part of Bitcoin's economic model.
**Why is the Bitcoin Hash Rate Important?**
The hash rate measures the total computational power used in mining and processing transactions on the Bitcoin network. A higher hash rate indicates a more secure and robust network, making it resistant to attacks.
**What Happens to Bitcoin's Price After Halving?**
Historically, Bitcoin's price has increased following halving events, but this is not guaranteed. Market reactions can be unpredictable, and various factors influence Bitcoin's price.
**How Does Halving Affect Bitcoin Miners?**
Halving reduces the reward miners receive for validating new blocks, impacting their profitability. Miners often need to upgrade to more efficient hardware or find cheaper energy sources to remain competitive.
**Can Bitcoin Halving Lead to Increased Centralization in Mining?**
Potentially, yes. As mining becomes less profitable for smaller operations, there could be a consolidation towards larger mining pools, which might lead to a more centralized mining landscape.
**Is the Increase in Bitcoin's Hash Rate Linked to the Upcoming Halving?**
Yes, the increase in hash rate is often linked to the upcoming halving as miners upgrade their equipment and increase their computational power in anticipation of the reduced mining rewards.
**That's all for today**
**If you want more, be sure to follow us on:**
**NOSTR: croxroad@getalby.com**
**X: [@croxroadnews.co](https://x.com/croxroadnewsco)**
**Instagram: [@croxroadnews.co](https://www.instagram.com/croxroadnews.co/)**
**Youtube: [@croxroadnews](https://www.youtube.com/@croxroadnews)**
**Store: https://croxroad.store**
**Subscribe to CROX ROAD Bitcoin Only Daily Newsletter**
**https://www.croxroad.co/subscribe**
***DISCLAIMER: None of this is financial advice. This newsletter is strictly educational and is not investment advice or a solicitation to buy or sell any assets or to make any financial decisions. Please be careful and do your own research.***