Skip to content

Commit c9f1763

Browse files
committed
Run formatter
1 parent 6e217f1 commit c9f1763

File tree

10 files changed

+958
-790
lines changed

10 files changed

+958
-790
lines changed

payjoin-ffi/javascript/package-lock.json

Lines changed: 597 additions & 597 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
{
2-
"name": "payjoin",
3-
"version": "0.1.0",
4-
"description": "JavaScript/WASM bindings for rust-payjoin",
5-
"main": "dist/index.js",
6-
"module": "dist/index.js",
7-
"types": "dist/index.d.ts",
8-
"browser": "dist/index.web.js",
9-
"scripts": {
10-
"ubrn:web": "ubrn build web --and-generate",
11-
"compile": "tsc",
12-
"copy-wasm": "mkdir -p dist/generated && cp -r src/generated/wasm-bindgen dist/generated/",
13-
"fix-imports": "node scripts/fix-imports.js",
14-
"build": "npm run ubrn:web && npm run compile && npm run copy-wasm && npm run fix-imports",
15-
"build:test-utils": "cd test-utils && npm install && npx @napi-rs/cli build",
16-
"clean": "rm -rf rust_modules dist src/generated",
17-
"test": "tsx --test test/unit.test.ts test/integration.test.ts"
18-
},
19-
"files": [
20-
"dist/**/*"
21-
],
22-
"keywords": [
23-
"payjoin",
24-
"bitcoin",
25-
"wasm",
26-
"rust"
27-
],
28-
"devDependencies": {
29-
"prettier": "^3.6.2",
30-
"tsx": "^4.20.6",
31-
"typescript": "^5.9.3",
32-
"uniffi-bindgen-react-native": "github:spacebear21/uniffi-bindgen-react-native#update-uniffi-0.30-wasm"
33-
},
34-
"repository": {
35-
"type": "git",
36-
"url": "https://github.com/payjoin/rust-payjoin.git",
37-
"directory": "payjoin-ffi/javascript"
38-
}
2+
"name": "payjoin",
3+
"version": "0.1.0",
4+
"description": "JavaScript/WASM bindings for rust-payjoin",
5+
"main": "dist/index.js",
6+
"module": "dist/index.js",
7+
"types": "dist/index.d.ts",
8+
"browser": "dist/index.web.js",
9+
"scripts": {
10+
"ubrn:web": "ubrn build web --and-generate",
11+
"compile": "tsc",
12+
"copy-wasm": "mkdir -p dist/generated && cp -r src/generated/wasm-bindgen dist/generated/",
13+
"fix-imports": "node scripts/fix-imports.js",
14+
"build": "npm run ubrn:web && npm run compile && npm run copy-wasm && npm run fix-imports",
15+
"build:test-utils": "cd test-utils && npm install && npx @napi-rs/cli build",
16+
"clean": "rm -rf rust_modules dist src/generated",
17+
"test": "tsx --test test/unit.test.ts test/integration.test.ts"
18+
},
19+
"files": [
20+
"dist/**/*"
21+
],
22+
"keywords": [
23+
"payjoin",
24+
"bitcoin",
25+
"wasm",
26+
"rust"
27+
],
28+
"devDependencies": {
29+
"prettier": "^3.6.2",
30+
"tsx": "^4.20.6",
31+
"typescript": "^5.9.3",
32+
"uniffi-bindgen-react-native": "github:spacebear21/uniffi-bindgen-react-native#update-uniffi-0.30-wasm"
33+
},
34+
"repository": {
35+
"type": "git",
36+
"url": "https://github.com/payjoin/rust-payjoin.git",
37+
"directory": "payjoin-ffi/javascript"
38+
}
3939
}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
fn main() {
2-
napi_build::setup();
3-
}
1+
fn main() { napi_build::setup(); }

payjoin-ffi/javascript/test-utils/package-lock.json

Lines changed: 29 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"name": "payjoin-test-utils",
3-
"version": "0.1.0",
4-
"description": "Native Node.js bindings for payjoin test utilities",
5-
"type": "module",
6-
"main": "index.js",
7-
"types": "index.d.ts",
8-
"napi": {
9-
"name": "payjoin-test-utils-napi",
10-
"triples": {}
11-
},
12-
"devDependencies": {
13-
"@napi-rs/cli": "^2.18.0"
14-
}
2+
"name": "payjoin-test-utils",
3+
"version": "0.1.0",
4+
"description": "Native Node.js bindings for payjoin test utilities",
5+
"type": "module",
6+
"main": "index.js",
7+
"types": "index.d.ts",
8+
"napi": {
9+
"name": "payjoin-test-utils-napi",
10+
"triples": {}
11+
},
12+
"devDependencies": {
13+
"@napi-rs/cli": "^2.18.0"
14+
}
1515
}

