Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add manual commit to the typescript sdk #59

Merged
merged 4 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish-bolt-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:

env:
solana_version: v1.18.8
solana_version: v1.18.15

jobs:
install:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-bolt-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:

env:
solana_version: v1.18.8
solana_version: v1.18.15

jobs:
install:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:

env:
solana_version: v1.18.9
solana_version: v1.18.15

jobs:
install:
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
- name: Generate lib
run: |
cd clients/bolt-sdk
yarn build
yarn install && yarn build
cd ../..

- name: run tests
Expand Down
3 changes: 2 additions & 1 deletion clients/bolt-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"private": false,
"dependencies": {
"@metaplex-foundation/beet": "^0.7.1",
"@metaplex-foundation/beet-solana": "^0.4.0"
"@metaplex-foundation/beet-solana": "^0.4.0",
"@magicblock-labs/delegation-program": "0.1.1"
},
"devDependencies": {
"@metaplex-foundation/solita": "^0.20.1",
Expand Down
16 changes: 8 additions & 8 deletions clients/bolt-sdk/src/delegation/accounts.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { PublicKey } from "@solana/web3.js";

const SEED_BUFFER_PDA = "buffer";
const SEED_DELEGATION_PDA = "delegation";
const DELEGATED_ACCOUNT_SEEDS = "account-seeds";
const SEED_COMMIT_STATE_RECORD_PDA = "commit-state-record";
const SEED_STATE_DIFF_PDA = "state-diff";
export const DELEGATION_PROGRAM_ID =
"DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh";
import {
DELEGATED_ACCOUNT_SEEDS,
DELEGATION_PROGRAM_ID,
SEED_BUFFER_PDA,
SEED_COMMIT_STATE_RECORD_PDA,
SEED_DELEGATION_PDA,
SEED_STATE_DIFF_PDA,
} from "@magicblock-labs/delegation-program";

export function getDelegationAccounts(
accountToDelegate: PublicKey,
Expand Down
3 changes: 2 additions & 1 deletion clients/bolt-sdk/src/delegation/delegate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as beet from "@metaplex-foundation/beet";
import * as web3 from "@solana/web3.js";
import { DELEGATION_PROGRAM_ID, getDelegationAccounts } from "./accounts";
import { getDelegationAccounts } from "./accounts";
import { DELEGATION_PROGRAM_ID } from "@magicblock-labs/delegation-program";

export interface DelegateInstructionArgs {
validUntil: beet.bignum;
Expand Down
115 changes: 0 additions & 115 deletions clients/bolt-sdk/src/delegation/undelegate.ts

This file was deleted.

6 changes: 5 additions & 1 deletion clients/bolt-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ export * from "./generated/instructions";
export * from "./world/transactions";
export * from "./delegation/accounts";
export * from "./delegation/delegate";
export * from "./delegation/undelegate";
export {
createCommitInstruction,
createUndelegateInstruction,
DELEGATION_PROGRAM_ID,
} from "@magicblock-labs/delegation-program";

export const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(
"Sysvar1nstructions1111111111111111111111111"
Expand Down
Loading
Loading