Skip to content

Commit fb4ac7f

Browse files
committed
Latest libauth, default to BCH 2025 VM
1 parent e2d8875 commit fb4ac7f

15 files changed

+82
-76
lines changed

libauth

Submodule libauth updated 2546 files

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"private": true,
55
"devDependencies": {
6-
"@bitauth/libauth": "3.1.0-next.1",
6+
"@bitauth/libauth": "3.1.0-next.2",
77
"@blueprintjs/core": "^5.8.2",
88
"@blueprintjs/icons": "^5.7.0",
99
"@blueprintjs/select": "^5.0.23",

src/editor/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const ideURI = window.location.origin;
22

33
export const bitauthWalletTemplateSchema =
4-
'https://ide.bitauth.com/authentication-template-v0.schema.json';
4+
'https://libauth.org/schemas/wallet-template-v0.schema.json';
55

66
export const localStorageBackupPrefix = 'BITAUTH_IDE_BACKUP_';
77

src/editor/dialogs/edit-script-dialog/EditScriptDialog.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ export const EditScriptDialog = ({
130130
>
131131
<HTMLSelect
132132
id="script-p2sh"
133+
value={scriptLockingType}
133134
options={lockingTypes}
134135
onChange={(e) => {
135136
setScriptLockingType(e.currentTarget.value as LockingType);

src/editor/script-editor/wallet-template.schema.json

Lines changed: 60 additions & 48 deletions
Large diffs are not rendered by default.

src/state/defaults.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ export const defaultState: AppState = {
3939
currentScenarioInternalId: undefined,
4040
lastSelectedScenarioInternalId: undefined,
4141
currentTemplate: defaultTemplate,
42-
currentVmId: 'BCH_2023_05',
42+
currentVmId: 'BCH_2025_05',
4343
evaluationViewerSettings: {
4444
abbreviateLongStackItems: true,
4545
groupStackItemsDeeperThan: 3,
46-
supportBigInt: false,
46+
supportBigInt: true,
4747
vmNumbersDisplayFormat: 'integer',
4848
reverseStack: false,
4949
showAlternateStack: false,

src/templates/2-of-3.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://ide.bitauth.com/authentication-template-v0.schema.json",
2+
"$schema": "https://libauth.org/schemas/wallet-template-v0.schema.json",
33
"name": "2-of-3 Multisig",
44
"entities": {
55
"signer_1": {
@@ -62,6 +62,5 @@
6262
"BCH_2026_05",
6363
"BCH_SPEC",
6464
"BTC_2017_08"
65-
],
66-
"version": 0
65+
]
6766
}

tests/fixtures/empty.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://ide.bitauth.com/authentication-template-v0.schema.json",
2+
"$schema": "https://libauth.org/schemas/wallet-template-v0.schema.json",
33
"description": "An empty wallet template.\n",
44
"name": "empty.json",
55
"entities": {},
@@ -15,6 +15,5 @@
1515
"script": ""
1616
}
1717
},
18-
"supported": ["BCH_2023_05"],
19-
"version": 0
18+
"supported": ["BCH_2023_05", "BCH_2025_05"]
2019
}

tests/fixtures/loops.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://ide.bitauth.com/authentication-template-v0.schema.json",
2+
"$schema": "https://libauth.org/schemas/wallet-template-v0.schema.json",
33
"description": "Render loops and loop controls in the evaluation viewer.\n",
44
"name": "loops.json",
55
"entities": {},
@@ -9,6 +9,5 @@
99
"script": "\n<0> <0>\nOP_BEGIN\n\n <1> OP_IF \n <0> OP_BEGIN OP_1ADD OP_DUP <2> OP_EQUAL OP_UNTIL\n <1> <1> OP_BEGIN \n OP_UNTIL OP_BEGIN\n OP_UNTIL\n OP_ENDIF\n OP_ADD\n OP_SWAP OP_1ADD OP_SWAP\n OP_OVER\n <1> OP_IF \n <0> OP_BEGIN OP_BEGIN\n OP_1ADD\n OP_DUP\n <$(\n <0> OP_BEGIN \n OP_1ADD \n OP_DUP <5>\n OP_EQUAL\n OP_UNTIL\n )>\n OP_EQUAL\n OP_UNTIL <1> OP_UNTIL\n OP_ENDIF\n OP_EQUAL\nOP_UNTIL\nOP_NIP\n"
1010
}
1111
},
12-
"supported": ["BCH_SPEC"],
13-
"version": 0
12+
"supported": ["BCH_SPEC"]
1413
}

