Skip to content

Commit 391cff5

Browse files
✨ Add manual commit to the typescript sdk (#59)
# ✨ Add manual commit to the typescript sdk | Status | Type | ⚠️ Core Change | Issue | | :---: | :---: | :---: | :--: | | Ready | Feature | No | - | ## Description Add Ephemeral Rollups manual commit instruction to the typescript sdk
1 parent 3d6d727 commit 391cff5

File tree

10 files changed

+304
-147
lines changed

10 files changed

+304
-147
lines changed

.github/workflows/publish-bolt-crates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
workflow_dispatch:
99

1010
env:
11-
solana_version: v1.18.8
11+
solana_version: v1.18.15
1212

1313
jobs:
1414
install:

.github/workflows/publish-bolt-sdk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
workflow_dispatch:
99

1010
env:
11-
solana_version: v1.18.8
11+
solana_version: v1.18.15
1212

1313
jobs:
1414
install:

.github/workflows/run-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pull_request:
77

88
env:
9-
solana_version: v1.18.9
9+
solana_version: v1.18.15
1010

1111
jobs:
1212
install:
@@ -157,7 +157,7 @@ jobs:
157157
- name: Generate lib
158158
run: |
159159
cd clients/bolt-sdk
160-
yarn build
160+
yarn install && yarn build
161161
cd ../..
162162
163163
- name: run tests

clients/bolt-sdk/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"private": false,
88
"dependencies": {
99
"@metaplex-foundation/beet": "^0.7.1",
10-
"@metaplex-foundation/beet-solana": "^0.4.0"
10+
"@metaplex-foundation/beet-solana": "^0.4.0",
11+
"@magicblock-labs/delegation-program": "0.1.1"
1112
},
1213
"devDependencies": {
1314
"@metaplex-foundation/solita": "^0.20.1",

clients/bolt-sdk/src/delegation/accounts.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { PublicKey } from "@solana/web3.js";
2-
3-
const SEED_BUFFER_PDA = "buffer";
4-
const SEED_DELEGATION_PDA = "delegation";
5-
const DELEGATED_ACCOUNT_SEEDS = "account-seeds";
6-
const SEED_COMMIT_STATE_RECORD_PDA = "commit-state-record";
7-
const SEED_STATE_DIFF_PDA = "state-diff";
8-
export const DELEGATION_PROGRAM_ID =
9-
"DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh";
2+
import {
3+
DELEGATED_ACCOUNT_SEEDS,
4+
DELEGATION_PROGRAM_ID,
5+
SEED_BUFFER_PDA,
6+
SEED_COMMIT_STATE_RECORD_PDA,
7+
SEED_DELEGATION_PDA,
8+
SEED_STATE_DIFF_PDA,
9+
} from "@magicblock-labs/delegation-program";
1010

1111
export function getDelegationAccounts(
1212
accountToDelegate: PublicKey,

clients/bolt-sdk/src/delegation/delegate.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as beet from "@metaplex-foundation/beet";
22
import * as web3 from "@solana/web3.js";
3-
import { DELEGATION_PROGRAM_ID, getDelegationAccounts } from "./accounts";
3+
import { getDelegationAccounts } from "./accounts";
4+
import { DELEGATION_PROGRAM_ID } from "@magicblock-labs/delegation-program";
45

56
export interface DelegateInstructionArgs {
67
validUntil: beet.bignum;

clients/bolt-sdk/src/delegation/undelegate.ts

Lines changed: 0 additions & 115 deletions
This file was deleted.

clients/bolt-sdk/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ export * from "./generated/instructions";
66
export * from "./world/transactions";
77
export * from "./delegation/accounts";
88
export * from "./delegation/delegate";
9-
export * from "./delegation/undelegate";
9+
export {
10+
createCommitInstruction,
11+
createUndelegateInstruction,
12+
DELEGATION_PROGRAM_ID,
13+
} from "@magicblock-labs/delegation-program";
1014

1115
export const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(
1216
"Sysvar1nstructions1111111111111111111111111"

0 commit comments

Comments
 (0)