-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support creating dashboard wallet user in SDK (#7106)
Co-authored-by: Nikki Kang <kangaroo233@gmail.com>
- Loading branch information
Showing
10 changed files
with
188 additions
and
30 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
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
76 changes: 76 additions & 0 deletions
76
packages/libs/src/sdk/api/generated/default/models/TxSignature.ts
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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
// @ts-nocheck | ||
/** | ||
* API | ||
* Audius V1 API | ||
* | ||
* The version of the OpenAPI document: 1.0 | ||
* | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
import { exists, mapValues } from '../runtime'; | ||
/** | ||
* | ||
* @export | ||
* @interface TxSignature | ||
*/ | ||
export interface TxSignature { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof TxSignature | ||
*/ | ||
message: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof TxSignature | ||
*/ | ||
signature: string; | ||
} | ||
|
||
/** | ||
* Check if a given object implements the TxSignature interface. | ||
*/ | ||
export function instanceOfTxSignature(value: object): boolean { | ||
let isInstance = true; | ||
isInstance = isInstance && "message" in value; | ||
isInstance = isInstance && "signature" in value; | ||
|
||
return isInstance; | ||
} | ||
|
||
export function TxSignatureFromJSON(json: any): TxSignature { | ||
return TxSignatureFromJSONTyped(json, false); | ||
} | ||
|
||
export function TxSignatureFromJSONTyped(json: any, ignoreDiscriminator: boolean): TxSignature { | ||
if ((json === undefined) || (json === null)) { | ||
return json; | ||
} | ||
return { | ||
|
||
'message': json['message'], | ||
'signature': json['signature'], | ||
}; | ||
} | ||
|
||
export function TxSignatureToJSON(value?: TxSignature | null): any { | ||
if (value === undefined) { | ||
return undefined; | ||
} | ||
if (value === null) { | ||
return null; | ||
} | ||
return { | ||
|
||
'message': value.message, | ||
'signature': value.signature, | ||
}; | ||
} | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
import { OAUTH_SCOPE_OPTIONS } from '../oauth' | ||
import { OAUTH_SCOPE_OPTIONS, WriteOnceParams } from '../oauth' | ||
|
||
export const isOAuthScopeValid = (scope: string[]) => { | ||
const validScopes = new Set(OAUTH_SCOPE_OPTIONS) | ||
return scope.findIndex((s) => !validScopes.has(s as any)) === -1 | ||
} | ||
|
||
export const isWriteOnceParams = (object: any): object is WriteOnceParams => { | ||
return ( | ||
'tx' in object && | ||
object.tx === 'connect_dashboard_wallet' && | ||
'wallet' in object | ||
) | ||
} |