tests/fixtures/network/success/bf273322db1709581003eb1f05a66be408864eed.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"raw_url": "https://gist.githubusercontent.com/bitjson/a055ad6ba863a4472767bb5e441a3437/raw/9c014d7e356f33c1b981d07538a936434a08fc27/single-sig.json",
2525
"size": 1254,
2626
"truncated": false,
27-
"content": "{\n \"$schema\": \"https://ide.bitauth.com/authentication-template-v0.schema.json\",\n \"description\": \"A standard single-factor authentication template that uses Pay-to-Public-Key-Hash (P2PKH), the most common authentication scheme in use on the network.\\n\\nThis P2PKH template uses BCH Schnorr signatures, reducing the size of transactions. Because the template uses a Hierarchical Deterministic (HD) key, it also supports watch-only clients.\",\n \"name\": \"Single Signature (P2PKH)\",\n \"entities\": {\n \"owner\": {\n \"description\": \"The individual who can spend from this wallet.\",\n \"name\": \"Owner\",\n \"scripts\": [\"lock\", \"unlock\"],\n \"variables\": {\n \"key\": {\n \"description\": \"The private key that controls this wallet.\",\n \"name\": \"Key\",\n \"type\": \"HdKey\"\n }\n }\n }\n },\n \"scripts\": {\n \"unlock\": {\n \"name\": \"Unlock\",\n \"script\": \"<key.schnorr_signature.all_outputs>\\n<key.public_key>\",\n \"unlocks\": \"lock\"\n },\n \"lock\": {\n \"lockingType\": \"standard\",\n \"name\": \"P2PKH Lock\",\n \"script\": \"OP_DUP\\nOP_HASH160 <$(<key.public_key> OP_HASH160\\n)> OP_EQUALVERIFY\\nOP_CHECKSIG\"\n }\n },\n \"supported\": [\"BCH_2020_05\", \"BCH_2021_05\", \"BCH_2022_05\"],\n \"version\": 0\n}"
27+
"content": "{\n \"$schema\": \"https://libauth.org/schemas/wallet-template-v0.schema.json\",\n \"description\": \"A standard single-factor authentication template that uses Pay-to-Public-Key-Hash (P2PKH), the most common authentication scheme in use on the network.\\n\\nThis P2PKH template uses BCH Schnorr signatures, reducing the size of transactions. Because the template uses a Hierarchical Deterministic (HD) key, it also supports watch-only clients.\",\n \"name\": \"Single Signature (P2PKH)\",\n \"entities\": {\n \"owner\": {\n \"description\": \"The individual who can spend from this wallet.\",\n \"name\": \"Owner\",\n \"scripts\": [\"lock\", \"unlock\"],\n \"variables\": {\n \"key\": {\n \"description\": \"The private key that controls this wallet.\",\n \"name\": \"Key\",\n \"type\": \"HdKey\"\n }\n }\n }\n },\n \"scripts\": {\n \"unlock\": {\n \"name\": \"Unlock\",\n \"script\": \"<key.schnorr_signature.all_outputs>\\n<key.public_key>\",\n \"unlocks\": \"lock\"\n },\n \"lock\": {\n \"lockingType\": \"standard\",\n \"name\": \"P2PKH Lock\",\n \"script\": \"OP_DUP\\nOP_HASH160 <$(<key.public_key> OP_HASH160\\n)> OP_EQUALVERIFY\\nOP_CHECKSIG\"\n }\n },\n \"supported\": [\"BCH_2020_05\", \"BCH_2021_05\", \"BCH_2022_05\"],\n \"version\": 0\n}"
2828
}
2929
},
3030
"public": true,

tests/fixtures/non-push-unlocking-opcode.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://ide.bitauth.com/authentication-template-v0.schema.json",
2+
"$schema": "https://libauth.org/schemas/wallet-template-v0.schema.json",
33
"description": "Render the error for a non-push opcode located in unlocking bytecode.\n",
44
"name": "non-push-unlocking-opcode.json",
55
"entities": {},
@@ -15,6 +15,5 @@
1515
"script": "OP_ADD\n"
1616
}
1717
},
18-
"supported": ["BCH_2023_05"],
19-
"version": 0
18+
"supported": ["BCH_2023_05", "BCH_2025_05"]
2019
}

