Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions sdk/src/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { PermissionsService } from './services/PermissionsService';
import { RelayerService } from './services/RelayerService';
import { TransactionService } from './services/TransactionService';
import { WalletCredentialsService } from './services/WalletCredentialsService';
import { WalletSubscriptionsService } from './services/WalletSubscriptionsService';
import { WebhooksService } from './services/WebhooksService';

type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
Expand Down Expand Up @@ -62,6 +63,7 @@ class EngineLogic {
public readonly relayer: RelayerService;
public readonly transaction: TransactionService;
public readonly walletCredentials: WalletCredentialsService;
public readonly walletSubscriptions: WalletSubscriptionsService;
public readonly webhooks: WebhooksService;

public readonly request: BaseHttpRequest;
Expand Down Expand Up @@ -104,6 +106,7 @@ class EngineLogic {
this.relayer = new RelayerService(this.request);
this.transaction = new TransactionService(this.request);
this.walletCredentials = new WalletCredentialsService(this.request);
this.walletSubscriptions = new WalletSubscriptionsService(this.request);
this.webhooks = new WebhooksService(this.request);
}
}
Expand Down
1 change: 1 addition & 0 deletions sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ export { PermissionsService } from './services/PermissionsService';
export { RelayerService } from './services/RelayerService';
export { TransactionService } from './services/TransactionService';
export { WalletCredentialsService } from './services/WalletCredentialsService';
export { WalletSubscriptionsService } from './services/WalletSubscriptionsService';
export { WebhooksService } from './services/WebhooksService';
53 changes: 50 additions & 3 deletions sdk/src/services/WalletCredentialsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export class WalletCredentialsService {
label: string;
type: 'circle';
/**
* 32-byte hex string. If not provided, a random one will be generated.
* 32-byte hex string. Consult https://developers.circle.com/w3s/entity-secret-management to create and register an entity secret.
*/
entitySecret?: string;
entitySecret: string;
/**
* Whether this credential should be set as the default for its type. Only one credential can be default per type.
*/
Expand Down Expand Up @@ -102,7 +102,7 @@ export class WalletCredentialsService {
id: string;
type: string;
label: (string | null);
isDefault: boolean;
isDefault: (boolean | null);
createdAt: string;
updatedAt: string;
deletedAt: (string | null);
Expand All @@ -122,4 +122,51 @@ export class WalletCredentialsService {
});
}

/**
* Update wallet credential
* Update a wallet credential's label, default status, and entity secret.
* @param id The ID of the wallet credential to update.
* @param requestBody
* @returns any Default Response
* @throws ApiError
*/
public updateWalletCredential(
id: string,
requestBody?: {
label?: string;
/**
* Whether this credential should be set as the default for its type. Only one credential can be default per type.
*/
isDefault?: boolean;
/**
* 32-byte hex string. Consult https://developers.circle.com/w3s/entity-secret-management to create and register an entity secret.
*/
entitySecret?: string;
},
): CancelablePromise<{
result: {
id: string;
type: string;
label: (string | null);
isDefault: (boolean | null);
createdAt: string;
updatedAt: string;
};
}> {
return this.httpRequest.request({
method: 'PUT',
url: '/wallet-credentials/{id}',
path: {
'id': id,
},
body: requestBody,
mediaType: 'application/json',
errors: {
400: `Bad Request`,
404: `Not Found`,
500: `Internal Server Error`,
},
});
}

}
Loading
Loading