Jaco Greeff
db3cb47d05
Firm up on derive typings & results ( #1489 )
...
* Firm up on derive typings & results
* Move assertion (eslint vs ts, round 1, fight!)
2019-10-16 10:13:13 +02:00
Amaury Martiny
fadb1ffdd8
Make derive types work, and a bit more readable ( #1430 )
...
* Fix typings for derive
* Fix typings
* Spacing
2019-10-01 14:30:53 +02:00
Jaco Greeff
07b89e759c
Some non-functionality readability cleanups ( #1295 )
...
* Some non-functionality readability cleanups
* Small Address cleanups
2019-08-11 21:45:16 +02:00
Jaco Greeff
e5cc6836eb
BlockNumber, Nonce -> u32 ( #1284 )
...
* BlockNumber -> u32
* Interface types extend, not re-use
* Merge master, rebuild
* Merge typo
* Lazy create struct types (extended definitions)
* Cleanup tests for Nonce u32
* Remove polkadot u64 BlockNumber (substrate default)
* Warn on type dup & still clear
* Allow type overrides to work at any point
2019-08-11 15:07:00 +02:00
Jaco Greeff
02cd1331aa
Move Event, Address, AccountId, AccountIndex to generic ( #1202 )
...
* Move Event, Address, AccountId, AccountIndex to generic
* Move AccountId, AccountIndex, Address & Event to generic
* Move Vote
2019-07-26 16:39:28 +02:00
Amaury Martiny
441148889d
CreateType is typed, add createTypeUnsafe just in case ( #1199 )
...
* Use unsafe internally
* Add comments
* Remove <> in createType
* Fix lint
* Fix classOf
* Remove createType from Text
* Fix lint
* Fix Fallback type
* Fix fallback in createType
2019-07-26 14:00:25 +02:00
Jaco Greeff
2a37b8746d
Rename srml to interfaces ( #1198 )
...
* Rename srml to interfaces
* newline, package.json
2019-07-26 12:08:17 +02:00
Jaco Greeff
478f54c703
Convert RPC classes to primitive classes or /srml types ( #1192 )
...
* Convert RPC classes to primitive classes or /srml types
* Lint passes... lokking at tests next.
* Tests pass.
* Types with basic docs (lots of work here)
* Update StorageKey.spec.ts
* Add injector to metadata doc generation
* Fix import
2019-07-26 10:23:37 +02:00
Jaco Greeff
39323a8896
Convert all type/* (and some primitives) to srml/* ( #1189 )
...
* Convert (almost-all) non-primitives (and some primitives) to srml/*
* Move Vote to primitives, remove type folder
* Move Balance :-o
* Fixup tests, override Balance.toRaw()
2019-07-25 16:34:47 +02:00
Jaco Greeff
a25110b281
Move additional classes to definition-only ( #1165 )
...
* Move additional classes to definition-only
* Move some additional quick-hit types
* Last of the easier type/* conversions
* Remove rhd files
* Remove commented line
* Add injector to types loading
* typo
* Update comment
* Merge master
* Rework & organize CHANGELOG
* Some small helper cleanups
2019-07-25 10:32:26 +02:00
Jaco Greeff
3b339a2bae
Remove some as any as Observable from derives ( #1129 )
2019-07-15 15:01:54 +02:00
Jaco Greeff
71c5920b1f
eslint rules ( #1099 )
...
* Off to the races - 3760 problems (1794 errors, 1966 warnings)
* Convert Array<T> -> T[] (not all correct, eg. extends)
* () => { -> (): void => {
* get is/as -> public get is/as
* public for getters, constructors & base Codec
* Some cleanups from previous overzealous search & replace
* Under 2k, 1874 problems (649 errors, 1225 warnings)
* ^^^ check that commit for details ;)
* Minor.
* rm config header
* Minor cleanups
* Default to tslint, eslint as option
* Trigger
* Update jsonrpc
* 1494 problems (433 errors, 1061 warnings)
* 1103 problems (135 errors, 968 warnings)
* 899 problems (9 errors, 890 warnings)
* 483 problems (9 errors, 474 warnings) (ignore any... for now)
* 366 problems (9 errors, 357 warnings)
* 336 problems (9 errors, 327 warnings)
* 148 problems (9 errors, 139 warnings)
* 31 problems (8 errors, 23 warnings)
* 0, 0
2019-07-14 12:15:14 +02:00
Stefanie Doll
1393c8c5cf
Include api.consts in api.derive methods ( #1084 )
...
* Bring back derive changes
* Fix fees tests
* contract fees for v1.0
* Contract fees v1.0 test
* Bring back console.logs
* Uase api.consts instead
* linter fixes
* more linter nits
* Fixed staking & session
* .skip()
* Formatting nits
2019-07-10 16:56:11 +02:00
Jaco Greeff
e7eeeae5d3
Update with latest modules (all indexes are off) ( #1082 )
2019-07-09 06:59:58 +02:00
Jaco Greeff
22bf06e6e0
Remove derive {Struct,Vector}Any (new typing magic) ( #1019 )
...
* Remove derive {Struct,Vector}Any (new typing magic)
* Import ordering
* Small lint fix
2019-06-17 10:41:32 +02:00
Hyungsuk Kang
0d12b082b6
Update fees.ts ( #1014 )
2019-06-14 17:14:15 +02:00
Amaury Martiny
63846ac367
Remove onCall, use decorateMethod ( #987 )
...
* update signature of doublemap storage function
* add test cases
* update doublemap implementation
* update implementation
* remove duplicate test case
* update test cases
* Add hkt
* Fix derive types
* Make derive work
* Fix some bugs
* Fix some bugs
* More stuff
* Make some more stuff work
* Fix types in derive
* Fix all tests in derive
* Change back ApiType
* Remove vscode
* Fix Submittables
* Fix some errors
* Fix some bugs
* Change some stuff
* Fix merge conflict
* Fix types
* Add console.log
* Add console.log
* Re-add decorateMethod
* Fix tests
* Skip e2e
* Small fixes
* Fix signAndSend
* Fix typings in test
* Fix lint
* Add comments
* One line
* Remove useless
* URI->ApiType
* Indentation
2019-06-14 12:12:53 +02:00
Jaco Greeff
73f2a2abc3
availableBalance should be >0 ( #963 )
...
* availableBalance should be >0
* Remove double >0 check
* Add e2e test
2019-05-30 13:27:07 +02:00
Jaco Greeff
2d94ac7d24
Alias votingBalance -> all
2019-05-27 16:00:38 +02:00
Jaco Greeff
acaca67385
derive.{balances, contracts, staking, session} returns Codec ( #953 )
...
* derive.{balances, contracts, staking, session} returns Codec
* Json -> StructAny (as per VectorAny)
* multi returns VectorAny
* VectorAny casts
* Bump common
2019-05-27 12:49:19 +02:00
Jaco Greeff
2dfc55cb5c
Update api.derive to use api.queryMulti ( #911 )
...
* session api.queryMulti
* Make a single subscription to retrieve all session info
* Adjustments
* WIP
* Seems mostly comprehensive, need to full test e2e
* e2e tests for operations
* Allow "create from empty"
* skip
* Remove comment
* Remove ancient ?'s
* Update types.ts
2019-05-16 11:36:41 +02:00
Stefanie Doll
c30d3a80e8
Added derive e2e tests and documentation ( #898 )
...
* export IExtrinsic
* Switch to localhos & enable tests in promise.spec
* Derive.accounts docs (copy from my other branch) + code examples
* Fixed existing accounts tests and added tests for all accounts.derive methods
* e2e tests and docs/ examples for balances.all and balances.fees
* Removed emty lines below jsdoc info
* tests & documentation dor derive.chain
* Addressed comments from former PR https://github.com/polkadot-js/api/pull/869
* Removed unused import
* obseralbe -> observable
* undo keith' commit
* use correct jsdocs syntax
* Re-enable skip
2019-05-15 11:50:28 +02:00
Jaco Greeff
3557657034
Expose queryMulti on api ( #909 )
...
* Expose queryMulti on api
* Convert contract fees to queryMulti
2019-05-15 10:41:48 +02:00
kwingram25
168b12d98f
Check array before running bnMax ( #893 )
...
* Updated with derive.balances.all
* add new keys to votingBalance
* remove multi test
* vestedBalance > 0
* bestNumber bug
* Check balances.all > 0
* Check balances.all > 0
* Check balances.all > 0
* check locks array
* check locks array
2019-05-09 20:13:31 +02:00
kwingram25
b8fabfeade
Fix error causing balances.all = undefined ( #891 )
...
* Updated with derive.balances.all
* add new keys to votingBalance
* remove multi test
* vestedBalance > 0
* bestNumber bug
* Check balances.all > 0
* Check balances.all > 0
* Check balances.all > 0
2019-05-09 17:20:30 +02:00
kwingram25
c2ccf35c5c
Replace votingBalance -> derive.balances.all ( #883 )
...
* Updated with derive.balances.all
* add new keys to votingBalance
* remove multi test
* vestedBalance > 0
2019-05-09 12:38:56 +02:00
Stefanie Doll
adec070434
multi calls for democracy.votes and staking.controllers ( #887 )
...
* .multi for democracy.votes & stating.controllers
* Removed leftover comment from https://github.com/polkadot-js/api/pull/875
* no new line at the end
2019-05-09 09:53:15 +02:00
Jaco Greeff
07792ff54a
Add contract fees ( #875 )
2019-05-07 15:53:40 +02:00
Jaco Greeff
21dab00203
Basic same-type multi queries ( #866 )
...
* Basic same-type multi queries
* Remove extra map, straight to switchMap
2019-05-03 13:54:05 +02:00
Jaco Greeff
5445314d95
Bump deps ( #861 )
...
* Bump deps
* Align with published common
* Fix rxjs to 6.4.0 (false deprecations on 6.5.1)
2019-04-29 13:47:55 +02:00
Jaco Greeff
34888bd4fb
Remove /index imports (swap to bare) ( #773 )
...
* Remove /index imports (swap to bare)
* Bump common
2019-03-14 09:02:55 +01:00
Jaco Greeff
d1825c749a
Update metadata to latest (Amount & AssetOf types) ( #726 )
...
* Update metadata to latest (Amount & AssetOf types)
* Allow derive fees to work with fees module
2019-02-20 17:21:20 +01:00
Jaco Greeff
f95763906e
Add codec exports to types index ( #689 )
...
* Add codec exports to types index
* Use actual index exports (internally)
* Merge {AccountId, Balance, Moment}Of into parent classes
2019-02-13 16:00:59 +01:00
Jaco Greeff
bfe5661d8f
derive.balances.* handle Address & AccountIndex everywhere ( #639 )
2019-01-28 11:22:11 +01:00
Jaco Greeff
a3e421f665
Allow for balance/indices lookups ( #596 )
...
* Allow for balance/indices lookups
* Latest metadata
* Indices work
* Update json with actual decoded
* Update Type.ts
* Some tests updated
* Update final tests
* Remove .only from derive e2e (really skip it)
2019-01-17 15:11:50 +01:00
Jaco Greeff
a69cff1c64
Add derive.staking.intentionsBalances ( #595 )
...
* Add derive.staking.intentionsBalances
* Skip e2e test
* ts-lint?
* Alignment with new signatures, remove all slices
2019-01-17 09:55:08 +01:00
Amaury Martiny
d07ed8ac38
Refactor api-promise/rx ( #566 )
...
* Use a generic abstract OnCall
* Add OnCall for Promise
* First run at fixing extrinsics
* Fix types
* Make submittable extrinsic work
* Move file
* Make derive work
* Fix types
* Only call metadata once
* Make tests pass
* Put event emitter in apirx
* Fix small bugs
* Fix tests
* Fix bug decorateStorage
* Make tests pass for tx
* Move rpc base to apirx
* Fix lint
* Fix small bugs
* Fix bug with isSubscription
* Fix codeclimate
* Revert
* Add tslint disable line
* Fix lint
* Skip e2e
* Typo
* Lint
* Re-add combinator back
* Add ._rx in Base
* Make extrinsics work
* Update derivex
* Fix bug lint
* Fix circular dep
* Fix bug e2e
* Remove useless check
* Add description comment
* Clean stuff
* Move assert to Base
* Bump version, update CHANGELOG
* Make _rx private
* Private emit
2019-01-16 15:42:59 +01:00
Amaury Martiny
2a2df9a1c3
Add derive functions ( #564 )
...
* Add drr
* Update headers
* Lint
* Copy other functions
* Account indexes
* accountIndexToId
* accountIdAndIndex
* Fees
* votingBalance
* votingBalances
* votingBalancesNominatorsFor
* validatingBalance
* validatingBalances
* bestNumberFinalised
* eraLength
* Add drr
* eraProgress
* votes
* referendumInfos
* referendumVotesFor
* referendums
* Clean code
* Add tests
* Fix lint
* Fix bug eraProgress
* Fix bug fees
* combineLatest without array
* Fix lint
2019-01-10 17:39:25 +01:00