@massalabs/wallet-provider 1.4.2-dev.20230929102811 → 1.4.2-dev.20230929132145

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.
@@ -1,20 +1,25 @@
1
1
  /**
2
- * This interface represents the request object for the signing operation sent to the content script.
2
+ * Represents the payload for a signing operation request sent to the content script.
3
+ * address - Account's unique address.
4
+ * data - Data to be signed, as a Uint8Array.
3
5
  */
4
6
  export interface IAccountSignRequest {
5
7
  address: string;
6
8
  data: Uint8Array;
7
9
  }
8
10
  /**
9
- * This interface represents the response object containing the signed message data, which is sent by the content script
10
- * after the signing operation.
11
+ * Represents response from the content script after a signing operation.
12
+ * publicKey - Public key of the account.
13
+ * signature - Signed message data.
11
14
  */
12
15
  export interface IAccountSignResponse {
13
16
  publicKey: string;
14
17
  signature: string;
15
18
  }
16
19
  /**
17
- * This interface represents the output of a sign() method
20
+ * Represents the output produced by the sign() method.
21
+ * publicKey - Public key of the account.
22
+ * base58Encoded - Base58 encoded representation of the signed data.
18
23
  */
19
24
  export interface IAccountSignOutput {
20
25
  publicKey: string;
@@ -1 +1 @@
1
- {"version":3,"file":"AccountSign.d.ts","sourceRoot":"","sources":["../../../src/account/AccountSign.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB"}
1
+ {"version":3,"file":"AccountSign.d.ts","sourceRoot":"","sources":["../../../src/account/AccountSign.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"AccountSign.js","sourceRoot":"","sources":["../../../src/account/AccountSign.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * This interface represents the request object for the signing operation sent to the content script.\n */\nexport interface IAccountSignRequest {\n address: string;\n data: Uint8Array;\n}\n\n/**\n * This interface represents the response object containing the signed message data, which is sent by the content script\n * after the signing operation.\n */\nexport interface IAccountSignResponse {\n publicKey: string;\n signature: string;\n}\n\n/**\n * This interface represents the output of a sign() method\n */\nexport interface IAccountSignOutput {\n publicKey: string;\n base58Encoded: string;\n}\n"]}
1
+ {"version":3,"file":"AccountSign.js","sourceRoot":"","sources":["../../../src/account/AccountSign.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents the payload for a signing operation request sent to the content script.\n * address - Account's unique address.\n * data - Data to be signed, as a Uint8Array.\n */\nexport interface IAccountSignRequest {\n address: string;\n data: Uint8Array;\n}\n\n/**\n * Represents response from the content script after a signing operation.\n * publicKey - Public key of the account.\n * signature - Signed message data.\n */\nexport interface IAccountSignResponse {\n publicKey: string;\n signature: string;\n}\n\n/**\n * Represents the output produced by the sign() method.\n * publicKey - Public key of the account.\n * base58Encoded - Base58 encoded representation of the signed data.\n */\nexport interface IAccountSignOutput {\n publicKey: string;\n base58Encoded: string;\n}\n"]}
@@ -2,20 +2,78 @@
2
2
  import { ITransactionDetails } from '..';
3
3
  import { IAccountBalanceResponse } from './AccountBalance';
4
4
  import { IAccountSignOutput } from './AccountSign';
5
- import { Args } from '@massalabs/web3-utils';
5
+ import { Args, IContractReadOperationResponse } from '@massalabs/web3-utils';
6
6
  /**
7
- * This interface represents an Account object.
8
- *
7
+ * `IAccount` outlines the structure expected for an account.
9
8
  */
10
9
  export interface IAccount {
10
+ /**
11
+ * Retrieves the account's address.
12
+ *
13
+ * @returns Account address as a string.
14
+ */
11
15
  address(): string;
16
+ /**
17
+ * Retrieves the account's name.
18
+ *
19
+ * @returns Account name as a string.
20
+ */
12
21
  name(): string;
22
+ /**
23
+ * Retrieves the name of the provider associated with the account.
24
+ *
25
+ * @returns Provider name as a string.
26
+ */
13
27
  providerName(): string;
28
+ /**
29
+ * Initiates a request to retrieve the account's balance.
30
+ *
31
+ * @returns Promise resolving to an `IAccountBalanceResponse`.
32
+ */
14
33
  balance(): Promise<IAccountBalanceResponse>;
34
+ /**
35
+ * Signs data.
36
+ *
37
+ * @param data - Data to be signed, can be of type Buffer, Uint8Array, or string.
38
+ * @returns Promise resolving to an `IAccountSignOutput`.
39
+ */
15
40
  sign(data: Buffer | Uint8Array | string): Promise<IAccountSignOutput>;
41
+ /**
42
+ * Purchases rolls.
43
+ *
44
+ * @param amount - Amount of rolls to purchase.
45
+ * @param fee - Transaction fee.
46
+ * @returns A promise resolving to an `ITransactionDetails` object.
47
+ */
16
48
  buyRolls(amount: bigint, fee: bigint): Promise<ITransactionDetails>;
49
+ /**
50
+ * Sells rolls.
51
+ *
52
+ * @param amount - Amount of rolls to sell.
53
+ * @param fee - Transaction fee.
54
+ * @returns A promise resolving to an `ITransactionDetails` object.
55
+ */
17
56
  sellRolls(amount: bigint, fee: bigint): Promise<ITransactionDetails>;
57
+ /**
58
+ * Sends a transaction.
59
+ *
60
+ * @param amount - Amount to send.
61
+ * @param recipientAddress - Address of the recipient.
62
+ * @param fee - Transaction fee.
63
+ * @returns A promise resolving to an `ITransactionDetails` object.
64
+ */
18
65
  sendTransaction(amount: bigint, recipientAddress: string, fee: bigint): Promise<ITransactionDetails>;
19
- callSC(contractAddress: string, functionName: string, parameter: Uint8Array | Args, amount: bigint, fee: bigint, maxGas: bigint, nonPersistentExecution?: boolean): any;
66
+ /**
67
+ * Calls a smart contract.
68
+ *
69
+ * @param contractAddress - Address of the smart contract.
70
+ * @param functionName - Name of the function to call.
71
+ * @param parameter - Parameters to pass to the function.
72
+ * @param amount - Amount of funds to send with the call.
73
+ * @param fee - Fee for the transaction.
74
+ * @param maxGas - Maximum gas to use for the transaction.
75
+ * @param nonPersistentExecution - Optional flag for non-persistent execution.
76
+ */
77
+ callSC(contractAddress: string, functionName: string, parameter: Uint8Array | Args, amount: bigint, fee: bigint, maxGas: bigint, nonPersistentExecution?: boolean): Promise<ITransactionDetails | IContractReadOperationResponse>;
20
78
  }
21
79
  //# sourceMappingURL=IAccount.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IAccount.d.ts","sourceRoot":"","sources":["../../../src/account/IAccount.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,IAAI,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,OAAO,IAAI,MAAM,CAAC;IAClB,IAAI,IAAI,MAAM,CAAC;IACf,YAAY,IAAI,MAAM,CAAC;IACvB,OAAO,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC5C,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACtE,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACpE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACrE,eAAe,CAC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e,CACb,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,EACxB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEhC;;;;;;;;;;OAUG;IACH,MAAM,CACJ,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,UAAU,GAAG,IAAI,EAC5B,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,sBAAsB,CAAC,EAAE,OAAO,GAC/B,OAAO,CAAC,mBAAmB,GAAG,8BAA8B,CAAC,CAAC;CAClE"}
@@ -1 +1 @@
1
- {"version":3,"file":"IAccount.js","sourceRoot":"","sources":["../../../src/account/IAccount.ts"],"names":[],"mappings":"","sourcesContent":["import { ITransactionDetails } from '..';\nimport { IAccountBalanceResponse } from './AccountBalance';\nimport { IAccountSignOutput } from './AccountSign';\nimport { Args } from '@massalabs/web3-utils';\n\n/**\n * This interface represents an Account object.\n *\n */\nexport interface IAccount {\n address(): string;\n name(): string;\n providerName(): string;\n balance(): Promise<IAccountBalanceResponse>;\n sign(data: Buffer | Uint8Array | string): Promise<IAccountSignOutput>;\n buyRolls(amount: bigint, fee: bigint): Promise<ITransactionDetails>;\n sellRolls(amount: bigint, fee: bigint): Promise<ITransactionDetails>;\n sendTransaction(\n amount: bigint,\n recipientAddress: string,\n fee: bigint,\n ): Promise<ITransactionDetails>;\n callSC(\n contractAddress: string,\n functionName: string,\n parameter: Uint8Array | Args,\n amount: bigint,\n fee: bigint,\n maxGas: bigint,\n nonPersistentExecution?: boolean,\n );\n}\n"]}
1
+ {"version":3,"file":"IAccount.js","sourceRoot":"","sources":["../../../src/account/IAccount.ts"],"names":[],"mappings":"","sourcesContent":["import { ITransactionDetails } from '..';\nimport { IAccountBalanceResponse } from './AccountBalance';\nimport { IAccountSignOutput } from './AccountSign';\nimport { Args, IContractReadOperationResponse } from '@massalabs/web3-utils';\n\n/**\n * `IAccount` outlines the structure expected for an account.\n */\nexport interface IAccount {\n /**\n * Retrieves the account's address.\n *\n * @returns Account address as a string.\n */\n address(): string;\n\n /**\n * Retrieves the account's name.\n *\n * @returns Account name as a string.\n */\n name(): string;\n\n /**\n * Retrieves the name of the provider associated with the account.\n *\n * @returns Provider name as a string.\n */\n providerName(): string;\n\n /**\n * Initiates a request to retrieve the account's balance.\n *\n * @returns Promise resolving to an `IAccountBalanceResponse`.\n */\n balance(): Promise<IAccountBalanceResponse>;\n\n /**\n * Signs data.\n *\n * @param data - Data to be signed, can be of type Buffer, Uint8Array, or string.\n * @returns Promise resolving to an `IAccountSignOutput`.\n */\n sign(data: Buffer | Uint8Array | string): Promise<IAccountSignOutput>;\n\n /**\n * Purchases rolls.\n *\n * @param amount - Amount of rolls to purchase.\n * @param fee - Transaction fee.\n * @returns A promise resolving to an `ITransactionDetails` object.\n */\n buyRolls(amount: bigint, fee: bigint): Promise<ITransactionDetails>;\n\n /**\n * Sells rolls.\n *\n * @param amount - Amount of rolls to sell.\n * @param fee - Transaction fee.\n * @returns A promise resolving to an `ITransactionDetails` object.\n */\n sellRolls(amount: bigint, fee: bigint): Promise<ITransactionDetails>;\n\n /**\n * Sends a transaction.\n *\n * @param amount - Amount to send.\n * @param recipientAddress - Address of the recipient.\n * @param fee - Transaction fee.\n * @returns A promise resolving to an `ITransactionDetails` object.\n */\n sendTransaction(\n amount: bigint,\n recipientAddress: string,\n fee: bigint,\n ): Promise<ITransactionDetails>;\n\n /**\n * Calls a smart contract.\n *\n * @param contractAddress - Address of the smart contract.\n * @param functionName - Name of the function to call.\n * @param parameter - Parameters to pass to the function.\n * @param amount - Amount of funds to send with the call.\n * @param fee - Fee for the transaction.\n * @param maxGas - Maximum gas to use for the transaction.\n * @param nonPersistentExecution - Optional flag for non-persistent execution.\n */\n callSC(\n contractAddress: string,\n functionName: string,\n parameter: Uint8Array | Args,\n amount: bigint,\n fee: bigint,\n maxGas: bigint,\n nonPersistentExecution?: boolean,\n ): Promise<ITransactionDetails | IContractReadOperationResponse>;\n}\n"]}
@@ -1,20 +1,25 @@
1
1
  /**
2
- * This interface represents the request object for the signing operation sent to the content script.
2
+ * Represents the payload for a signing operation request sent to the content script.
3
+ * address - Account's unique address.
4
+ * data - Data to be signed, as a Uint8Array.
3
5
  */
4
6
  export interface IAccountSignRequest {
5
7
  address: string;
6
8
  data: Uint8Array;
7
9
  }
8
10
  /**
9
- * This interface represents the response object containing the signed message data, which is sent by the content script
10
- * after the signing operation.
11
+ * Represents response from the content script after a signing operation.
12
+ * publicKey - Public key of the account.
13
+ * signature - Signed message data.
11
14
  */
12
15
  export interface IAccountSignResponse {
13
16
  publicKey: string;
14
17
  signature: string;
15
18
  }
16
19
  /**
17
- * This interface represents the output of a sign() method
20
+ * Represents the output produced by the sign() method.
21
+ * publicKey - Public key of the account.
22
+ * base58Encoded - Base58 encoded representation of the signed data.
18
23
  */
19
24
  export interface IAccountSignOutput {
20
25
  publicKey: string;
@@ -1 +1 @@
1
- {"version":3,"file":"AccountSign.d.ts","sourceRoot":"","sources":["../../../src/account/AccountSign.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB"}
1
+ {"version":3,"file":"AccountSign.d.ts","sourceRoot":"","sources":["../../../src/account/AccountSign.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"AccountSign.js","sourceRoot":"","sources":["../../../src/account/AccountSign.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * This interface represents the request object for the signing operation sent to the content script.\n */\nexport interface IAccountSignRequest {\n address: string;\n data: Uint8Array;\n}\n\n/**\n * This interface represents the response object containing the signed message data, which is sent by the content script\n * after the signing operation.\n */\nexport interface IAccountSignResponse {\n publicKey: string;\n signature: string;\n}\n\n/**\n * This interface represents the output of a sign() method\n */\nexport interface IAccountSignOutput {\n publicKey: string;\n base58Encoded: string;\n}\n"]}
1
+ {"version":3,"file":"AccountSign.js","sourceRoot":"","sources":["../../../src/account/AccountSign.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents the payload for a signing operation request sent to the content script.\n * address - Account's unique address.\n * data - Data to be signed, as a Uint8Array.\n */\nexport interface IAccountSignRequest {\n address: string;\n data: Uint8Array;\n}\n\n/**\n * Represents response from the content script after a signing operation.\n * publicKey - Public key of the account.\n * signature - Signed message data.\n */\nexport interface IAccountSignResponse {\n publicKey: string;\n signature: string;\n}\n\n/**\n * Represents the output produced by the sign() method.\n * publicKey - Public key of the account.\n * base58Encoded - Base58 encoded representation of the signed data.\n */\nexport interface IAccountSignOutput {\n publicKey: string;\n base58Encoded: string;\n}\n"]}
@@ -2,20 +2,78 @@
2
2
  import { ITransactionDetails } from '..';
3
3
  import { IAccountBalanceResponse } from './AccountBalance';
4
4
  import { IAccountSignOutput } from './AccountSign';
5
- import { Args } from '@massalabs/web3-utils';
5
+ import { Args, IContractReadOperationResponse } from '@massalabs/web3-utils';
6
6
  /**
7
- * This interface represents an Account object.
8
- *
7
+ * `IAccount` outlines the structure expected for an account.
9
8
  */
10
9
  export interface IAccount {
10
+ /**
11
+ * Retrieves the account's address.
12
+ *
13
+ * @returns Account address as a string.
14
+ */
11
15
  address(): string;
16
+ /**
17
+ * Retrieves the account's name.
18
+ *
19
+ * @returns Account name as a string.
20
+ */
12
21
  name(): string;
22
+ /**
23
+ * Retrieves the name of the provider associated with the account.
24
+ *
25
+ * @returns Provider name as a string.
26
+ */
13
27
  providerName(): string;
28
+ /**
29
+ * Initiates a request to retrieve the account's balance.
30
+ *
31
+ * @returns Promise resolving to an `IAccountBalanceResponse`.
32
+ */
14
33
  balance(): Promise<IAccountBalanceResponse>;
34
+ /**
35
+ * Signs data.
36
+ *
37
+ * @param data - Data to be signed, can be of type Buffer, Uint8Array, or string.
38
+ * @returns Promise resolving to an `IAccountSignOutput`.
39
+ */
15
40
  sign(data: Buffer | Uint8Array | string): Promise<IAccountSignOutput>;
41
+ /**
42
+ * Purchases rolls.
43
+ *
44
+ * @param amount - Amount of rolls to purchase.
45
+ * @param fee - Transaction fee.
46
+ * @returns A promise resolving to an `ITransactionDetails` object.
47
+ */
16
48
  buyRolls(amount: bigint, fee: bigint): Promise<ITransactionDetails>;
49
+ /**
50
+ * Sells rolls.
51
+ *
52
+ * @param amount - Amount of rolls to sell.
53
+ * @param fee - Transaction fee.
54
+ * @returns A promise resolving to an `ITransactionDetails` object.
55
+ */
17
56
  sellRolls(amount: bigint, fee: bigint): Promise<ITransactionDetails>;
57
+ /**
58
+ * Sends a transaction.
59
+ *
60
+ * @param amount - Amount to send.
61
+ * @param recipientAddress - Address of the recipient.
62
+ * @param fee - Transaction fee.
63
+ * @returns A promise resolving to an `ITransactionDetails` object.
64
+ */
18
65
  sendTransaction(amount: bigint, recipientAddress: string, fee: bigint): Promise<ITransactionDetails>;
19
- callSC(contractAddress: string, functionName: string, parameter: Uint8Array | Args, amount: bigint, fee: bigint, maxGas: bigint, nonPersistentExecution?: boolean): any;
66
+ /**
67
+ * Calls a smart contract.
68
+ *
69
+ * @param contractAddress - Address of the smart contract.
70
+ * @param functionName - Name of the function to call.
71
+ * @param parameter - Parameters to pass to the function.
72
+ * @param amount - Amount of funds to send with the call.
73
+ * @param fee - Fee for the transaction.
74
+ * @param maxGas - Maximum gas to use for the transaction.
75
+ * @param nonPersistentExecution - Optional flag for non-persistent execution.
76
+ */
77
+ callSC(contractAddress: string, functionName: string, parameter: Uint8Array | Args, amount: bigint, fee: bigint, maxGas: bigint, nonPersistentExecution?: boolean): Promise<ITransactionDetails | IContractReadOperationResponse>;
20
78
  }
21
79
  //# sourceMappingURL=IAccount.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IAccount.d.ts","sourceRoot":"","sources":["../../../src/account/IAccount.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,IAAI,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,OAAO,IAAI,MAAM,CAAC;IAClB,IAAI,IAAI,MAAM,CAAC;IACf,YAAY,IAAI,MAAM,CAAC;IACvB,OAAO,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC5C,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACtE,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACpE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACrE,eAAe,CACb,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,EACxB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,mBAAmB,CAAC,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AAC,CAAC;IAEhC;;;;;;;;;;OAUG;IACH,MAAM,CACJ,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,UAAU,GAAG,IAAI,EAC5B,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,sBAAsB,CAAC,EAAE,OAAO,GAC/B,OAAO,CAAC,mBAAmB,GAAG,8BAA8B,CAAC,CAAC;CAClE"}
@@ -1 +1 @@
1
- {"version":3,"file":"IAccount.js","sourceRoot":"","sources":["../../../src/account/IAccount.ts"],"names":[],"mappings":"","sourcesContent":["import { ITransactionDetails } from '..';\nimport { IAccountBalanceResponse } from './AccountBalance';\nimport { IAccountSignOutput } from './AccountSign';\nimport { Args } from '@massalabs/web3-utils';\n\n/**\n * This interface represents an Account object.\n *\n */\nexport interface IAccount {\n address(): string;\n name(): string;\n providerName(): string;\n balance(): Promise<IAccountBalanceResponse>;\n sign(data: Buffer | Uint8Array | string): Promise<IAccountSignOutput>;\n buyRolls(amount: bigint, fee: bigint): Promise<ITransactionDetails>;\n sellRolls(amount: bigint, fee: bigint): Promise<ITransactionDetails>;\n sendTransaction(\n amount: bigint,\n recipientAddress: string,\n fee: bigint,\n ): Promise<ITransactionDetails>;\n callSC(\n contractAddress: string,\n functionName: string,\n parameter: Uint8Array | Args,\n amount: bigint,\n fee: bigint,\n maxGas: bigint,\n nonPersistentExecution?: boolean,\n );\n}\n"]}
1
+ {"version":3,"file":"IAccount.js","sourceRoot":"","sources":["../../../src/account/IAccount.ts"],"names":[],"mappings":"","sourcesContent":["import { ITransactionDetails } from '..';\nimport { IAccountBalanceResponse } from './AccountBalance';\nimport { IAccountSignOutput } from './AccountSign';\nimport { Args, IContractReadOperationResponse } from '@massalabs/web3-utils';\n\n/**\n * `IAccount` outlines the structure expected for an account.\n */\nexport interface IAccount {\n /**\n * Retrieves the account's address.\n *\n * @returns Account address as a string.\n */\n address(): string;\n\n /**\n * Retrieves the account's name.\n *\n * @returns Account name as a string.\n */\n name(): string;\n\n /**\n * Retrieves the name of the provider associated with the account.\n *\n * @returns Provider name as a string.\n */\n providerName(): string;\n\n /**\n * Initiates a request to retrieve the account's balance.\n *\n * @returns Promise resolving to an `IAccountBalanceResponse`.\n */\n balance(): Promise<IAccountBalanceResponse>;\n\n /**\n * Signs data.\n *\n * @param data - Data to be signed, can be of type Buffer, Uint8Array, or string.\n * @returns Promise resolving to an `IAccountSignOutput`.\n */\n sign(data: Buffer | Uint8Array | string): Promise<IAccountSignOutput>;\n\n /**\n * Purchases rolls.\n *\n * @param amount - Amount of rolls to purchase.\n * @param fee - Transaction fee.\n * @returns A promise resolving to an `ITransactionDetails` object.\n */\n buyRolls(amount: bigint, fee: bigint): Promise<ITransactionDetails>;\n\n /**\n * Sells rolls.\n *\n * @param amount - Amount of rolls to sell.\n * @param fee - Transaction fee.\n * @returns A promise resolving to an `ITransactionDetails` object.\n */\n sellRolls(amount: bigint, fee: bigint): Promise<ITransactionDetails>;\n\n /**\n * Sends a transaction.\n *\n * @param amount - Amount to send.\n * @param recipientAddress - Address of the recipient.\n * @param fee - Transaction fee.\n * @returns A promise resolving to an `ITransactionDetails` object.\n */\n sendTransaction(\n amount: bigint,\n recipientAddress: string,\n fee: bigint,\n ): Promise<ITransactionDetails>;\n\n /**\n * Calls a smart contract.\n *\n * @param contractAddress - Address of the smart contract.\n * @param functionName - Name of the function to call.\n * @param parameter - Parameters to pass to the function.\n * @param amount - Amount of funds to send with the call.\n * @param fee - Fee for the transaction.\n * @param maxGas - Maximum gas to use for the transaction.\n * @param nonPersistentExecution - Optional flag for non-persistent execution.\n */\n callSC(\n contractAddress: string,\n functionName: string,\n parameter: Uint8Array | Args,\n amount: bigint,\n fee: bigint,\n maxGas: bigint,\n nonPersistentExecution?: boolean,\n ): Promise<ITransactionDetails | IContractReadOperationResponse>;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massalabs/wallet-provider",
3
- "version": "1.4.2-dev.20230929102811",
3
+ "version": "1.4.2-dev.20230929132145",
4
4
  "description": "massa's wallet provider",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",