@lumenwipe/verify 0.2.0 → 0.3.0

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/CHANGELOG.md CHANGED
@@ -7,6 +7,23 @@ release is cut.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.0] - 2026-11-10
11
+
12
+ ### Added
13
+
14
+ - `verifyRevokeAllowanceTransaction(unsignedXdr, networkPassphrase, expected, nowSeconds?)`,
15
+ compiled from the web's allowance-revocation trust anchor, with the documented input type
16
+ `RevokeAllowanceExpectation` (`owner`, `token`, `spender`).
17
+ - `RevokeAllowanceVerificationError`, whose `name` is `"RevokeAllowanceVerificationError"` and
18
+ whose `code` is one stable `RevokeAllowanceVerificationErrorCode` per refusal reason. Branch on
19
+ the code: the message is English wording and may change. An envelope that cannot be decoded is
20
+ refused with `VerificationError` and its existing code.
21
+ - `vectors/revoke-allowance-v1.json`, exported as `@lumenwipe/verify/vectors/revoke-allowance-v1.json`:
22
+ two accepted revocations (a contract and an account spender) and a rejected mutation for every
23
+ refusal code, plus one envelope the decoder refuses.
24
+
25
+ The bundled exchange and contract registries are unchanged.
26
+
10
27
  ## [0.2.0] - 2026-11-08
11
28
 
12
29
  ### Added
@@ -62,6 +79,7 @@ release is cut.
62
79
  is optional, and a rejection may mutate the snapshot instead of, or with, the transaction.
63
80
  - The package ships its `LICENSE` and this `CHANGELOG.md`.
64
81
 
65
- [Unreleased]: https://github.com/LumenWipe/lumenwipe/compare/verify-v0.2.0...HEAD
82
+ [Unreleased]: https://github.com/LumenWipe/lumenwipe/compare/verify-v0.3.0...HEAD
83
+ [0.3.0]: https://github.com/LumenWipe/lumenwipe/compare/verify-v0.2.0...verify-v0.3.0
66
84
  [0.2.0]: https://github.com/LumenWipe/lumenwipe/compare/verify-v0.1.0...verify-v0.2.0
67
85
  [0.1.0]: https://github.com/LumenWipe/lumenwipe/tree/verify-v0.1.0
package/README.md CHANGED
@@ -10,6 +10,11 @@ It is not a port. The bundle is compiled from the web's own
10
10
  conformance vector set (`vectors/close-v1.json`) runs against this package and against the web
11
11
  verifier in CI.
12
12
 
13
+ It also ships the web's trust anchor for an allowance revocation,
14
+ `verifyRevokeAllowanceTransaction`, compiled from
15
+ [`verify-revoke-allowance.ts`](https://github.com/LumenWipe/lumenwipe/blob/main/apps/web/lib/stellar/verify-revoke-allowance.ts)
16
+ with its own vector set (`vectors/revoke-allowance-v1.json`).
17
+
13
18
  ## Install
14
19
 
15
20
  ```bash
@@ -121,6 +126,34 @@ Without a snapshot:
121
126
  `verifyCloseTransaction` also reads the system clock for the transaction's expiry: a transaction
122
127
  valid for more than 900 seconds from now is refused.
123
128
 
129
+ ## Revoking an allowance
130
+
131
+ `verifyRevokeAllowanceTransaction` checks an API-built revocation before the signature: exactly
132
+ one `approve(owner, spender, 0, expiration)` on the token, sourced from the owner, with no memo,
133
+ a fee of at most 10,000,000 stroops, valid for at most 900 seconds, authorized only by the
134
+ owner's own source account and naming no other account or contract. Pass the allowance your
135
+ screen showed, never values read from the transaction:
136
+
137
+ ```ts
138
+ import {
139
+ RevokeAllowanceVerificationError,
140
+ verifyRevokeAllowanceTransaction,
141
+ } from "@lumenwipe/verify";
142
+ import { Networks } from "@stellar/stellar-sdk";
143
+
144
+ try {
145
+ verifyRevokeAllowanceTransaction(unsignedXdr, Networks.PUBLIC, { owner, token, spender });
146
+ } catch (error) {
147
+ if (error instanceof RevokeAllowanceVerificationError) console.error(error.code);
148
+ throw error;
149
+ }
150
+ ```
151
+
152
+ It throws `RevokeAllowanceVerificationError` with a stable `code`
153
+ (`RevokeAllowanceVerificationErrorCode`), or `VerificationError` when the envelope cannot be
154
+ decoded at all. The optional fourth argument is the current Unix time in seconds; it defaults to
155
+ the system clock.
156
+
124
157
  ## Conformance vectors
125
158
 
126
159
  `vectors/close-v1.json` (schema 1) lists accepted and rejected transactions with the full
@@ -133,6 +166,11 @@ this one:
133
166
  import vectors from "@lumenwipe/verify/vectors/close-v1.json" with { type: "json" };
134
167
  ```
135
168
 
169
+ `vectors/revoke-allowance-v1.json` (schema 1) does the same for
170
+ `verifyRevokeAllowanceTransaction`: each vector gives the envelope, the network passphrase, the
171
+ expectation and `nowSeconds` to pass as the fourth argument, and for a rejection the error
172
+ `class`, `code` and exact `message`.
173
+
136
174
  ## License
137
175
 
138
176
  Apache-2.0
package/dist/index.cjs CHANGED
@@ -2355,6 +2355,112 @@ function exitExpectations(accountState, network) {
2355
2355
  };
2356
2356
  }
2357
2357
 
