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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
computeVertexNormals() { | |
const positionAttribute = this.attributes['position']; | |
if (positionAttribute !== undefined) { | |
this.addAttribute('normal', { size: 3, data: new Float32Array(positionAttribute.count * 3) }); | |
let normalAttribute = this.attributes['normal']; | |
const pA = new Vec3(), pB = new Vec3(), pC = new Vec3(); | |
const nA = new Vec3(), nB = new Vec3(), nC = new Vec3(); | |
const cb = new Vec3(), ab = new Vec3(); |
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
/* | |
.env file: | |
# https://quicknode.com/ | |
HTTP_PROVIDER=https://magical-thrumming-firefly.solana-mainnet.quiknode.pro/<API_KEY> | |
WSS_PROVIDER=wss://magical-thrumming-firefly.solana-mainnet.quiknode.pro/<API_KEY> | |
run: |
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
/* | |
tsx --env-file=.env ./get-wallet-details.ts | |
接口2: 输入钱包地址,返回钱包的详情 | |
每笔买入交易得到钱包余额,钱包地址,买入金额,买入单价,买入数量,交易签名,代币地址,代币名称, | |
卖出交易得到钱包余额,钱包地址,卖出金额,卖出单价,卖出数量,交易签名,代币地址,代币名称(最好能算出总价值)) | |
使用方法 |
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
/* | |
接口3: 输入钱包和币地址,卖出比例,立即按照当前价格卖出。 | |
依赖: | |
npm i @jup-ag/api | |
用法: |