starknet 3.6.0 → 3.7.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/CHANGELOG.md +8 -0
- package/account/default.d.ts +2 -1
- package/account/default.js +3 -2
- package/dist/account/default.d.ts +2 -1
- package/dist/account/default.js +3 -2
- package/package.json +1 -1
- package/src/account/default.ts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# [3.7.0](https://github.com/seanjameshan/starknet.js/compare/v3.6.0...v3.7.0) (2022-03-24)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- **Account:** account constructor should take a KeyPair or a Signer as parameter ([ea6ae40](https://github.com/seanjameshan/starknet.js/commit/ea6ae40225d33e293b9d2de7c8509e87fb7a651e))
|
|
6
|
+
- add BigInt support within BigNumberish ([e42427a](https://github.com/seanjameshan/starknet.js/commit/e42427afa9a57673576da68cfbbee1356ffb5c0d))
|
|
7
|
+
- using typeguard to narrow variable's type in Account's constructor ([ed048f3](https://github.com/seanjameshan/starknet.js/commit/ed048f355bee815cc9b2ccc984db900059fa2303))
|
|
8
|
+
|
|
1
9
|
# [3.6.0](https://github.com/seanjameshan/starknet.js/compare/v3.5.1...v3.6.0) (2022-03-24)
|
|
2
10
|
|
|
3
11
|
### Bug Fixes
|
package/account/default.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Provider } from '../provider';
|
|
2
|
+
import { SignerInterface } from '../signer';
|
|
2
3
|
import {
|
|
3
4
|
Abi,
|
|
4
5
|
AddTransactionResponse,
|
|
@@ -15,7 +16,7 @@ import { AccountInterface } from './interface';
|
|
|
15
16
|
export declare class Account extends Provider implements AccountInterface {
|
|
16
17
|
address: string;
|
|
17
18
|
private signer;
|
|
18
|
-
constructor(provider: Provider, address: string,
|
|
19
|
+
constructor(provider: Provider, address: string, keyPairOrSigner: KeyPair | SignerInterface);
|
|
19
20
|
getNonce(): Promise<string>;
|
|
20
21
|
estimateFee(calls: Call | Call[]): Promise<EstimateFeeResponse>;
|
|
21
22
|
/**
|
package/account/default.js
CHANGED
|
@@ -207,9 +207,10 @@ var transaction_1 = require('../utils/transaction');
|
|
|
207
207
|
var typedData_1 = require('../utils/typedData');
|
|
208
208
|
var Account = /** @class */ (function (_super) {
|
|
209
209
|
__extends(Account, _super);
|
|
210
|
-
function Account(provider, address,
|
|
210
|
+
function Account(provider, address, keyPairOrSigner) {
|
|
211
211
|
var _this = _super.call(this, provider) || this;
|
|
212
|
-
_this.signer =
|
|
212
|
+
_this.signer =
|
|
213
|
+
'getPubKey' in keyPairOrSigner ? keyPairOrSigner : new signer_1.Signer(keyPairOrSigner);
|
|
213
214
|
_this.address = address;
|
|
214
215
|
return _this;
|
|
215
216
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Provider } from '../provider';
|
|
2
|
+
import { SignerInterface } from '../signer';
|
|
2
3
|
import { Abi, AddTransactionResponse, Call, EstimateFeeResponse, InvocationsDetails, KeyPair, Signature, Transaction } from '../types';
|
|
3
4
|
import { BigNumberish } from '../utils/number';
|
|
4
5
|
import { TypedData } from '../utils/typedData';
|
|
@@ -6,7 +7,7 @@ import { AccountInterface } from './interface';
|
|
|
6
7
|
export declare class Account extends Provider implements AccountInterface {
|
|
7
8
|
address: string;
|
|
8
9
|
private signer;
|
|
9
|
-
constructor(provider: Provider, address: string,
|
|
10
|
+
constructor(provider: Provider, address: string, keyPairOrSigner: KeyPair | SignerInterface);
|
|
10
11
|
getNonce(): Promise<string>;
|
|
11
12
|
estimateFee(calls: Call | Call[]): Promise<EstimateFeeResponse>;
|
|
12
13
|
/**
|
package/dist/account/default.js
CHANGED
|
@@ -91,9 +91,10 @@ var transaction_1 = require("../utils/transaction");
|
|
|
91
91
|
var typedData_1 = require("../utils/typedData");
|
|
92
92
|
var Account = /** @class */ (function (_super) {
|
|
93
93
|
__extends(Account, _super);
|
|
94
|
-
function Account(provider, address,
|
|
94
|
+
function Account(provider, address, keyPairOrSigner) {
|
|
95
95
|
var _this = _super.call(this, provider) || this;
|
|
96
|
-
_this.signer =
|
|
96
|
+
_this.signer =
|
|
97
|
+
'getPubKey' in keyPairOrSigner ? keyPairOrSigner : new signer_1.Signer(keyPairOrSigner);
|
|
97
98
|
_this.address = address;
|
|
98
99
|
return _this;
|
|
99
100
|
}
|
package/package.json
CHANGED
package/src/account/default.ts
CHANGED
|
@@ -31,9 +31,10 @@ export class Account extends Provider implements AccountInterface {
|
|
|
31
31
|
|
|
32
32
|
private signer: SignerInterface;
|
|
33
33
|
|
|
34
|
-
constructor(provider: Provider, address: string,
|
|
34
|
+
constructor(provider: Provider, address: string, keyPairOrSigner: KeyPair | SignerInterface) {
|
|
35
35
|
super(provider);
|
|
36
|
-
this.signer =
|
|
36
|
+
this.signer =
|
|
37
|
+
'getPubKey' in keyPairOrSigner ? keyPairOrSigner : new Signer(keyPairOrSigner as KeyPair);
|
|
37
38
|
this.address = address;
|
|
38
39
|
}
|
|
39
40
|
|