1import { Ownership } from '@urbit/roller-api';
3export const getProxyAndNonce = (
6): { proxy?: string; nonce?: number } =>
7 owner.managementProxy?.address === address
8 ? { proxy: 'manage', nonce: owner.managementProxy.nonce }
9 : owner.owner?.address === address
10 ? { proxy: 'own', nonce: owner.owner.nonce }
11 : owner.spawnProxy?.address === address
12 ? { proxy: 'spawn', nonce: owner.spawn?.owner.nonce }
13 : owner.votingProxy?.address === address
14 ? { proxy: 'vote', nonce: owner.votingProxy?.owner.nonce }
15 : owner.transferProxy?.address === address
18 nonce: owner.votingProxy?.nonce,
20 : { proxy: undefined, nonce: undefined };
22export const getManagementNonce = (
25): { nonce?: number; proxy?: string } | undefined =>
26 owner.managementProxy?.address === address
27 ? { nonce: owner.managementProxy.nonce, proxy: 'manage' }
30export const getTransferNonce = (
33): { nonce?: number; proxy?: string } | undefined =>
34 owner.transferProxy?.address === address
35 ? { nonce: owner.transferProxy.nonce, proxy: 'transfer' }
38export const getOwnerNonce = (
41): { nonce?: number; proxy?: string } | undefined =>
42 owner.owner?.address === address
43 ? { nonce: owner.owner.nonce, proxy: 'own' }
46export const getSpawnNonce = (
49): { nonce?: number; proxy?: string } | undefined =>
50 owner.spawnProxy?.address === address
51 ? { nonce: owner.spawnProxy.nonce, proxy: 'spawn' }
54export const getVotingNonce = (
57): { nonce?: number; proxy?: string } | undefined =>
58 owner.votingProxy?.address === address
59 ? { nonce: owner.votingProxy.nonce, proxy: 'vote' }
62export const increaseProxyNonce = (
65): Ownership | undefined =>
70 ...owner.managementProxy,
71 nonce: owner.managementProxy?.nonce
72 ? owner.managementProxy?.nonce + 1
81 nonce: owner.owner?.nonce ? owner.owner?.nonce + 1 : 1,
89 nonce: owner.spawnProxy?.nonce ? owner.spawnProxy?.nonce + 1 : 1,
97 nonce: owner.votingProxy?.nonce ? owner.votingProxy?.nonce + 1 : 1,
100 : 'transfer' === proxy
104 ...owner.transferProxy,
105 nonce: owner.transferProxy?.nonce
106 ? owner.transferProxy?.nonce + 1
112export const setProxyNonce = (
116): Ownership | undefined =>
121 ...owner.managementProxy,
149 : 'transfer' === proxy
153 ...owner.transferProxy,
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list