-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use
typesBundle
for api options (#54)
* works * 6.0.8 * bump v6.1.0
- Loading branch information
1 parent
a9a4f45
commit 3166ff0
Showing
7 changed files
with
43 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@acala-network/api-derive", | ||
"version": "6.0.5", | ||
"version": "6.1.0", | ||
"description": "Additional polkadot.js derives for Acala Network", | ||
"author": "Acala Developers <[email protected]>", | ||
"license": "Apache-2.0", | ||
|
@@ -23,7 +23,7 @@ | |
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"dependencies": { | ||
"@acala-network/types": "6.0.5" | ||
"@acala-network/types": "6.1.0" | ||
}, | ||
"peerDependencies": { | ||
"@polkadot/api": "^10.9.1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@acala-network/api", | ||
"version": "6.0.5", | ||
"version": "6.1.0", | ||
"description": "Acala JS API", | ||
"author": "Acala Developers <[email protected]>", | ||
"license": "Apache-2.0", | ||
|
@@ -23,8 +23,8 @@ | |
"publish:manual": "npm publish --tolerate-republish --access public" | ||
}, | ||
"dependencies": { | ||
"@acala-network/api-derive": "6.0.5", | ||
"@acala-network/types": "6.0.5" | ||
"@acala-network/api-derive": "6.1.0", | ||
"@acala-network/types": "6.1.0" | ||
}, | ||
"peerDependencies": { | ||
"@polkadot/api": "^10.9.1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,9 @@ | ||
import { acalaTypesBundle } from '@acala-network/types'; | ||
import type { ApiOptions } from '@polkadot/api/types'; | ||
import type { RegistryTypes } from '@polkadot/types/types'; | ||
|
||
import { acalaDerives } from '@acala-network/api-derive'; | ||
import { | ||
acalaLookupTypes, | ||
acalaRpc, | ||
acalaRuntime, | ||
acalaSignedExtensions, | ||
acalaTypes, | ||
acalaTypesAlias, | ||
acalaTypesBundle, | ||
} from '@acala-network/types'; | ||
|
||
export const options = ({ derives = {}, | ||
rpc = {}, | ||
runtime = {}, | ||
signedExtensions, | ||
types = {}, | ||
typesAlias = {}, | ||
typesBundle = {}, | ||
...otherOptions }: ApiOptions = {}): ApiOptions => ({ | ||
types: { | ||
...acalaTypes as unknown as RegistryTypes, | ||
...acalaLookupTypes as unknown as RegistryTypes, | ||
...types, | ||
}, | ||
runtime: { | ||
...acalaRuntime, | ||
...runtime, | ||
}, | ||
rpc: { | ||
...acalaRpc, | ||
...rpc, | ||
}, | ||
typesAlias: { | ||
...acalaTypesAlias, | ||
...typesAlias, | ||
}, | ||
derives: { | ||
...acalaDerives, | ||
...derives, | ||
}, | ||
typesBundle: { | ||
spec: { | ||
...typesBundle.spec, | ||
acala: { | ||
...acalaTypesBundle.spec.acala, | ||
...typesBundle?.spec?.acala, | ||
}, | ||
mandala: { | ||
...acalaTypesBundle.spec.mandala, | ||
...typesBundle?.spec?.mandala, | ||
}, | ||
karura: { | ||
...acalaTypesBundle.spec.karura, | ||
...typesBundle?.spec?.mandala, | ||
}, | ||
}, | ||
...typesBundle, | ||
}, | ||
signedExtensions: { | ||
...acalaSignedExtensions, | ||
...signedExtensions, | ||
}, | ||
...otherOptions, | ||
export const options = ({ provider }: ApiOptions = {}): ApiOptions => ({ | ||
typesBundle: acalaTypesBundle, | ||
provider, | ||
}); | ||
|
||
export const withAcalaTypes = options; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@acala-network/types", | ||
"version": "6.0.5", | ||
"version": "6.1.0", | ||
"description": "Acala types for @polkadot/api", | ||
"author": "Acala Developers <[email protected]>", | ||
"license": "Apache-2.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters