Skip to content

Commit

Permalink
Merge branch 'main' into build/bump-replica
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker authored Oct 23, 2024
2 parents a4f50b2 + a0ff658 commit ac59720
Show file tree
Hide file tree
Showing 8 changed files with 1,192 additions and 267 deletions.
172 changes: 142 additions & 30 deletions cli/src/declarations/governance.d.ts

Large diffs are not rendered by default.

605 changes: 516 additions & 89 deletions cli/src/declarations/governance.did

Large diffs are not rendered by default.

273 changes: 212 additions & 61 deletions cli/src/declarations/governance.idl.js

Large diffs are not rendered by default.

62 changes: 53 additions & 9 deletions cli/src/declarations/internet_identity.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,18 @@ export interface BufferedArchiveEntry {
anchor_number: UserNumber;
timestamp: Timestamp;
}
export interface CaptchaConfig {
max_unsolved_captchas: bigint;
captcha_trigger:
| {
Dynamic: {
reference_rate_sampling_interval_s: bigint;
threshold_pct: number;
current_rate_sampling_interval_s: bigint;
};
}
| {Static: {CaptchaDisabled: null} | {CaptchaEnabled: null}};
}
export type CaptchaResult = ChallengeResult;
export interface Challenge {
png_base64: string;
Expand All @@ -81,6 +93,13 @@ export interface ChallengeResult {
key: ChallengeKey;
chars: string;
}
export interface CheckCaptchaArg {
solution: string;
}
export type CheckCaptchaError =
| {NoRegistrationFlow: null}
| {UnexpectedCall: {next_step: RegistrationFlowNextStep}}
| {WrongSolution: {new_captcha_png_base64: string}};
export type CredentialId = Uint8Array | number[];
export interface Delegation {
pubkey: PublicKey;
Expand Down Expand Up @@ -152,6 +171,25 @@ export interface IdAliasCredentials {
rp_id_alias_credential: SignedIdAlias;
issuer_id_alias_credential: SignedIdAlias;
}
export interface IdRegFinishArg {
authn_method: AuthnMethodData;
}
export type IdRegFinishError =
| {NoRegistrationFlow: null}
| {UnexpectedCall: {next_step: RegistrationFlowNextStep}}
| {InvalidAuthnMethod: string}
| {IdentityLimitReached: null}
| {StorageError: string};
export interface IdRegFinishResult {
identity_number: bigint;
}
export interface IdRegNextStepResult {
next_step: RegistrationFlowNextStep;
}
export type IdRegStartError =
| {InvalidCaller: null}
| {AlreadyInProgress: null}
| {RateLimitExceeded: null};
export interface IdentityAnchorInfo {
devices: Array<DeviceWithUsage>;
device_registration: [] | [DeviceRegistrationInfo];
Expand All @@ -178,15 +216,11 @@ export type IdentityMetadataReplaceError =
};
};
export type IdentityNumber = bigint;
export type IdentityRegisterError =
| {BadCaptcha: null}
| {CanisterFull: null}
| {InvalidMetadata: string};
export interface InternetIdentityInit {
assigned_user_number_range: [] | [[bigint, bigint]];
max_inflight_captchas: [] | [bigint];
archive_config: [] | [ArchiveConfig];
canister_creation_cycles_cost: [] | [bigint];
captcha_config: [] | [CaptchaConfig];
register_rate_limit: [] | [RateLimitConfig];
}
export interface InternetIdentityStats {
Expand Down Expand Up @@ -233,6 +267,11 @@ export type RegisterResponse =
| {bad_challenge: null}
| {canister_full: null}
| {registered: {user_number: UserNumber}};
export type RegistrationFlowNextStep =
| {
CheckCaptcha: {captcha_png_base64: string};
}
| {Finish: null};
export type SessionKey = PublicKey;
export interface SignedDelegation {
signature: Uint8Array | number[];
Expand Down Expand Up @@ -303,7 +342,11 @@ export interface _SERVICE {
[IdentityNumber, PublicKey, AuthnMethodSecuritySettings],
{Ok: null} | {Err: AuthnMethodSecuritySettingsReplaceError}
>;
captcha_create: ActorMethod<[], {Ok: Challenge} | {Err: null}>;
check_captcha: ActorMethod<
[CheckCaptchaArg],
{Ok: IdRegNextStepResult} | {Err: CheckCaptchaError}
>;
config: ActorMethod<[], InternetIdentityInit>;
create_challenge: ActorMethod<[], Challenge>;
deploy_archive: ActorMethod<[Uint8Array | number[]], DeployArchiveResult>;
enter_device_registration_mode: ActorMethod<[UserNumber], Timestamp>;
Expand All @@ -325,10 +368,11 @@ export interface _SERVICE {
[IdentityNumber, MetadataMapV2],
{Ok: null} | {Err: IdentityMetadataReplaceError}
>;
identity_register: ActorMethod<
[AuthnMethodData, CaptchaResult, [] | [Principal]],
{Ok: IdentityNumber} | {Err: IdentityRegisterError}
identity_registration_finish: ActorMethod<
[IdRegFinishArg],
{Ok: IdRegFinishResult} | {Err: IdRegFinishError}
>;
identity_registration_start: ActorMethod<[], {Ok: IdRegNextStepResult} | {Err: IdRegStartError}>;
init_salt: ActorMethod<[], undefined>;
lookup: ActorMethod<[UserNumber], Array<DeviceData>>;
prepare_delegation: ActorMethod<
Expand Down
Loading

0 comments on commit ac59720

Please sign in to comment.