2358
+ // ../../apps/web/lib/stellar/verify-revoke-allowance.ts
2359
+ var MAX_REVOKE_FEE_STROOPS = BigInt(1e7);
2360
+ var MAX_VALIDITY_SECONDS2 = BigInt(900);
2361
+ var RevokeAllowanceVerificationError = class extends Error {
2362
+ constructor(code, message) {
2363
+ super(message);
2364
+ this.name = "RevokeAllowanceVerificationError";
2365
+ this.code = code;
2366
+ }
2367
+ };
2368
+ function fail(code, message) {
2369
+ throw new RevokeAllowanceVerificationError(code, message);
2370
+ }
2371
+ function verifyRevokeAllowanceTransaction(xdr2, networkPassphrase, expected, nowSeconds = Math.floor(Date.now() / 1e3)) {
2372
+ const intent = intentFromXdr(xdr2, networkPassphrase);
2373
+ const maxTime = intent.maxTime ?? null;
2374
+ if (maxTime === null || !/^\d+$/.test(maxTime)) {
2375
+ fail(
2376
+ "revoke_expiry_missing",
2377
+ "This transaction never expires, so it could be submitted long after you approved it."
2378
+ );
2379
+ }
2380
+ if (BigInt(maxTime) > BigInt(Math.floor(nowSeconds)) + MAX_VALIDITY_SECONDS2) {
2381
+ fail(
2382
+ "revoke_expiry_too_far",
2383
+ "This transaction stays valid for far longer than a revocation needs."
2384
+ );
2385
+ }
2386
+ if (intent.source !== expected.owner) {
2387
+ fail(
2388
+ "revoke_transaction_source_mismatch",
2389
+ "This transaction is not sourced from the account being revoked for."
2390
+ );
2391
+ }
2392
+ if (intent.memo !== null) {
2393
+ fail("revoke_memo_present", "This transaction carries a memo, which a revocation never needs.");
2394
+ }
2395
+ if (BigInt(intent.fee) > MAX_REVOKE_FEE_STROOPS) {
2396
+ fail(
2397
+ "revoke_fee_above_cap",
2398
+ "This transaction's fee is higher than a revocation should ever need."
2399
+ );
2400
+ }
2401
+ if (intent.operations.length !== 1) {
2402
+ fail(
2403
+ "revoke_operation_count",
2404
+ `This transaction has ${intent.operations.length} operations; a revocation has exactly one.`
2405
+ );
2406
+ }
2407
+ const op = intent.operations[0];
2408
+ if (op.source !== expected.owner) {
2409
+ fail(
2410
+ "revoke_operation_source_mismatch",
2411
+ "The operation does not act as the account being revoked for."
2412
+ );
2413
+ }
2414
+ if (op.type !== "invoke_host_function") {
2415
+ fail("revoke_not_invocation", "This transaction does not invoke a contract.");
2416
+ }
2417
+ if (op.contract !== expected.token) {
2418
+ fail("revoke_token_mismatch", "This transaction does not touch the expected token contract.");
2419
+ }
2420
+ if (op.function !== "approve") {
2421
+ fail(
2422
+ "revoke_function_not_approve",
2423
+ "This transaction does not call approve, so it is not a revocation."
2424
+ );
2425
+ }
2426
+ if (op.args.length !== 4 || op.args[0] !== expected.owner || op.args[1] !== expected.spender || op.args[2] !== "0") {
2427
+ fail(
2428
+ "revoke_approve_args_mismatch",
2429
+ "This transaction does not revoke the expected spender's allowance on this token."
2430
+ );
2431
+ }
2432
+ if (op.authorizesBeyondSelf) {
2433
+ fail(
2434
+ "revoke_auth_beyond_self",
2435
+ "This transaction authorizes more than the account's own revocation."
2436
+ );
2437
+ }
2438
+ if (op.authDepth !== 0) {
2439
+ fail(
2440
+ "revoke_auth_nested",
2441
+ "This transaction authorizes a nested call, which a plain revocation never needs."
2442
+ );
2443
+ }
2444
+ if (op.unsupportedAddressCount > 0) {
2445
+ fail(
2446
+ "revoke_address_unsupported",
2447
+ "This transaction references an address form that cannot be verified."
2448
+ );
2449
+ }
2450
+ if (op.accountsReferenced.some((a) => a !== expected.owner && a !== expected.spender)) {
2451
+ fail(
2452
+ "revoke_foreign_account",
2453
+ "This transaction references an account other than the one being revoked for."
2454
+ );
2455
+ }
2456
+ if (op.contractsReferenced.some((c) => c !== expected.token && c !== expected.spender)) {
2457
+ fail(
2458
+ "revoke_foreign_contract",
2459
+ "This transaction references a contract other than the token or the spender."
2460
+ );
2461
+ }
2462
+ }
2463
+
2358
2464
  // src/index.ts
