@btc-vision/btc-runtime 1.9.15 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/runtime/buffer/BytesReader.ts +1 -1
- package/runtime/constants/Exports.ts +11 -11
- package/runtime/contracts/OP20.ts +335 -39
- package/runtime/contracts/OP721.ts +15 -9
- package/runtime/env/BlockchainEnvironment.ts +202 -5
- package/runtime/env/classes/Transaction.ts +36 -3
- package/runtime/env/consensus/ConsensusRules.ts +228 -0
- package/runtime/env/consensus/MLDSAMetadata.ts +181 -0
- package/runtime/env/consensus/Signatures.ts +7 -0
- package/runtime/env/global.ts +111 -7
- package/runtime/exports/index.ts +2 -1
- package/runtime/index.ts +7 -11
- package/runtime/interfaces/as.ts +5 -0
- package/runtime/shared-libraries/TransferHelper.ts +4 -17
- package/runtime/types/Address.ts +230 -46
- package/runtime/types/ExtendedAddress.ts +426 -0
- package/runtime/nested/PointerManager.ts +0 -55
- package/runtime/nested/codecs/AddressCodec.ts +0 -19
- package/runtime/nested/codecs/BooleanCodec.ts +0 -17
- package/runtime/nested/codecs/Ids.ts +0 -10
- package/runtime/nested/codecs/NumericCodec.ts +0 -58
- package/runtime/nested/codecs/StringCodec.ts +0 -24
- package/runtime/nested/codecs/U256Codec.ts +0 -20
- package/runtime/nested/codecs/VariableBytesCodec.ts +0 -134
- package/runtime/nested/interfaces/ICodec.ts +0 -12
- package/runtime/nested/storage/StorageMap.ts +0 -207
- package/runtime/nested/storage/StorageSet.ts +0 -60
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@btc-vision/btc-runtime",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Bitcoin Smart Contract Runtime",
|
|
5
5
|
"main": "btc/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@btc-vision/as-pect-assembly": "^8.2.0",
|
|
26
26
|
"@btc-vision/as-pect-cli": "^8.2.0",
|
|
27
27
|
"@btc-vision/as-pect-transform": "^8.2.0",
|
|
28
|
-
"@types/node": "^24.10.
|
|
28
|
+
"@types/node": "^24.10.1",
|
|
29
29
|
"assemblyscript": "^0.28.9"
|
|
30
30
|
},
|
|
31
31
|
"repository": {
|
|
@@ -238,7 +238,7 @@ export class BytesReader {
|
|
|
238
238
|
public readAddress(): Address {
|
|
239
239
|
this.verifyEnd(this.currentOffset + ADDRESS_BYTE_LENGTH);
|
|
240
240
|
|
|
241
|
-
const addr = new Address();
|
|
241
|
+
const addr = new Address([]);
|
|
242
242
|
for (let i: i32 = 0; i < ADDRESS_BYTE_LENGTH; i++) {
|
|
243
243
|
addr[i] = this.readU8();
|
|
244
244
|
}
|
|
@@ -79,14 +79,14 @@ export const OP721_TRANSFER_TYPE_HASH: u8[] = [
|
|
|
79
79
|
0x64, 0xab, 0xa6, 0xaf, 0x68, 0x51, 0x03, 0xfe, 0xc4, 0xae, 0x12, 0xd7, 0xa6, 0xa9, 0xb2, 0x0f,
|
|
80
80
|
];
|
|
81
81
|
|
|
82
|
-
export const BALANCE_OF_SELECTOR:
|
|
83
|
-
export const ALLOWANCE_SELECTOR:
|
|
84
|
-
export const TOTAL_SUPPLY_SELECTOR:
|
|
85
|
-
export const NAME_SELECTOR:
|
|
86
|
-
export const SYMBOL_SELECTOR:
|
|
87
|
-
export const DECIMALS_SELECTOR:
|
|
88
|
-
export const NONCE_OF_SELECTOR:
|
|
89
|
-
export const DOMAIN_SEPARATOR_SELECTOR:u32 = 0xf1bf80e0; // "domainSeparator()"
|
|
90
|
-
export const METADATA_SELECTOR:
|
|
91
|
-
export const MAXIMUM_SUPPLY_SELECTOR:
|
|
92
|
-
export const ICON_SELECTOR:
|
|
82
|
+
export const BALANCE_OF_SELECTOR: u32 = 0x5b46f8f6; // "balanceOf(address)"
|
|
83
|
+
export const ALLOWANCE_SELECTOR: u32 = 0xd864b7ca; // "allowance(address,address)"
|
|
84
|
+
export const TOTAL_SUPPLY_SELECTOR: u32 = 0xa368022e; // "totalSupply()"
|
|
85
|
+
export const NAME_SELECTOR: u32 = 0x1581f81c; // "name()"
|
|
86
|
+
export const SYMBOL_SELECTOR: u32 = 0x25967ca5; // "symbol()"
|
|
87
|
+
export const DECIMALS_SELECTOR: u32 = 0xbb844440; // "decimals()"
|
|
88
|
+
export const NONCE_OF_SELECTOR: u32 = 0xf6824b65; // "nonceOf(address)"
|
|
89
|
+
export const DOMAIN_SEPARATOR_SELECTOR: u32 = 0xf1bf80e0; // "domainSeparator()"
|
|
90
|
+
export const METADATA_SELECTOR: u32 = 0xfc0d115c; // "metadata()"
|
|
91
|
+
export const MAXIMUM_SUPPLY_SELECTOR: u32 = 0x7d8d5019; // "maximumSupply()"
|
|
92
|
+
export const ICON_SELECTOR: u32 = 0xaaaa50c5; // "icon()"
|