@alephium/web3 3.0.0-test.7 → 3.0.0-test.9
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/MIGRATION.md +25 -0
- package/dist/_cjs/codec/hash.d.ts +1 -1
- package/dist/_cjs/codec/signature-codec.d.ts +1 -1
- package/dist/_cjs/codec/signature-codec.js.map +1 -1
- package/dist/_cjs/codec/unlock-script-codec.d.ts +1 -1
- package/dist/_cjs/codec/unlock-script-codec.js +4 -1
- package/dist/_cjs/codec/unlock-script-codec.js.map +1 -1
- package/dist/_esm/codec/hash.d.ts +1 -1
- package/dist/_esm/codec/signature-codec.d.ts +1 -1
- package/dist/_esm/codec/signature-codec.js.map +1 -1
- package/dist/_esm/codec/unlock-script-codec.d.ts +1 -1
- package/dist/_esm/codec/unlock-script-codec.js +4 -1
- package/dist/_esm/codec/unlock-script-codec.js.map +1 -1
- package/package.json +5 -4
- package/src/codec/hash.ts +1 -1
- package/src/codec/signature-codec.ts +1 -1
- package/src/codec/unlock-script-codec.ts +4 -1
package/MIGRATION.md
CHANGED
|
@@ -158,3 +158,28 @@ The following are no longer needed for `@alephium/web3` (they may still be neede
|
|
|
158
158
|
The SDK is now built with TypeScript 5.9 and uses `moduleResolution: "bundler"` internally. Consumers using `moduleResolution: "node"` (the default) are supported via the `typesVersions` field — no changes needed on your side.
|
|
159
159
|
|
|
160
160
|
If you upgrade your own project to `moduleResolution: "bundler"`, the `exports` field in `package.json` will be used for type resolution, which is more accurate.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## WalletConnect
|
|
165
|
+
|
|
166
|
+
### `@alephium/walletconnect-provider` now uses `optionalNamespaces`
|
|
167
|
+
|
|
168
|
+
The provider's `connect()` method now sends namespaces via `optionalNamespaces` instead of the deprecated `requiredNamespaces`. This follows WalletConnect SDK 2.21.6+, which auto-converts `requiredNamespaces` to `optionalNamespaces` internally.
|
|
169
|
+
|
|
170
|
+
**If your app is a dApp (initiates WalletConnect connections):** No changes needed. The provider handles this internally.
|
|
171
|
+
|
|
172
|
+
**If your app is a wallet (responds to session proposals):** Update your `session_proposal` handler to read from `optionalNamespaces`, falling back to `requiredNamespaces` for backward compatibility with older dApps:
|
|
173
|
+
|
|
174
|
+
```ts
|
|
175
|
+
// ❌ v2
|
|
176
|
+
const { requiredNamespaces } = proposal.params
|
|
177
|
+
const alephiumNamespace = requiredNamespaces['alephium']
|
|
178
|
+
|
|
179
|
+
// ✅ v3
|
|
180
|
+
const { requiredNamespaces, optionalNamespaces } = proposal.params
|
|
181
|
+
const alephiumNamespace =
|
|
182
|
+
optionalNamespaces?.['alephium'] ?? requiredNamespaces?.['alephium']
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
This change is required because WalletConnect SDK 2.21.6+ moves all `requiredNamespaces` into `optionalNamespaces` before sending the proposal. Wallet code that only reads `requiredNamespaces` will see an empty object.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function blakeHash(raw: Uint8Array): Uint8Array
|
|
1
|
+
export declare function blakeHash(raw: Uint8Array): Uint8Array;
|
|
2
2
|
export declare function djbIntHash(bytes: Uint8Array): number;
|
|
3
3
|
export declare function createHint(input: Uint8Array): number;
|
|
@@ -2,4 +2,4 @@ import { ArrayCodec } from './array-codec';
|
|
|
2
2
|
import { FixedSizeCodec } from './codec';
|
|
3
3
|
export type Signature = Uint8Array;
|
|
4
4
|
export declare const signatureCodec: FixedSizeCodec;
|
|
5
|
-
export declare const signaturesCodec: ArrayCodec<Uint8Array
|
|
5
|
+
export declare const signaturesCodec: ArrayCodec<Uint8Array>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signature-codec.js","sourceRoot":"","sources":["../../../src/codec/signature-codec.ts"],"names":[],"mappings":";;;AAiBA,+CAA0C;AAC1C,mCAAwC;AAI3B,QAAA,cAAc,GAAG,IAAI,sBAAc,CAAC,EAAE,CAAC,CAAA;AACvC,QAAA,eAAe,
|
|
1
|
+
{"version":3,"file":"signature-codec.js","sourceRoot":"","sources":["../../../src/codec/signature-codec.ts"],"names":[],"mappings":";;;AAiBA,+CAA0C;AAC1C,mCAAwC;AAI3B,QAAA,cAAc,GAAG,IAAI,sBAAc,CAAC,EAAE,CAAC,CAAA;AACvC,QAAA,eAAe,GAA2B,IAAI,wBAAU,CAAC,sBAAc,CAAC,CAAA"}
|
|
@@ -48,5 +48,8 @@ exports.unlockScriptCodec = new codec_1.EnumCodec('unlock script', {
|
|
|
48
48
|
P2PK: p2pkCodec,
|
|
49
49
|
P2HMPK: p2hmpkCodec
|
|
50
50
|
});
|
|
51
|
-
exports.encodedSameAsPrevious = exports.unlockScriptCodec.encode({
|
|
51
|
+
exports.encodedSameAsPrevious = exports.unlockScriptCodec.encode({
|
|
52
|
+
kind: 'SameAsPrevious',
|
|
53
|
+
value: 'SameAsPrevious'
|
|
54
|
+
});
|
|
52
55
|
//# sourceMappingURL=unlock-script-codec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unlock-script-codec.js","sourceRoot":"","sources":["../../../src/codec/unlock-script-codec.ts"],"names":[],"mappings":";;;AAiBA,+CAA0C;AAC1C,2DAA8C;AAC9C,mCAAuE;AACvE,iDAAoD;AACpD,+BAAsC;AACtC,mEAA2E;AA6B3E,MAAM,cAAc,GAAG,IAAI,sBAAc,CAAC,EAAE,CAAC,CAAA;AAC7C,MAAM,iBAAiB,GAAG,IAAI,mBAAW,CAAe;IACtD,SAAS,EAAE,cAAc;IACzB,KAAK,EAAE,4BAAQ;CAChB,CAAC,CAAA;AACF,MAAM,WAAW,GAAkB,IAAI,wBAAU,CAAC,iBAAiB,CAAC,CAAA;AACpE,MAAM,SAAS,GAAG,IAAI,mBAAW,CAAO;IACtC,MAAM,EAAE,0BAAW;IACnB,MAAM,EAAE,eAAS;CAClB,CAAC,CAAA;AACF,MAAM,mBAAmB,GAAG,IAAI,CAAC,KAAM,SAAQ,aAAqB;IAClE,MAAM;QACJ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Uint8Array): Uint8Array
|
|
1
|
+
export declare function blakeHash(raw: Uint8Array): Uint8Array;
|
|
2
2
|
export declare function djbIntHash(bytes: Uint8Array): number;
|
|
3
3
|
export declare function createHint(input: Uint8Array): number;
|
|
@@ -2,4 +2,4 @@ import { ArrayCodec } from './array-codec.js';
|
|
|
2
2
|
import { FixedSizeCodec } from './codec.js';
|
|
3
3
|
export type Signature = Uint8Array;
|
|
4
4
|
export declare const signatureCodec: FixedSizeCodec;
|
|
5
|
-
export declare const signaturesCodec: ArrayCodec<Uint8Array
|
|
5
|
+
export declare const signaturesCodec: ArrayCodec<Uint8Array>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signature-codec.js","sourceRoot":"","sources":["../../../src/codec/signature-codec.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAIxC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,EAAE,CAAC,CAAA;AACpD,MAAM,CAAC,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"signature-codec.js","sourceRoot":"","sources":["../../../src/codec/signature-codec.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAIxC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,EAAE,CAAC,CAAA;AACpD,MAAM,CAAC,MAAM,eAAe,GAA2B,IAAI,UAAU,CAAC,cAAc,CAAC,CAAA"}
|
|
@@ -45,5 +45,8 @@ export const unlockScriptCodec = new EnumCodec('unlock script', {
|
|
|
45
45
|
P2PK: p2pkCodec,
|
|
46
46
|
P2HMPK: p2hmpkCodec
|
|
47
47
|
});
|
|
48
|
-
export const encodedSameAsPrevious = unlockScriptCodec.encode({
|
|
48
|
+
export const encodedSameAsPrevious = unlockScriptCodec.encode({
|
|
49
|
+
kind: 'SameAsPrevious',
|
|
50
|
+
value: 'SameAsPrevious'
|
|
51
|
+
});
|
|
49
52
|
//# sourceMappingURL=unlock-script-codec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unlock-script-codec.js","sourceRoot":"","sources":["../../../src/codec/unlock-script-codec.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACvE,OAAO,EAAU,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAO,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAiB,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AA6B3E,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,EAAE,CAAC,CAAA;AAC7C,MAAM,iBAAiB,GAAG,IAAI,WAAW,CAAe;IACtD,SAAS,EAAE,cAAc;IACzB,KAAK,EAAE,QAAQ;CAChB,CAAC,CAAA;AACF,MAAM,WAAW,GAAkB,IAAI,UAAU,CAAC,iBAAiB,CAAC,CAAA;AACpE,MAAM,SAAS,GAAG,IAAI,WAAW,CAAO;IACtC,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,SAAS;CAClB,CAAC,CAAA;AACF,MAAM,mBAAmB,GAAG,IAAI,CAAC,KAAM,SAAQ,KAAqB;IAClE,MAAM;QACJ,OAAO,IAAI,UAAU,CAAC,EAAE,CAAC,CAAA;IAC3B,CAAC;IACD,OAAO;QACL,OAAO,gBAAgB,CAAA;IACzB,CAAC;CACF,CAAC,EAAE,CAAA;AACJ,MAAM,SAAS,GAAG,IAAI,CAAC,KAAM,SAAQ,KAAW;IAC9C,MAAM;QACJ,OAAO,IAAI,UAAU,C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|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alephium/web3",
|
|
3
|
-
"version": "3.0.0-test.
|
|
3
|
+
"version": "3.0.0-test.9",
|
|
4
4
|
"description": "A JS/TS library to interact with the Alephium platform",
|
|
5
5
|
"license": "GPL",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@noble/curves": "1.9.7",
|
|
68
68
|
"@noble/hashes": "1.8.0",
|
|
69
69
|
"@noble/secp256k1": "1.7.2",
|
|
70
|
-
"base-x": "4.0.
|
|
70
|
+
"base-x": "4.0.1",
|
|
71
71
|
"bignumber.js": "^9.1.1",
|
|
72
72
|
"eventemitter3": "^4.0.7"
|
|
73
73
|
},
|
|
@@ -89,10 +89,11 @@
|
|
|
89
89
|
"shelljs": "^0.8.5",
|
|
90
90
|
"size-limit": "^11.0.0",
|
|
91
91
|
"swagger-typescript-api": "12.0.3",
|
|
92
|
-
"ts-node": "^10.9.
|
|
92
|
+
"ts-node": "^10.9.2",
|
|
93
93
|
"tsc-alias": "^1.8.16",
|
|
94
94
|
"tslib": "^2.5.0",
|
|
95
|
-
"typescript": "^5.9.3"
|
|
95
|
+
"typescript": "^5.9.3",
|
|
96
|
+
"vitest": "^3.1.1"
|
|
96
97
|
},
|
|
97
98
|
"engines": {
|
|
98
99
|
"node": ">=20.0.0",
|
package/src/codec/hash.ts
CHANGED
|
@@ -17,7 +17,7 @@ along with the library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
17
17
|
*/
|
|
18
18
|
import { blake2b } from '@noble/hashes/blake2b'
|
|
19
19
|
|
|
20
|
-
export function blakeHash(raw: Uint8Array) {
|
|
20
|
+
export function blakeHash(raw: Uint8Array): Uint8Array {
|
|
21
21
|
return blake2b(raw, { dkLen: 32 })
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -21,4 +21,4 @@ import { FixedSizeCodec } from './codec'
|
|
|
21
21
|
export type Signature = Uint8Array
|
|
22
22
|
|
|
23
23
|
export const signatureCodec = new FixedSizeCodec(64)
|
|
24
|
-
export const signaturesCodec = new ArrayCodec(signatureCodec)
|
|
24
|
+
export const signaturesCodec: ArrayCodec<Uint8Array> = new ArrayCodec(signatureCodec)
|
|
@@ -93,4 +93,7 @@ export const unlockScriptCodec = new EnumCodec<UnlockScript>('unlock script', {
|
|
|
93
93
|
P2HMPK: p2hmpkCodec
|
|
94
94
|
})
|
|
95
95
|
|
|
96
|
-
export const encodedSameAsPrevious = unlockScriptCodec.encode({
|
|
96
|
+
export const encodedSameAsPrevious: Uint8Array = unlockScriptCodec.encode({
|
|
97
|
+
kind: 'SameAsPrevious',
|
|
98
|
+
value: 'SameAsPrevious'
|
|
99
|
+
})
|