git clone git@github.com:metaplex-foundation/metaplex.git
cd metaplex/rust
cargo build-bpf
solana config set --url localhost
solana-test-validator
/* eslint-disable @typescript-eslint/no-unused-vars */ | |
import {EventEmitter, forwardRef} from '@angular/core'; | |
import { | |
ControlValueAccessor as Control, | |
NG_VALUE_ACCESSOR, | |
} from '@angular/forms'; | |
export const VALUE_ACCESSOR = <T>(clazz: T) => ({ | |
provide: NG_VALUE_ACCESSOR, | |
useExisting: forwardRef(() => clazz), |
// Check it out here: | |
// https://www.typescriptlang.org/play?ts=4.1.0-dev.20201001#code/C4TwDgpgBAMg9gdwgJwMYEMDOECCAbMAC3SgF4oBydCqAH0oCMb6LVnKATdiibgM24BzboW4BLbgCtuAa255uAW24A7bnG5huAR27JumbsG4BXbgDduCbgA9uIbgC8KAbgBQoSFACqYSGixcAmIyKABhdDAxYHQ8MUcIAB54JADsfCJ0AD53T2gM4gYIYFCUlAx04JJ6X38KoMzc8GgAORNFIuRMUIoABm4ARm4AJm4AZm4AFm4AVm4ANm4Adm4ADm4ATlcPZqgAZRAOuDxu8goAWm4AfQodrwBJDggVYDE+MRRTqAL0IpL6NodFB0faHBjHTBNLwAdUI0QgmDA6FQ0DOlBBFAAOmoMZjjLiBLi1FDoABFExwYAI0IAIgoNIxdJJUAAKsh0OZPrEegAabhZbiJbgAP24AGptnkoI8egBiSW7MJ4LBfCgAOgVXm8KjEnK63LOACpblKAKIAeQAYj1NdBLWIdZhCBAODbmThgMBkGIGCYqebICoegBtW3fT3e31UpVwbA9AC6YY9Xp9fogEWwqtFGIAetwACTcY0YgCE3FoYdN2hMBsopCTEdTVK+ycjaYDzxBrab6bwseg9G7UfTgW69CrNbwzLCxC6oUez1e70+INh8MRyIHUHJlOp9DZHK5eBBMvoSpVIO1uqPIIt1sHjeHkLcd2gMAgNlNyGQcGQiQAsgimDoII0AflSKgcN0mApioghZKEADeUCKEBIEQAAXFAgGYMBoFQAAvu4r6sugMhBHgiRuFANFQAAalA4HPFBUAwd6cE8tRtEzugXRuAh5BcTRDFMZB3QAAb5ohDp8MCYQEVJMnAgASgR4lQAA-FAQm0TRYSMTYEEsTxc5aTpum6SyZEUYkyk8uEs6YAhWHmbRDEYTpdHEVKVnkdqryUZ5BlGdBsGCJxukmd0oksWxDqCPxoRBT |
Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.
The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from
function logClass(target: any) { | |
// save a reference to the original constructor | |
var original = target; | |
// a utility function to generate instances of a class | |
function construct(constructor, args) { | |
var c : any = function () { | |
return constructor.apply(this, args); | |
} |