Skip to content

Commit

Permalink
Jimii/list fix (#8)
Browse files Browse the repository at this point in the history
* fix: failing buy IX

* fix: failing initialize bid ix

* release: 0.0.11

* fix: remove the conversion to SOL in SDK

* feat: add methods to withdraw and deposit sol

* test: withdraw and deposit methods

* chore: update readme and package.json

* fix: failing accept bid IX

edit bid IX

version 0.0.12
  • Loading branch information
jim4067 authored Jan 20, 2024
1 parent 9790a6e commit 9af8efa
Show file tree
Hide file tree
Showing 7 changed files with 416 additions and 278 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@

```bash
# yarn
yarn add @jimii/soundwork-sdk
yarn add @soundwork-oss/soundwork-sdk
# npm
npm install @jimii/soundwork-sdk
npm install @soundwork-oss/soundwork-sdk
# pnpm
pnpm install @jimii/soundwork-sdk
pnpm install @soundwork-oss/soundwork-sdk
```

## Examples
Expand All @@ -38,13 +38,13 @@ Check out the extensive list of methods you can call in the [tests directory](./

```ts
// import the SDK
import { SoundworkListSDK } from "@jimii/soundwork-sdk";
import { SoundworkListSDK } from "@soundwork-oss/soundwork-sdk";

// Initialize the list program SDK
let listSDK = new SoundworkListSDK(provider, connection);

// list an NFT
let ix = await listSDK.createListing(nftMint, 1);
let ix = await listSDK.createListing(nftMint, new BN(1 * LAMPORTS_PER_SOL));
let tx = new Transaction().add(ix);

await sendAndConfirmTransaction(provider.connection, tx, [userKeypair]);
Expand All @@ -54,7 +54,7 @@ await sendAndConfirmTransaction(provider.connection, tx, [userKeypair]);

```ts
// import the SDK
import { SoundworkBidSDK } from "@jimii/soundwork-sdk";
import { SoundworkBidSDK } from "@soundwork-oss/soundwork-sdk";

// Initialize the list program SDK
let bidSDK = new SoundworkBidSDK(provider, connection);
Expand Down
73 changes: 40 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
{
"name": "@jimii/soundwork-sdk",
"version": "0.0.11",
"description": "",
"main": "./dist/main.js",
"files": [
"dist"
],
"scripts": {
"build:ts": "rm -rf ./dist && tsc",
"update-list-idl": "cp ../market-contracts/target/types/soundwork_list.ts src/soundwork-list/idl",
"update-bid-idl": "cp ../market-contracts/target/types/soundwork_bid.ts src/soundwork-bid/idl",
"update-idl": "pnpm run update-list-idl && pnpm run update-bid-idl",
"test": "jest --runInBand --forceExit --coverage --verbose"
},
"keywords": [
"soundwork",
"typescript",
"sdk"
],
"author": "Jimii",
"license": "ISC",
"dependencies": {
"@coral-xyz/anchor": "^0.29.0",
"@project-serum/anchor": "^0.26.0",
"@solana/spl-token": "^0.3.8",
"@solana/web3.js": "^1.87.1"
},
"devDependencies": {
"@types/jest": "^29.5.5",
"jest": "^29.7.0",
"jest-runner-tsc": "^1.6.0",
"ts-jest": "^29.1.1"
}
"name": "@soundwork-oss/soundwork-sdk",
"version": "0.0.12",
"description": "TypeScript client for the soundwork marketplace contracts",
"repository": {
"type": "git",
"url": "https://github.com/SoundWorkLabs/soundwork-sdk.git"
},
"homepage": "https://github.com/SoundWorkLabs/xnft/soundwork-sdk#readme",
"keywords": [
"soundwork",
"web3",
"solana",
"typescript",
"sdk"
],
"main": "./dist/main.js",
"files": [
"dist"
],
"scripts": {
"build:ts": "rm -rf ./dist && tsc",
"update-list-idl": "cp ../market-contracts/target/types/soundwork_list.ts src/soundwork-list/idl",
"update-bid-idl": "cp ../market-contracts/target/types/soundwork_bid.ts src/soundwork-bid/idl",
"update-idl": "pnpm run update-list-idl && pnpm run update-bid-idl",
"test": "jest --runInBand --forceExit --coverage --verbose"
},
"author": "Jimii <[email protected]>",
"license": "ISC",
"dependencies": {
"@coral-xyz/anchor": "^0.29.0",
"@project-serum/anchor": "^0.26.0",
"@solana/spl-token": "^0.3.8",
"@solana/web3.js": "^1.87.1"
},
"devDependencies": {
"@types/jest": "^29.5.5",
"jest": "^29.7.0",
"jest-runner-tsc": "^1.6.0",
"ts-jest": "^29.1.1"
}
}
Loading

0 comments on commit 9af8efa

Please sign in to comment.