tests/fixtures/single_signature_p2pkh.wallet-template.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://ide.bitauth.com/authentication-template-v0.schema.json",
2+
"$schema": "https://libauth.org/schemas/wallet-template-v0.schema.json",
33
"description": "A standard single-factor wallet template that uses Pay-to-Public-Key-Hash (P2PKH), the most common authentication scheme in use on the network.\n\nThis P2PKH template uses BCH Schnorr signatures, reducing the size of transactions. Because the template uses a Hierarchical Deterministic (HD) key, it also supports watch-only clients.",
44
"name": "Single Signature (P2PKH)",
55
"entities": {
@@ -37,6 +37,5 @@
3737
"BCH_2025_05",
3838
"BCH_2026_05",
3939
"BCH_SPEC"
40-
],
41-
"version": 0
40+
]
4241
}

tests/fixtures/spacers.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://ide.bitauth.com/authentication-template-v0.schema.json",
2+
"$schema": "https://libauth.org/schemas/wallet-template-v0.schema.json",
33
"description": "Render an example of deeply-nested spacers in the evaluation viewer.",
44
"name": "spacers.json",
55
"entities": {},
@@ -20,6 +20,5 @@
2020
"script": "OP_IF\n <1> OP_IF\n <\n $(<'eval_1'> \n <$(\n <'eval_2'>\n <1> OP_IF\n OP_DROP\n <'inner_if'>\n OP_ENDIF\n )>\n OP_2DROP\n <1> OP_IF\n <'if_1'>\n <1> OP_IF\n <'if_2'>\n OP_ENDIF \n OP_DROP\n OP_ENDIF\n )\n > // push happens after this line\n OP_ELSE <'never'>\n OP_ENDIF\nOP_ELSE\n <0>\nOP_ELSE <'Multiple OP_ELSE quirk'> OP_DROP\nOP_ELSE OP_NOT\nOP_ENDIF \nOP_0NOTEQUAL"
2121
}
2222
},
23-
"supported": ["BCH_2023_05"],
24-
"version": 0
23+
"supported": ["BCH_2023_05", "BCH_2025_05"]
2524
}

tests/fixtures/state-merkle-trees.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://ide.bitauth.com/authentication-template-v0.schema.json",
2+
"$schema": "https://libauth.org/schemas/wallet-template-v0.schema.json",
33
"description": "This contract demonstrates a simple Merkle tree leaf replacement within a covenant. Leaves can be used to maintain any kind of state that a covenant must manage internally like sealed ballots (e.g. shareholder votes), deposit receipts (e.g. for issuing refunds), an order book, etc.\n\nThis demonstration uses a 3-level Merkle tree for which each leaf has been initialized to OP_0:\n \n rt\n / \\\n z0 z1\n / \\ / \\\n y0 y1 y2 y3\n /\\ /\\ /\\ /\\\n x0 x1 x2 x3 x4 x5 x6 x7\n | | | | | | | |\n a0 a1 a2 a3 a4 a5 a6 a7\n\nIn this demo, both \"before\" and \"after\" Merkle trees are simultaneously built/validated for each tree level, optimizing contract size.\n\nYou can explore scripts on the left sidebar:\n\n- See the \"Replace Empty Leaf\" script for a full demo.\n- See the \"Left Sibling\" and \"Right Sibling\" scripts for unit tests of a single tree level.\n\nNote: Merkle trees are typically less efficient for state management than token commitments. Before choosing a Merkle tree, verify that the intended use case cannot be served by placing state in token commitments issued either to certain participants or to covenants designed for this purpose.",
44
"name": "Experimenting with Contract State Merkle Trees",
55
"entities": {},
@@ -103,6 +103,5 @@
103103
}
104104
}
105105
},
106-
"supported": ["BCH_2022_05"],
107-
"version": 0
106+
"supported": ["BCH_2022_05"]
108107
}

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3407,7 +3407,7 @@ __metadata:
34073407
version: 0.0.0-use.local
34083408
resolution: "bitauth-ide@workspace:."
34093409
dependencies:
3410-
"@bitauth/libauth": "npm:3.1.0-next.1"
3410+
"@bitauth/libauth": "npm:3.1.0-next.2"
34113411
"@blueprintjs/core": "npm:^5.8.2"
34123412
"@blueprintjs/icons": "npm:^5.7.0"
34133413
"@blueprintjs/select": "npm:^5.0.23"

0 commit comments

Comments
 (0)