This guide shows how to set up a bidirectional client/server authentication for plain TLS sockets.
Generate a Certificate Authority:
openssl req -new -x509 -days 9999 -keyout ca-key.pem -out ca-crt.pem
{ | |
"extension": ["ts"], | |
"node-option": ["experimental-specifier-resolution=node", "loader=ts-node/esm"], | |
"spec": ["test/**/*.test.ts"] | |
} |
import { PublicKey, Transaction } from '@solana/web3.js'; | |
import EventEmitter from 'eventemitter3'; | |
export interface WalletAdapterEvents { | |
ready: () => void; | |
connect: () => void; | |
disconnect: () => void; | |
error: (error: Error) => void; | |
} |
#![cfg(feature = "test-bpf")] | |
// first, grab some account data, e.g. | |
// ```shell | |
// solana account -u m SRMuApVNdxXokk5GT7XD5cUUgXMBCoAz2LHeuAoKWRt --output-file account.bin | |
// ``` | |
mod helpers; | |
use helpers::*; |
class Image | |
def initialize (data) | |
@data = data | |
end | |
#write a method that loops through the existing 2D array and finds the | |
#location of the existing ones. The location of the the existing ones | |
#needs to be stored into memory so they can be iterated over and the | |
#exiting cells around them can be altered. |
CREATE OR REPLACE FUNCTION jsonb_diff(a_ jsonb, b_ jsonb) | |
RETURNS jsonb AS $$ | |
SELECT jsonb_object_agg("keys"."key", "a"."value") | |
FROM ( | |
SELECT jsonb_object_keys(a_) AS "key" | |
UNION | |
SELECT jsonb_object_keys(b_) AS "key" | |
) AS "keys" | |
LEFT JOIN (SELECT "key", "value" FROM jsonb_each(a_)) AS "a" | |
ON "a"."key" = "keys"."key" |
/* @flow */ | |
'use strict'; | |
const Promise = require('bluebird'); | |
const Fiber = require('fibers'); | |
const fiber = function <T: any> (callback: () => T): Promise<T> { | |
return new Promise(function (resolve: Function, reject: Function): void { | |
Fiber(function (): void { | |
let fiber: Fiber = Fiber.current; |
'use strict'; | |
const call = function (fn) { | |
return Function.prototype.call.bind(fn); | |
}; | |
export default call; |
'use strict'; | |
import Promise from 'bluebird'; | |
import { | |
zonifyCall, | |
zonifyCatch, | |
zonifyCoroutine, | |
zonifyFirst, | |
zonifyLast, | |
zonifyMiddle, |
// @flow | |
class SuperClass { | |
something () { | |
} | |
} | |
class SubClass extends SuperClass { | |
} |