@dynamic-labs/sdk-api-core 0.0.882 → 0.0.884
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/deviceNonceSignatureEndpoints.cjs +52 -0
- package/src/deviceNonceSignatureEndpoints.d.ts +2 -0
- package/src/deviceNonceSignatureEndpoints.js +47 -0
- package/src/index.cjs +3 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/models/DynamicJwt.cjs +2 -0
- package/src/models/DynamicJwt.d.ts +6 -0
- package/src/models/DynamicJwt.js +2 -0
- package/src/models/MinifiedDynamicJwt.cjs +2 -0
- package/src/models/MinifiedDynamicJwt.d.ts +6 -0
- package/src/models/MinifiedDynamicJwt.js +2 -0
- package/src/models/TransactionFeeEstimateResponse.cjs +1 -1
- package/src/models/TransactionFeeEstimateResponse.d.ts +1 -1
- package/src/models/TransactionFeeEstimateResponse.js +1 -1
- package/src/models/WalletTransaction.cjs +10 -1
- package/src/models/WalletTransaction.d.ts +26 -2
- package/src/models/WalletTransaction.js +10 -1
package/package.json
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
// Auto-generated by postprocess-openapi.js — do not edit manually
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
const NONCE_SIGNATURE_PATHS = [
|
|
8
|
+
'/sdk/{environmentId}/externalAuth/signin',
|
|
9
|
+
'/sdk/{environmentId}/providers/{providerType}/verify',
|
|
10
|
+
'/sdk/{environmentId}/farcaster/signin',
|
|
11
|
+
'/sdk/{environmentId}/farcaster/verify',
|
|
12
|
+
'/sdk/{environmentId}/verify/link',
|
|
13
|
+
'/sdk/{environmentId}/wallets/verify',
|
|
14
|
+
'/sdk/{environmentId}/verify/merge',
|
|
15
|
+
'/sdk/{environmentId}/verify/transfer',
|
|
16
|
+
'/sdk/{environmentId}/verify',
|
|
17
|
+
'/sdk/{environmentId}/smsVerifications/verify',
|
|
18
|
+
'/sdk/{environmentId}/smsVerifications/signin',
|
|
19
|
+
'/sdk/{environmentId}/emailVerifications/verify',
|
|
20
|
+
'/sdk/{environmentId}/emailVerifications/signin',
|
|
21
|
+
'/sdk/{environmentId}/telegram/verify',
|
|
22
|
+
'/sdk/{environmentId}/deviceRegistration',
|
|
23
|
+
];
|
|
24
|
+
const NONCE_SIGNATURE_REGEXPS = [
|
|
25
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/externalAuth\/signin$/,
|
|
26
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/providers\/[^\/]+\/verify$/,
|
|
27
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/farcaster\/signin$/,
|
|
28
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/farcaster\/verify$/,
|
|
29
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/verify\/link$/,
|
|
30
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/wallets\/verify$/,
|
|
31
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/verify\/merge$/,
|
|
32
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/verify\/transfer$/,
|
|
33
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/verify$/,
|
|
34
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/smsVerifications\/verify$/,
|
|
35
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/smsVerifications\/signin$/,
|
|
36
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/emailVerifications\/verify$/,
|
|
37
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/emailVerifications\/signin$/,
|
|
38
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/telegram\/verify$/,
|
|
39
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/deviceRegistration$/,
|
|
40
|
+
];
|
|
41
|
+
const isDeviceNonceSignatureRequiredForUrl = (url) => {
|
|
42
|
+
try {
|
|
43
|
+
const pathname = new URL(url).pathname;
|
|
44
|
+
return NONCE_SIGNATURE_REGEXPS.some((re) => re.test(pathname));
|
|
45
|
+
}
|
|
46
|
+
catch (_a) {
|
|
47
|
+
return NONCE_SIGNATURE_REGEXPS.some((re) => re.test(url));
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
exports.NONCE_SIGNATURE_PATHS = NONCE_SIGNATURE_PATHS;
|
|
52
|
+
exports.isDeviceNonceSignatureRequiredForUrl = isDeviceNonceSignatureRequiredForUrl;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const NONCE_SIGNATURE_PATHS: readonly ["/sdk/{environmentId}/externalAuth/signin", "/sdk/{environmentId}/providers/{providerType}/verify", "/sdk/{environmentId}/farcaster/signin", "/sdk/{environmentId}/farcaster/verify", "/sdk/{environmentId}/verify/link", "/sdk/{environmentId}/wallets/verify", "/sdk/{environmentId}/verify/merge", "/sdk/{environmentId}/verify/transfer", "/sdk/{environmentId}/verify", "/sdk/{environmentId}/smsVerifications/verify", "/sdk/{environmentId}/smsVerifications/signin", "/sdk/{environmentId}/emailVerifications/verify", "/sdk/{environmentId}/emailVerifications/signin", "/sdk/{environmentId}/telegram/verify", "/sdk/{environmentId}/deviceRegistration"];
|
|
2
|
+
export declare const isDeviceNonceSignatureRequiredForUrl: (url: string) => boolean;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Auto-generated by postprocess-openapi.js — do not edit manually
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
const NONCE_SIGNATURE_PATHS = [
|
|
4
|
+
'/sdk/{environmentId}/externalAuth/signin',
|
|
5
|
+
'/sdk/{environmentId}/providers/{providerType}/verify',
|
|
6
|
+
'/sdk/{environmentId}/farcaster/signin',
|
|
7
|
+
'/sdk/{environmentId}/farcaster/verify',
|
|
8
|
+
'/sdk/{environmentId}/verify/link',
|
|
9
|
+
'/sdk/{environmentId}/wallets/verify',
|
|
10
|
+
'/sdk/{environmentId}/verify/merge',
|
|
11
|
+
'/sdk/{environmentId}/verify/transfer',
|
|
12
|
+
'/sdk/{environmentId}/verify',
|
|
13
|
+
'/sdk/{environmentId}/smsVerifications/verify',
|
|
14
|
+
'/sdk/{environmentId}/smsVerifications/signin',
|
|
15
|
+
'/sdk/{environmentId}/emailVerifications/verify',
|
|
16
|
+
'/sdk/{environmentId}/emailVerifications/signin',
|
|
17
|
+
'/sdk/{environmentId}/telegram/verify',
|
|
18
|
+
'/sdk/{environmentId}/deviceRegistration',
|
|
19
|
+
];
|
|
20
|
+
const NONCE_SIGNATURE_REGEXPS = [
|
|
21
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/externalAuth\/signin$/,
|
|
22
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/providers\/[^\/]+\/verify$/,
|
|
23
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/farcaster\/signin$/,
|
|
24
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/farcaster\/verify$/,
|
|
25
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/verify\/link$/,
|
|
26
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/wallets\/verify$/,
|
|
27
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/verify\/merge$/,
|
|
28
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/verify\/transfer$/,
|
|
29
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/verify$/,
|
|
30
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/smsVerifications\/verify$/,
|
|
31
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/smsVerifications\/signin$/,
|
|
32
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/emailVerifications\/verify$/,
|
|
33
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/emailVerifications\/signin$/,
|
|
34
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/telegram\/verify$/,
|
|
35
|
+
/\/api\/v0\/sdk\/[0-9a-f-]{36}\/deviceRegistration$/,
|
|
36
|
+
];
|
|
37
|
+
const isDeviceNonceSignatureRequiredForUrl = (url) => {
|
|
38
|
+
try {
|
|
39
|
+
const pathname = new URL(url).pathname;
|
|
40
|
+
return NONCE_SIGNATURE_REGEXPS.some((re) => re.test(pathname));
|
|
41
|
+
}
|
|
42
|
+
catch (_a) {
|
|
43
|
+
return NONCE_SIGNATURE_REGEXPS.some((re) => re.test(url));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { NONCE_SIGNATURE_PATHS, isDeviceNonceSignatureRequiredForUrl };
|
package/src/index.cjs
CHANGED
|
@@ -417,6 +417,7 @@ var WalletTransactionAssetTransferMetadata = require('./models/WalletTransaction
|
|
|
417
417
|
var WalletTransactionType = require('./models/WalletTransactionType.cjs');
|
|
418
418
|
var WalletTransactionsResponse = require('./models/WalletTransactionsResponse.cjs');
|
|
419
419
|
var ZerodevBundlerProvider = require('./models/ZerodevBundlerProvider.cjs');
|
|
420
|
+
var deviceNonceSignatureEndpoints = require('./deviceNonceSignatureEndpoints.cjs');
|
|
420
421
|
|
|
421
422
|
|
|
422
423
|
|
|
@@ -1987,3 +1988,5 @@ Object.defineProperty(exports, 'ZerodevBundlerProvider', {
|
|
|
1987
1988
|
exports.ZerodevBundlerProviderFromJSON = ZerodevBundlerProvider.ZerodevBundlerProviderFromJSON;
|
|
1988
1989
|
exports.ZerodevBundlerProviderFromJSONTyped = ZerodevBundlerProvider.ZerodevBundlerProviderFromJSONTyped;
|
|
1989
1990
|
exports.ZerodevBundlerProviderToJSON = ZerodevBundlerProvider.ZerodevBundlerProviderToJSON;
|
|
1991
|
+
exports.NONCE_SIGNATURE_PATHS = deviceNonceSignatureEndpoints.NONCE_SIGNATURE_PATHS;
|
|
1992
|
+
exports.isDeviceNonceSignatureRequiredForUrl = deviceNonceSignatureEndpoints.isDeviceNonceSignatureRequiredForUrl;
|
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
|
@@ -413,3 +413,4 @@ export { WalletTransactionAssetTransferMetadataFromJSON, WalletTransactionAssetT
|
|
|
413
413
|
export { WalletTransactionType, WalletTransactionTypeFromJSON, WalletTransactionTypeFromJSONTyped, WalletTransactionTypeToJSON } from './models/WalletTransactionType.js';
|
|
414
414
|
export { WalletTransactionsResponseFromJSON, WalletTransactionsResponseFromJSONTyped, WalletTransactionsResponseToJSON } from './models/WalletTransactionsResponse.js';
|
|
415
415
|
export { ZerodevBundlerProvider, ZerodevBundlerProviderFromJSON, ZerodevBundlerProviderFromJSONTyped, ZerodevBundlerProviderToJSON } from './models/ZerodevBundlerProvider.js';
|
|
416
|
+
export { NONCE_SIGNATURE_PATHS, isDeviceNonceSignatureRequiredForUrl } from './deviceNonceSignatureEndpoints.js';
|
|
@@ -46,6 +46,7 @@ function DynamicJwtFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
46
|
'verifiedAccount': !runtime.exists(json, 'verified_account') ? undefined : JwtBlockchainAccount.JwtBlockchainAccountFromJSON(json['verified_account']),
|
|
47
47
|
'verifiedCredentials': (json['verified_credentials'].map(JwtVerifiedCredential.JwtVerifiedCredentialFromJSON)),
|
|
48
48
|
'lastVerifiedCredentialId': json['last_verified_credential_id'],
|
|
49
|
+
'signinCredentialId': !runtime.exists(json, 'signin_credential_id') ? undefined : json['signin_credential_id'],
|
|
49
50
|
'firstVisit': !runtime.exists(json, 'first_visit') ? undefined : (new Date(json['first_visit'])),
|
|
50
51
|
'lastVisit': !runtime.exists(json, 'last_visit') ? undefined : (new Date(json['last_visit'])),
|
|
51
52
|
'newUser': !runtime.exists(json, 'new_user') ? undefined : json['new_user'],
|
|
@@ -104,6 +105,7 @@ function DynamicJwtToJSON(value) {
|
|
|
104
105
|
'verified_account': JwtBlockchainAccount.JwtBlockchainAccountToJSON(value.verifiedAccount),
|
|
105
106
|
'verified_credentials': (value.verifiedCredentials.map(JwtVerifiedCredential.JwtVerifiedCredentialToJSON)),
|
|
106
107
|
'last_verified_credential_id': value.lastVerifiedCredentialId,
|
|
108
|
+
'signin_credential_id': value.signinCredentialId,
|
|
107
109
|
'first_visit': value.firstVisit === undefined ? undefined : (value.firstVisit.toISOString()),
|
|
108
110
|
'last_visit': value.lastVisit === undefined ? undefined : (value.lastVisit.toISOString()),
|
|
109
111
|
'new_user': value.newUser,
|
package/src/models/DynamicJwt.js
CHANGED
|
@@ -42,6 +42,7 @@ function DynamicJwtFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
42
42
|
'verifiedAccount': !exists(json, 'verified_account') ? undefined : JwtBlockchainAccountFromJSON(json['verified_account']),
|
|
43
43
|
'verifiedCredentials': (json['verified_credentials'].map(JwtVerifiedCredentialFromJSON)),
|
|
44
44
|
'lastVerifiedCredentialId': json['last_verified_credential_id'],
|
|
45
|
+
'signinCredentialId': !exists(json, 'signin_credential_id') ? undefined : json['signin_credential_id'],
|
|
45
46
|
'firstVisit': !exists(json, 'first_visit') ? undefined : (new Date(json['first_visit'])),
|
|
46
47
|
'lastVisit': !exists(json, 'last_visit') ? undefined : (new Date(json['last_visit'])),
|
|
47
48
|
'newUser': !exists(json, 'new_user') ? undefined : json['new_user'],
|
|
@@ -100,6 +101,7 @@ function DynamicJwtToJSON(value) {
|
|
|
100
101
|
'verified_account': JwtBlockchainAccountToJSON(value.verifiedAccount),
|
|
101
102
|
'verified_credentials': (value.verifiedCredentials.map(JwtVerifiedCredentialToJSON)),
|
|
102
103
|
'last_verified_credential_id': value.lastVerifiedCredentialId,
|
|
104
|
+
'signin_credential_id': value.signinCredentialId,
|
|
103
105
|
'first_visit': value.firstVisit === undefined ? undefined : (value.firstVisit.toISOString()),
|
|
104
106
|
'last_visit': value.lastVisit === undefined ? undefined : (value.lastVisit.toISOString()),
|
|
105
107
|
'new_user': value.newUser,
|
|
@@ -23,6 +23,7 @@ function MinifiedDynamicJwtFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
23
23
|
'iat': !runtime.exists(json, 'iat') ? undefined : json['iat'],
|
|
24
24
|
'environmentId': json['environment_id'],
|
|
25
25
|
'lastVerifiedCredentialId': json['last_verified_credential_id'],
|
|
26
|
+
'signinCredentialId': !runtime.exists(json, 'signin_credential_id') ? undefined : json['signin_credential_id'],
|
|
26
27
|
'sessionPublicKey': !runtime.exists(json, 'session_public_key') ? undefined : json['session_public_key'],
|
|
27
28
|
'scope': !runtime.exists(json, 'scope') ? undefined : json['scope'],
|
|
28
29
|
'verifiedCredentialsHashes': !runtime.exists(json, 'verifiedCredentialsHashes') ? undefined : JwtVerifiedCredentialHashes.JwtVerifiedCredentialHashesFromJSON(json['verifiedCredentialsHashes']),
|
|
@@ -52,6 +53,7 @@ function MinifiedDynamicJwtToJSON(value) {
|
|
|
52
53
|
'iat': value.iat,
|
|
53
54
|
'environment_id': value.environmentId,
|
|
54
55
|
'last_verified_credential_id': value.lastVerifiedCredentialId,
|
|
56
|
+
'signin_credential_id': value.signinCredentialId,
|
|
55
57
|
'session_public_key': value.sessionPublicKey,
|
|
56
58
|
'scope': value.scope,
|
|
57
59
|
'verifiedCredentialsHashes': JwtVerifiedCredentialHashes.JwtVerifiedCredentialHashesToJSON(value.verifiedCredentialsHashes),
|
|
@@ -70,6 +70,12 @@ export interface MinifiedDynamicJwt {
|
|
|
70
70
|
* @memberof MinifiedDynamicJwt
|
|
71
71
|
*/
|
|
72
72
|
lastVerifiedCredentialId: string;
|
|
73
|
+
/**
|
|
74
|
+
* ID of the credential that was used to sign in and create this session. Unlike last_verified_credential_id, this value is immutable for the lifetime of the session and always refers to a sign-in capable credential.
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof MinifiedDynamicJwt
|
|
77
|
+
*/
|
|
78
|
+
signinCredentialId?: string;
|
|
73
79
|
/**
|
|
74
80
|
* Client session public key
|
|
75
81
|
* @type {string}
|
|
@@ -19,6 +19,7 @@ function MinifiedDynamicJwtFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
19
19
|
'iat': !exists(json, 'iat') ? undefined : json['iat'],
|
|
20
20
|
'environmentId': json['environment_id'],
|
|
21
21
|
'lastVerifiedCredentialId': json['last_verified_credential_id'],
|
|
22
|
+
'signinCredentialId': !exists(json, 'signin_credential_id') ? undefined : json['signin_credential_id'],
|
|
22
23
|
'sessionPublicKey': !exists(json, 'session_public_key') ? undefined : json['session_public_key'],
|
|
23
24
|
'scope': !exists(json, 'scope') ? undefined : json['scope'],
|
|
24
25
|
'verifiedCredentialsHashes': !exists(json, 'verifiedCredentialsHashes') ? undefined : JwtVerifiedCredentialHashesFromJSON(json['verifiedCredentialsHashes']),
|
|
@@ -48,6 +49,7 @@ function MinifiedDynamicJwtToJSON(value) {
|
|
|
48
49
|
'iat': value.iat,
|
|
49
50
|
'environment_id': value.environmentId,
|
|
50
51
|
'last_verified_credential_id': value.lastVerifiedCredentialId,
|
|
52
|
+
'signin_credential_id': value.signinCredentialId,
|
|
51
53
|
'session_public_key': value.sessionPublicKey,
|
|
52
54
|
'scope': value.scope,
|
|
53
55
|
'verifiedCredentialsHashes': JwtVerifiedCredentialHashesToJSON(value.verifiedCredentialsHashes),
|
|
@@ -15,7 +15,7 @@ function TransactionFeeEstimateResponseFromJSONTyped(json, ignoreDiscriminator)
|
|
|
15
15
|
return {
|
|
16
16
|
'estimatedFee': json['estimatedFee'],
|
|
17
17
|
'currency': json['currency'],
|
|
18
|
-
'decimals': json['decimals'],
|
|
18
|
+
'decimals': !runtime.exists(json, 'decimals') ? undefined : json['decimals'],
|
|
19
19
|
'units': !runtime.exists(json, 'units') ? undefined : json['units'],
|
|
20
20
|
'unitPrice': !runtime.exists(json, 'unitPrice') ? undefined : json['unitPrice'],
|
|
21
21
|
'baseFee': !runtime.exists(json, 'baseFee') ? undefined : json['baseFee'],
|
|
@@ -32,7 +32,7 @@ export interface TransactionFeeEstimateResponse {
|
|
|
32
32
|
* @type {number}
|
|
33
33
|
* @memberof TransactionFeeEstimateResponse
|
|
34
34
|
*/
|
|
35
|
-
decimals
|
|
35
|
+
decimals?: number;
|
|
36
36
|
/**
|
|
37
37
|
* Estimated units of compute/space required (gas, compute units, vBytes, etc.)
|
|
38
38
|
* @type {string}
|
|
@@ -11,7 +11,7 @@ function TransactionFeeEstimateResponseFromJSONTyped(json, ignoreDiscriminator)
|
|
|
11
11
|
return {
|
|
12
12
|
'estimatedFee': json['estimatedFee'],
|
|
13
13
|
'currency': json['currency'],
|
|
14
|
-
'decimals': json['decimals'],
|
|
14
|
+
'decimals': !exists(json, 'decimals') ? undefined : json['decimals'],
|
|
15
15
|
'units': !exists(json, 'units') ? undefined : json['units'],
|
|
16
16
|
'unitPrice': !exists(json, 'unitPrice') ? undefined : json['unitPrice'],
|
|
17
17
|
'baseFee': !exists(json, 'baseFee') ? undefined : json['baseFee'],
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var runtime = require('../runtime.cjs');
|
|
5
6
|
var ChainEnum = require('./ChainEnum.cjs');
|
|
6
7
|
var WalletTransactionAssetTransfer = require('./WalletTransactionAssetTransfer.cjs');
|
|
7
8
|
var WalletTransactionType = require('./WalletTransactionType.cjs');
|
|
@@ -18,7 +19,7 @@ function WalletTransactionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
18
19
|
'transactionHash': json['transactionHash'],
|
|
19
20
|
'blockNumber': json['blockNumber'],
|
|
20
21
|
'transactionTimestamp': (new Date(json['transactionTimestamp'])),
|
|
21
|
-
'blockHash': json['blockHash'],
|
|
22
|
+
'blockHash': !runtime.exists(json, 'blockHash') ? undefined : json['blockHash'],
|
|
22
23
|
'blockExplorerUrls': json['blockExplorerUrls'],
|
|
23
24
|
'fromAddress': json['fromAddress'],
|
|
24
25
|
'toAddress': json['toAddress'],
|
|
@@ -26,6 +27,10 @@ function WalletTransactionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
26
27
|
'assetTransfers': (json['assetTransfers'].map(WalletTransactionAssetTransfer.WalletTransactionAssetTransferFromJSON)),
|
|
27
28
|
'chainName': ChainEnum.ChainEnumFromJSON(json['chainName']),
|
|
28
29
|
'networkId': json['networkId'],
|
|
30
|
+
'description': !runtime.exists(json, 'description') ? undefined : json['description'],
|
|
31
|
+
'source': !runtime.exists(json, 'source') ? undefined : json['source'],
|
|
32
|
+
'spam': !runtime.exists(json, 'spam') ? undefined : json['spam'],
|
|
33
|
+
'transactionType': !runtime.exists(json, 'transactionType') ? undefined : json['transactionType'],
|
|
29
34
|
};
|
|
30
35
|
}
|
|
31
36
|
function WalletTransactionToJSON(value) {
|
|
@@ -47,6 +52,10 @@ function WalletTransactionToJSON(value) {
|
|
|
47
52
|
'assetTransfers': (value.assetTransfers.map(WalletTransactionAssetTransfer.WalletTransactionAssetTransferToJSON)),
|
|
48
53
|
'chainName': ChainEnum.ChainEnumToJSON(value.chainName),
|
|
49
54
|
'networkId': value.networkId,
|
|
55
|
+
'description': value.description,
|
|
56
|
+
'source': value.source,
|
|
57
|
+
'spam': value.spam,
|
|
58
|
+
'transactionType': value.transactionType,
|
|
50
59
|
};
|
|
51
60
|
}
|
|
52
61
|
|
|
@@ -37,11 +37,11 @@ export interface WalletTransaction {
|
|
|
37
37
|
*/
|
|
38
38
|
transactionTimestamp: Date;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Block hash of the transaction. May be empty for some chains.
|
|
41
41
|
* @type {string}
|
|
42
42
|
* @memberof WalletTransaction
|
|
43
43
|
*/
|
|
44
|
-
blockHash
|
|
44
|
+
blockHash?: string;
|
|
45
45
|
/**
|
|
46
46
|
* URLs to the block explorer for the transaction
|
|
47
47
|
* @type {Array<string>}
|
|
@@ -84,6 +84,30 @@ export interface WalletTransaction {
|
|
|
84
84
|
* @memberof WalletTransaction
|
|
85
85
|
*/
|
|
86
86
|
networkId: number;
|
|
87
|
+
/**
|
|
88
|
+
* Human-readable description of the transaction
|
|
89
|
+
* @type {string}
|
|
90
|
+
* @memberof WalletTransaction
|
|
91
|
+
*/
|
|
92
|
+
description?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Protocol or program that originated the transaction
|
|
95
|
+
* @type {string}
|
|
96
|
+
* @memberof WalletTransaction
|
|
97
|
+
*/
|
|
98
|
+
source?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Whether the transaction is likely spam or dust
|
|
101
|
+
* @type {boolean}
|
|
102
|
+
* @memberof WalletTransaction
|
|
103
|
+
*/
|
|
104
|
+
spam?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Detailed transaction type from the data provider (e.g., TRANSFER, SWAP, BURN, STAKE)
|
|
107
|
+
* @type {string}
|
|
108
|
+
* @memberof WalletTransaction
|
|
109
|
+
*/
|
|
110
|
+
transactionType?: string;
|
|
87
111
|
}
|
|
88
112
|
export declare function WalletTransactionFromJSON(json: any): WalletTransaction;
|
|
89
113
|
export declare function WalletTransactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): WalletTransaction;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { exists } from '../runtime.js';
|
|
1
2
|
import { ChainEnumFromJSON, ChainEnumToJSON } from './ChainEnum.js';
|
|
2
3
|
import { WalletTransactionAssetTransferFromJSON, WalletTransactionAssetTransferToJSON } from './WalletTransactionAssetTransfer.js';
|
|
3
4
|
import { WalletTransactionTypeFromJSON, WalletTransactionTypeToJSON } from './WalletTransactionType.js';
|
|
@@ -14,7 +15,7 @@ function WalletTransactionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
14
15
|
'transactionHash': json['transactionHash'],
|
|
15
16
|
'blockNumber': json['blockNumber'],
|
|
16
17
|
'transactionTimestamp': (new Date(json['transactionTimestamp'])),
|
|
17
|
-
'blockHash': json['blockHash'],
|
|
18
|
+
'blockHash': !exists(json, 'blockHash') ? undefined : json['blockHash'],
|
|
18
19
|
'blockExplorerUrls': json['blockExplorerUrls'],
|
|
19
20
|
'fromAddress': json['fromAddress'],
|
|
20
21
|
'toAddress': json['toAddress'],
|
|
@@ -22,6 +23,10 @@ function WalletTransactionFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
22
23
|
'assetTransfers': (json['assetTransfers'].map(WalletTransactionAssetTransferFromJSON)),
|
|
23
24
|
'chainName': ChainEnumFromJSON(json['chainName']),
|
|
24
25
|
'networkId': json['networkId'],
|
|
26
|
+
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
27
|
+
'source': !exists(json, 'source') ? undefined : json['source'],
|
|
28
|
+
'spam': !exists(json, 'spam') ? undefined : json['spam'],
|
|
29
|
+
'transactionType': !exists(json, 'transactionType') ? undefined : json['transactionType'],
|
|
25
30
|
};
|
|
26
31
|
}
|
|
27
32
|
function WalletTransactionToJSON(value) {
|
|
@@ -43,6 +48,10 @@ function WalletTransactionToJSON(value) {
|
|
|
43
48
|
'assetTransfers': (value.assetTransfers.map(WalletTransactionAssetTransferToJSON)),
|
|
44
49
|
'chainName': ChainEnumToJSON(value.chainName),
|
|
45
50
|
'networkId': value.networkId,
|
|
51
|
+
'description': value.description,
|
|
52
|
+
'source': value.source,
|
|
53
|
+
'spam': value.spam,
|
|
54
|
+
'transactionType': value.transactionType,
|
|
46
55
|
};
|
|
47
56
|
}
|
|
48
57
|
|