payjoin-ffi/javascript/test/unit.test.ts

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ describe("URI tests", () => {
8282
"http://vjdpwgybvubne5hda6v4c5iaeeevhge6jvo3w2cl6eocbwwvwxp7b7qd.onion";
8383

8484
const base58 = "bitcoin:12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX";
85-
const bech32Upper = "BITCOIN:TB1Q6D3A2W975YNY0ASUVD9A67NER4NKS58FF0Q8G4";
86-
const bech32Lower = "bitcoin:tb1q6d3a2w975yny0asuvd9a67ner4nks58ff0q8g4";
85+
const bech32Upper =
86+
"BITCOIN:TB1Q6D3A2W975YNY0ASUVD9A67NER4NKS58FF0Q8G4";
87+
const bech32Lower =
88+
"bitcoin:tb1q6d3a2w975yny0asuvd9a67ner4nks58ff0q8g4";
8789

8890
const addresses = [base58, bech32Upper, bech32Lower];
8991
const pjs = [https, onion];
@@ -109,13 +111,14 @@ describe("Persistence tests", () => {
109111
);
110112
const ohttpKeys = payjoin.OhttpKeys.decode(
111113
new Uint8Array([
112-
0x01, 0x00, 0x16, 0x04, 0xba, 0x48, 0xc4, 0x9c, 0x3d, 0x4a, 0x92,
113-
0xa3, 0xad, 0x00, 0xec, 0xc6, 0x3a, 0x02, 0x4d, 0xa1, 0x0c, 0xed,
114-
0x02, 0x18, 0x0c, 0x73, 0xec, 0x12, 0xd8, 0xa7, 0xad, 0x2c, 0xc9,
115-
0x1b, 0xb4, 0x83, 0x82, 0x4f, 0xe2, 0xbe, 0xe8, 0xd2, 0x8b, 0xfe,
116-
0x2e, 0xb2, 0xfc, 0x64, 0x53, 0xbc, 0x4d, 0x31, 0xcd, 0x85, 0x1e,
117-
0x8a, 0x65, 0x40, 0xe8, 0x6c, 0x53, 0x82, 0xaf, 0x58, 0x8d, 0x37,
118-
0x09, 0x57, 0x00, 0x04, 0x00, 0x01, 0x00, 0x03,
114+
0x01, 0x00, 0x16, 0x04, 0xba, 0x48, 0xc4, 0x9c, 0x3d, 0x4a,
115+
0x92, 0xa3, 0xad, 0x00, 0xec, 0xc6, 0x3a, 0x02, 0x4d, 0xa1,
116+
0x0c, 0xed, 0x02, 0x18, 0x0c, 0x73, 0xec, 0x12, 0xd8, 0xa7,
117+
0xad, 0x2c, 0xc9, 0x1b, 0xb4, 0x83, 0x82, 0x4f, 0xe2, 0xbe,
118+
0xe8, 0xd2, 0x8b, 0xfe, 0x2e, 0xb2, 0xfc, 0x64, 0x53, 0xbc,
119+
0x4d, 0x31, 0xcd, 0x85, 0x1e, 0x8a, 0x65, 0x40, 0xe8, 0x6c,
120+
0x53, 0x82, 0xaf, 0x58, 0x8d, 0x37, 0x09, 0x57, 0x00, 0x04,
121+
0x00, 0x01, 0x00, 0x03,
119122
]).buffer,
120123
);
121124

@@ -129,7 +132,11 @@ describe("Persistence tests", () => {
129132
const result = payjoin.replayReceiverEventLog(persister);
130133
const state = result.state();
131134

132-
assert.strictEqual(state.tag, "Initialized", "State should be Initialized");
135+
assert.strictEqual(
136+
state.tag,
137+
"Initialized",
138+
"State should be Initialized",
139+
);
133140
});
134141

135142
test("sender persistence", () => {
@@ -140,13 +147,14 @@ describe("Persistence tests", () => {
140147
);
141148
const ohttpKeys = payjoin.OhttpKeys.decode(
142149
new Uint8Array([
143-
0x01, 0x00, 0x16, 0x04, 0xba, 0x48, 0xc4, 0x9c, 0x3d, 0x4a, 0x92,
144-
0xa3, 0xad, 0x00, 0xec, 0xc6, 0x3a, 0x02, 0x4d, 0xa1, 0x0c, 0xed,
145-
0x02, 0x18, 0x0c, 0x73, 0xec, 0x12, 0xd8, 0xa7, 0xad, 0x2c, 0xc9,
146-
0x1b, 0xb4, 0x83, 0x82, 0x4f, 0xe2, 0xbe, 0xe8, 0xd2, 0x8b, 0xfe,
147-
0x2e, 0xb2, 0xfc, 0x64, 0x53, 0xbc, 0x4d, 0x31, 0xcd, 0x85, 0x1e,
148-
0x8a, 0x65, 0x40, 0xe8, 0x6c, 0x53, 0x82, 0xaf, 0x58, 0x8d, 0x37,
149-
0x09, 0x57, 0x00, 0x04, 0x00, 0x01, 0x00, 0x03,
150+
0x01, 0x00, 0x16, 0x04, 0xba, 0x48, 0xc4, 0x9c, 0x3d, 0x4a,
151+
0x92, 0xa3, 0xad, 0x00, 0xec, 0xc6, 0x3a, 0x02, 0x4d, 0xa1,
152+
0x0c, 0xed, 0x02, 0x18, 0x0c, 0x73, 0xec, 0x12, 0xd8, 0xa7,
153+
0xad, 0x2c, 0xc9, 0x1b, 0xb4, 0x83, 0x82, 0x4f, 0xe2, 0xbe,
154+
0xe8, 0xd2, 0x8b, 0xfe, 0x2e, 0xb2, 0xfc, 0x64, 0x53, 0xbc,
155+
0x4d, 0x31, 0xcd, 0x85, 0x1e, 0x8a, 0x65, 0x40, 0xe8, 0x6c,
156+
0x53, 0x82, 0xaf, 0x58, 0x8d, 0x37, 0x09, 0x57, 0x00, 0x04,
157+
0x00, 0x01, 0x00, 0x03,
150158
]).buffer,
151159
);
152160

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
2-
"compilerOptions": {
3-
"target": "es2022",
4-
"module": "es2022",
5-
"lib": ["es2022", "dom"],
6-
"declaration": true,
7-
"declarationMap": true,
8-
"sourceMap": true,
9-
"outDir": "./dist",
10-
"rootDir": "./src",
11-
"strict": true,
12-
"esModuleInterop": true,
13-
"skipLibCheck": true,
14-
"forceConsistentCasingInFileNames": true,
15-
"moduleResolution": "node",
16-
"resolveJsonModule": true
17-
},
18-
"include": ["src/**/*"],
19-
"exclude": ["node_modules", "dist", "rust_modules"]
2+
"compilerOptions": {
3+
"target": "es2022",
4+
"module": "es2022",
5+
"lib": ["es2022", "dom"],
6+
"declaration": true,
7+
"declarationMap": true,
8+
"sourceMap": true,
9+
"outDir": "./dist",
10+
"rootDir": "./src",
11+
"strict": true,
12+
"esModuleInterop": true,
13+
"skipLibCheck": true,
14+
"forceConsistentCasingInFileNames": true,
15+
"moduleResolution": "node",
16+
"resolveJsonModule": true
17+
},
18+
"include": ["src/**/*"],
19+
"exclude": ["node_modules", "dist", "rust_modules"]
2020
}

payjoin-ffi/python/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
import toml
66

77
# Read version from Cargo.toml
8-
cargo_toml_path = os.path.join(os.path.dirname(__file__), '..', 'Cargo.toml')
8+
cargo_toml_path = os.path.join(os.path.dirname(__file__), "..", "Cargo.toml")
99
cargo_toml = toml.load(cargo_toml_path)
10-
version = cargo_toml['package']['version']
10+
version = cargo_toml["package"]["version"]
1111

1212
LONG_DESCRIPTION = """# payjoin
1313
This repository creates libraries for various programming languages, all using the Rust-based [Payjoin](https://github.com/payjoin/rust-payjoin)

0 commit comments

Comments
 (0)