This file contains hidden or 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
| package main | |
| import ( | |
| "crypto/ecdsa" | |
| "crypto/sha256" | |
| "encoding/hex" | |
| "fmt" | |
| "log" | |
| "github.com/mr-tron/base58" |
This file contains hidden or 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
| SHELL:=/bin/bash | |
| OUTPUT=server | |
| PRODUCTION_OUTPUT=project_name | |
| QA_OUTPUT=project_qa | |
| PRODUCTION_USER_CREATE=user_create | |
| QA_USER_CREATE=user_create | |
| PRODUCTION_GOOS=linux | |
| PRODUCTION_GOARCH=amd64 | |
| PRODUCTION_RESTART=systemctl restart ${PRODUCTION_OUTPUT}.service | |
| QA_RESTART=systemctl restart ${QA_OUTPUT}.service |
This file contains hidden or 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
| async function Process(source, signature) { | |
| const unspents = [1]; | |
| return new Promise((resolve, reject) => { | |
| const len = unspents.length; | |
| asyncForEach(unspents, async (k) => { | |
| const encode = await sleepFunc(source) | |
| if (!encode) { | |
| reject() | |
| } | |
| if (k === (len-1)) { |
This file contains hidden or 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 publickeys = this.pubKeys.map(this.filter); | |
| const p2ms = bitcoin.payments.p2ms({ | |
| m: this.multWallet.passNum, | |
| pubkeys: publickeys, | |
| network: bitcoin.networks.bitcoin, | |
| }); | |
| const p2sh = bitcoin.payments.p2sh({ redeem: p2ms }); | |
| // 创建新的transaction |