@celo/utils › "packages/sdk/utils/src/io"
Module: "packages/sdk/utils/src/io"
Index
References
Type aliases
- Address
- AttestationRequest
- AttestationResponse
- AttestationServiceTestRequest
- E164Number
- GetAttestationRequest
- Signature
Variables
- AddressType
- AttestationRequestType
- AttestationResponseType
- AttestationServiceStatusResponseType
- AttestationServiceTestRequestType
- E164PhoneNumberType
- GetAttestationRequestType
- JSONStringType
- PublicKeyType
- SaltType
- SignatureType
- UrlType
References
URL_REGEX
• URL_REGEX:
isValidUrl
• isValidUrl:
Type aliases
Address
Ƭ Address: t.TypeOf‹typeof AddressType›
Defined in packages/sdk/utils/src/io.ts:118
AttestationRequest
Ƭ AttestationRequest: t.TypeOf‹typeof AttestationRequestType›
Defined in packages/sdk/utils/src/io.ts:143
deprecated
moved to @celo/phone-utils will be removed in next major version
AttestationResponse
Ƭ AttestationResponse: t.TypeOf‹typeof AttestationResponseType›
Defined in packages/sdk/utils/src/io.ts:195
AttestationServiceTestRequest
Ƭ AttestationServiceTestRequest: t.TypeOf‹typeof AttestationServiceTestRequestType›
Defined in packages/sdk/utils/src/io.ts:115
deprecated
moved to @celo/phone-utils will be removed in next major version
E164Number
Ƭ E164Number: t.TypeOf‹typeof E164PhoneNumberType›
Defined in packages/sdk/utils/src/io.ts:123
deprecated
moved to @celo/phone-utils will be removed in next major version
GetAttestationRequest
Ƭ GetAttestationRequest: t.TypeOf‹typeof GetAttestationRequestType›
Defined in packages/sdk/utils/src/io.ts:161
deprecated
moved to @celo/phone-utils will be removed in next major version
Signature
Ƭ Signature: t.TypeOf‹typeof SignatureType›
Defined in packages/sdk/utils/src/io.ts:117
Variables
Const
AddressType
• AddressType: Type‹string, string, unknown› = new t.Type
Defined in packages/sdk/utils/src/io.ts:54
Const
AttestationRequestType
• AttestationRequestType: TypeC‹object› = t.type({ phoneNumber: E164PhoneNumberType, account: AddressType, issuer: AddressType, // io-ts way of defining optional key-value pair salt: t.union([t.undefined, SaltType]), smsRetrieverAppSig: t.union([t.undefined, t.string]), // if specified, the message sent will be short random number prefixed by this string securityCodePrefix: t.union([t.undefined, t.string]), language: t.union([t.undefined, t.string]), })
Defined in packages/sdk/utils/src/io.ts:128
deprecated
moved to @celo/phone-utils will be removed in next major version
Const
AttestationResponseType
• AttestationResponseType: TypeC‹object› = t.type({ // Always returned in 1.0.x success: t.boolean,
// Returned for errors in 1.0.x error: t.union([t.undefined, t.string]),
// Stringifyed JSON dict of dicts, mapping attempt to error info. errors: t.union([t.undefined, t.string]),
// Returned for successful send in 1.0.x provider: t.union([t.undefined, t.string]),
// New fields identifier: t.union([t.undefined, t.string]), account: t.union([t.undefined, AddressType]), issuer: t.union([t.undefined, AddressType]), status: t.union([t.undefined, t.string]), attempt: t.union([t.undefined, t.number]), countryCode: t.union([t.undefined, t.string]),
// Time to receive eventual delivery/failure (inc retries) duration: t.union([t.undefined, t.number]),
// Only used by test endpoint to return randomly generated salt. // Never return a user-supplied salt. salt: t.union([t.undefined, t.string]),
// only returned if the request supplied the correct security code attestationCode: t.union([t.undefined, t.string]), })
Defined in packages/sdk/utils/src/io.ts:163
Const
AttestationServiceStatusResponseType
• AttestationServiceStatusResponseType: TypeC‹object› = t.type({ status: t.literal('ok'), smsProviders: t.array(t.string), blacklistedRegionCodes: t.union([t.array(t.string), t.undefined]), accountAddress: AddressType, signature: t.union([SignatureType, t.undefined]), version: t.string, latestBlock: t.number, ageOfLatestBlock: t.number, isNodeSyncing: t.boolean, appSignature: t.string, smsProvidersRandomized: t.boolean, maxDeliveryAttempts: t.number, maxRerequestMins: t.number, twilioVerifySidProvided: t.boolean, })
Defined in packages/sdk/utils/src/io.ts:85
deprecated
moved to @celo/phone-utils will be removed in next major version
Const
AttestationServiceTestRequestType
• AttestationServiceTestRequestType: TypeC‹object› = t.type({ phoneNumber: E164PhoneNumberType, message: t.string, signature: SignatureType, provider: t.union([t.string, t.undefined]), })
Defined in packages/sdk/utils/src/io.ts:105
deprecated
moved to @celo/phone-utils will be removed in next major version
Const
E164PhoneNumberType
• E164PhoneNumberType: Type‹string, string, unknown› = new t.Type
Defined in packages/sdk/utils/src/io.ts:42
deprecated
moved to @celo/phone-utils will be removed in next major version
Const
GetAttestationRequestType
• GetAttestationRequestType: TypeC‹object› = t.type({ phoneNumber: E164PhoneNumberType, account: AddressType, issuer: AddressType, // io-ts way of defining optional key-value pair salt: t.union([t.undefined, SaltType]), // if the value supplied matches the stored security code, the response will include the complete message securityCode: t.union([t.undefined, t.string]), })
Defined in packages/sdk/utils/src/io.ts:148
deprecated
moved to @celo/phone-utils will be removed in next major version
Const
JSONStringType
• JSONStringType: Type‹string, string, unknown› = new t.Type
Defined in packages/sdk/utils/src/io.ts:24
Const
PublicKeyType
• PublicKeyType: Type‹string, string, unknown› = new t.Type
Defined in packages/sdk/utils/src/io.ts:66
Const
SaltType
• SaltType: StringC‹› = t.string
Defined in packages/sdk/utils/src/io.ts:80
Const
SignatureType
• SignatureType: StringC‹› = t.string
Defined in packages/sdk/utils/src/io.ts:78
Const
UrlType
• UrlType: Type‹string, string, unknown› = new t.Type
Defined in packages/sdk/utils/src/io.ts:12