Skip to content

Commit a137e8b

Browse files
author
Fabrice Bascoulergue
committed
Merge branch 'develop'
* develop: 0.4.0 Follow cosmjs upstream and improve implementation and related unittests Add clean support for multiple transaction signatures (#11) Added basic beam test Fixed codec compilation Removed not relevant test Fixed typo Added editor config (webstorm) Added beam messages, fixed duplicate interface usage Use builtin codecs Added beam proto generation 0.3.5 Add support for ulum base denom 0.3.4 Update auto generated docs Move types declaration dependencies in production from dev dependencies CI/CD pipes improvement, added contributing file
2 parents 485f28c + a1e632b commit a137e8b

36 files changed

+553
-624
lines changed

CONTRIBUTING.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Contributing
22

33
When contributing to this repository, please first discuss the change you wish to make via issue,
4-
email, or any other method with the owners of this repository before making a change.
4+
email, or any other method with the owners of this repository before making a change.
55

66
Please note we have a code of conduct, please follow it in all your interactions with the project.
77

@@ -10,7 +10,7 @@ Please note we have a code of conduct, please follow it in all your interactions
1010
1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
1111
2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
1212
3. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
13-
4. You may merge the Pull Request in once you have the approval of one core team member, or if you do not have permission to do that, you may request a reviewer to merge it for you.
13+
4. You may merge the Pull Request in once you have the approval of one core team member, or if you do not have permission to do that, you may request a reviewer to merge it for you.
1414

1515
## Code of Conduct
1616

@@ -25,19 +25,19 @@ nationality, personal appearance, race, religion, or sexual identity and orienta
2525
Examples of behavior that contributes to creating a positive environment
2626
include:
2727

28-
* Using welcoming language
29-
* Being respectful of differing viewpoints and experiences
30-
* Gracefully accepting constructive criticism
31-
* Focusing on what is best for the community
32-
* Showing empathy towards other community members
28+
- Using welcoming language
29+
- Being respectful of differing viewpoints and experiences
30+
- Gracefully accepting constructive criticism
31+
- Focusing on what is best for the community
32+
- Showing empathy towards other community members
3333

3434
Examples of unacceptable behavior by participants include:
3535

36-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
37-
* Trolling, insulting/derogatory comments, and personal or political attacks
38-
* Public or private harassment
39-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
40-
* Other conduct which could reasonably be considered inappropriate in a professional setting
36+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
37+
- Trolling, insulting/derogatory comments, and personal or political attacks
38+
- Public or private harassment
39+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
40+
- Other conduct which could reasonably be considered inappropriate in a professional setting
4141

4242
### Our Responsibilities
4343

@@ -50,14 +50,14 @@ threatening, offensive, or harmful.
5050

5151
### Scope
5252

53-
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
53+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
5454
Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed
55-
representative at an online or offline event.
55+
representative at an online or offline event.
5656
Representation of a project may be further defined and clarified by project maintainers.
5757

5858
### Enforcement
5959

60-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact [ at ] lum.network.
60+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact [ at ] lum.network.
6161
All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
6262
The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
6363
Further details of specific enforcement policies may be posted separately.
@@ -70,4 +70,4 @@ members of the project's leadership.
7070
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
7171

7272
[homepage]: http://contributor-covenant.org
73-
[version]: http://contributor-covenant.org/version/1/4/
73+
[version]: http://contributor-covenant.org/version/1/4/

docs/README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,15 @@ const fee = {
158158
const account = await testnetClient.getAccount(wallet.getAddress());
159159
// Create the transaction document
160160
const doc = {
161-
accountNumber: account.accountNumber,
162161
chainId,
163162
fee: fee,
164163
memo: 'my transaction memo',
165164
messages: [sendMsg],
166-
sequence: account.sequence,
165+
signers: [{
166+
accountNumber: account.accountNumber,
167+
sequence: account.sequence,
168+
publicKey: wallet.getPublicKey(),
169+
}],
167170
};
168171
// Sign and broadcast the transaction using the client
169172
const broadcastResult = await clt.signAndBroadcastTx(w1, doc);

docs/lib/classes/lumclient.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -285,15 +285,15 @@ ___
285285

286286
### signAndBroadcastTx
287287

288-
**signAndBroadcastTx**(`wallet`: [*LumWallet*](lumwallet.md), `doc`: [*Doc*](../interfaces/lumtypes.doc.md)): *Promise*<BroadcastTxCommitResponse\>
288+
**signAndBroadcastTx**(`wallet`: [*LumWallet*](lumwallet.md) \| [*LumWallet*](lumwallet.md)[], `doc`: [*Doc*](../interfaces/lumtypes.doc.md)): *Promise*<BroadcastTxCommitResponse\>
289289

290290
Signs and broadcast the transaction using the specified wallet and messages
291291

292292
#### Parameters:
293293

294294
Name | Type | Description |
295295
:------ | :------ | :------ |
296-
`wallet` | [*LumWallet*](lumwallet.md) | signing wallet |
296+
`wallet` | [*LumWallet*](lumwallet.md) \| [*LumWallet*](lumwallet.md)[] | signing wallet or wallets for multi signature |
297297
`doc` | [*Doc*](../interfaces/lumtypes.doc.md) | document to sign and broadcast as a transaction |
298298

299299
**Returns:** *Promise*<BroadcastTxCommitResponse\>
@@ -302,15 +302,15 @@ ___
302302

303303
### signTx
304304

305-
**signTx**(`wallet`: [*LumWallet*](lumwallet.md), `doc`: [*Doc*](../interfaces/lumtypes.doc.md)): *Promise*<Uint8Array\>
305+
**signTx**(`wallet`: [*LumWallet*](lumwallet.md) \| [*LumWallet*](lumwallet.md)[], `doc`: [*Doc*](../interfaces/lumtypes.doc.md)): *Promise*<Uint8Array\>
306306

307307
Signs the messages using the provided wallet and builds the transaction
308308

309309
#### Parameters:
310310

311311
Name | Type | Description |
312312
:------ | :------ | :------ |
313-
`wallet` | [*LumWallet*](lumwallet.md) | signing wallet |
313+
`wallet` | [*LumWallet*](lumwallet.md) \| [*LumWallet*](lumwallet.md)[] | signing wallet or wallets for multi signature |
314314
`doc` | [*Doc*](../interfaces/lumtypes.doc.md) | document to sign |
315315

316316
**Returns:** *Promise*<Uint8Array\>
@@ -329,7 +329,7 @@ ___
329329

330330
### txsQuery
331331

332-
`Private`**txsQuery**(`params`: TxSearchParams): *Promise*<TxResponse[]\>
332+
`Private`**txsQuery**(`params`: TxSearchParams): *Promise*<readonly TxResponse[]\>
333333

334334
Run a tx search
335335

@@ -339,7 +339,7 @@ Name | Type | Description |
339339
:------ | :------ | :------ |
340340
`params` | TxSearchParams | Search params |
341341

342-
**Returns:** *Promise*<TxResponse[]\>
342+
**Returns:** *Promise*<readonly TxResponse[]\>
343343

344344
___
345345

docs/lib/classes/lumledgerwallet.md

+11
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
- [getAddress](lumledgerwallet.md#getaddress)
2626
- [getAppConfiguration](lumledgerwallet.md#getappconfiguration)
2727
- [getPublicKey](lumledgerwallet.md#getpublickey)
28+
- [sign](lumledgerwallet.md#sign)
2829
- [signMessage](lumledgerwallet.md#signmessage)
2930
- [signTransaction](lumledgerwallet.md#signtransaction)
3031
- [signingMode](lumledgerwallet.md#signingmode)
@@ -128,6 +129,16 @@ Inherited from: [LumWallet](lumwallet.md)
128129

129130
___
130131

132+
### sign
133+
134+
**sign**(): *Promise*<Uint8Array\>
135+
136+
**Returns:** *Promise*<Uint8Array\>
137+
138+
Inherited from: [LumWallet](lumwallet.md)
139+
140+
___
141+
131142
### signMessage
132143

133144
**signMessage**(`msg`: *string*): *Promise*<[*SignMsg*](../interfaces/lumtypes.signmsg.md)\>

docs/lib/classes/lumpaperwallet.md

+17
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
- [canChangeAccount](lumpaperwallet.md#canchangeaccount)
2525
- [getAddress](lumpaperwallet.md#getaddress)
2626
- [getPublicKey](lumpaperwallet.md#getpublickey)
27+
- [sign](lumpaperwallet.md#sign)
2728
- [signMessage](lumpaperwallet.md#signmessage)
2829
- [signTransaction](lumpaperwallet.md#signtransaction)
2930
- [signingMode](lumpaperwallet.md#signingmode)
@@ -121,6 +122,22 @@ Inherited from: [LumWallet](lumwallet.md)
121122

122123
___
123124

125+
### sign
126+
127+
**sign**(`data`: *Uint8Array*): *Promise*<Uint8Array\>
128+
129+
#### Parameters:
130+
131+
Name | Type |
132+
:------ | :------ |
133+
`data` | *Uint8Array* |
134+
135+
**Returns:** *Promise*<Uint8Array\>
136+
137+
Inherited from: [LumWallet](lumwallet.md)
138+
139+
___
140+
124141
### signMessage
125142

126143
**signMessage**(`msg`: *string*): *Promise*<[*SignMsg*](../interfaces/lumtypes.signmsg.md)\>

docs/lib/classes/lumwallet.md

+18
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
- [canChangeAccount](lumwallet.md#canchangeaccount)
2525
- [getAddress](lumwallet.md#getaddress)
2626
- [getPublicKey](lumwallet.md#getpublickey)
27+
- [sign](lumwallet.md#sign)
2728
- [signMessage](lumwallet.md#signmessage)
2829
- [signTransaction](lumwallet.md#signtransaction)
2930
- [signingMode](lumwallet.md#signingmode)
@@ -92,6 +93,23 @@ wallet public key (secp256k1)
9293

9394
___
9495

96+
### sign
97+
98+
`Abstract`**sign**(`data`: *Uint8Array*): *Promise*<Uint8Array\>
99+
100+
Sign a raw payload.
101+
This method might not be available for all types of wallets such as Ledger.
102+
103+
#### Parameters:
104+
105+
Name | Type | Description |
106+
:------ | :------ | :------ |
107+
`data` | *Uint8Array* | the payload to sign directly |
108+
109+
**Returns:** *Promise*<Uint8Array\>
110+
111+
___
112+
95113
### signMessage
96114

97115
`Abstract`**signMessage**(`msg`: *string*): *Promise*<[*SignMsg*](../interfaces/lumtypes.signmsg.md)\>

docs/lib/interfaces/lummessages.msgbeginredelegate.md

-39
This file was deleted.

docs/lib/interfaces/lummessages.msgcreatevalidator.md

-59
This file was deleted.

docs/lib/interfaces/lummessages.msgdelegate.md

-32
This file was deleted.

0 commit comments

Comments
 (0)