Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
01e6baf
feat: Implement the Moonlight transaction builder and operations cond…
Oct 13, 2025
199316d
chore: Implement unit tests for the Moonlight transaction builder add…
Oct 13, 2025
6400050
chore: Implement unit tests for internal signatures methods from the …
Oct 13, 2025
2cdfd06
chore: Update the Stellar SDK imports
Oct 13, 2025
a512964
chore: Add unit test for the get operation methods
Oct 14, 2025
913f0ea
chore: Add unit test for the auth entry and args
Oct 14, 2025
90393ce
chore: Add unit test for the hash and signature XDR methods
Oct 14, 2025
5d86156
chore: Add unit test for the high-level signing methods
Oct 14, 2025
fa32ba2
chore: Add unit tests for the XDR serialization and the auth entries …
Oct 14, 2025
91e7c44
chore: Add unit test for the deposit, spend, and withdraw operation t…
Oct 14, 2025
777238b
chore: Add unit tests for all the available operations and some edge …
Oct 14, 2025
19a8305
fix: Cast privateKeyBytes and payload to BufferSource in signPayload …
fazzatti Oct 16, 2025
ee8e447
fix: Cast data to BufferSource in sha256Buffer function for type safety
fazzatti Oct 16, 2025
6c7d93c
refactor: Remove unused pool and pool-engine files for codebase clean…
fazzatti Oct 16, 2025
7b34250
feat: Update dependencies in deno.json to remove stellar-plus and add…
fazzatti Oct 16, 2025
29856cd
feat: Implement PrivacyChannel and Channel functionality with constan…
fazzatti Oct 16, 2025
dbffeb0
doc: Enhance PrivacyChannel with detailed JSDoc comments for methods
fazzatti Oct 16, 2025
84c1487
fix: Update invoke method to use getclient for invoking contract call…
fazzatti Oct 16, 2025
d34193b
fix: Rename getclient method to getClient for consistency and clarity…
fazzatti Oct 16, 2025
b65e916
fix: Rename getclient method to getClient for consistency and update …
fazzatti Oct 16, 2025
6b76338
fix: Rename PrivacyChannel class to ChannelAuth for consistency and c…
fazzatti Oct 16, 2025
8581142
fix: Change constructor visibility from private to public in ChannelA…
fazzatti Oct 16, 2025
64561c2
fix: Change constructor visibility from private to public in PrivacyC…
fazzatti Oct 16, 2025
70464f0
fix: Rename ContractConstructorArgs to ChannelAuthConstructorArgs for…
fazzatti Oct 16, 2025
5006adc
fix: Rename ContractConstructorArgs to ChannelConstructorArgs for cla…
fazzatti Oct 16, 2025
448d565
fix: Remove unused privacy_pool.wasm file to reduce clutter and impro…
fazzatti Oct 16, 2025
7bf39cc
feat: Add new WASM files for channel authentication and privacy chann…
fazzatti Oct 16, 2025
3b184f4
fix: Refactor deno.json to streamline testing tasks and update depend…
fazzatti Oct 16, 2025
4edcc3a
feat: Add integration tests for AuthChannel functionality to validate…
fazzatti Oct 16, 2025
04f7e9f
fix: Update transaction fee in AuthChannel integration test for accur…
fazzatti Oct 16, 2025
59942f2
fix: Correct test suite description for ChannelAuth integration tests…
fazzatti Oct 16, 2025
f973ae4
refactor: Remove pool-engine integration test file to streamline test…
fazzatti Oct 16, 2025
47a07b1
feat: Add disableSanitizeConfig to manage sanitization settings for t…
fazzatti Oct 16, 2025
2e415b0
feat: Add assetId property and getter method to PrivacyChannel class …
fazzatti Oct 16, 2025
3faa48b
fix: Add disableSanitizeConfig to ChannelAuth integration tests for i…
fazzatti Oct 16, 2025
bd4cc1d
feat: Implement PrivacyChannel integration tests for enhanced contrac…
fazzatti Oct 16, 2025
63d578a
refactor: Change the transaction builder context structure to be more…
Oct 15, 2025
7b53578
Merge pull request #5 from Moonlight-Protocol/feat/add-transaction-bu…
toruguera Oct 16, 2025
7cc7e3f
Merge branch 'dev' into feat/add-colibri-sdk
fazzatti Oct 16, 2025
390ed6e
Merge pull request #6 from Moonlight-Protocol/feat/add-colibri-sdk
toruguera Oct 16, 2025
7fa2e44
feat: Add Condition class for UTXO operations with factory methods an…
fazzatti Oct 17, 2025
5ba986d
refactor: Improve type imports and condition handling in transaction …
fazzatti Oct 17, 2025
4f5df0c
test: fix transaction builder tests to use Condition class
fazzatti Oct 17, 2025
12189be
test: add unit tests for Condition class operations and error handling
fazzatti Oct 17, 2025
301b268
Update src/conditions/index.ts
toruguera Oct 17, 2025
8c1ffa7
Update src/conditions/index.ts
toruguera Oct 17, 2025
cb69b5e
Update src/conditions/index.ts
toruguera Oct 17, 2025
1a2a9c2
Update src/conditions/types.ts
toruguera Oct 17, 2025
404195b
Merge pull request #7 from Moonlight-Protocol/feat/add-condition-class
toruguera Oct 17, 2025
f6bf618
Merge remote-tracking branch 'origin/main' into dev
fazzatti Oct 20, 2025
7660d65
feat: enhance PrivacyChannel and MoonlightTransactionBuilder with new…
fazzatti Oct 20, 2025
77f2acf
chore: update dependencies for @colibri/core and @stellar/stellar-sdk…
fazzatti Oct 20, 2025
f1faf59
Merge pull request #8 from Moonlight-Protocol/feat/transact-deposit
toruguera Oct 20, 2025
0e395a0
refactor: update UTXO operation handling in Condition class and relat…
fazzatti Oct 21, 2025
59451e6
refactor: change import statements to use 'type' for xdr in bundle an…
fazzatti Oct 21, 2025
50e5767
refactor: comment out unused imports and code in full-setup.ts and ut…
fazzatti Oct 21, 2025
0ba4430
refactor: update types and imports across multiple files for improved…
fazzatti Oct 21, 2025
bcdf238
feat: implement MoonlightOperation class with UTXO operation handling
fazzatti Oct 21, 2025
875a031
refactor: remove unused XDR operation files for cleaner codebase
fazzatti Oct 21, 2025
9d22205
Update src/operation/index.ts
fazzatti Oct 21, 2025
2e02d98
Update src/operation/index.ts
fazzatti Oct 21, 2025
bc22fdd
Update src/transaction-builder/index.ts
fazzatti Oct 21, 2025
cd8a0c6
fix: update conditionsToScVal method to return an empty array instead…
fazzatti Oct 21, 2025
1c705bd
Merge pull request #9 from Moonlight-Protocol/feat/add-operation-class
toruguera Oct 22, 2025
d901b49
test: Add integration tests for the UTXO account management and the M…
Oct 22, 2025
2c3f1fa
Merge pull request #10 from Moonlight-Protocol/test/add-UTXO-account-…
fazzatti Oct 23, 2025
9cbfd7b
chore: update version to 0.3.0 in deno.json for release
fazzatti Oct 23, 2025
3cc4256
delete: remove unused integration test file main.integration.tes.ts
fazzatti Oct 23, 2025
344634e
refactor(tests): update import paths and clean up assertions in utxo-…
fazzatti Oct 23, 2025
61008d0
fix(tests): correct variable name from 'stelalrDerivator' to 'stellar…
fazzatti Oct 23, 2025
22a9b27
chore(workflow): enhance GitHub Actions workflow for Deno testing and…
fazzatti Oct 23, 2025
c0fb0ff
fix(deps): update @noble/curves and @noble/hashes dependencies to spe…
fazzatti Oct 23, 2025
28ccc0d
Merge remote-tracking branch 'origin/main' into dev
fazzatti Oct 23, 2025
3e100de
feat: restructure exports and enhance integration tests for channel a…
fazzatti Oct 23, 2025
aa9454c
fix: enhance type definitions and return types in various modules
fazzatti Oct 23, 2025
4cac665
refactor: remove commented-out export statements in mod.ts for cleane…
fazzatti Oct 23, 2025
7882da1
Merge remote-tracking branch 'origin/main' into dev
fazzatti Oct 23, 2025
8cea414
fix: update Deno version to 2.2.2 and change publish command to use Deno
fazzatti Oct 23, 2025
85cfed5
feat: implement custom error handling with MoonlightError class and r…
fazzatti Nov 11, 2025
f4c65c9
refactor: remove unused MLXDR conversion methods and console logs fro…
fazzatti Nov 11, 2025
5afc1ab
refactor: remove commented out fromXDR and fromScVal methods in BaseC…
fazzatti Nov 11, 2025
353d515
refactor: clean up unused UNEXPECTED_ERROR class and comments in erro…
fazzatti Nov 11, 2025
658c5b8
refactor: remove unused UNEXPECTED_ERROR class and related comments i…
fazzatti Nov 11, 2025
9d1ad25
refactor: code for consistency and clarity
fazzatti Nov 11, 2025
ab19a46
refactor: update VSCode settings to enable format on save and set def…
fazzatti Nov 11, 2025
70ee678
Merge remote-tracking branch 'origin/main' into dev
fazzatti Nov 11, 2025
570c12a
fix: replace deprecated deposit-auth-entry copy with updated implemen…
fazzatti Nov 11, 2025
acf8f1f
Merge remote-tracking branch 'origin/main' into dev
fazzatti Nov 12, 2025
5506550
feat: add getBalancesFetcher method to PrivacyChannel for UTXO balanc…
fazzatti Nov 13, 2025
091a86c
feat: add getTransactionBuilder method to PrivacyChannel for creating…
fazzatti Nov 13, 2025
32f0635
fix: correct formatting in JSDoc for getTransactionBuilder method in …
fazzatti Nov 13, 2025
dfcdd12
feat: add getUTXOAccountHandler method to PrivacyChannel for UTXO acc…
fazzatti Nov 13, 2025
eb49273
fix: update return types for getBalancesFetcher, getTransactionBuilde…
fazzatti Nov 13, 2025
ffcea80
chore: update version number in deno.json from 0.4.0 to 0.5.0
fazzatti Nov 13, 2025
0696dfa
fix: correct spelling of UTXOBasedAccountConstructorArgs in types.ts …
fazzatti Nov 13, 2025
dcdaac3
fix: update import path for UTXOPublicKey and enhance JSDoc for getUT…
fazzatti Nov 13, 2025
0f36842
Merge pull request #18 from Moonlight-Protocol/feat/add-client-helpin…
fazzatti Nov 13, 2025
7f75dde
fix: change coverage status from patch to project in codecov.yml for …
fazzatti Nov 13, 2025
5f4d710
fix: streamline PrivacyChannel and UtxoBasedStellarAccount integration
fazzatti Nov 13, 2025
dc3d69c
Merge branch 'dev' into fix/static-initiators
fazzatti Nov 13, 2025
c4dc2db
fix: correct error message in getDerivator JSDoc for clarity
fazzatti Nov 13, 2025
48a9ca3
fix: ensure options are correctly merged in UtxoBasedStellarAccount.f…
fazzatti Nov 13, 2025
82a0725
Merge pull request #20 from Moonlight-Protocol/fix/static-initiators
fazzatti Nov 13, 2025
aec0d2b
fix: add informational status for patch coverage in codecov.yml
fazzatti Nov 13, 2025
e290dae
feat: implement MLXDR operations bundle handling (#21)
fazzatti Nov 14, 2025
a96d985
Merge branch 'main' into dev
fazzatti Nov 14, 2025
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 deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moonlight/moonlight-sdk",
"version": "0.5.0",
"version": "0.6.0",
"description": "A privacy-focused toolkit for the Moonlight protocol on Stellar Soroban smart contracts.",
"license": "MIT",
"tasks": {
Expand Down
65 changes: 64 additions & 1 deletion src/custom-xdr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
import { Buffer } from "buffer";
import { MLXDRPrefix, MLXDRTypeByte } from "./types.ts";
import type { Condition as ConditionType } from "../conditions/types.ts";
import { nativeToScVal, scValToBigInt, xdr } from "@stellar/stellar-sdk";
import {
nativeToScVal,
scValToBigInt,
scValToNative,
xdr,
} from "@stellar/stellar-sdk";
import { Condition } from "../conditions/index.ts";
import {
type MoonlightOperation as MoonlightOperationType,
Expand All @@ -38,6 +43,8 @@ const MLXDROperationBytes = [
MLXDRTypeByte.WithdrawOperation,
];

const MLXDROperationsBundleBytes = [MLXDRTypeByte.OperationsBundle];

const MLXDRTransactionBundleBytes = [MLXDRTypeByte.TransactionBundle];

const isMLXDR = (data: string): boolean => {
Expand Down Expand Up @@ -93,6 +100,13 @@ const isOperation = (data: string): boolean => {
return MLXDROperationBytes.includes(prefixByte);
};

const isOperationsBundle = (data: string): boolean => {
const typePrefix = getMLXDRTypePrefix(data);

const prefixByte = typePrefix[0];
return MLXDROperationsBundleBytes.includes(prefixByte);
};

const isTransactionBundle = (data: string): boolean => {
const typePrefix = getMLXDRTypePrefix(data);

Expand Down Expand Up @@ -310,6 +324,52 @@ const MLXDRtoOperation = (data: string): MoonlightOperationType => {
}
};

const operationsBundleToMLXDR = (
operations: MoonlightOperationType[],
): string => {
if (operations.length === 0) {
throw new Error("Operations bundle cannot be empty");
}
const operationMLXDRArray = operations.map((op) => {
return xdr.ScVal.scvString(op.toMLXDR());
});
const typeByte: MLXDRTypeByte = MLXDRTypeByte.OperationsBundle;

const operationBundleXDR = xdr.ScVal.scvVec([
...operationMLXDRArray,
]).toXDR("base64");

return appendMLXDRPrefixToRawXDR(operationBundleXDR, typeByte);
};

const MLXDRtoOperationsBundle = (data: string): MoonlightOperationType[] => {
if (!isOperationsBundle(data)) {
throw new Error("Data is not a valid MLXDR Operations Bundle");
}

const buffer = Buffer.from(data, "base64");
const rawXDRBuffer = buffer.slice(3);
const rawXDRString = rawXDRBuffer.toString("base64");

const scVal = xdr.ScVal.fromXDR(rawXDRString, "base64");

const vec = scVal.vec();

if (vec === null) {
throw new Error("Invalid ScVal vector for operations bundle");
}

const operations: MoonlightOperationType[] = vec.map((opScVal) => {
if (opScVal.switch().name !== xdr.ScValType.scvString().name) {
throw new Error("Invalid ScVal type for operation in bundle");
}
const opMLXDR = scValToNative(opScVal) as string;
return MLXDRtoOperation(opMLXDR);
});

return operations;
};

/**
* * MLXDR Module
*
Expand All @@ -330,10 +390,13 @@ export const MLXDR = {
is: isMLXDR,
isCondition,
isOperation,
isOperationsBundle,
isTransactionBundle,
getXDRType,
fromCondition: conditionToMLXDR,
toCondition: MLXDRtoCondition,
fromOperation: operationToMLXDR,
toOperation: MLXDRtoOperation,
fromOperationsBundle: operationsBundleToMLXDR,
toOperationsBundle: MLXDRtoOperationsBundle,
};
261 changes: 261 additions & 0 deletions src/custom-xdr/index.unit.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@
import { assert, assertEquals, assertExists } from "@std/assert";
import { beforeAll, describe, it } from "@std/testing/bdd";
import {
type ContractId,
type Ed25519PublicKey,
LocalSigner,
} from "@colibri/core";
import type { UTXOPublicKey } from "../core/utxo-keypair-base/types.ts";
import { generateP256KeyPair } from "../utils/secp256r1/generateP256KeyPair.ts";

import { Asset, Networks } from "@stellar/stellar-sdk";

import {
type CreateOperation,
type DepositOperation,
type SpendOperation,
UTXOOperationType,
type WithdrawOperation,
} from "../operation/types.ts";
import { MoonlightOperation } from "../operation/index.ts";
import { UTXOKeypairBase } from "../core/utxo-keypair-base/index.ts";
import { MLXDR } from "./index.ts";

describe("MLXDR", () => {
let validPublicKey: Ed25519PublicKey;
let validUtxo: UTXOPublicKey;

let channelId: ContractId;

let assetId: ContractId;
let network: string;

beforeAll(async () => {
validPublicKey = LocalSigner.generateRandom()
.publicKey() as Ed25519PublicKey;
validUtxo = (await generateP256KeyPair()).publicKey as UTXOPublicKey;

channelId =
"CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC" as ContractId;

network = Networks.TESTNET;
assetId = Asset.native().contractId(network) as ContractId;
});

describe("OperationsBundle MLXDR", () => {
it("should verify if the Operations Bundle is a valid MLXDR", () => {
const createOp = MoonlightOperation.create(validUtxo, 10n);

const opBundleMLXDR = MLXDR.fromOperationsBundle([createOp]);

assertEquals(MLXDR.isOperationsBundle(opBundleMLXDR), true);
});
it("should convert to and from one operation", () => {
const createOp = MoonlightOperation.create(validUtxo, 10n);

const opBundleMLXDR = MLXDR.fromOperationsBundle([createOp]);

const recreatedOps = MLXDR.toOperationsBundle(opBundleMLXDR);

assertEquals(recreatedOps.length, 1);
assertEquals(recreatedOps[0].getOperation(), UTXOOperationType.CREATE);
assertEquals(recreatedOps[0].getAmount(), 10n);
assert(recreatedOps[0].isCreate());

assertEquals(
(recreatedOps[0] as CreateOperation).getUtxo().toString(),
validUtxo.toString(),
);
});

it("should convert to and from multiple Operations", () => {
const createOpA = MoonlightOperation.create(validUtxo, 10n);
const createOpB = MoonlightOperation.create(validUtxo, 20n);
const createOpC = MoonlightOperation.create(validUtxo, 30n);

const opBundleMLXDR = MLXDR.fromOperationsBundle([
createOpA,
createOpB,
createOpC,
]);

const recreatedOps = MLXDR.toOperationsBundle(opBundleMLXDR);

assertEquals(recreatedOps.length, 3);

assertEquals(recreatedOps[0].getOperation(), UTXOOperationType.CREATE);
assertEquals(recreatedOps[0].getAmount(), 10n);
assert(recreatedOps[0].isCreate());
assertEquals(
(recreatedOps[0] as CreateOperation).getUtxo().toString(),
validUtxo.toString(),
);

assertEquals(recreatedOps[1].getOperation(), UTXOOperationType.CREATE);
assertEquals(recreatedOps[1].getAmount(), 20n);
assert(recreatedOps[1].isCreate());
assertEquals(
(recreatedOps[1] as CreateOperation).getUtxo().toString(),
validUtxo.toString(),
);

assertEquals(recreatedOps[2].getOperation(), UTXOOperationType.CREATE);
assertEquals(recreatedOps[2].getAmount(), 30n);
assert(recreatedOps[2].isCreate());
assertEquals(
(recreatedOps[2] as CreateOperation).getUtxo().toString(),
validUtxo.toString(),
);
});

it("should convert to and from multiple mixed operations", () => {
const createOp = MoonlightOperation.create(validUtxo, 10n);
const depositOp = MoonlightOperation.deposit(validPublicKey, 20n);
const withdrawOp = MoonlightOperation.withdraw(validPublicKey, 30n);
const spendOp = MoonlightOperation.spend(validUtxo);

const opBundleMLXDR = MLXDR.fromOperationsBundle([
createOp,
depositOp,
withdrawOp,
spendOp,
]);

const recreatedOps = MLXDR.toOperationsBundle(opBundleMLXDR);

assertEquals(recreatedOps.length, 4);

assertEquals(recreatedOps[0].getOperation(), UTXOOperationType.CREATE);
assertEquals(recreatedOps[0].getAmount(), 10n);
assert(recreatedOps[0].isCreate());
assertEquals(
(recreatedOps[0] as CreateOperation).getUtxo().toString(),
validUtxo.toString(),
);

assertEquals(recreatedOps[1].getOperation(), UTXOOperationType.DEPOSIT);
assertEquals(recreatedOps[1].getAmount(), 20n);
assert(recreatedOps[1].isDeposit());
assertEquals(
(recreatedOps[1] as DepositOperation).getPublicKey().toString(),
validPublicKey.toString(),
);

assertEquals(recreatedOps[2].getOperation(), UTXOOperationType.WITHDRAW);
assertEquals(recreatedOps[2].getAmount(), 30n);
assert(recreatedOps[2].isWithdraw());
assertEquals(
(recreatedOps[2] as WithdrawOperation).getPublicKey().toString(),
validPublicKey.toString(),
);

assertEquals(recreatedOps[3].getOperation(), UTXOOperationType.SPEND);
assert(recreatedOps[3].isSpend());
assertEquals(
(recreatedOps[3] as SpendOperation).getUtxo().toString(),
validUtxo.toString(),
);
});

it("should handle signed operations in an Operation Bundle", async () => {
const userSigner = LocalSigner.generateRandom();
const spender = new UTXOKeypairBase(await generateP256KeyPair());
const createOp = MoonlightOperation.create(validUtxo, 1000n);

const depositOp = await MoonlightOperation.deposit(
userSigner.publicKey() as Ed25519PublicKey,
1000n,
).addCondition(createOp.toCondition()).signWithEd25519(
userSigner,
100000,
channelId,
assetId,
network,
);

const spendOp = await MoonlightOperation.spend(
spender.publicKey,
).addCondition(createOp.toCondition()).signWithUTXO(
spender,
channelId,
1000,
);

const withdrawOp = await MoonlightOperation.withdraw(
userSigner.publicKey() as Ed25519PublicKey,
500n,
).addCondition(createOp.toCondition());

const opBundleMLXDR = MLXDR.fromOperationsBundle([
createOp,
depositOp,
withdrawOp,
spendOp,
]);

const recreatedOps = MLXDR.toOperationsBundle(opBundleMLXDR);

assertEquals(recreatedOps.length, 4);

// Validate create Operation Signature
assertEquals(recreatedOps[0].getOperation(), UTXOOperationType.CREATE);
assertEquals(recreatedOps[0].getAmount(), 1000n);
assert(recreatedOps[0].isCreate());
assertEquals(
(recreatedOps[0] as CreateOperation).getUtxo().toString(),
validUtxo.toString(),
);

// Validate deposit Operation Signature
assertEquals(recreatedOps[1].getOperation(), UTXOOperationType.DEPOSIT);
assertEquals(recreatedOps[1].getAmount(), 1000n);
assert(recreatedOps[1].isDeposit());
assertEquals(
(recreatedOps[1] as DepositOperation).getPublicKey().toString(),
userSigner.publicKey().toString(),
);
assertEquals(
(recreatedOps[1] as DepositOperation).isSignedByEd25519(),
true,
);
assertExists(
(recreatedOps[1] as DepositOperation).getEd25519Signature(),
);
assertEquals(
(recreatedOps[1] as DepositOperation).getConditions(),
depositOp.getConditions(),
);
// Validate withdraw Operation Signature
assertEquals(recreatedOps[2].getOperation(), UTXOOperationType.WITHDRAW);
assertEquals(recreatedOps[2].getAmount(), 500n);
assert(recreatedOps[2].isWithdraw());
assertEquals(
(recreatedOps[2] as WithdrawOperation).getPublicKey().toString(),
userSigner.publicKey().toString(),
);

assertEquals(
(recreatedOps[2] as WithdrawOperation).getConditions(),
withdrawOp.getConditions(),
);
// Validate spend Operation Signature
assertEquals(recreatedOps[3].getOperation(), UTXOOperationType.SPEND);
assert(recreatedOps[3].isSpend());
assertEquals(
(recreatedOps[3] as SpendOperation).getUtxo().toString(),
spender.publicKey.toString(),
);
assertEquals(
(recreatedOps[3] as SpendOperation).isSignedByUTXO(),
true,
);
assertExists(
(recreatedOps[3] as SpendOperation).getUTXOSignature(),
);
assertEquals(
(recreatedOps[3] as SpendOperation).getConditions(),
spendOp.getConditions(),
);
});
});
});
4 changes: 2 additions & 2 deletions src/custom-xdr/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export enum MLXDRTypeByte {
SpendOperation = 0x05,
DepositOperation = 0x06,
WithdrawOperation = 0x07,

TransactionBundle = 0x08,
OperationsBundle = 0x08,
TransactionBundle = 0x09,
}

export const MLXDRPrefix: Buffer = Buffer.from([0x30, 0xb0]);
Expand Down
4 changes: 2 additions & 2 deletions src/operation/index.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { UTXOOperationType } from "./types.ts";
import type { CreateCondition } from "../conditions/types.ts";
import { Condition } from "../conditions/index.ts";
import { Asset, Networks } from "@stellar/stellar-sdk";
import { UTXOKeypairBase } from "@moonlight/moonlight-sdk";
import { UTXOKeypairBase } from "../core/utxo-keypair-base/index.ts";

describe("Condition", () => {
describe("Operation", () => {
let validPublicKey: Ed25519PublicKey;
let validUtxo: UTXOPublicKey;

Expand Down
Loading