2359
2465
  function verifyCloseTransaction2(input) {
2360
2466
  verifyCloseTransaction(input);
@@ -2365,8 +2471,13 @@ function exitExpectations2(accountState, network) {
2365
2471
  function requiresMediator(address) {
2366
2472
  return mediatorAllowedFor(address);
2367
2473
  }
2474
+ function verifyRevokeAllowanceTransaction2(unsignedXdr, networkPassphrase, expected, nowSeconds) {
2475
+ verifyRevokeAllowanceTransaction(unsignedXdr, networkPassphrase, expected, nowSeconds);
2476
+ }
2368
2477
 
2478
+ exports.RevokeAllowanceVerificationError = RevokeAllowanceVerificationError;
2369
2479
  exports.VerificationError = VerificationError;
2370
2480
  exports.exitExpectations = exitExpectations2;
2371
2481
  exports.requiresMediator = requiresMediator;
2372
2482
  exports.verifyCloseTransaction = verifyCloseTransaction2;
2483
+ exports.verifyRevokeAllowanceTransaction = verifyRevokeAllowanceTransaction2;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * `@lumenwipe/verify`: the verifier the LumenWipe web app runs before every signature, compiled
3
- * from the web's own modules rather than copied. There is one implementation; this file only
3
+ * from the web's own modules rather than copied, together with the web's trust anchor for an
4
+ * allowance revocation. There is one implementation; this file only
4
5
  * gives it explicit, documented types. `tests/types.test.ts` pins every type below to the web
5
6
  * signature in both directions, so a change on either side fails the build.
6
7
  *
@@ -434,6 +435,40 @@ declare interface PoolShareEntry {
434
435
  */
435
436
  export declare function requiresMediator(address: string): boolean;
436
437
 
438
+ /**
439
+ * Every reason the revocation anchor refuses a transaction, one stable code each, in the order the
440
+ * checks run. The code is the contract an integrator branches on; the message is the current
441
+ * English wording and may change. Each code carries a `revoke_` prefix so it never shares a value
442
+ * with a close `VerificationErrorCode`.
443
+ */
444
+ declare const REVOKE_ALLOWANCE_VERIFICATION_ERROR_CODES: readonly ["revoke_expiry_missing", "revoke_expiry_too_far", "revoke_transaction_source_mismatch", "revoke_memo_present", "revoke_fee_above_cap", "revoke_operation_count", "revoke_operation_source_mismatch", "revoke_not_invocation", "revoke_token_mismatch", "revoke_function_not_approve", "revoke_approve_args_mismatch", "revoke_auth_beyond_self", "revoke_auth_nested", "revoke_address_unsupported", "revoke_foreign_account", "revoke_foreign_contract"];
445
+
446
+ /**
447
+ * What the screen showed the user before they approved an allowance revocation: the allowance
448
+ * the revocation must zero, and nothing else. Every value is one the integrator already displayed,
449
+ * never one read from the transaction under verification.
450
+ */
451
+ export declare interface RevokeAllowanceExpectation {
452
+ /** The account whose allowance is revoked. The transaction and its one operation must be
453
+ * sourced from it, and it is the only account the call may authorize. */
454
+ owner: string;
455
+ /** The token contract (`C...`) `approve` is called on. */
456
+ token: string;
457
+ /** The spender whose allowance goes to zero: a contract (`C...`) or, less often, an account
458
+ * (`G...`). */
459
+ spender: string;
460
+ }
461
+
462
+ /** Thrown when a server-built allowance revocation fails verification. Never sign past this. */
463
+ export declare class RevokeAllowanceVerificationError extends Error {
464
+ /** Why the transaction was refused. Stable across releases, unlike the message. */
465
+ readonly code: RevokeAllowanceVerificationErrorCode;
466
+ constructor(code: RevokeAllowanceVerificationErrorCode, message: string);
467
+ }
468
+
469
+ /** The reason a {@link RevokeAllowanceVerificationError} was thrown. */
470
+ export declare type RevokeAllowanceVerificationErrorCode = (typeof REVOKE_ALLOWANCE_VERIFICATION_ERROR_CODES)[number];
471
+
437
472
  /**
438
473
  * A served exchange registry: the body of `GET /v1/config/exchange-registry` (the SDK's
439
474
  * `client.getExchangeRegistry()`), passed as is. Only these three fields are read.
@@ -651,4 +686,27 @@ export declare interface VerifyCloseInput {
651
686
  */
652
687
  export declare function verifyCloseTransaction(input: VerifyCloseInput): void;
653
688
 
689
+ /**
690
+ * Decodes an API-built, unsigned allowance revocation and asserts it is exactly
691
+ * `approve(owner, spender, 0, expiration)` on `token`: one operation, sourced from `owner`, no
692
+ * memo, a fee of at most 10,000,000 stroops, valid for at most 900 seconds after `nowSeconds`,
693
+ * authorized only by the owner's own source account with no nested call, and naming no other
694
+ * account or contract. Returns only when the transaction may be signed.
695
+ *
696
+ * What it guarantees is that the signed transaction does what the screen said, so an API cannot
697
+ * swap the token or the spender between what was shown and what is signed. It does not judge
698
+ * whether the shown allowance is worth revoking.
699
+ *
700
+ * Throws {@link RevokeAllowanceVerificationError} with a stable `code` on any mismatch, or
701
+ * {@link VerificationError} when the envelope cannot be decoded at all (for example a text memo
702
+ * that is not valid UTF-8). Synchronous and offline: it reads no network and no page state, and
703
+ * keeps no state between calls. Run it once per transaction, immediately before the signature.
704
+ *
705
+ * @param unsignedXdr - The unsigned transaction envelope as returned by the API, base64.
706
+ * @param networkPassphrase - The passphrase of the network the revocation runs on.
707
+ * @param expected - The allowance the screen showed.
708
+ * @param nowSeconds - The current Unix time in seconds; defaults to the system clock.
709
+ */
710
+ export declare function verifyRevokeAllowanceTransaction(unsignedXdr: string, networkPassphrase: string, expected: RevokeAllowanceExpectation, nowSeconds?: number): void;
711
+
654
712
  export { }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * `@lumenwipe/verify`: the verifier the LumenWipe web app runs before every signature, compiled
3
- * from the web's own modules rather than copied. There is one implementation; this file only
3
+ * from the web's own modules rather than copied, together with the web's trust anchor for an
4
+ * allowance revocation. There is one implementation; this file only
4
5
  * gives it explicit, documented types. `tests/types.test.ts` pins every type below to the web
5
6
  * signature in both directions, so a change on either side fails the build.
6
7
  *
@@ -434,6 +435,40 @@ declare interface PoolShareEntry {
434
435
  */
435
436
  export declare function requiresMediator(address: string): boolean;
436
437
 
438
+ /**
439
+ * Every reason the revocation anchor refuses a transaction, one stable code each, in the order the
440
+ * checks run. The code is the contract an integrator branches on; the message is the current
441
+ * English wording and may change. Each code carries a `revoke_` prefix so it never shares a value
442
+ * with a close `VerificationErrorCode`.
443
+ */
444
+ declare const REVOKE_ALLOWANCE_VERIFICATION_ERROR_CODES: readonly ["revoke_expiry_missing", "revoke_expiry_too_far", "revoke_transaction_source_mismatch", "revoke_memo_present", "revoke_fee_above_cap", "revoke_operation_count", "revoke_operation_source_mismatch", "revoke_not_invocation", "revoke_token_mismatch", "revoke_function_not_approve", "revoke_approve_args_mismatch", "revoke_auth_beyond_self", "revoke_auth_nested", "revoke_address_unsupported", "revoke_foreign_account", "revoke_foreign_contract"];
445
+
446
+ /**
447
+ * What the screen showed the user before they approved an allowance revocation: the allowance
448
+ * the revocation must zero, and nothing else. Every value is one the integrator already displayed,
449
+ * never one read from the transaction under verification.
450
+ */
451
+ export declare interface RevokeAllowanceExpectation {
452
+ /** The account whose allowance is revoked. The transaction and its one operation must be
453
+ * sourced from it, and it is the only account the call may authorize. */
454
+ owner: string;
455
+ /** The token contract (`C...`) `approve` is called on. */
456
+ token: string;
457
+ /** The spender whose allowance goes to zero: a contract (`C...`) or, less often, an account
458
+ * (`G...`). */
459
+ spender: string;
460
+ }
461
+
462
+ /** Thrown when a server-built allowance revocation fails verification. Never sign past this. */
463
+ export declare class RevokeAllowanceVerificationError extends Error {
464
+ /** Why the transaction was refused. Stable across releases, unlike the message. */
465
+ readonly code: RevokeAllowanceVerificationErrorCode;
466
+ constructor(code: RevokeAllowanceVerificationErrorCode, message: string);
467
+ }
468
+
469
+ /** The reason a {@link RevokeAllowanceVerificationError} was thrown. */
470
+ export declare type RevokeAllowanceVerificationErrorCode = (typeof REVOKE_ALLOWANCE_VERIFICATION_ERROR_CODES)[number];
471
+
437
472
  /**
438
473
  * A served exchange registry: the body of `GET /v1/config/exchange-registry` (the SDK's
439
474
  * `client.getExchangeRegistry()`), passed as is. Only these three fields are read.
@@ -651,4 +686,27 @@ export declare interface VerifyCloseInput {
651
686
  */
652
687
  export declare function verifyCloseTransaction(input: VerifyCloseInput): void;
653
688
 
689
+ /**
690
+ * Decodes an API-built, unsigned allowance revocation and asserts it is exactly
691
+ * `approve(owner, spender, 0, expiration)` on `token`: one operation, sourced from `owner`, no
692
+ * memo, a fee of at most 10,000,000 stroops, valid for at most 900 seconds after `nowSeconds`,
693
+ * authorized only by the owner's own source account with no nested call, and naming no other
694
+ * account or contract. Returns only when the transaction may be signed.
695
+ *
696
+ * What it guarantees is that the signed transaction does what the screen said, so an API cannot
697
+ * swap the token or the spender between what was shown and what is signed. It does not judge
698
+ * whether the shown allowance is worth revoking.
699
+ *
700
+ * Throws {@link RevokeAllowanceVerificationError} with a stable `code` on any mismatch, or
701
+ * {@link VerificationError} when the envelope cannot be decoded at all (for example a text memo
702
+ * that is not valid UTF-8). Synchronous and offline: it reads no network and no page state, and
703
+ * keeps no state between calls. Run it once per transaction, immediately before the signature.
704
+ *
705
+ * @param unsignedXdr - The unsigned transaction envelope as returned by the API, base64.
706
+ * @param networkPassphrase - The passphrase of the network the revocation runs on.
707
+ * @param expected - The allowance the screen showed.
708
+ * @param nowSeconds - The current Unix time in seconds; defaults to the system clock.
709
+ */
710
+ export declare function verifyRevokeAllowanceTransaction(unsignedXdr: string, networkPassphrase: string, expected: RevokeAllowanceExpectation, nowSeconds?: number): void;
711
+
654
712
  export { }
package/dist/index.js CHANGED
@@ -2353,6 +2353,112 @@ function exitExpectations(accountState, network) {
2353
2353
  };
2354
2354
  }
2355
2355
 
2356
+ // ../../apps/web/lib/stellar/verify-revoke-allowance.ts
2357
+ var MAX_REVOKE_FEE_STROOPS = BigInt(1e7);
2358
+ var MAX_VALIDITY_SECONDS2 = BigInt(900);
2359
+ var RevokeAllowanceVerificationError = class extends Error {
2360
+ constructor(code, message) {
2361
+ super(message);
2362
+ this.name = "RevokeAllowanceVerificationError";
2363
+ this.code = code;
2364
+ }
2365
+ };
2366
+ function fail(code, message) {
2367
+ throw new RevokeAllowanceVerificationError(code, message);
2368
+ }
2369
+ function verifyRevokeAllowanceTransaction(xdr2, networkPassphrase, expected, nowSeconds = Math.floor(Date.now() / 1e3)) {
2370
+ const intent = intentFromXdr(xdr2, networkPassphrase);
2371
+ const maxTime = intent.maxTime ?? null;
2372
+ if (maxTime === null || !/^\d+$/.test(maxTime)) {
2373
+ fail(
2374
+ "revoke_expiry_missing",
2375
+ "This transaction never expires, so it could be submitted long after you approved it."
2376
+ );
2377
+ }
2378
+ if (BigInt(maxTime) > BigInt(Math.floor(nowSeconds)) + MAX_VALIDITY_SECONDS2) {
2379
+ fail(
2380
+ "revoke_expiry_too_far",
2381
+ "This transaction stays valid for far longer than a revocation needs."
2382
+ );
2383
+ }
2384
+ if (intent.source !== expected.owner) {
2385
+ fail(
2386
+ "revoke_transaction_source_mismatch",
2387
+ "This transaction is not sourced from the account being revoked for."
2388
+ );
2389
+ }
2390
+ if (intent.memo !== null) {
2391
+ fail("revoke_memo_present", "This transaction carries a memo, which a revocation never needs.");
2392
+ }
2393
+ if (BigInt(intent.fee) > MAX_REVOKE_FEE_STROOPS) {
2394
+ fail(
2395
+ "revoke_fee_above_cap",
2396
+ "This transaction's fee is higher than a revocation should ever need."
2397
+ );
2398
+ }
2399
+ if (intent.operations.length !== 1) {
2400
+ fail(
2401
+ "revoke_operation_count",
2402
+ `This transaction has ${intent.operations.length} operations; a revocation has exactly one.`
2403
+ );
2404
+ }
2405
+ const op = intent.operations[0];
2406
+ if (op.source !== expected.owner) {
2407
+ fail(
2408
+ "revoke_operation_source_mismatch",
2409
+ "The operation does not act as the account being revoked for."
2410
+ );
2411
+ }
2412
+ if (op.type !== "invoke_host_function") {
2413
+ fail("revoke_not_invocation", "This transaction does not invoke a contract.");
2414
+ }
2415
+ if (op.contract !== expected.token) {
2416
+ fail("revoke_token_mismatch", "This transaction does not touch the expected token contract.");
2417
+ }
2418
+ if (op.function !== "approve") {
2419
+ fail(
2420
+ "revoke_function_not_approve",
2421
+ "This transaction does not call approve, so it is not a revocation."
2422
+ );
2423
+ }
2424
+ if (op.args.length !== 4 || op.args[0] !== expected.owner || op.args[1] !== expected.spender || op.args[2] !== "0") {
2425
+ fail(
2426
+ "revoke_approve_args_mismatch",
2427
+ "This transaction does not revoke the expected spender's allowance on this token."
2428
+ );
2429
+ }
2430
+ if (op.authorizesBeyondSelf) {
2431
+ fail(
2432
+ "revoke_auth_beyond_self",
2433
+ "This transaction authorizes more than the account's own revocation."
2434
+ );
2435
+ }
2436
+ if (op.authDepth !== 0) {
2437
+ fail(
2438
+ "revoke_auth_nested",
2439
+ "This transaction authorizes a nested call, which a plain revocation never needs."
2440
+ );
2441
+ }
2442
+ if (op.unsupportedAddressCount > 0) {
2443
+ fail(
2444
+ "revoke_address_unsupported",
2445
+ "This transaction references an address form that cannot be verified."
2446
+ );
2447
+ }
2448
+ if (op.accountsReferenced.some((a) => a !== expected.owner && a !== expected.spender)) {
2449
+ fail(
2450
+ "revoke_foreign_account",
2451
+ "This transaction references an account other than the one being revoked for."
2452
+ );
2453
+ }
2454
+ if (op.contractsReferenced.some((c) => c !== expected.token && c !== expected.spender)) {
2455
+ fail(
2456
+ "revoke_foreign_contract",
2457
+ "This transaction references a contract other than the token or the spender."
2458
+ );
2459
+ }
2460
+ }
2461
+
2356
2462
  // src/index.ts
2357
2463
  function verifyCloseTransaction2(input) {
2358
2464
  verifyCloseTransaction(input);
@@ -2363,5 +2469,8 @@ function exitExpectations2(accountState, network) {
2363
2469
  function requiresMediator(address) {
2364
2470
  return mediatorAllowedFor(address);
2365
2471
  }
2472
+ function verifyRevokeAllowanceTransaction2(unsignedXdr, networkPassphrase, expected, nowSeconds) {
2473
+ verifyRevokeAllowanceTransaction(unsignedXdr, networkPassphrase, expected, nowSeconds);
2474
+ }
2366
2475
 
2367
- export { VerificationError, exitExpectations2 as exitExpectations, requiresMediator, verifyCloseTransaction2 as verifyCloseTransaction };
2476
+ export { RevokeAllowanceVerificationError, VerificationError, exitExpectations2 as exitExpectations, requiresMediator, verifyCloseTransaction2 as verifyCloseTransaction, verifyRevokeAllowanceTransaction2 as verifyRevokeAllowanceTransaction };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumenwipe/verify",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Reference verifier for LumenWipe close transactions, compiled from the web app's own trust anchor, with a conformance vector set.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -18,7 +18,8 @@
18
18
  "default": "./dist/index.cjs"
19
19
  }
20
20
  },
21
- "./vectors/close-v1.json": "./vectors/close-v1.json"
21
+ "./vectors/close-v1.json": "./vectors/close-v1.json",
22
+ "./vectors/revoke-allowance-v1.json": "./vectors/revoke-allowance-v1.json"
22
23
  },
23
24
  "files": [
24
25
  "dist",
@@ -0,0 +1,437 @@
1
+ {
2
+ "schema": 1,
3
+ "name": "revoke-allowance-v1",
4
+ "description": "Conformance vectors for verifyRevokeAllowanceTransaction. Call the verifier with input.unsignedXdr, input.networkPassphrase, input.expected and nowSeconds, and expect it to return (accept) or to throw an error of exactly error.class with exactly error.code and error.message (reject). A RevokeAllowanceVerificationError is a revocation check; a VerificationError is a transaction the decoder refused first. The code is the stable reason to branch on; the message is the current English wording. Each reject is one named mutation of the transaction of the accept named in base. Every key is public.",
5
+ "generator": "packages/verify/scripts/revoke-vectors.ts",
6
+ "vectors": [
7
+ {
8
+ "name": "revoke-contract-spender",
9
+ "verdict": "accept",
10
+ "description": "approve(owner, spender, 0, 0) on the token, sourced from the owner, valid for five minutes, with the owner's own source-account authorization and no memo. The spender is a contract.",
11
+ "nowSeconds": 1793491200,
12
+ "input": {
13
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAG2ZBRAD3CFRPXdcw1RfDzMiTX13mUKBHE3Pzt2TMDl2AAAAAdhcHByb3ZlAAAAAAQAAAASAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAABIAAAABOJPzBwn97iHqrMlax7LT/T9M1H/KXOtSyc1O8HvoyVgAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAA",
14
+ "networkPassphrase": "Test SDF Network ; September 2015",
15
+ "expected": {
16
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
17
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
18
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
19
+ }
20
+ }
21
+ },
22
+ {
23
+ "name": "revoke-account-spender",
24
+ "verdict": "accept",
25
+ "description": "The same revocation for a spender that is a plain account rather than a contract.",
26
+ "nowSeconds": 1793491200,
27
+ "input": {
28
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAAAAAAAB2hSXuoTqaDDdmKoPQpIxEjXENsTnfLuGGM+ZSb0qnNgAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAABAAAAAAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAAAAAAAB2hSXuoTqaDDdmKoPQpIxEjXENsTnfLuGGM+ZSb0qnNgAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAA=",
29
+ "networkPassphrase": "Test SDF Network ; September 2015",
30
+ "expected": {
31
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
32
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
33
+ "spender": "GB3IKJPOUE5JUDBXMYVIHUFERRCI24INWE456LXBQYZ6MUTPJKTTN3NO"
34
+ }
35
+ }
36
+ },
37
+ {
38
+ "name": "never-expires",
39
+ "verdict": "reject",
40
+ "base": "revoke-contract-spender",
41
+ "mutation": "Sets maxTime to 0: no upper time bound.",
42
+ "nowSeconds": 1793491200,
43
+ "input": {
44
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAG2ZBRAD3CFRPXdcw1RfDzMiTX13mUKBHE3Pzt2TMDl2AAAAAdhcHByb3ZlAAAAAAQAAAASAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAABIAAAABOJPzBwn97iHqrMlax7LT/T9M1H/KXOtSyc1O8HvoyVgAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAA",
45
+ "networkPassphrase": "Test SDF Network ; September 2015",
46
+ "expected": {
47
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
48
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
49
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
50
+ }
51
+ },
52
+ "error": {
53
+ "class": "RevokeAllowanceVerificationError",
54
+ "code": "revoke_expiry_missing",
55
+ "message": "This transaction never expires, so it could be submitted long after you approved it."
56
+ }
57
+ },
58
+ {
59
+ "name": "valid-past-fifteen-minutes",
60
+ "verdict": "reject",
61
+ "base": "revoke-contract-spender",
62
+ "mutation": "Sets maxTime to one hour after nowSeconds, past the 900-second window.",
63
+ "nowSeconds": 1793491200,
64
+ "input": {
65
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5o8QAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAG2ZBRAD3CFRPXdcw1RfDzMiTX13mUKBHE3Pzt2TMDl2AAAAAdhcHByb3ZlAAAAAAQAAAASAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAABIAAAABOJPzBwn97iHqrMlax7LT/T9M1H/KXOtSyc1O8HvoyVgAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAA",
66
+ "networkPassphrase": "Test SDF Network ; September 2015",
67
+ "expected": {
68
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
69
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
70
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
71
+ }
72
+ },
73
+ "error": {
74
+ "class": "RevokeAllowanceVerificationError",
75
+ "code": "revoke_expiry_too_far",
76
+ "message": "This transaction stays valid for far longer than a revocation needs."
77
+ }
78
+ },
79
+ {
80
+ "name": "transaction-source-not-owner",
81
+ "verdict": "reject",
82
+ "base": "revoke-contract-spender",
83
+ "mutation": "Sources the transaction from another account.",
84
+ "nowSeconds": 1793491200,
85
+ "input": {
86
+ "unsignedXdr": "AAAAAgAAAADyeNmt0vz0Pkos9CGTZ0++MrEGySLqXpsMEnatcJwdTgAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAG2ZBRAD3CFRPXdcw1RfDzMiTX13mUKBHE3Pzt2TMDl2AAAAAdhcHByb3ZlAAAAAAQAAAASAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAABIAAAABOJPzBwn97iHqrMlax7LT/T9M1H/KXOtSyc1O8HvoyVgAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAA",
87
+ "networkPassphrase": "Test SDF Network ; September 2015",
88
+ "expected": {
89
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
90
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
91
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
92
+ }
93
+ },
94
+ "error": {
95
+ "class": "RevokeAllowanceVerificationError",
96
+ "code": "revoke_transaction_source_mismatch",
97
+ "message": "This transaction is not sourced from the account being revoked for."
98
+ }
99
+ },
100
+ {
101
+ "name": "carries-memo",
102
+ "verdict": "reject",
103
+ "base": "revoke-contract-spender",
104
+ "mutation": "Adds the text memo \"hi\".",
105
+ "nowSeconds": 1793491200,
106
+ "input": {
107
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAQAAAAJoaQAAAAAAAQAAAAAAAAAYAAAAAAAAAAG2ZBRAD3CFRPXdcw1RfDzMiTX13mUKBHE3Pzt2TMDl2AAAAAdhcHByb3ZlAAAAAAQAAAASAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAABIAAAABOJPzBwn97iHqrMlax7LT/T9M1H/KXOtSyc1O8HvoyVgAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAQAAAAAAAAAAAAAAAbZkFEAPcIVE9d1zDVF8PMyJNfXeZQoEcTc/O3ZMwOXYAAAAB2FwcHJvdmUAAAAABAAAABIAAAAAAAAAAF4SfNpPQMEOsT+Uj5Rq7gE+Ry2tkh2MVSQZGz4yFfbrAAAAEgAAAAE4k/MHCf3uIeqsyVrHstP9P0zUf8pc61LJzU7we+jJWAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAA=",
108
+ "networkPassphrase": "Test SDF Network ; September 2015",
109
+ "expected": {
110
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
111
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
112
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
113
+ }
114
+ },
115
+ "error": {
116
+ "class": "RevokeAllowanceVerificationError",
117
+ "code": "revoke_memo_present",
118
+ "message": "This transaction carries a memo, which a revocation never needs."
119
+ }
120
+ },
121
+ {
122
+ "name": "memo-not-valid-text",
123
+ "verdict": "reject",
124
+ "base": "revoke-contract-spender",
125
+ "mutation": "Adds a text memo whose bytes are not valid UTF-8, which the decoder refuses before any revocation check.",
126
+ "nowSeconds": 1793491200,
127
+ "input": {
128
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAQAAAAL//gAAAAAAAQAAAAAAAAAYAAAAAAAAAAG2ZBRAD3CFRPXdcw1RfDzMiTX13mUKBHE3Pzt2TMDl2AAAAAdhcHByb3ZlAAAAAAQAAAASAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAABIAAAABOJPzBwn97iHqrMlax7LT/T9M1H/KXOtSyc1O8HvoyVgAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAQAAAAAAAAAAAAAAAbZkFEAPcIVE9d1zDVF8PMyJNfXeZQoEcTc/O3ZMwOXYAAAAB2FwcHJvdmUAAAAABAAAABIAAAAAAAAAAF4SfNpPQMEOsT+Uj5Rq7gE+Ry2tkh2MVSQZGz4yFfbrAAAAEgAAAAE4k/MHCf3uIeqsyVrHstP9P0zUf8pc61LJzU7we+jJWAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAA=",
129
+ "networkPassphrase": "Test SDF Network ; September 2015",
130
+ "expected": {
131
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
132
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
133
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
134
+ }
135
+ },
136
+ "error": {
137
+ "class": "VerificationError",
138
+ "code": "memo_invalid_text",
139
+ "message": "The transaction carries a memo that is not valid text."
140
+ }
141
+ },
142
+ {
143
+ "name": "fee-above-cap",
144
+ "verdict": "reject",
145
+ "base": "revoke-contract-spender",
146
+ "mutation": "Raises the fee to 10,000,001 stroops, one above the 1 XLM cap.",
147
+ "nowSeconds": 1793491200,
148
+ "input": {
149
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wCYloEAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAG2ZBRAD3CFRPXdcw1RfDzMiTX13mUKBHE3Pzt2TMDl2AAAAAdhcHByb3ZlAAAAAAQAAAASAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAABIAAAABOJPzBwn97iHqrMlax7LT/T9M1H/KXOtSyc1O8HvoyVgAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAA",
150
+ "networkPassphrase": "Test SDF Network ; September 2015",
151
+ "expected": {
152
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
153
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
154
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
155
+ }
156
+ },
157
+ "error": {
158
+ "class": "RevokeAllowanceVerificationError",
159
+ "code": "revoke_fee_above_cap",
160
+ "message": "This transaction's fee is higher than a revocation should ever need."
161
+ }
162
+ },
163
+ {
164
+ "name": "two-operations",
165
+ "verdict": "reject",
166
+ "base": "revoke-contract-spender",
167
+ "mutation": "Repeats the approve call as a second operation.",
168
+ "nowSeconds": 1793491200,
169
+ "input": {
170
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAMgAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAIAAAAAAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAG2ZBRAD3CFRPXdcw1RfDzMiTX13mUKBHE3Pzt2TMDl2AAAAAdhcHByb3ZlAAAAAAQAAAASAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAABIAAAABOJPzBwn97iHqrMlax7LT/T9M1H/KXOtSyc1O8HvoyVgAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAG2ZBRAD3CFRPXdcw1RfDzMiTX13mUKBHE3Pzt2TMDl2AAAAAdhcHByb3ZlAAAAAAQAAAASAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAABIAAAABOJPzBwn97iHqrMlax7LT/T9M1H/KXOtSyc1O8HvoyVgAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAQAAAAAAAAAAAAAAAbZkFEAPcIVE9d1zDVF8PMyJNfXeZQoEcTc/O3ZMwOXYAAAAB2FwcHJvdmUAAAAABAAAABIAAAAAAAAAAF4SfNpPQMEOsT+Uj5Rq7gE+Ry2tkh2MVSQZGz4yFfbrAAAAEgAAAAE4k/MHCf3uIeqsyVrHstP9P0zUf8pc61LJzU7we+jJWAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAA=",
171
+ "networkPassphrase": "Test SDF Network ; September 2015",
172
+ "expected": {
173
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
174
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
175
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
176
+ }
177
+ },
178
+ "error": {
179
+ "class": "RevokeAllowanceVerificationError",
180
+ "code": "revoke_operation_count",
181
+ "message": "This transaction has 2 operations; a revocation has exactly one."
182
+ }
183
+ },
184
+ {
185
+ "name": "operation-source-not-owner",
186
+ "verdict": "reject",
187
+ "base": "revoke-contract-spender",
188
+ "mutation": "Gives the operation another account as its source.",
189
+ "nowSeconds": 1793491200,
190
+ "input": {
191
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAEAAAABAAAAAPJ42a3S/PQ+Siz0IZNnT74ysQbJIupemwwSdq1wnB1OAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAG2ZBRAD3CFRPXdcw1RfDzMiTX13mUKBHE3Pzt2TMDl2AAAAAdhcHByb3ZlAAAAAAQAAAASAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAABIAAAABOJPzBwn97iHqrMlax7LT/T9M1H/KXOtSyc1O8HvoyVgAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAA",
192
+ "networkPassphrase": "Test SDF Network ; September 2015",
193
+ "expected": {
194
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
195
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
196
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
197
+ }
198
+ },
199
+ "error": {
200
+ "class": "RevokeAllowanceVerificationError",
201
+ "code": "revoke_operation_source_mismatch",
202
+ "message": "The operation does not act as the account being revoked for."
203
+ }
204
+ },
205
+ {
206
+ "name": "not-a-contract-call",
207
+ "verdict": "reject",
208
+ "base": "revoke-contract-spender",
209
+ "mutation": "Replaces the contract call with a 1 XLM payment to another account.",
210
+ "nowSeconds": 1793491200,
211
+ "input": {
212
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAEAAAAAAAAAAQAAAADyeNmt0vz0Pkos9CGTZ0++MrEGySLqXpsMEnatcJwdTgAAAAAAAAAAAJiWgAAAAAAAAAAA",
213
+ "networkPassphrase": "Test SDF Network ; September 2015",
214
+ "expected": {
215
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
216
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
217
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
218
+ }
219
+ },
220
+ "error": {
221
+ "class": "RevokeAllowanceVerificationError",
222
+ "code": "revoke_not_invocation",
223
+ "message": "This transaction does not invoke a contract."
224
+ }
225
+ },
226
+ {
227
+ "name": "other-token",
228
+ "verdict": "reject",
229
+ "base": "revoke-contract-spender",
230
+ "mutation": "Calls approve on another contract instead of the token.",
231
+ "nowSeconds": 1793491200,
232
+ "input": {
233
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABNIn1GlSUnd3c9gQqLo91CGrV3aAehmIPmRFjvaRexV4AAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAE0ifUaVJSd3dz2BCouj3UIatXdoB6GYg+ZEWO9pF7FXgAAAAdhcHByb3ZlAAAAAAQAAAASAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAABIAAAABOJPzBwn97iHqrMlax7LT/T9M1H/KXOtSyc1O8HvoyVgAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAA",
234
+ "networkPassphrase": "Test SDF Network ; September 2015",
235
+ "expected": {
236
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
237
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
238
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
239
+ }
240
+ },
241
+ "error": {
242
+ "class": "RevokeAllowanceVerificationError",
243
+ "code": "revoke_token_mismatch",
244
+ "message": "This transaction does not touch the expected token contract."
245
+ }
246
+ },
247
+ {
248
+ "name": "calls-transfer",
249
+ "verdict": "reject",
250
+ "base": "revoke-contract-spender",
251
+ "mutation": "Calls transfer instead of approve, with the same arguments.",
252
+ "nowSeconds": 1793491200,
253
+ "input": {
254
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAIdHJhbnNmZXIAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAG2ZBRAD3CFRPXdcw1RfDzMiTX13mUKBHE3Pzt2TMDl2AAAAAh0cmFuc2ZlcgAAAAQAAAASAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAABIAAAABOJPzBwn97iHqrMlax7LT/T9M1H/KXOtSyc1O8HvoyVgAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAA",
255
+ "networkPassphrase": "Test SDF Network ; September 2015",
256
+ "expected": {
257
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
258
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
259
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
260
+ }
261
+ },
262
+ "error": {
263
+ "class": "RevokeAllowanceVerificationError",
264
+ "code": "revoke_function_not_approve",
265
+ "message": "This transaction does not call approve, so it is not a revocation."
266
+ }
267
+ },
268
+ {
269
+ "name": "non-zero-amount",
270
+ "verdict": "reject",
271
+ "base": "revoke-contract-spender",
272
+ "mutation": "Approves 5 instead of 0: a grant, not a revocation.",
273
+ "nowSeconds": 1793491200,
274
+ "input": {
275
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAUAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAG2ZBRAD3CFRPXdcw1RfDzMiTX13mUKBHE3Pzt2TMDl2AAAAAdhcHByb3ZlAAAAAAQAAAASAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAABIAAAABOJPzBwn97iHqrMlax7LT/T9M1H/KXOtSyc1O8HvoyVgAAAAKAAAAAAAAAAAAAAAAAAAABQAAAAMAAAAAAAAAAAAAAAAAAAAA",
276
+ "networkPassphrase": "Test SDF Network ; September 2015",
277
+ "expected": {
278
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
279
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
280
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
281
+ }
282
+ },
283
+ "error": {
284
+ "class": "RevokeAllowanceVerificationError",
285
+ "code": "revoke_approve_args_mismatch",
286
+ "message": "This transaction does not revoke the expected spender's allowance on this token."
287
+ }
288
+ },
289
+ {
290
+ "name": "other-spender",
291
+ "verdict": "reject",
292
+ "base": "revoke-contract-spender",
293
+ "mutation": "Revokes another contract's allowance instead of the spender's.",
294
+ "nowSeconds": 1793491200,
295
+ "input": {
296
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATSJ9RpUlJ3d3PYEKi6PdQhq1d2gHoZiD5kRY72kXsVeAAAACgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAG2ZBRAD3CFRPXdcw1RfDzMiTX13mUKBHE3Pzt2TMDl2AAAAAdhcHByb3ZlAAAAAAQAAAASAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAABIAAAABNIn1GlSUnd3c9gQqLo91CGrV3aAehmIPmRFjvaRexV4AAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAA",
297
+ "networkPassphrase": "Test SDF Network ; September 2015",
298
+ "expected": {
299
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
300
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
301
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
302
+ }
303
+ },
304
+ "error": {
305
+ "class": "RevokeAllowanceVerificationError",
306
+ "code": "revoke_approve_args_mismatch",
307
+ "message": "This transaction does not revoke the expected spender's allowance on this token."
308
+ }
309
+ },
310
+ {
311
+ "name": "three-arguments",
312
+ "verdict": "reject",
313
+ "base": "revoke-contract-spender",
314
+ "mutation": "Drops approve's expiration ledger argument.",
315
+ "nowSeconds": 1793491200,
316
+ "input": {
317
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAADAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAADAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
318
+ "networkPassphrase": "Test SDF Network ; September 2015",
319
+ "expected": {
320
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
321
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
322
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
323
+ }
324
+ },
325
+ "error": {
326
+ "class": "RevokeAllowanceVerificationError",
327
+ "code": "revoke_approve_args_mismatch",
328
+ "message": "This transaction does not revoke the expected spender's allowance on this token."
329
+ }
330
+ },
331
+ {
332
+ "name": "address-credentials",
333
+ "verdict": "reject",
334
+ "base": "revoke-contract-spender",
335
+ "mutation": "Authorizes the call under address credentials instead of the source account's own.",
336
+ "nowSeconds": 1793491200,
337
+ "input": {
338
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAABAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAbZkFEAPcIVE9d1zDVF8PMyJNfXeZQoEcTc/O3ZMwOXYAAAAB2FwcHJvdmUAAAAABAAAABIAAAAAAAAAAF4SfNpPQMEOsT+Uj5Rq7gE+Ry2tkh2MVSQZGz4yFfbrAAAAEgAAAAE4k/MHCf3uIeqsyVrHstP9P0zUf8pc61LJzU7we+jJWAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAA=",
339
+ "networkPassphrase": "Test SDF Network ; September 2015",
340
+ "expected": {
341
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
342
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
343
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
344
+ }
345
+ },
346
+ "error": {
347
+ "class": "RevokeAllowanceVerificationError",
348
+ "code": "revoke_auth_beyond_self",
349
+ "message": "This transaction authorizes more than the account's own revocation."
350
+ }
351
+ },
352
+ {
353
+ "name": "nested-authorization",
354
+ "verdict": "reject",
355
+ "base": "revoke-contract-spender",
356
+ "mutation": "Adds a nested approve on another contract under the authorized call.",
357
+ "nowSeconds": 1793491200,
358
+ "input": {
359
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAG2ZBRAD3CFRPXdcw1RfDzMiTX13mUKBHE3Pzt2TMDl2AAAAAdhcHByb3ZlAAAAAAQAAAASAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAABIAAAABOJPzBwn97iHqrMlax7LT/T9M1H/KXOtSyc1O8HvoyVgAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAQAAAAAAAAABNIn1GlSUnd3c9gQqLo91CGrV3aAehmIPmRFjvaRexV4AAAAHYXBwcm92ZQAAAAAAAAAAAAAAAAAAAAAA",
360
+ "networkPassphrase": "Test SDF Network ; September 2015",
361
+ "expected": {
362
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
363
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
364
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
365
+ }
366
+ },
367
+ "error": {
368
+ "class": "RevokeAllowanceVerificationError",
369
+ "code": "revoke_auth_nested",
370
+ "message": "This transaction authorizes a nested call, which a plain revocation never needs."
371
+ }
372
+ },
373
+ {
374
+ "name": "muxed-address-argument",
375
+ "verdict": "reject",
376
+ "base": "revoke-contract-spender",
377
+ "mutation": "Replaces the expiration ledger argument with a muxed account.",
378
+ "nowSeconds": 1793491200,
379
+ "input": {
380
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAgAAAAAAAAAHXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAABAAAAAAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAgAAAAAAAAAHXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAAAAAAAAAAAAAA=",
381
+ "networkPassphrase": "Test SDF Network ; September 2015",
382
+ "expected": {
383
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
384
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
385
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
386
+ }
387
+ },
388
+ "error": {
389
+ "class": "RevokeAllowanceVerificationError",
390
+ "code": "revoke_address_unsupported",
391
+ "message": "This transaction references an address form that cannot be verified."
392
+ }
393
+ },
394
+ {
395
+ "name": "foreign-account-argument",
396
+ "verdict": "reject",
397
+ "base": "revoke-contract-spender",
398
+ "mutation": "Replaces the expiration ledger argument with another account.",
399
+ "nowSeconds": 1793491200,
400
+ "input": {
401
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAADyeNmt0vz0Pkos9CGTZ0++MrEGySLqXpsMEnatcJwdTgAAAAEAAAAAAAAAAAAAAAG2ZBRAD3CFRPXdcw1RfDzMiTX13mUKBHE3Pzt2TMDl2AAAAAdhcHByb3ZlAAAAAAQAAAASAAAAAAAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAABIAAAABOJPzBwn97iHqrMlax7LT/T9M1H/KXOtSyc1O8HvoyVgAAAAKAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAPJ42a3S/PQ+Siz0IZNnT74ysQbJIupemwwSdq1wnB1OAAAAAAAAAAAAAAAA",
402
+ "networkPassphrase": "Test SDF Network ; September 2015",
403
+ "expected": {
404
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
405
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
406
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
407
+ }
408
+ },
409
+ "error": {
410
+ "class": "RevokeAllowanceVerificationError",
411
+ "code": "revoke_foreign_account",
412
+ "message": "This transaction references an account other than the one being revoked for."
413
+ }
414
+ },
415
+ {
416
+ "name": "foreign-contract-argument",
417
+ "verdict": "reject",
418
+ "base": "revoke-contract-spender",
419
+ "mutation": "Replaces the expiration ledger argument with another contract.",
420
+ "nowSeconds": 1793491200,
421
+ "input": {
422
+ "unsignedXdr": "AAAAAgAAAABeEnzaT0DBDrE/lI+Uau4BPkctrZIdjFUkGRs+MhX26wAAAGQAAAABAAAAAQAAAAEAAAAAAAAAAAAAAABq5oIsAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABtmQUQA9whUT13XMNUXw8zIk19d5lCgRxNz87dkzA5dgAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAAXhJ82k9AwQ6xP5SPlGruAT5HLa2SHYxVJBkbPjIV9usAAAASAAAAATiT8wcJ/e4h6qzJWsey0/0/TNR/ylzrUsnNTvB76MlYAAAACgAAAAAAAAAAAAAAAAAAAAAAAAASAAAAATSJ9RpUlJ3d3PYEKi6PdQhq1d2gHoZiD5kRY72kXsVeAAAAAQAAAAAAAAAAAAAAAbZkFEAPcIVE9d1zDVF8PMyJNfXeZQoEcTc/O3ZMwOXYAAAAB2FwcHJvdmUAAAAABAAAABIAAAAAAAAAAF4SfNpPQMEOsT+Uj5Rq7gE+Ry2tkh2MVSQZGz4yFfbrAAAAEgAAAAE4k/MHCf3uIeqsyVrHstP9P0zUf8pc61LJzU7we+jJWAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAE0ifUaVJSd3dz2BCouj3UIatXdoB6GYg+ZEWO9pF7FXgAAAAAAAAAAAAAAAA==",
423
+ "networkPassphrase": "Test SDF Network ; September 2015",
424
+ "expected": {
425
+ "owner": "GBPBE7G2J5AMCDVRH6KI7FDK5YAT4RZNVWJB3DCVEQMRWPRSCX3OXSU5",
426
+ "token": "CC3GIFCAB5YIKRHV3VZQ2UL4HTGISNPV3ZSQUBDRG47TW5SMYDS5RNST",
427
+ "spender": "CA4JH4YHBH664IPKVTEVVR5S2P6T6TGUP7FFZ22SZHGU54D35DEVQ4T2"
428
+ }
429
+ },
430
+ "error": {
431
+ "class": "RevokeAllowanceVerificationError",
432
+ "code": "revoke_foreign_contract",
433
+ "message": "This transaction references a contract other than the token or the spender."
434
+ }
435
+ }
436
+ ]
437
+ }