gokiprotocol / goki Goto Github PK
View Code? Open in Web Editor NEWA suite of programs for Solana key management and security.
Home Page: https://goki.so
A suite of programs for Solana key management and security.
Home Page: https://goki.so
I am creating file same workspace file as similar to your files
import { chaiSolana } from "@saberhq/chai-solana";
import { SolanaProvider } from "@saberhq/solana-contrib";
import * as chai from "chai";
// import type { Programs } from "../src";
import { GokiSDK } from "@gokiprotocol/client";
chai.use(chaiSolana);
// export type Workspace = Programs;
export const makeSDK = (): GokiSDK => {
const anchorProvider = anchor.Provider.env();
anchor.setProvider(anchorProvider);
const provider = SolanaProvider.init({
connection: anchorProvider.connection,
wallet: anchorProvider.wallet,
opts: anchorProvider.opts,
});
return GokiSDK.load({
provider,
});
};
and then importing it in my anchor test file.
import * as anchor from '@project-serum/anchor';
import { Program } from '@project-serum/anchor';
import { LiquidityMiner } from '../target/types/liquidity_miner';
import { GokiSDK } from '@gokiprotocol/client';
import { newProgramMap } from "@saberhq/anchor-contrib";
import { SolanaProvider } from "@saberhq/solana-contrib"
import mapValues from "lodash.mapvalues";
import { makeSDK } from './workspace';
describe('liquidityMiner', () => {
// Configure the client to use the local cluster.
// const anchorProvider = anchor.setProvider(anchor.Provider.env());
const anchorProvider = anchor.Provider.env();
anchor.setProvider(anchorProvider);
const program = anchor.workspace.NewContract as Program<LiquidityMiner>;
const sdk = makeSDK();
before(async () => {
// const gokiSDK = GokiSDK.load({ provider: provider});
})
});
And after running anchor test getting following error:
Require stack:
- /home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/@ubeswap/token-math/dist/
cjs/constants.js
- /home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/@ubeswap/token-math/dist/
cjs/index.js
- /home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/@saberhq/token-utils/dist
/cjs/price.js
- /home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/@saberhq/token-utils/dist
/cjs/index.js
- /home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/@saberhq/chai-solana/dist
/cjs/index.js
- /home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/tests/workspace.ts
- /home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/tests/liquidityMiner.ts
- /home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/mocha/lib/nodejs/esm-util
s.js
- /home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/mocha/lib/mocha.js
- /home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/mocha/lib/cli/one-and-don
es.js
- /home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/mocha/lib/cli/options.js
- /home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/mocha/bin/mocha
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/
@ubeswap/token-math/src/constants.ts:1:1)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/
@ubeswap/token-math/src/index.ts:1:1)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/
@saberhq/token-utils/src/price.ts:2:1)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/
@saberhq/token-utils/src/index.ts:4:1)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/
@saberhq/chai-solana/src/index.ts:5:1)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/tests/workspa
ce.ts:2:1)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Module.m._compile (/home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/t
s-node/src/index.ts:439:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Object.require.extensions.<computed> [as .ts] (/home/agathokako/saurabh/cyclos/newcontract/li
quidity-miner/node_modules/ts-node/src/index.ts:442:12)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/tests/liquidi
tyMiner.ts:10:1)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Module.m._compile (/home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/t
s-node/src/index.ts:439:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Object.require.extensions.<computed> [as .ts] (/home/agathokako/saurabh/cyclos/newcontract/li
quidity-miner/node_modules/ts-node/src/index.ts:442:12)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.exports.requireOrImport (/home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/n
ode_modules/mocha/lib/nodejs/esm-utils.js:60:20)
at Object.exports.loadFilesAsync (/home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/no
de_modules/mocha/lib/nodejs/esm-utils.js:103:20)
at singleRun (/home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modules/mocha/lib
/cli/run-helpers.js:125:3)
at Object.exports.handler (/home/agathokako/saurabh/cyclos/newcontract/liquidity-miner/node_modu
les/mocha/lib/cli/run.js:374:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Hello, I am wondering how can I use your project to create a multi-sig. Can you please add the process description in the readme ?
Thanks
Add a grace_period
for timelocked transactions, so transactions may become stale.
Seems like we can iterate the base keypair to get the vanity address we want?
I have written a small rust cli program here https://github.com/mralbertchen/goki-grinder to help me do that. Can you confirm that I have the right idea?
It should be easier for users to create wallets.
SOL can't be held by a program account. We should allow a multisig to derive PDAs, and encourage users to use those PDAs as "subaccounts".
This is a broken link to https://docs.goki.so/client/ :
Hey,
The SDK gives us an option to fetch a transaction, but how can I get details of it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.