This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generate Table of Contents for GitHub Wiki using Markdown | |
// How to Use | |
// 1. Open the Wiki page in a modern browser, for example, Chrome | |
// 2. Open the Console of the developer tools using F12 or ⌥ + Cmd + I | |
// 3. Copy the code below | |
// 4. Run it in the Console, it will generate Markdown for "Table of Contents" | |
// 5. Copy and Paste in your Wiki page. | |
(function () { | |
var toc = '**Table of Contents**\n'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"sig":"908651afdbca939d462c6aa14593fbc0be88c9f93e32bc3efa53d15902b72d10ce9a1d416ec65c9f54f9979981cfe76e27b08e71b92818647c79bfbb44fec0731","msghash":"aa8d8317afa83028d875a62bab5ca3f1d3319fb985cb6891a8d2b23fd357719a"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const findPrivateKeyForAddress = (privateKeyStr, addressStr) => { | |
if (typeof privateKeyStr !== 'string') { | |
throw new TypeError('param privateKeyStr must be of String'); | |
} else if (typeof addressStr !== 'string') { | |
throw new TypeError('param addressStr must be of String'); | |
} | |
const hexStr = '0123456789abcdef' | |
const targetAddress = Buffer.from(addressStr, 'hex') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const EC = require('elliptic').ec | |
const BN = require('bn.js') | |
const ec = new EC('secp256k1') | |
const G = ec.g; // Generator point | |
const keccak256 = require('js-sha3').keccak256 | |
// Refer to https://etherworld.co/2017/11/17/understanding-the-concept-of-private-key-public-key-and-address-in-ethereum-blockchain | |
/// Get public key from private key. `privateKey` is private key in buffer | |
const getPublickKeyFromPrivateKey = (privateKey) => { | |
if (!(privateKey instanceof Buffer)) { |
WWDC20 10118 - Create app clips for other businesses 视频
这个主题讲述如何为其他商户构建 App Clips 体验,例如某外卖 App 如何帮各个不同餐饮商户构建基于他们自己品牌的 App Clips 来支持预定餐桌,点餐等服务。只需在一个主 App 中创建唯一的 App Clips 库就可以为不同商户提供各自独特的 App Clip 体验。同时讲述了 App Clips 的最佳实践,包括如何上传独特的商户信息,处理入口链接,路由推送消息,处理存储和恢复会话状态等等。也讲述了各种 App Clips 体验图标类型的差异性,如何呈现和定制这些图标。