diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 4bc5d61..758bb9c 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.9.0 +7.10.0 diff --git a/README.md b/README.md index d8c78a4..b6156c3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## @curvegrid/multibaas-sdk@1.0.0-beta26 +## @curvegrid/multibaas-sdk@1.0.0-beta27 This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments: @@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co _published:_ ``` -npm install @curvegrid/multibaas-sdk@1.0.0-beta26 --save +npm install @curvegrid/multibaas-sdk@1.0.0-beta27 --save ``` _unPublished (not recommended):_ diff --git a/api.ts b/api.ts index 0b51192..7ac4f07 100644 --- a/api.ts +++ b/api.ts @@ -1271,12 +1271,6 @@ export interface ContractABIMethod { * @memberof ContractABIMethod */ notes: string; - /** - * - * @type {string} - * @memberof ContractABIMethod - */ - returns: string; /** * The function description. * @type {string} @@ -1344,12 +1338,6 @@ export interface ContractABIMethod1 { * @memberof ContractABIMethod1 */ notes: string; - /** - * - * @type {string} - * @memberof ContractABIMethod1 - */ - returns: string; /** * The function description. * @type {string} @@ -2004,6 +1992,115 @@ export interface DeployContractTransaction { */ label?: string; } +/** + * The domain fields for EIP-712. All fields are optional per the specification. + * @export + * @interface EIP712Domain + */ +export interface EIP712Domain { + /** + * Human-readable name of the signing domain. + * @type {string} + * @memberof EIP712Domain + */ + name?: string; + /** + * Current major version of the signing domain. + * @type {string} + * @memberof EIP712Domain + */ + version?: string; + /** + * + * @type {EIP712DomainChainId} + * @memberof EIP712Domain + */ + chainId?: EIP712DomainChainId; + /** + * An ethereum address. + * @type {string} + * @memberof EIP712Domain + */ + verifyingContract?: string; + /** + * A hex string. + * @type {string} + * @memberof EIP712Domain + */ + salt?: string; +} +/** + * @type EIP712DomainChainId + * The EIP-155 chain ID of the application using the typed data. + * @export + */ +export type EIP712DomainChainId = number | string; + +/** + * + * @export + * @interface EIP712TypeEntry + */ +export interface EIP712TypeEntry { + /** + * + * @type {string} + * @memberof EIP712TypeEntry + */ + name: string; + /** + * + * @type {string} + * @memberof EIP712TypeEntry + */ + type: string; +} +/** + * EIP-712 structured typed data object. + * @export + * @interface EIP712TypedData + */ +export interface EIP712TypedData { + /** + * + * @type {EIP712Types} + * @memberof EIP712TypedData + */ + types: EIP712Types; + /** + * The root type of the message object. Must correspond to a key in the `types` object. + * @type {string} + * @memberof EIP712TypedData + */ + primaryType: string; + /** + * + * @type {EIP712Domain} + * @memberof EIP712TypedData + */ + domain: EIP712Domain; + /** + * The actual data, conforming to the `primaryType` definition in `types`. + * @type {object} + * @memberof EIP712TypedData + */ + message: object; +} +/** + * A mapping of type names to arrays of fields. + * @export + * @interface EIP712Types + */ +export interface EIP712Types { + [key: string]: Array | any; + + /** + * + * @type {Array} + * @memberof EIP712Types + */ + EIP712Domain: Array; +} /** * An event returned by the API call. * @export @@ -2801,42 +2898,78 @@ export interface HSMData { wallets: Array; } /** - * Request body representing a sign-data request. + * @type HSMSignRequest * @export - * @interface HSMSignRequest */ -export interface HSMSignRequest { +export type HSMSignRequest = + | ({ method: 'eth_signTypedData_v4' } & HSMSignRequestTypedData) + | ({ method: 'personal_sign' } & HSMSignRequestPersonalSign) + | ({ method: 'HSMSignRequestPersonalSign' } & HSMSignRequestPersonalSign) + | ({ method: 'HSMSignRequestTypedData' } & HSMSignRequestTypedData); + +/** + * Request to sign a message using a cloud wallet. + * @export + * @interface HSMSignRequestPersonalSign + */ +export interface HSMSignRequestPersonalSign { /** - * An ethereum address. + * The signing method to use. * @type {string} - * @memberof HSMSignRequest + * @memberof HSMSignRequestPersonalSign */ - address: string; + method: string; /** - * Is the data field an encapsulated EIP-712 typed message? - * @type {boolean} - * @memberof HSMSignRequest + * An ethereum address. + * @type {string} + * @memberof HSMSignRequestPersonalSign */ - isTyped?: boolean; + address: string; /** - * Data to sign + * A hex string. * @type {string} - * @memberof HSMSignRequest + * @memberof HSMSignRequestPersonalSign */ data: string; /** * - * @type {HSMSignRequestChainId} - * @memberof HSMSignRequest + * @type {HSMSignRequestPersonalSignChainId} + * @memberof HSMSignRequestPersonalSign */ - chainId?: HSMSignRequestChainId; + chainId?: HSMSignRequestPersonalSignChainId; } /** - * @type HSMSignRequestChainId + * @type HSMSignRequestPersonalSignChainId + * Optionally lock the message to a specific chain by encoding the chain ID in the signature per EIP-155. * @export */ -export type HSMSignRequestChainId = number | string; +export type HSMSignRequestPersonalSignChainId = number | string; +/** + * Request to sign typed data using a cloud wallet. + * @export + * @interface HSMSignRequestTypedData + */ +export interface HSMSignRequestTypedData { + /** + * The signing method to use. + * @type {string} + * @memberof HSMSignRequestTypedData + */ + method: string; + /** + * An ethereum address. + * @type {string} + * @memberof HSMSignRequestTypedData + */ + address: string; + /** + * + * @type {EIP712TypedData} + * @memberof HSMSignRequestTypedData + */ + data: EIP712TypedData; +} /** * Response body representing a sign-data response. * @export diff --git a/openapi-generator.yaml b/openapi-generator.yaml index 8444f72..7942851 100644 --- a/openapi-generator.yaml +++ b/openapi-generator.yaml @@ -6,7 +6,7 @@ gitRepoId: multibaas-sdk-typescript templateDir: templates additionalProperties: npmName: "@curvegrid/multibaas-sdk" - npmVersion: 1.0.0-beta26 + npmVersion: 1.0.0-beta27 disallowAdditionalPropertiesIfNotPresent: true legacyDiscriminatorBehavior: false withInterfaces: true diff --git a/openapitools.json b/openapitools.json index f80faaa..f8d07ce 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,6 +2,6 @@ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "7.9.0" + "version": "7.10.0" } } diff --git a/package-lock.json b/package-lock.json index f3d4428..2e0d879 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@curvegrid/multibaas-sdk", - "version": "1.0.0-beta26", + "version": "1.0.0-beta27", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@curvegrid/multibaas-sdk", - "version": "1.0.0-beta26", + "version": "1.0.0-beta27", "license": "MIT", "dependencies": { "axios": "^1.2.2" diff --git a/package.json b/package.json index 614f6d3..765581b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@curvegrid/multibaas-sdk", - "version": "1.0.0-beta26", + "version": "1.0.0-beta27", "description": "MultiBaas SDK for TypeScript / JavaScript", "author": "Curvegrid", "repository": {